Army Men RTS Tools, Mods n Work

Tools n Mods

dbghelp

dbghelp.zip copy & replace the two files inside the zip to "Army Men RTS\library\dbg"

dbghelp.dll is a dll wrapper for the real dbghelp.dll (renamed to dbghelp_r.dll)

This loads studio.dll whilst passing all calls to dbghelp_r, this also fixes ths MiniDumpWriteDump error

This error due to modern AMD drivers trying to call funcs that aren't in the older versions of dbghelp.dll

DBG Installation Guide

Studio

studio.zip copy the files inside the zip to the main directory of Army Men RTS

studio.dll contains the code that is used to launch studio + all extra features added back into the game

List of features

  • Studio (the official map editor)
  • Added vars
    • terrain.toggle.shroud
  • Added cmds
    • coregame.createobj
    • coregame.listobjs
    • coregame.listoffmap
    • coregame.listbyclassid
    • coregame.listclusters
    • coregame.listunits
    • coregame.removeobj
    • coregame.addobj
  • Added ConsoleEdit back
  • Hooked functions
    • InitBuckets (0x432010)
    • Hooked function, changed args by x4 to increase mem limits
    • CoreGameInit (0x53D710)
    • Hooked to call VarSys::CreateCmd to add old cmds back
  • Oh yeah also added LUA

Work...

Where it started

slight warning i've had to teach myself how to write n spell etc so somethings/wordings might be wrong
this will also be updated time to time until this message is gone

prep yourself for either a long incoherent story or the short ver

So to start, Army Men RTS was probally the first pc game I've ever played. I had gotten a copy of it
after my dad had brought a pc back from base that was going to be scrapped, he brought it home and after setting it up for me
there were a few games on the desktop and amrts was one of them.
I Launched the game and since then I've been messing around with it since then.
Over the years I messed around with the cfg files trying to see if i could change stuff with the game etc
but to no avail.

Fast forward to around September 2019 where I randomly found the game on steam, with some reverse engineering knowledge
I decided to give it a go, after a while I had used the DR2 (Dark Reign 2) source code leak to help with the reverse engineering as
amrts was built off of DR2

First what I had done was a lot of string searches to find the functions that were used to register studio and launch it
and had eventually found what I had needed, But when changing the Main function to register/call studio "worked" but the game was very broken

This is what it looks like before

At the time I was looking a lot of src & reversed srcs from different game/tools/malware etc to see how they work.
Well at the current time I was looking at some GTA: San Andreas either a multiplayer mod or just a mod on github.
This is where I had found out that you could call functions via memory addresses.
From the way the mod had called cheat functions in GTA: SA, I thought what if I tried it and well that was that.
After a little work I had this.


So basically reversed engineer the game after years of fukin about here is the code below lolz, I learnt calling funcs from a GTA: SA mod or mp src
(at this time I can't find the github or the zip where the src was in (its was some folder I had from like 6-7yrs ago)

Note: this was the first iteration of studio so somethings could be written better etc

#define ScanAddress(Address) (Address - 0x400000 + (DWORD)GetModuleHandle("AMRTS.exe"))

typedef int(*StudioProcess) (void);
StudioProcess StudioPrss = (StudioProcess)(ScanAddress(0x5D02B0));

typedef int(__cdecl *StudioInt) (void);
StudioInt StudioInit = (StudioInt)(ScanAddress(0x5D01E0));

typedef void(__cdecl *StudioDN) (void);
StudioDN StudioDone = (StudioDN)(ScanAddress(0x5D0270));

typedef void(__cdecl *StudioPostInt) (void);
StudioPostInt StudioPostInit = (StudioPostInt)(ScanAddress(0x5D0260));

DWORD Something = 0x007288E0;

void LoadStudioStuff()
{
    RegRunCode((DWORD *)Something, "Studio", (int)StudioPrss, (int)StudioInit, (int)StudioDone, (int)StudioPostInit, 0);//Register runcode
    
    RunCodesSet((DWORD *)Something, 0xCB860660);//Set runcode to studio (0xCB860660)
}

After this compile it into a DLL(32-bit) n use your favorite injector

LUA integration???

So yeah we have LUA integrated into Army men RTS and whit that it has allowed me to write
a modding api, with this the small community that exists for this game would allow them to write their
own indepth mods allowing more access/modification to the game.

baller