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

Re: I Have Unlocked Studio After Years of Hard Work

Post by DavidTheTech »

Ahhhh.
Yes I will be able to remove/fix the errors I hope

Thank you, Good luck with what you're doing too
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
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 »

I changed this topic into a sticky so that you can just keep posting updates on here and it always stays on top. Also, congrats on your new status. ;) @DavidTheTech
Image
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 »

The chunks are dead baby I'm pretty sure is due to wrongful setup of a model file

Thank you E]x[F-Sniper I appreciate very much

DR2 graphics/meshload.cpp

This is the main part

Code: Select all

  // chunks
  chunkIndex = god->LoadU32();
  U32 chunkCount  = god->LoadU32();
  if (chunkCount)
  {
    chunkify = TRUE;

    chunks.Alloc( chunkCount);
    for (i = 0; i < chunkCount; i++)
    {
      chunks[i] = new MeshRoot;
      chunks[i]->Load( god);
      chunks[i]->isChunk = TRUE;

      static U32 chunknum = 0;
      NameString namebuf;
      sprintf( namebuf.str, "chunk%d", chunknum);
      chunknum++;

      if (!Mesh::Manager::SetupRoot( *chunks[i], namebuf.str))
      {
        ERR_FATAL( ("Error loading %s", namebuf.str));
      }
    }
  }

and in AMRTS

Code: Select all

  sub_429C40(v84, (const void **)v2, (int)v84, 0, 1);
  sub_44D9B0(v84->dword1B8);
  v101 = *(_DWORD *)v2 + 4;
  *(_DWORD *)v2 = v101;
  v102 = v101 + 4;
  v34 = *(_DWORD *)v101 == 0;
  *(_DWORD *)v2 = v101 + 4;
  if ( !v34 )
  {
    sub_4D1540((int)aDSrcCodeGrap_3, 764, 3);
    v102 = LOG_DXERR();                         // Chunks are dead baby
  }
  v103 = *(_DWORD *)v102;
  *(_DWORD *)v2 = v102 + 4;
  if ( v103 != -474265615 )
  {
    sub_4D1540((int)aDSrcCodeGrap_3, 770, 3);
    LOG_DXERR();                                // Corrupt GOD file
  }
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

Chunks are dead baby

Post by TommyCD1 »

Well, let me try to explain why "chunks are dead baby" happens to hopefully help explain what I want to happen.

In Dark Reign 2, models are determined by defining a .GOD file in the unit's .cfg.
The .GOD file is a "archive" or "compiled" set of .XSI meshes, each with their own animation. These .XSI files are named by the animation they are meant to correspond to, and the .GOD file uses the base .XSI mesh, and morphs its bones according to the animations. Standard stuff.

Now, some bones in the .XSI mesh are labeled with "_CHUNK".
chunk.jpg
This tells the game to look at this bone and it's child. Then, when the unit is dead, it will spawn a special type of particle effect.

Code: Select all

//
// INFANTRY DEATH GIB (1)
//
CreateParticleType("common.fx.infantrydeath.gib1", "Ember")
{
  LifeTime(2.0);
  RenderBase("common.fx.infantrydeath.gib1");
}
CreateParticleRenderType("common.fx.infantrydeath.gib1", "Geometry")
{
  GeometryName("gibchunk01.god");
  HasShadow(0);
}

//
// INFANTRY DEATH GIB (2)
//
CreateParticleType("common.fx.infantrydeath.gib2", "Ember")
{
  LifeTime(2.5);
  RenderBase("common.fx.infantrydeath.gib2");
}
CreateParticleRenderType("common.fx.infantrydeath.gib2", "Geometry")
{
  GeometryName("gibchunk02.god");
  HasShadow(0);
}

//
// INFANTRY DEATH GIB (3)
//
CreateParticleType("common.fx.infantrydeath.gib3", "Ember")
{
  LifeTime(3.0);
  RenderBase("common.fx.infantrydeath.gib3");
}
CreateParticleRenderType("common.fx.infantrydeath.gib3", "Geometry")
{
  GeometryName("gibchunk03.god");
  HasShadow(0);
}
The gib particle effect has no real mesh for it, instead it will look at all of the unit's bones labeled with "_CHUNK" and will instead refer to those bones as its meshes, resulting in something like this.
gibs.jpg
The reason this is done like this is so that each unit gibs their respective limbs in a realistic fashion, without having to define a new particle each time.

In Army Men RTS, you may notice something similar happening when an infantry unit dies.
limbs.jpg
However, unlike in Dark Reign 2, these particle effects are the same for all infantry units. Therefore, there is no need to make unique meshes for each death, and consequently there is no need for the "_CHUNK" routine.

Code: Select all

// infantry Gib
CreateParticleType("death.infantry.armgib1", "Ember")
{
  LifeTime(4.0);
  RenderBase("death.infantry.armgib1");
  TerrainCollision(1);
}

CreateParticleRenderType("death.infantry.armgib1", "GeometryScale")
{
  GeometryName("grunt_chunk2.god");
  HasShadow(0);
  Lighting();
  
  ColorKey( 0, 255, 255, 255, 255);
  ColorKey( 0.75, 255, 255, 255, 255);
  ColorKey( 1, 255, 255, 255, 0);
  RadiusKey( 0, 1);
  RadiusKey( 0.75, 1);
  RadiusKey( 1, 0);
}


CreateParticleType("death.infantry.torsogib1", "Ember")
{
  LifeTime(4.0);
  RenderBase("death.infantry.torsogib1");
  TerrainCollision(1);
}
So what happened to chunking? Well chunking does not actually happen automatically in Dark Reign 2. You must actually choose to enable it when "compiling" the .XSI meshes into a .GOD file.
chunkify.jpg
When this chunkify routine is detected in Army Men RTS, that's when the game hits the abort switch and displays "chunks are dead baby".

What I want to know is this: Is it possible to either stop the game from closing when chunks are enabled, or is it possible to tweak the .GOD file itself and remove chunkifying?
chunk.zip
(208.91 KiB) Downloaded 239 times
chunk.zip
(208.91 KiB) Downloaded 239 times
Here are two .GOD files I made to help. They are both exactly identical, however one uses chunks while the other does not.
The .gfg files are there if you need them too. They will reload all the .XSI files in the meshviewer using the same settings the .GOD was made with.
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 »

ahhhhhhh I understand now, Thank you I'll have a look tomorrow on how to bypass the error after I fix the runcodes

I'll see if I can remove the chunking check and if I can't fix it I'll try make a tool to remove them from .GOD files
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
User avatar
Secg
Half Track L2
Half Track L2
Posts: 200
Joined: Sat Jun 10, 2017 12:28 am
United States of America

Re: I Have Unlocked Studio After Years of Hard Work

Post by Secg »

Just a small question:

Even though any modder who wishes to mod the missions with the studio should use AMRTS_STUDIO.exe; can the modder play-test the mission using the normal AMRTS.exe?
ImageImage
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 »

Yes. Missions saved with the studio can play straight into the regular .exe

Although if you make a mission and a team is set as SideFixed(0);
Then when you next load the map that team will have a Sarge and a Bulldozer in the studio. These two units will have to be deleted or else you'll get another set when you resave the map... =))
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
j3rry
Map Maker
Map Maker
Posts: 121
Joined: Thu Oct 11, 2018 5:43 am
Location: Central Russia
Russia

Re: I Have Unlocked Studio After Years of Hard Work

Post by j3rry »

Great work!

Also you can edit singleplayer missions, just have to be tricky to remove all Bookmarks from objects.cfg.
Last edited by j3rry on Thu Jan 06, 2022 6:14 am, edited 1 time in total.
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 »

Thank you Now I can mess with missions
I was the first one to officially unlock studio mode for Army Men RTS
Add me on Discord DavidTheTech
User avatar
Secg
Half Track L2
Half Track L2
Posts: 200
Joined: Sat Jun 10, 2017 12:28 am
United States of America

Re: j3rry

Post by Secg »

j3rry wrote: Fri Oct 04, 2019 10:59 pm Also you can edit singleplayer missions, just need to be tricky to remove all Bookmarks from objects.cfg.
For some reasons, I can not do that: I always get error messages :( . I wonder :? if that were because all of missions in my Heroic mod had been heavily modded?
ImageImage
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests