Jump to content
Sign in to follow this  
ztz2019

So, that's what puzzled me about the Tick Tank

Recommended Posts

It's from CnCLab's the forgotten mod's code. I tried to copy TickTank's anim.

        <ModelConditionState ParseCondStateType="PARSE_DEFAULT" RetainSubObjects="true">          <Model Name="MUTick_SKN" />......        </ModelConditionState>        <AnimationState ParseCondStateType="PARSE_DEFAULT">          <Animation AnimationName="MUTick_SKN" AnimationMode="MANUAL" />......        </AnimationState>        <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING">          <Animation AnimationName="MUTick_SKN" AnimationMode="ONCE" AnimationSpeedFactorMin="0.4" AnimationSpeedFactorMax="0.4" />......        </AnimationState>        <AnimationState ParseCondStateType="PARSE_NORMAL" Flags="START_FRAME_LAST" ConditionsYes="PACKING">          <Animation AnimationName="MUTick_SKN" AnimationMode="ONCE_BACKWARDS" AnimationSpeedFactorMin="0.4" AnimationSpeedFactorMax="0.4" />......        </AnimationState>        <AnimationState ParseCondStateType="PARSE_NORMAL" Flags="START_FRAME_LAST" ConditionsYes="DEPLOYED">          <Animation AnimationName="MUTick_SKN" AnimationMode="MANUAL" />        </AnimationState>      <SpecialPower id="ModuleTag_GiveUnpackUpgradeSpecialPowerTrigger" SpecialPowerTemplate="SpecialPower_GrantUnpackUpgrade" UpdateModuleStartsAttack="true" SetModelCondition="UNPACKING" SetModelConditionTime="=$TICK_TANK_DEPLOY_TIME" DisableDuringAnimDuration="true" />      <GiveOrRestoreUpgradeSpecialPower id="ModuleTag_GiveUnpackUpgradeSpecialPowerUpdate" SpecialPowerTemplate="SpecialPower_GrantUnpackUpgrade" UpgradeToGive="Upgrade_UnPack" PreparationTime="=$TICK_TANK_DEPLOY_TIME" Options="SHOW_PREPARATION_PROGRESS MUST_FINISH_ABILITY" />      <SpecialPower id="ModuleTag_GivePackUpgradeSpecialPowerTrigger" SpecialPowerTemplate="SpecialPower_GrantPackUpgrade" UpdateModuleStartsAttack="true" SetModelCondition="PACKING" SetModelConditionTime="=$TICK_TANK_DEPLOY_TIME" DisableDuringAnimDuration="true" />      <GiveOrRestoreUpgradeSpecialPower id="ModuleTag_GivePackUpgradeSpecialPowerUpdate" SpecialPowerTemplate="SpecialPower_GrantPackUpgrade" UpgradeToGive="Upgrade_Pack" PreparationTime="=$TICK_TANK_DEPLOY_TIME" Options="SHOW_PREPARATION_PROGRESS MUST_FINISH_ABILITY" />      <LocomotorSetUpgrade id="ModuleTag_AttributeModifierDeployed2">        <TriggeredBy>Upgrade_UnPack</TriggeredBy>      </LocomotorSetUpgrade>      <AttributeModifierUpgrade id="ModuleTag_AttributeModifierDeployed" AttributeModifier="AttributeModifier_TickTankDeployed">        <TriggeredBy>Upgrade_UnPack</TriggeredBy>      </AttributeModifierUpgrade>      <AttributeModifierAuraUpdate id="ModuleTag_AttributeModifierAuraUpdate" AttributeModifierName="AttributeModifier_TickTankDeployedAdvancedFortifications" RefreshDelay="0.5s" Range="1" AllowSelf="true" InitiallyActive="false" RequiredObjectStatusFlags="DEPLOYED">        <ObjectFilter Rule="ALL" Relationship="ALLIES" />        <TriggeredBy>Upgrade_MutantAdvancedFortification</TriggeredBy>      </AttributeModifierAuraUpdate>      <RemoveUpgradeUpgrade id="ModuleTag_RemoveUpgradeUpgrade1">        <UpgradeToRemove>Upgrade_Pack</UpgradeToRemove>        <TriggeredBy>Upgrade_UnPack</TriggeredBy>      </RemoveUpgradeUpgrade>      <RemoveUpgradeUpgrade id="ModuleTag_RemoveUpgradeUpgrade2">        <UpgradeToRemove>Upgrade_UnPack</UpgradeToRemove>        <TriggeredBy>Upgrade_Pack</TriggeredBy>      </RemoveUpgradeUpgrade>

So that's my problem. It seems that all anim and models are named MUTick_SKN(and also the w3x skeleton after searching the extracted .big asset by the asset viewer), how they did it?

And there's no ModelConditionUpgrade module to claim the anim flag like "DEPLOYED"(obviously not the RequiredObjectStatusFlags="DEPLOYED"), why the Tick Tank could do right anim? Maybe it also be related to the first question.

 

 

To tell the truth, the forgotten mod's code is different from EA's cnc3xml. The code style is much more like ZH, much conciser but needs more familiar with the cnc3's xsd, and I felt weird when saw the first time.

Edited by Sonic

Share this post


