Author Topic: Robot Arena 2: Component Freedom (remove 7-component limit!)  (Read 48192 times)

Offline Serge

  • *
  • Posts: 1530
  • Rep: 13
    • View Profile
    • http://www.q3k.org/
    • Awards
Robot Arena 2: Component Freeedom

I finally sat down and managed to remove the 7-component limit in an hour or so. Feels good. It took, what, only a couple of years? And I have a few other things brewing as well...

v.2.0 - Final
Status: Released!
Features:
  • Removes 7 component chain limit
  • Allows attachment of components to any type of attachment points (including slave points)
  • Allows intersection with other components
  • Removes mass limit
Download link: --> GTM Downloads Link <--

To install, extract anywhere and read the included 'README (seriously!)'.txt file. You will be able to choose from a SergePatcher based version and a static .exe version.

v.1.0 - Teaser
Status: Obsolete.
Features:
  • Removes 7 component chain limit
  • Removes robot mass limit
  • No SergePatcher version :(

Screenshots / Proof

7-component limit removal:


Attachment point type restriction removal:


Technical details

Here was the procedure for finding the relevant 7-component-limit-code:
  • Get a working debugger (in my case, winedbg, because the game suddenly started working under wine)
  • Do some basic static analysis off strings and shit to find sub_42c850 (I call it BotLab::ComponentCursorMoved)
  • Bisect with a debugger the point at which breakpoints only trigger on placeable components, find that point to be the return value of sub_4dcd50 (I call it BotLab::CanPlaceComponent)
  • Follow with a debugger (via vtable call) to sub_45e9d0, which I call Component::CanAttach, find comparison
  • ????
  • PATCH!

Code: [Select]
.text:0045E9D0 ; =============== S U B R O U T I N E =======================================
.text:0045E9D0
.text:0045E9D0 Component::CanAttach proc near        ;
.text:0045E9D0
.text:0045E9D0                 sub     esp, 38h
.text:0045E9D3                 push    esi
.text:0045E9D4                 mov     esi, ecx
.text:0045E9D6                 push    edi
.text:0045E9D7                 mov     edi, [esp+40h+arg_4]
.text:0045E9DB                 mov     eax, [esi]
.text:0045E9DD                 push    edi
.text:0045E9DE                 call    dword ptr [eax+40h]
.text:0045E9E1                 test    al, al
.text:0045E9E3                 jz      loc_45EB04
.text:0045E9E9                 cmp     dword ptr [esi+0E4h], 7
.text:0045E9F0                 jge     loc_45EB04
.text:0045E9F6                 mov     ecx, edi
.text:0045E9F8                 call    sub_416930
.text:0045E9FD                 mov     ecx, [esp+40h+arg_8]
.text:0045EA01                 push    eax
.text:0045EA02                 lea     edx, [esp+44h+var_28]

The interesting comparison is, of course, at 0x0045E9E9. To remove the limit, I patched the following jge to 6x NOP, so:
0x5E9F0: 0F 8D 0E 01 00 00 -> 90 90 90 90 90 90

And, of course, to remove the mass limit we apply the old sergepatcher mod (see sergepatcher_mass.py), but statically:
0x2F7BA: 75 06 -> EB 06
« Last Edit: June 04, 2016, 04:00:53 PM by Serge »
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline cephalopod

Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #1 on: May 01, 2016, 02:27:21 PM »
Oh you.
Thanks for returning with gifts yet again Serge, always awesome to see you back. :)
bristol bot builders / two headed death flamingo / snappy robots
//
kindest and friendliest '13, '15, '16, '17 / favourite staff member '14, '15

Offline R01

  • Heavyweight
  • Posts: 769
  • Rep: 1
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #2 on: May 01, 2016, 02:31:44 PM »
Amazing, you talk about this about an hour ago and now you already have done it, truly a legend, also thanks for doing the patch version/explaining how we do this as this allows us to use this together with other mods/on future "releases". Would've said "time to break some rules" and increase your reputation if I could, but looks like someone has already done that.
Tournament History:
Showcases:
https://gametechmods.com/forums/index.php?topic=18882.0
https://gametechmods.com/forums/index.php?topic=19197.0

