I Have Unlocked Studio After Years of Hard Work

Talk about anything that has to do with the Game.
DavidTheTech
Programmer
Programmer
Posts: 30
Joined: Sat Sep 14, 2019 3:55 am
Location: anywhere
Contact:
Ireland

I Have Unlocked Studio After Years of Hard Work

Post by DavidTheTech »

If you want direct contact where I can guarantee I will respond, message me on discord: DavidTheTech#5888

NEWEST UPDATE
To use studio easier without Anti-Virus crying use this
viewtopic.php?f=10&t=2827

MASSIVE UPDATE
You will need https://github.com/master131/ExtremeInjector/releases
and this https://mega.nz/file/9h5BTDID#uByrYvwd6 ... Hp6j-HROT0

This studio version fixes all errors with my old version

Download extreme injector click settings and click auto inject and load the AMRTSSTUDIO.dll and open the game
watch the video below if you need help

[YouTube]https://youtu.be/7tw5OXFeZJ8[/YouTube]



UPDATE:
I am going to attempt to re-implement studio mode through a injectable c++ dll, This should hopefully fix all errors with studio mode and allow you to play the maps



I would Like to say that after years of me messing with the game and only taking this serious on the 14th of September I am happy to announce that I, David Fedrick Have finally unlocked studio mode for Army Men RTS

Brush definitions were all there
I have finally unlocked it here is proof

Image

Ignore the black box in the middle of the screen and taskbar i took a printscreen but it didnt take it until i alt tabbed


So if anyone wants studio here is a few things to know first you cant test the mission you'll have to save it and then open a different copy of the AMRTS.exe because I had to change a few things to get it to work

to launch studio all you need to do is launch the AMRTS_STUDIO.exe

https://mega.nz/#!9ggnBaRC!9gohUi0E5-Rb ... YW0G3B2pzM

FIXED RUNCODES

This can now be launched in the missions tab in the top right corner of the main menu

Needs a bit of fixing first before I will release(it doesnt open it needs to have the runcodes in the right order and doing this one op code at a time is a pain)

Image
Last edited by DavidTheTech on Fri Apr 09, 2021 9:04 am, edited 7 times in total.
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
User avatar
TommyCD1
Moderator
Moderator
Posts: 1144
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: I Have Unlocked Studio After Years of Hard Work

Post by TommyCD1 »

Nice job. Can you tell us exactly what you've gone through to do this? Know what's been changed can help us to utilize it better.

Can you actively trouble shoot this? I'd like to know some things about it.
  • Why do some props appear as completely black, even though they are not flesh colored?
  • Why does the connected regions button crash the studio?
  • Why do single player missions crash the studio?
  • Why are there no options to set video settings?
  • Why does the mini-map not work?
  • Can you also restore the console? (Shift + Alt + F10)
  • Why do Sarge and the Bulldozer still appear even after a side is Fixed?
  • Why does attempting to exit normally crash?
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
DavidTheTech
Programmer
Programmer
Posts: 30
Joined: Sat Sep 14, 2019 3:55 am
Location: anywhere
Contact:
Ireland

Re: I Have Unlocked Studio After Years of Hard Work

Post by DavidTheTech »

Why do some props appear as completely black, even though they are not flesh colored?
This is due to lighting should be able to change this in studio


Why does the connected regions button crash the studio?
because it needs to be setup

Why do single player missions crash the studio?
because the runcodes were removed to allow studio

Why are there no options to set video settings?
Dont know

Why does the mini-map not work?
lighting issues

Can you also restore the console? (Shift + Alt + F10)
maybe depends if i can figure out whats up with it

Why do Sarge and the Bulldozer still appear even after a side is Fixed?
not sure

Why does attempting to exit normally crash?
not sure


I will be redoing the entire thing to hopefully fix issues and allow to play and test the missions

here is the changes

in DR2 gamegod.cpp is the following

Code: Select all

