Robot Arena > Modifications

Robot Arena 2: Component Freedom (remove 7-component limit!)

(1/25) > >>

Serge:
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 limitDownload 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: ---.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]
--- End code ---

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

cephalopod:
Oh you.
Thanks for returning with gifts yet again Serge, always awesome to see you back. :)

R01:
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.

DeadGenocide:
YEEEEEEEEEEEEEEEEES!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks Serge

Thyrus:
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?

Navigation

[0] Message Index

[#] Next page

Go to full version