Offline DeadGenocide

  • Yesweight
  • Heavyweight
  • Posts: 500
  • Rep: -12
  • "Fast and Furious." - Stock Team SPARK
    • UCe_o8LyJBuavehO3pRU5ilg
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #3 on: May 01, 2016, 02:36:15 PM »
YEEEEEEEEEEEEEEEEES!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks Serge
i'm only a finalist in BBEAMS 7 which was a meme tournament and I just stole a NAR AI bot and made it dense as ****.
and Not Bushido was a thing that happened, I beat the #1 seed despite being #bad seed.

Offline Thyrus

  • *
  • Posts: 6218
  • Rep: 19
  • Back to purple '17
    • http://www.youtube.com/Th
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #4 on: May 01, 2016, 02:36:44 PM »
That is a rather nice supprise there. Well done Sir.

That reminds me: Can we make a RA2 Complete Version or Version 1.41 with all the helpfull mods?
Or a DSL version with things like this and narmour be gone and stuff?

Offline Mr. AS

  • TheGloriousCarbideArstotzkanIronsideChaosProtocol
  • *
  • Posts: 7558
  • Rep: 19
    • robotarenagtm
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #5 on: May 01, 2016, 02:41:00 PM »
My AV started having a hissy fit when I tried to download it.



Probably a false positive since I was able to run it just fine after disabling my AV, downloading it and then re-enabling the AV, but I thought I'd just let you know.

It should be interesting to see if tourney hosts allow people to bypass rule of 7 on thier entries or not.
How you make Alarm Clock Pizza is:
Step 1: You buy an alarm clock from the store, and then you have to break it and put it in the sauce.
Step 2: Fold the sauce in 5 slices and put it in the dough.
Step 3: Paint the eggs with a pitcher of a clock showing what time you want to wake up and eat pizza for breakfast.
Step 4: Put the eggs in the dough.
Step 5: Make it flat into a round shape and draw the time you want on it.
Step 6: Put some old steel to prevent other peple from stealing it.
Step 7: Make it flat and cut into 60 slices 1 for each minute in 1 our.
Step 8: Put in the oven set the timer to 30048813.2884 seconds and put the temperature on 'Volcano' setting.
Step 9: If you think it is take to long, then get yor alarm clock and set it to now so that it will ring and you can take it out.
Step 10: Take it out uv the uvin wen it is redy and go to bed. In the morning eat pizza and also eat yor hands bi mistake.

Offline R01

  • Heavyweight
  • Posts: 769
  • Rep: 1
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #6 on: May 01, 2016, 02:42:09 PM »
My AV started having a hissy fit when I tried to download it.

(Image removed from quote.)

Probably a false positive since I was able to run it just fine after disabling by AV and downloading it, but I thought I'd just let you know.

It should be interesting to see if tourney hosts allow people to bypass rule of 7 on thier entries or not.
Probably because the .exe has been modified in an odd way, quite a lot of hacking tools(and with hacking I mean game editing ones) seem to trigger antiviruses. Also the thing about tournaments is exactly what I thought.
Tournament History:
Showcases:
https://gametechmods.com/forums/index.php?topic=18882.0
https://gametechmods.com/forums/index.php?topic=19197.0

Offline Serge

  • *
  • Posts: 1530
  • Rep: 13
    • View Profile
    • http://www.q3k.org/
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #7 on: May 01, 2016, 02:45:24 PM »
Probably a false positive since I was able to run it just fine after disabling my AV, downloading it and then re-enabling the AV, but I thought I'd just let you know.

It's a Smart Feature (tm) by Avast that triggers when you download from a little known site (ie., mine). According to their forums:

Quote
Hi,
DomainRep is a new feature of Avast, so let me explain a bit. It blocks EXE files downloads if these conditions are *all* met:
1. The file is not prevalent enough, ie. not enough Avast users launched the file yet,
2. The domain is not prevalent enough, ie. not enough Avast users downloaded (any) EXE files from the domain yet,
3. The file is not signed or Avast does not trust the signature.