void Init()
  {
    ASSERT(!initialized)

    // Never seen original CD
    seenOriginal = FALSE;

    // See if it's there now
    FindOriginalCD();

    // Register command handler
    VarSys::RegisterHandler("gamegod", CmdHandler);
    VarSys::RegisterHandler("gamegod.missions", CmdHandler);
    VarSys::RegisterHandler("gamegod.flow", CmdHandler);
    VarSys::RegisterHandler("gamegod.loader", CmdHandler);

    // Create items
    VarSys::CreateCmd("gamegod.verify");
    VarSys::CreateCmd("gamegod.dosafeload");
    VarSys::CreateCmd("gamegod.setterraingroup");
    VarSys::CreateCmd("gamegod.setnewmapsize");

    VarSys::CreateInteger("gamegod.check.types", 0, VarSys::DEFAULT, &checkTypes);
    VarSys::CreateInteger("gamegod.check.objects", 0, VarSys::DEFAULT, &checkObjects);

    VarSys::CreateCmd("gamegod.missions.select");
    VarSys::CreateCmd("gamegod.missions.launch");
    VarSys::CreateCmd("gamegod.missions.replay");
    VarSys::CreateCmd("gamegod.missions.next");
    VarSys::CreateCmd("gamegod.missions.current");
    VarSys::CreateCmd("gamegod.missions.progress");

    VarSys::CreateInteger("gamegod.studiomode", 0, VarSys::DEFAULT, &studioEnabled);

    VarSys::CreateString("gamegod.flow.action", "", VarSys::DEFAULT, &flowAction);
    VarSys::CreateString("gamegod.flow.state", "", VarSys::DEFAULT, &flowState);

    VarSys::CreateString("gamegod.loader.system", "", VarSys::DEFAULT, &Loader::system);
    VarSys::CreateFloat ("gamegod.loader.percent", 0.0F, VarSys::DEFAULT, &Loader::percent)->SetFloatRange(0.0F, 1.0F);

    // System now initialized
    initialized = TRUE;

    // Initialize game-specific core systems
    Sound::Init();
    Sound::Digital::Claim();
    Sound::Redbook::SetVolumeLabel(CD_LABEL_ORIGINAL);
    GameSound::Init();
    Orders::Init();
    ExecGameConfig();
    IFace::Init();
    GameTime::Init();
    Game::RC::Init();
    Sync::Init();
    Difficulty::Init();
    Campaigns::Init();
    Missions::Init();
    User::Init();
    Demo::Init();
    SaveGame::Init();
    Sides::Init();
    Mods::Init();
    MultiPlayer::Init();
 
    //Win32Reg::Update();

    Vid::InitIFace();
    Mesh::Manager::InitIFace();

    // Register controls
    IFace::RegisterControlClass("Game::Login", CreateHandler);
    IFace::RegisterControlClass("Game::MissionSelection", CreateHandler);
    IFace::RegisterControlClass("Game::CampaignSelection", CreateHandler);
    IFace::RegisterControlClass("Game::SaveLoad", CreateHandler);
    IFace::RegisterControlClass("Game::DifficultyList", CreateHandler);
    IFace::RegisterControlClass("Game::AddonList", CreateHandler);

    // Set the initial run code
    Main::runCodes.Set(0xA521E37B); // "Intro"
  }
well in AMRTS its same and i changed the following

Code: Select all

    // Set the initial run code
    Main::runCodes.Set(0xA521E37B); // "Intro"
into this

Code: Select all

    // Set the initial run code
    Main::runCodes.Set(0xCB860660); // "studio"
which was actually
c++

Code: Select all

return sub_4B6750((int)&unk_7288E0, 0xCB860660);
asm

Code: Select all

push    0CB860660h
.text:00403449                 call    sub_4B6750
.text:0040344E                 retn

I changed the runcode setup to allow studio due to studio using 4 functions as arguments as the rest uses 3
before

Code: Select all

int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
  void *v4; // ebx@0
  double v5; // st4@0
  double v6; // st5@0
  double v7; // st6@0
  double v8; // st7@0

  sub_4D6590();
  sub_4B3470(hInstance, (int)lpCmdLine);
  Main::runCodes_Register(&unk_7288E0, aStart, (int)sub_403E40, (int)sub_403DE0, (int)sub_403E70, 0, 0);
  Main::runCodes_Register(&unk_7288E0, aIntro, (int)sub_403FD0, (int)sub_403F10, (int)sub_404100, 0, 0);
  Main::runCodes_Register(&unk_7288E0, aShell, (int)sub_404170, (int)unknown_libname_12, (int)sub_404180, 0, 0);
  Main::runCodes_Register(&unk_7288E0, aMission, (int)unknown_libname_14, (int)sub_404190, (int)sub_404210, 0, 0);
  sub_4D0A60(sub_4038B0, v4, v5, v6, v7, v8);
  sub_4B34C0();
  return 0;
}

after

Code: Select all

int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
  void *v4; // ebx@0
  double v5; // st4@0
  double v6; // st5@0
  double v7; // st6@0
  double v8; // st7@0

  sub_4D6590();
  sub_4B3470(hInstance, (int)lpCmdLine);
  Main::runCodes_Register(&unk_7288E0, aStart, (int)sub_403E40, (int)sub_403DE0, (int)sub_403E70, 0, 0);
  Main::runCodes_Register(
    &unk_7288E0,
    aStudio,
    (int)unknown_libname_388,
    (int)Studio::Init,
    (int)Studio::Done,
    (int)Studio::PostInit,
    0);                                         // Added studio ignore the intro cause its there to auto trigger studio
  Main::runCodes_Register(&unk_7288E0, aShell, (int)sub_404170, (int)unknown_libname_12, (int)sub_404180, 0, 0);
  sub_4D0A60(sub_4038B0, v4, v5, v6, v7, v8);
  sub_4B34C0();
  return 0;
}
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
User avatar
TommyCD1
Moderator
Moderator
Posts: 1144
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: I Have Unlocked Studio After Years of Hard Work

Post by TommyCD1 »

So to start the studio in DR2 you would need to use this.

Code: Select all

-cmd:"gamegod.studiomode 1;sys.runcode studio"
So I guess that would satisfy sys.runcode. Can you figure out anything about gamegod.studiomode ? Maybe that would solve a few issues.

EDIT: Also I meant to ask if you only modified the .exe or the code itself? So in that case we can tweak around with the .cfg files a bit?
mmm
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
DavidTheTech
Programmer
Programmer
Posts: 30
Joined: Sat Sep 14, 2019 3:55 am
Location: anywhere
Contact:
Ireland

Re: I Have Unlocked Studio After Years of Hard Work

Post by DavidTheTech »

I think I just need to add the runcode stuff and start again as I know how to unlock it now

EDIT 1: all modification was done to the exe by using ida pro

EDIT 2: so mess with all of the .cfgs all you want tweak stuff

Image
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
User avatar
TommyCD1
Moderator
Moderator
Posts: 1144
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: I Have Unlocked Studio After Years of Hard Work

Post by TommyCD1 »

Well it's late for me here, but I will start working on updating the studio's interface and trying to fix some issues with it thru editing the cfg.

I had actually been working on a mod of the dr2 studio for sometime now, so I can probably use some of my stuffs from that here to quicken the process.
Attachments
DR2 screenshot 27.jpg
DR2 screenshot 8.jpg
DR2 screenshot 7.jpg
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
User avatar
E]x[F-Sniper
Admin
Admin
Posts: 1275
Joined: Wed Jul 16, 2008 2:21 am
Location: stfu noob
Contact:
Mexico

Re: I Have Unlocked Studio After Years of Hard Work

Post by E]x[F-Sniper »

It looks like it still needs some work but damn I give you props for doing what many have been trying to do for years. Do you plan on fixing some of the issues?
Image
User avatar
TommyCD1
Moderator
Moderator
Posts: 1144
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: I Have Unlocked Studio After Years of Hard Work

Post by TommyCD1 »

DavidTheTech wrote: Thu Oct 03, 2019 2:46 pm Can you also restore the console? (Shift + Alt + F10)
maybe depends if i can figure out whats up with it
So in the Dark Reign 2 studio, if you press Ctrl + Alt + F10 (not shift sorry) you would get a basic window that resembled the chat window in multiplayer. The main of the window would log all console output, as opposed to the multiplayer window which simply outputs player messages. My MP3 player actually uses a console viewer to display the current song. The entry at the bottom, however, allowed you to input console commands into the game. Actual commands, such as 'quit' or 'sound.player.next' or 'sys.runcode studio'.

The console input in DR2 looks like this:

Code: Select all

  CreateControl("Edit", "ConsoleEdit")
  {
    ReadTemplate("Std::Client");
    Geometry("ParentWidth", "Bottom");
    Size(0, 20);
    Font("Console");
    LinkViewer("<Viewer");
    CreateVarString("console");
    UseVar("$console");
  }
But in Army Men, when trying to make a module with the class "ConsoleEdit" then game simply crashes. However this is not a real crash I believe. The game actually forces itself closed, and displays a "fake" error message that simply reads "These bananas are making me thirsty".
Untitled.png
Untitled.png (8.75 KiB) Viewed 13410 times
Untitled.png
Untitled.png (8.75 KiB) Viewed 13410 times
I was wondering if, by doing something similar to here where you looked to see how DR2 did it, if you could perhaps circumvent the "fake crash" or find out why it stops itself like this?

And I KNOW this is so much to dump on you right now, but I mean getting studio to work is BIG. You're legendary! I just want to ask in a similar manner to the console issue, if you could also look into the infamous "chunks are dead baby" issue we have. If you need some more technical information about either of these I will be glad to help.
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
DavidTheTech
Programmer
Programmer
Posts: 30
Joined: Sat Sep 14, 2019 3:55 am
Location: anywhere
Contact:
Ireland

Re: I Have Unlocked Studio After Years of Hard Work

Post by DavidTheTech »

Yea im gonna try fix the issues and how did you manage to load a mission map or is it one you quickly made because if i try to load a map that is already in the game it crashes studio

and yes ill try fix all of the errors in the code and the error chunks are dead baby is to do with the model files in the game if they have been changed could be wrong though.

and the banana error i think is just a place holder error i wont be able to work on it until i get back from college cause this 19 yr old still gotta do work
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
User avatar
TommyCD1
Moderator
Moderator
Posts: 1144
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: I Have Unlocked Studio After Years of Hard Work

Post by TommyCD1 »

The sceenshots are from my current DR2 studio project, that's all. Also the AMRTS studio can still load multiplayer maps without crashing.

The "chunks are dead baby" error may actually be genuine, but I just wanted to know if you could circumvent the check for it to see what happens. We already know why the error occurs, and what causes it to. But we don't know how to get rid of it. Getting rid of the check in Army Men won't solve the issue, since the offending code is actually in the .god model file itself, but it would be interesting to see why they do not allow model chunking...

And also good luck with it all, including the college. :SWEET:
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests