I Have Unlocked Studio After Years of Hard Work
-
- Programmer
- Posts: 30
- Joined: Sat Sep 14, 2019 3:55 am
- Location: anywhere
- Contact:
Re: I Have Unlocked Studio After Years of Hard Work
Ahhhh.
Yes I will be able to remove/fix the errors I hope
Thank you, Good luck with what you're doing too
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
Add me on Discord DavidTheTech
- E]x[F-Sniper
- Admin
- Posts: 1275
- Joined: Wed Jul 16, 2008 2:21 am
- Location: stfu noob
- Contact:
Re: I Have Unlocked Studio After Years of Hard Work
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
-
- Programmer
- Posts: 30
- Joined: Sat Sep 14, 2019 3:55 am
- Location: anywhere
- Contact:
Re: I Have Unlocked Studio After Years of Hard Work
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
and in AMRTS
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
Add me on Discord DavidTheTech
Chunks are dead baby
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". 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.
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.
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. 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.
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.
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? 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.
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". 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);
}
In Army Men RTS, you may notice something similar happening when an infantry unit dies. 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);
}
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? 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.
"Can we order a pizza?"
GameRanger ID: 913974
"Can we order a pizza?"
GameRanger ID: 913974
-
- Programmer
- Posts: 30
- Joined: Sat Sep 14, 2019 3:55 am
- Location: anywhere
- Contact:
Re: I Have Unlocked Studio After Years of Hard Work
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'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
Add me on Discord DavidTheTech
Re: I Have Unlocked Studio After Years of Hard Work
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?
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?
Re: I Have Unlocked Studio After Years of Hard Work
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...
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.
"Can we order a pizza?"
GameRanger ID: 913974
"Can we order a pizza?"
GameRanger ID: 913974
Re: I Have Unlocked Studio After Years of Hard Work
Great work!
Also you can edit singleplayer missions, just have to be tricky to remove all Bookmarks from objects.cfg.
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.
-
- Programmer
- Posts: 30
- Joined: Sat Sep 14, 2019 3:55 am
- Location: anywhere
- Contact:
Re: I Have Unlocked Studio After Years of Hard Work
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
Add me on Discord DavidTheTech
Re: j3rry
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?
Who is online
Users browsing this forum: No registered users and 0 guests