Sorry about that. If someone from GTM packs this into a .zip and uploads it to the site downloads, I'll update links to point there instead.
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline yugitom

  • *
  • Posts: 2378
  • Rep: 17
  • Google Garry's Wars
    • TheYuGiTom
    • View Profile
    • Awards
  • Skype: nanwiththeplan
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #8 on: May 01, 2016, 02:46:45 PM »
You're awesome, Serge :D

It should be interesting to see if tourney hosts allow people to bypass rule of 7 on thier entries or not.
I'm thinking about this, as well. Hosts would probably have to wait until people start showcasing bots that use this to see if it can lead to absurd and/or op results. IRL tournaments will probably be the ones that use it almost all the time.

Offline Avalanche

  • Retired.
  • Ultra Heavyweight
  • Posts: 3109
  • Rep: -34
  • Yeah, I don't know why I'm still here either.
    • View Profile
    • Awards
  • Discord: ThePootisPower#8377
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #9 on: May 01, 2016, 02:57:07 PM »
This will be utterly brilliant for IRL builders.
Former DSL HW champion.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.
Robogames 1 BW Runner-up.
Professional cunt.
Man of a thousand alt accounts.

Offline R01

  • Heavyweight
  • Posts: 769
  • Rep: 1
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #10 on: May 01, 2016, 03:01:11 PM »
Probably a false positive since I was able to run it just fine after disabling my AV, downloading it and then re-enabling the AV, but I thought I'd just let you know.

It's a Smart Feature (tm) by Avast that triggers when you download from a little known site (ie., mine). According to their forums:

Quote
Hi,
DomainRep is a new feature of Avast, so let me explain a bit. It blocks EXE files downloads if these conditions are *all* met:
1. The file is not prevalent enough, ie. not enough Avast users launched the file yet,
2. The domain is not prevalent enough, ie. not enough Avast users downloaded (any) EXE files from the domain yet,
3. The file is not signed or Avast does not trust the signature.

Sorry about that. If someone from GTM packs this into a .zip and uploads it to the site downloads, I'll update links to point there instead.
I do hope that this feature can be disabled in avast, gotta hate that such unneeded features get added just because there are "brain dead" people out there that DL everything and then complain that windows is full of viruses that appear out of nowhere.
Tournament History:
Showcases:
https://gametechmods.com/forums/index.php?topic=18882.0
https://gametechmods.com/forums/index.php?topic=19197.0

Offline Serge

  • *
  • Posts: 1530
  • Rep: 13
    • View Profile
    • http://www.q3k.org/
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #11 on: May 01, 2016, 03:09:28 PM »
So yes, I was able to also patch being able attach anything to anything... I could also patch being able to intersect components.

Now I'm really not sure whether I should release this. I'm afraid RA2 will never be the same afterwards.



Elders of the community, what to do?

EDIT: Decided to release this on the 26th. See original post.
« Last Edit: May 02, 2016, 08:17:44 AM by Serge »
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline Sircreepalot2

  • Lightweight
  • Posts: 226
  • Rep: 4
  • So how about that airline food?
    • View Profile
    • Awards
  • Skype: Logan Keys
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #12 on: May 01, 2016, 03:13:20 PM »
no one man should have all that power
"You've heard the hymns, whispered throughout the lands. 
ooo macho madness oo o macho madness
OOO MACHO MADNESS OO O MACHO MADNESS"
                      -Macho Man Randy Savage

2nd place in Plan B- mcfreakinloseit

Offline cephalopod

Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #13 on: May 01, 2016, 03:13:42 PM »
I don't think releasing those will benefit the community, honestly. Could cause more harm than good, decreasing the skill needed for certain builds, but equally as long as the rules for tournaments/building styles are clear, it might not make a lot of difference...
At the end of the day, this is all yours to do as you wish with.
bristol bot builders / two headed death flamingo / snappy robots
//
kindest and friendliest '13, '15, '16, '17 / favourite staff member '14, '15

Offline R01

  • Heavyweight
  • Posts: 769
  • Rep: 1
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #14 on: May 01, 2016, 03:16:24 PM »
So yes, I was able to also patch being able attach anything to anything... I could also patch being able to intersect components.

Now I'm really not sure whether I should release this. I'm afraid RA2 will never be the same afterwards.

(Image removed from quote.)

Elders of the community, what to do?
Nice, both of those things can be set in the components file, right?(for my mod I'll definitely allow weapon to chassis clipping and I'd love to allow attaching everything to everything) I think this could be RA 2.5(funny enough my mod was aiming to be that).
Tournament History:
Showcases:
https://gametechmods.com/forums/index.php?topic=18882.0
https://gametechmods.com/forums/index.php?topic=19197.0

Offline Mr. AS

  • TheGloriousCarbideArstotzkanIronsideChaosProtocol
  • *
  • Posts: 7558
  • Rep: 19
    • robotarenagtm
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #15 on: May 01, 2016, 03:16:44 PM »
You should just go full yolo and release it anyway. BFE made it so RA2 "was never the same afterwards" but BFE is also banned from most tournies. I'm sure we'll be able to assess if this would be allowed or not.

If you're gonna go ham on patching things, you should get rid of the maxsphere. It should be pretty much the same method of patching it out as making components intersect, shouldn't it?
How you make Alarm Clock Pizza is:
Step 1: You buy an alarm clock from the store, and then you have to break it and put it in the sauce.
Step 2: Fold the sauce in 5 slices and put it in the dough.
Step 3: Paint the eggs with a pitcher of a clock showing what time you want to wake up and eat pizza for breakfast.
Step 4: Put the eggs in the dough.
Step 5: Make it flat into a round shape and draw the time you want on it.
Step 6: Put some old steel to prevent other peple from stealing it.
Step 7: Make it flat and cut into 60 slices 1 for each minute in 1 our.
Step 8: Put in the oven set the timer to 30048813.2884 seconds and put the temperature on 'Volcano' setting.
Step 9: If you think it is take to long, then get yor alarm clock and set it to now so that it will ring and you can take it out.
Step 10: Take it out uv the uvin wen it is redy and go to bed. In the morning eat pizza and also eat yor hands bi mistake.

Offline R01

  • Heavyweight
  • Posts: 769
  • Rep: 1
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #16 on: May 01, 2016, 03:22:42 PM »
You should just go full yolo and release it anyway. BFE made it so RA2 "was never the same afterwards" but BFE is also banned from most tournies. I'm sure we'll be able to assess if this would be allowed or not.

If you're gonna go ham on patching things, you should get rid of the maxsphere. It should be pretty much the same method of patching it out as making components intersect, shouldn't it?
I think similar as well, mostly because this would allow many possibilities and since it's just a patch people can still go back to vanilla RA2 and/or block certain of those mods in tournaments, best example would be stock(even if it's common to use glitches there) you still see normal bots in Ra's community and mods like DSL and Ironforge which don't use those.

Also would it be possible to set the component limit to a new number(so instead of 7 it's 20)?
Tournament History:
Showcases:
https://gametechmods.com/forums/index.php?topic=18882.0
https://gametechmods.com/forums/index.php?topic=19197.0

Offline Naryar

  • Posts: 23283
  • Rep: 21
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #17 on: May 01, 2016, 04:05:45 PM »
Wow. This is ****ing awesome !

And yes, release everything.

Offline Avalanche

  • Retired.
  • Ultra Heavyweight
  • Posts: 3109
  • Rep: -34
  • Yeah, I don't know why I'm still here either.
    • View Profile
    • Awards
  • Discord: ThePootisPower#8377
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #18 on: May 01, 2016, 04:42:12 PM »
Release everything, Hax Mode could and looked set to really f up ra2, but tournament hosts nipped it in the bud. No reason to fear.
Former DSL HW champion.
Runner-Up in The Cybernetic Colosseum HW division.
Semi-finalist in RNP: Sword of Glory.
Robogames 1 BW Runner-up.
Professional cunt.
Man of a thousand alt accounts.

Offline Sage

  • *
  • Posts: 6182
  • Rep: 11
  • RA2 Wizard & GTM's Favorite Stock Builder 2015
  • Awards Sage's Favorite BOTM Winner
    • View Profile
    • Awards
Re: Robot Arena 2: Component Freedom (remove 7-component limit!)
« Reply #19 on: May 01, 2016, 05:03:59 PM »
nice. good work

You got my vote for RA2 Wizard. Always and forever.