Studio Breakthrough

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

Studio Breakthrough

Post by DavidTheTech »

I have unlocked studio mode but all I need is help fixing brush configs

this is the error Image

and here is proof of studio

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: Studio Breakthrough

Post by TommyCD1 »

It's the definition for the brush that is missing. In DR2 it's defined through the source code and in ARMTS it doesn't exist at all...

If we knew how the source code translated into ingame language we could maybe restore the brushes, but as it stands now we can't modify the game engine and so we cannot restore the studio to the ARMTS build. It's best to simply mod the DR2 studio and use that instead.
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: Studio Breakthrough

Post by DavidTheTech »

I can modify the games code that's what I've been doing for some time now
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: Studio Breakthrough

Post by TommyCD1 »

If you can then can you reinstert the studio code from the DR2 source code? That should at least allow the studio to boot.
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: Studio Breakthrough

Post by DavidTheTech »

DR2 Brush file
Image

AMRTS Brush
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: Studio Breakthrough

Post by TommyCD1 »

So you can't? I know obviously one is formatted differently, but can you not change the parameters of the ARMTS code?
Why not look at the DR2 exe the same way you look at the amrts code?
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: Studio Breakthrough

Post by DavidTheTech »

Its all there the entire studio code is in amrts i've checked i do look at dr2 exe as well but the error is something different which is confusing me and asking if anyone knows whats wrong
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: Studio Breakthrough

Post by TommyCD1 »

The error is that the brush is not defined.
Normally when writing a new brush it looks like this:

Code: Select all

CreateControl("Brush::Terrain", "Brush::Config")
{
  ReadTemplate("Brush::Common");
  Text("Terrain");

  // Invisible control to align to
  CreateControl("Align", "Static")
  {
    Style("Transparent");
    Geometry("HCentre", "ParentWidth");
    Size(-4, 0);
  }

  // Should the brush draw heights
  CreateControl("Deform", "Tool::ToggleAlignButton")
  {
    UseVar("$<.drawheight");
  }
Notice how the class of the module is "Brush::Config".
Now all classes are defined somewhere in the game. For example in the interface for the sound settings:

Code: Select all

    CreateControl("Notches", "Game::Notches")
    {
      Align("<VolumeMaster");
    }
The class is "Game::Notches" which is defined earlier in the ingame.x file.

Code: Select all

ConfigureInterface()
{
  DefineControlType("Game::Notches", "Static")
  {
    Geometry("Bottom", "HInternal");
    Style("Transparent");
    Pos(0, 1);
    Size(302, 12);

    CreateControl("LeftNotch", "Static")
    {
      ColorGroup("Sys::Texture");
      Image("if_interfacealpha_game.tga", 56, 14, 7, 11);
      Size(7, 11);
    }
    CreateControl("RightNotch", "Static")
    {
      Geometry("Right");
      ColorGroup("Sys::Texture");
      Image("if_interfacealpha_game.tga", 63, 14, 7, 11);
      Size(7, 11);
    }
    CreateControl("Notch1", "Static")
    {
      Pos(24, 0);
      ColorGroup("Sys::Texture");
      Image("if_interfacealpha_game.tga", 28, 10, 3, 5);
      Size(3, 5);
    }
    CreateControl("Notch2", "Static")
    {
      Pos(49, 0);
      ColorGroup("Sys::Texture");
      Image("if_interfacealpha_game.tga", 28, 10, 3, 5);
      Size(3, 5);
    }
The problem is that the class of "Brush::Config" is not defined anywhere in AMRTS. In DR2, it's defined through the source code itself, in the same way that basic classes like "Static" "Window" or "MultiPlayer::Players::Slot" are defined.

If we knew how the source code translated into ingame language, we could theoretically redefine the class in the same way that "Game::Notches" is defined.
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: Studio Breakthrough

Post by DavidTheTech »

I give up
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
DavidTheTech
Programmer
Programmer
Posts: 30
Joined: Sat Sep 14, 2019 3:55 am
Location: anywhere
Contact:
Ireland

Re: Studio Breakthrough

Post by DavidTheTech »

I redact my claim of giving i was just tired

the brushes are defined in the source code

in studio_brush_terraintweak.cpp in dr2

Code: Select all

TerrainTweak::TerrainTweak(const char *name) : ApplyCell(name)
    {
      // Create interface vars
      varVertexColor1 = CreateInteger("vertexColor1", Color((S32)64, (S32)128, (S32)64));
      varVertexColor2 = CreateInteger("vertexColor2", Color((S32)255, (S32)255, (S32)255));
      varColorScale = CreateFloat("colorScale", 0.3f, 0.001f, 1.0f);
      varSmoothFloor = CreateInteger("smoothFloor", FALSE);
    }
in AMRTS

Code: Select all

int __thiscall sub_5D7050(int this, char *a2)
{
  int v2; // esi@1

  v2 = this;
  sub_5E56C0(this, a2);
  *(_DWORD *)v2 = &off_671008;
  *(_DWORD *)(v2 + 336) = sub_5BCF50((void *)v2, (int)aVertexcolor1, -12550080, 2147483648, 0x7FFFFFFF);
  *(_DWORD *)(v2 + 340) = sub_5BCF50((void *)v2, (int)aVertexcolor2, -1, 2147483648, 0x7FFFFFFF);
  *(_DWORD *)(v2 + 344) = sub_5BD020((void *)v2, (int)aColorscale, 1050253722, 981668463, 1065353216);
  *(_DWORD *)(v2 + 348) = sub_5BCF50((void *)v2, (int)aSmoothfloor, 0, 2147483648, 0x7FFFFFFF);
  return v2;
}
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests