Kane Edition, Damaged and Wreck model states

Tutorial for Command & Conquer 3 C&C3

No Avatar

Daz

Category: Code
Level: Beginner
Created: Saturday September 1, 2007 - 4:54
Updated: Saturday July 11, 2009 - 16:27
Views: 4422
Summary: A short explaination of what some of the model states in C&C3 are for
Rating
  • Staff-
  • Members-
  • Average-

0 votes

There are a few extra states for objects in the game.
These can be for upgrades or while the object is performing certain actions, but there are also a few more general states.
These states are the focus of this guide.

By "more general" states I am referring to:
Kane Edition state,
Damaged state,
Kane Edition damaged state,
Wreck state,
Kane Edition wrecked state.
These states specify what to change if certain conditions are met (such as "Is Kane Edition content enabled?" or "Is this unit seriously damaged?").

Damage states.
Damage states and Kane Edition states use the same model as the normal unit state, but with a different texture. This saves needing an entire extra model for these states, so you don't need to modify your model for these states.
The game must be told what model to use for the state, even if it is the default model.
Textures are changed by stating the original texture id and then the replacement texture id.
User image
In this example the code is telling the game that, if the model is in the "USER_5" state (which is triggered by the Kane Edition toggle), to replace the "GUPredatorTank" (the normal skin) areas with "GUPredatorTank_K" (the Kane Edition skin).
The same technique is used to call the damaged skin ("GUPredatorTank_D") when the unit is in its damaged state.
"REALLYDAMAGED" is the damaged condition where a unit is still operable but in red health.
"USER_5" is the Kane Edition condition where a unit uses its Kane Edition skin.
"REALLYDAMAGED USER_5" is the damaged, Kane Edition condition where a unit is still operable but in red health and uses its Kane Edition skin.

Wreck states.
User image
This is the Predator's wrecked state (the "dead" state you see once the unit is destroyed). As it's calling a different model file that file can have the damaged skin already applied - so no need to specify an original and replacement texture. It's also telling the game to draw particle effects.
"DYING" is the wreck condition when a unit has been completely destroyed, then sinks into the ground.
"DYING USER_5" is the wreck, Kane Edition condition when a unit using a Kane Edition skin has been completely destroyed, then sinks into the ground.

Wreck state models are, unlike the damaged state, different model files - with the suffix "R". These generally compose of a modified version of the normal state model so that it looks, unsurprisingly, like a wreck. They are also missing some parts (the turret and barrel are the most common) - these parts are in a seperate model file (a file for each part) with a 30 frame animation of them "tumbling".
This is so they can be used as debris, which explodes off in different directions.
When a unit dies it changes to it's wrecked state and spawns objects from an object creation list (which is specified in the "OCL" section, under "SlowDeath"). This list is composed of objects to be used as the debris. Object creation lists are detailed in "ObjectCreationLists.xml" in the "GlobalData" folder.
The debris have their own .xml files in "Neutral/Debris/" as they are seperate objects. They inherit from "BaseDebris" and only have lines to specify ID, editor names and to refer to graphics.

Happy modding,
Daz.

Comments

Display order: Newest first

2playgames (Administrator) - Sunday September 2, 2007 - 14:16

did you know you can use [ code ] tags? like so:

              
Code
<ModelConditionState
blablabla />

:p

Return to top