Link to post

      <AttributeModifierUpgrade id="ModuleTag_AttributeModifierDeployed" AttributeModifier="AttributeModifier_TickTankDeployed">

<TriggeredBy>Upgrade_UnPack</TriggeredBy>

</AttributeModifierUpgrade>

Share this post


Link to post

 

      <AttributeModifierUpgrade id="ModuleTag_AttributeModifierDeployed" AttributeModifier="AttributeModifier_TickTankDeployed">
        <TriggeredBy>Upgrade_UnPack</TriggeredBy>
      </AttributeModifierUpgrade>

Many thanx, so that's why I say too different from EA's cnc3xml that I feel weird.

 

And do you know the first problem? Why all assets are named the same and won't crash each other?

Share this post


Link to post

Why should they crash?

 

Model, skeleton and animations usually have different names (_SKN, _SKL, or whatever), but thats only for making them easier to find for humans.

Just like you can have multiple GameObjects in the same xml file, you can have multiple model objects (animtion, models) in the same w3x file. Its basicly just a container.

 

For the game, models, animations and skeletons are all different objects so it doesnt matter if a model has the same name as an animation (however, having 2 models with the same name would be different).

 

And if you have a model in 3dsmax that only has one animation and doenst need an external skeleton, you can export everything into a single w3x, thus ending up with everything having the same name.

Share this post


Link to post

Stuff is looked up by Type:Name

if the Type: part is missing it will be added automatically, thus there is a difference between

W3DMesh:ABC

and

W3DAnimation:ABC

Share this post


Link to post

Why should they crash?

 

Model, skeleton and animations usually have different names (_SKN, _SKL, or whatever), but thats only for making them easier to find for humans.

Just like you can have multiple GameObjects in the same xml file, you can have multiple model objects (animtion, models) in the same w3x file. Its basicly just a container.

 

For the game, models, animations and skeletons are all different objects so it doesnt matter if a model has the same name as an animation (however, having 2 models with the same name would be different).

 

And if you have a model in 3dsmax that only has one animation and doenst need an external skeleton, you can export everything into a single w3x, thus ending up with everything having the same name.

"For the game, models, animations and skeletons are all different objects so it doesnt matter if a model has the same name as an animation (however, having 2 models with the same name would be different)."

 

But how to put different same-named obj into one path? Or there's only one w3x asset that can perform all the attribution like ZH?

 

"And if you have a model in 3dsmax that only has one animation and doenst need an external skeleton, you can export everything into a single w3x, thus ending up with everything having the same name."

 

You mean the model in fact have no skeleton, just a w3x model with anim?—— Just like ZH vehicle model?

 

Stuff is looked up by Type:Name

if the Type: part is missing it will be added automatically, thus there is a difference between

W3DMesh:ABC

and

W3DAnimation:ABC

So it's also a ZH style asset? Just like ZH vehicle model, no need of skl, model is exported with self anim.

Edited by ztz2019

Share this post


Link to post

All assets work that way. Also a hierarchy (skl) is always used, otherwise it couldn't even be animated. W3D was the same as W3X just that W3X is in human readable xml format while W3D is a binary.

Share this post


Link to post

You can export from 3dsmax as:

 

Simple mesh, hierachical animated model, pure animation and skeleton

 

Simple mesh is something without any bones or animated needs.

 

hierachical animated model is the whole package, it is what is used for the ticktank above. i contains geometry, bones and animation data. it creates also the largest of files when exported, because it contains everything.

 

pure animation just saves animation data, it uses the skeletons prestine bone positions and hierachy for reference.

 

I personaly use hierachical animated model for geometry only and use the SKL for reference, then if it needs animation i export it as pure anim with the same SKL reference. This compiles faster, it is easier to alter meshes after and keep the animation the same. Also in my opinion it seems it gives a better performance ingame when not putting everything in one big w3x but splitting up geometry and animation that way, atleast it feels that way in my game, could be my rig tho.

Share this post


Link to post

Doesn't matter if it's all in 1 file or not. Compiled data doesn't care where it's from. The speedup might be because if you export everything x times with different names it becomes a different asset (as the hierarchy and meshes are exported multiple times and each time called differently, so more shader values have to change).

 

Hierarchy is the skeleton btw (bone hierarchy). Renderable are W3DMesh(the actual geometry) and W3DContainer (references to multiple geometries, bounding boxes, and a hierarchy).

 

You generally want to split the hierarchy, animations, and container.

The only one instance that comes to mind where you don't need/want it is the model in the menus, as it's basically a "one shot" anyway.

Edited by Lauren

Share this post


Link to post

I think the first part of the question has been answered: The Tick Tank model, skeleton, and animation are all in one W3X file.

 

As for the second part, AttributeModifier_TickTankDeployed is where the DEPLOYED ModelCondition is set. This is necessary because the DeployStyleAIUpdate doesn't accept having a weapon that works in the undeployed state.

Share this post


Link to post

All questions had been answered long ago. I don't know why Fandore needed to necro this topic. The first answer post answered where the model condition is set and later the other one.

Share this post


Link to post

my apologies then, i guess i did not see the 'answered' mark on the topic and just thought that if the person needed help, I have commie on my team so i put a shout out his way. did not mean to bring up an old subject in that means. please mark the subject as answered. =)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×