Jump to content
Sign in to follow this  
Egozi44

Animation cut, Unit collide, A veterancy inherit?

Recommended Posts

So... time to open new thread cause the old one was too long...

1. I trying to "cut" animation with code  (without involving real animation cut in max which will break it or without edit the original file as I tried it and it didn't work), can I make the game skip few frame from the start of the animation and how?

 

2. For some reason a new plane unit I added have some weird behvior, unlike the hammerhead or the firehawk the unit get placed on top of same unit on rally point or in different situations, don't really sure how can I explain it... it like you can't see you have more than one unit till you mark it with selection box since they one on top of the other when they come out on the rally point... they can also do it when attacking while each hammerhead will move a bit from the other on the rally point and the firehawk will try to not collide with the other when attacking , I don't think it box issue but rather code issue, maybe a line I need to add to the Kindof? (it already have the NO_COLLIDE  though)

 

3. more of a question... is it possible for a unit to inherit the veterancy of other unit if they both uses the MCV-like ability which replace the model?  the health status will be saved so I was wondering if it the same for the rank?

Share this post


Link to post
Share on other sites

1. Not that i know off, or at least can think of directly atm.

2. no idea what would cause that or how to fix it, can't remember coming across that bug in TW with anything i ever done,  might be its KW related maybe?

3. Not directly, but you could code it so it will look like it does: Have the veterancy upgrade trigger a commandsetupgrade. So you will have a veteran, elite and heroic commandset with each respectively deploying into the veteran,elite, heroic version of the object, you can use use the EquivelantTo coding addressed in your other topic to make it look like they are still the same units.

Share this post


Link to post
Share on other sites
5 hours ago, Ravendark said:

1. Not that i know off, or at least can think of directly atm.

2. no idea what would cause that or how to fix it, can't remember coming across that bug in TW with anything i ever done,  might be its KW related maybe?

3. Not directly, but you could code it so it will look like it does: Have the veterancy upgrade trigger a commandsetupgrade. So you will have a veteran, elite and heroic commandset with each respectively deploying into the veteran,elite, heroic version of the object, you can use use the EquivelantTo coding addressed in your other topic to make it look like they are still the same units.

1. The FadeEndFrame="" FadeBeginFrame="" codes can't be used for it? they always on -1 at default though so don't sure how they works

 

2. I see, if you don't know what cause it I guess there's no point in upload the xml then?

 

3. Don't sure I got how it done as I never done something like this before, you mean I need to make 3 unpack/repack buttons that will be open for each rank upgrade (while the old one will get lock after each rank upgrade)?  Or you meant something else?

I think it will look funny, And it probably cause the rank FX to show up each time the ability was used (which can be deleted from the experience xml... but then it won't show the rank fx on normal state when level up).

The EquivelantTo is not needed as this unit work a bit similar to the Empire of the rising sun's transformers from RA3, which probably going to work better as separate units.

 

 

 

Edited by Egozi44

Share this post


Link to post
Share on other sites

Also may I ask how I can make the transformation ability to be available all the time? because it currently available only when the plane is not above any object (like the mcv)

I thought it may be relate to the CheckBuildAssistant="True" but It probably matter of flags

 

Do I need to add flag like this: Flags="WATER_OK SHARED_SYNC IS_PLAYER_POWER IGNORE_MAP_EXTENTS"

To the modified SpecialPower_GrantUnpackUpgrade and SpecialPower_GrantpackUpgrade support power? (it have different name id so it won't effect the mcvs)

Edited by Egozi44

Share this post


Link to post
Share on other sites

1. I dont think the FadeIn coding works like that, but not totally sure, you can try it yourself.

3. Might want to start with the question of what are you trying to do with the transformation? If its just a transformation of the same unit i would suggest using the switchlocomotor power from the nod shadows instead. But if you its a different unit you want to transform into then yes use the replaceself module. are you replacing from a AIR to a GROUND unit?

Shared sync and player power aren't relevant flags, you can use water ok and ignore map extents, al tho i dont think map extents matters much either.

 

Share this post


Link to post
Share on other sites

1.  I tried it a few times and didn't was sure if I saw a different (the animation happened too fast but still look somewhat wrong), So I thought I'll ask about this code here and hopefully know how it works so I won't waste my time messing with it.

 

3. Well it was the CheckBuildAssistant="True" after all.

As for your question, this unit is aircraft (more like havocraft that similar to the Venom) that transform into aircraft that act like the firehawk in midair, it stay as Air unit in both cases but transform into different gameobject ID with the replaceself as unit's ability, it more of supportive unit that have A mod (shoot emp ray on ground only) and B mod (move faster but replace the emp to AA missiles), I originally thought about making the second form weaponless (which could've stay rankless as it wont be able to kill anyone) so it will just rely on it speed for escape purposes, but thought it won't hurt to give it weak anti air missiles as escape only option look so-so (which now going to look weird if it stay rank-less), and the ability have cool down so it won't be useful at all till you can unpack it again.

Are the shadows have better way to "transform" than replaceself? as far as I recall they just switch animation and locomotor but that all (will check it when I be home)

Edited by Egozi44

Share this post


Link to post
Share on other sites

You can trigger a model and status condition with the switchloco specialpower, so you can "transform" without switching units. There are some benefits to that and also some drawbacks ofc. But if you want it to attack like a firehawk (circlesforattacks=true) you cant use the switchloco, you basicly have to switch to a unit that has the correct jetaiupdate with circlesforattack=true.

Altho a while ago i expiremented with changing the gameobject.xsd so it could include more then one ai update and changed the aiupdate to be toggleable by using the need/forbidden upgrade element. It had mixed result, so i gave up on that.

Share this post


Link to post
Share on other sites

Well tried it and gave up as well :P

If it didn't work for you, there's no reason luck will shine on me xD

I may just give up on the whole veterancy inherit....

 

I'm more concern about it being collide

 

And just found out new issue I need help with... it seen that when the plane is under upack/repack ability, All kind of ground unit can shoot on it.... despite both gameobjects being aircrafts (unlike Scrin's MCV)

Any idea what I can do in these situations? none of the units attack the scrin's MCV when unpack on air till it close to the ground... and I doubt it because it have double replacement gameobjects... though making double replacement and set the gameobject that come in between as attackable may work but I assume there's easier method if Scrin's aren't like that.

Edited by Egozi44

Share this post


Link to post
Share on other sites
12 hours ago, Egozi44 said:

And just found out new issue I need help with... it seen that when the plane is under upack/repack ability, All kind of ground unit can shoot on it.... despite both gameobjects being aircrafts (unlike Scrin's MCV)

Any idea what I can do in these situations? none of the units attack the scrin's MCV when unpack on air till it close to the ground... and I doubt it because it have double replacement gameobjects... though making double replacement and set the gameobject that come in between as attackable may work but I assume there's easier method if Scrin's aren't like that.

that is exactly how the alieen mcv does it. it uses a in-between object with a lifetime update and a createdie module that spawns the conyard. the in-between object (AlienMCVUnpacking)

has a NOT_AUTOACQUIRABLE status, so the enemy ignores it mostly during that phase.

you could try to add some lua to the mix, and instead trigger a object status triggered by UNPACKING and set the object status to UNATTACKABLE or such

Share this post


Link to post
Share on other sites

I see, it still strange though, In the scrin mcv case it turn from flying unit into a structure

 

In my unit's case Both units are aircrafts...

Share this post


Link to post
Share on other sites

Welp... doing it the same way as EA done give me trillion of bugs

Are you sure there's no way to somehow make enemies ignore the unit when they using ability?

Share this post


Link to post
Share on other sites

try to add the following to your unpack specialpower
 

AttributeModifier="yourattribmodifier"

AttributeModifierAffectsSelf"true"

then create a attribute modifier that sets the following object status:

NO_AUTO_ACQUIRE

NO_ATTACK_FROM_AI

see if that works

 

Share this post


Link to post
Share on other sites
On ‏יום שלישי ‏10 ‏אוקטובר ‏2017 at 11:11 AM, Ravendark said:

try to add the following to your unpack specialpower
 


AttributeModifier="yourattribmodifier"

AttributeModifierAffectsSelf"true"

then create a attribute modifier that sets the following object status:

NO_AUTO_ACQUIRE

NO_ATTACK_FROM_AI

see if that works

 

Ok

 

I done this:

<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset">
<SpecialPowerTemplate 
                      id="SpecialPower_GrantPackUpgradeCondor" 
                      AttributeModifier="AttributeModifier_CplaneUnpack" 
                      AttributeModifierAffectsSelf="true" 
                      ReloadTime="5s" 
                      TargetType="NONE">
<ObjectFilter Rule="UNPARSED" />
<ForbiddenObjectFilter Rule="UNPARSED" />
</SpecialPowerTemplate>
</AssetDeclaration>

 

And this

<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset">
<AttributeModifier id="AttributeModifier_CplaneUnpack" 
                   Duration="2s" 
                   ObjectStatusToSet="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI" />
</AssetDeclaration>

And it didn't work, did I need to filter/tag it or anything of sort?

 

Also I got an idea from the behemoth

If the thing above doesn't work, how about adding a weapon that trigger upon unit "Creation" and use that attribute?

 

 

Edited by Egozi44

Share this post


Link to post
Share on other sites

..... that actually doesn't work either o_o

I added this to the unit behvior:

<FireWeaponUpdate 
                  id="ModuleTag_Fireweapon">
<FireWeaponNugget 
                  OneShot="true" 
                  Firedelay="0.1s" 
                  WeaponName="CondorFakeWeaponForUnpack"/>
</FireWeaponUpdate>

 

And this in the behvior beneath <slowdeath/> just in case:

<FireWeaponWhenDead 
                    id="0xF6CD4A6D3" 
                    InitiallyActive="True" 
                    DeathWeapon="CondorFakeWeaponForUnpack">
<DieMuxData 
            DeathTypes="ALL"/>
<WeaponFireProbability 
                       DeathType="ALL" 
                       ChancePercentage="100"/>
</FireWeaponWhenDead>

 

Made this attributie:

<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset">
<AttributeModifier 
                   id="AttributeModifier_CondorUnpack" 
                   Duration="2s" 
                   ObjectStatusToSet="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI" />
</AssetDeclaration>

 

And made this weapon:

<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset">
<WeaponTemplate 
                id="CondorFakeWeaponForUnpack" 
                Name="CondorFakeWeaponForUnpack" 
                AttackRange="100" 
                ClipSize="1" 
                RadiusDamageAffects="SELF">
<FiringDuration 
                MinSeconds="0.1s" 
                MaxSeconds="0.1s" />
<Nuggets>
<AttributeModifierNugget 
                         AttributeModifierName="AttributeModifier_CondorUnpack" 
                         Radius="1">
<SpecialObjectFilter>
                         <IncludeThing>ZOCOMCondorEmpMod</IncludeThing>
                         <IncludeThing>ZOCOMCondorSpeedMod</IncludeThing>
</SpecialObjectFilter>
</AttributeModifierNugget>
</Nuggets>
</WeaponTemplate>
</AssetDeclaration>

 

Is something missing or was made wrong?

 

Share this post


Link to post
Share on other sites

Well... if no one have better idea then I probably must use EA's method (Unless you have better idea or you notice I did something wrong, please tell me anyone here have better idea :/ )

 

I actually didn't have trillion issues (as you have guessed) but just three major ones (may have more but these are the ones I notice right away)

1. The unit unpacking animation was a bit broken (have idea how to solve it though)

2. For some reason when I unpack/repack the unit it stop the selection of the unit and make me reselect it (unlike the any other unpack unit in this game include the scrin mothership)

3. When I change the jet mod to the plane mod (that move in circles), The plane won't move in circles till you tell it to move manually, it have the same locomators and JetAIUpdate as the Firehawk and didn't gave me this issue when I only replaced Unit A with B and vice versa

If no one have any clue how to solve it with the method above (please tell me you have ;(  )  Then I post the unit xml and hopefully someone can figure what causing issue 2 and 3 (and 1 if I won't be able to solve it on my own)

 

Edited by Egozi44

Share this post


Link to post
Share on other sites

try triggering your unpack specialpower with this

<SpecialPower
				id="ModuleTag_unpackdispatch"
				SpecialPowerTemplate="SpecialPower_your_unpack_sp"
				UpdateModuleStartsAttack="true" />
			<SwitchLocomotorsSpecialAbilityUpdate
				id="ModuleTag_UnpackupdateUpdate"
				SpecialPowerTemplate="SpecialPower_your_unpack_sp"
				UnpackTime="0.57s"     /experiment with this setting to see what is the best time/duration to match your replaceselfupdate
				BusyForDuration="1s"   /experiment with this setting to see what is the best time/duration to match your replaceselfupdate
				UseUpgradedLocomotor="false"
				Options="IGNORE_FACING_CHECK"
				SetObjectStatusOnTrigger="NO_AUTO_ACQUIRE" />

 

Share this post


Link to post
Share on other sites
12 hours ago, Ravendark said:

try triggering your unpack specialpower with this


<SpecialPower
				id="ModuleTag_unpackdispatch"
				SpecialPowerTemplate="SpecialPower_your_unpack_sp"
				UpdateModuleStartsAttack="true" />
			<SwitchLocomotorsSpecialAbilityUpdate
				id="ModuleTag_UnpackupdateUpdate"
				SpecialPowerTemplate="SpecialPower_your_unpack_sp"
				UnpackTime="0.57s"     /experiment with this setting to see what is the best time/duration to match your replaceselfupdate
				BusyForDuration="1s"   /experiment with this setting to see what is the best time/duration to match your replaceselfupdate
				UseUpgradedLocomotor="false"
				Options="IGNORE_FACING_CHECK"
				SetObjectStatusOnTrigger="NO_AUTO_ACQUIRE" />

 

Alright, will do it in the unit's xml,

don't we also need  to add

NO_ATTACK_FROM_AI

in the setobjectstatus as well?

 

And I don't need to mess with the SP xml like you said in this post:

Quote

 

try to add the following to your unpack specialpower
 


AttributeModifier="yourattribmodifier"

AttributeModifierAffectsSelf"true"

then create a attribute modifier that sets the following object status:

NO_AUTO_ACQUIRE

NO_ATTACK_FROM_AI

see if that works

 

right?

 

 

Edited by Egozi44

Share this post


Link to post
Share on other sites

Well that may didn't work either (Unless I done something wrong as usual)

You meant I should add thses line to the unit's xmls right? I tried to even add it to the GiveOrRestoreUpgradeSpecialPower just in case

Here what I done


<SpecialPower 
              id="0x028447855" 
              SpecialPowerTemplate="SpecialPower_GrantPackUpgradeCondor" 
              AvailableAtStart="False" 
              UpdateModuleStartsAttack="True">
<SwitchLocomotorsSpecialAbilityUpdate 
                                      id="ModuleTag_UnpackupdateUpdate" 
                                      SpecialPowerTemplate="SpecialPower_GrantPackUpgradeCondor" 
                                      UnpackTime="2s" 
                                      BusyForDuration="2s" 
                                      UseUpgradedLocomotor="false" 
                                      Options="IGNORE_FACING_CHECK" 
                                      SetObjectStatusOnTrigger="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI"/>
<AttributeModifierAffects 
                          Rule="UNPARSED"/>
<RequirementsFilterMP 
                           Rule="UNPARSED"/>
<RequirementsFilterStrategic 
                             Rule="UNPARSED"/>
</SpecialPower>

<GiveOrRestoreUpgradeSpecialPower 
                                  id="0xE135B0503" 
                                  SpecialPowerTemplate="SpecialPower_GrantPackUpgradeCondor" 
                                  FaceTarget="True" 
                                  UpgradeToGive="Upgrade_Pack"/>
<SwitchLocomotorsSpecialAbilityUpdate 
                                      id="ModuleTag_UnpackupdateUpdate" 
                                      SpecialPowerTemplate="SpecialPower_GrantPackUpgradeCondor" 
                                      UnpackTime="2s" 
                                      BusyForDuration="2s" 
                                      UseUpgradedLocomotor="false" 
                                      Options="IGNORE_FACING_CHECK" 
                                      SetObjectStatusOnTrigger="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI"/>
<ReplaceSelfUpgrade 
                    id="0xFC14FA9EE" 
                    NewObjectUnpackTime="1.8s">
<TriggeredBy>Upgrade_Pack</TriggeredBy> 
<ReplacementTemplate>ZOCOMCondorEmpMod</ReplacementTemplate>
</ReplaceSelfUpgrade>

 

 

 

 

Share this post


Link to post
Share on other sites

Disclaimer: I just got out of the hospital yesterday for a shoulder surgery, and i might be abit off on painkillers atm, so im feeling abit fussy at times and im not testing this myself because sitting at the pc to long hurts like a motherfucker and feeling sleepy at times, so the time between my reply might varry and you def need to check for spelling errors :s

 

But:

<SpecialPower 
              id="0x028447855" 
              SpecialPowerTemplate="SpecialPower_GrantPackUpgradeCondor" 
              AvailableAtStart="False" 
              UpdateModuleStartsAttack="True">
<SwitchLocomotorsSpecialAbilityUpdate 
                                      id="ModuleTag_UnpackupdateUpdate" 
                                      SpecialPowerTemplate="SpecialPower_GrantPackUpgradeCondor" 
                                      UnpackTime="2s" 
                                      BusyForDuration="2s" 
                                      UseUpgradedLocomotor="false" 
                                      Options="IGNORE_FACING_CHECK" 
                                      SetObjectStatusOnTrigger="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI"/>
<AttributeModifierAffects 
                          Rule="UNPARSED"/>
<RequirementsFilterMP 
                           Rule="UNPARSED"/>
<RequirementsFilterStrategic 
                             Rule="UNPARSED"/>
</SpecialPower>

this seems fucked up,  the switch locomoterability shouldnt be in that specialpower module at all, tbh you should be able to remove it whole and just keep the restoeupgrade moduel and the switchloco module, that should work tbh. Again im not testing it myself for the next few days, so....

Share this post


Link to post
Share on other sites

Hell o_o, hope you will feel better man, fussy/drunk, but better~

That actually make me feel bad about bothering you with my noob's questions >.> (Nice plan ;D????...? )

Take your time replying ~

 

 

Anyway, I done 3 tests, so far all of them failed in the same manner by making the button unpressable:

Test 1.

<SpecialPower 
                                      id="0x7BD8B3AF" 
                                      AvailableAtStart="False" 
                                      SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeCondor">
<AttributeModifierAffects 
                                      Rule="UNPARSED"/>
<RequirementsFilterMP 
                                      Rule="UNPARSED"/>
<RequirementsFilterStrategic 
                                      Rule="UNPARSED"/>
</SpecialPower>

<SwitchLocomotorsSpecialAbilityUpdate 
                                      
                                      id="ModuleTag_UnpackupdateUpdate" 
                                      SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeCondor" 
                                      UnpackTime="2s" 
                                      BusyForDuration="2s" 
                                      UseUpgradedLocomotor="false" 
                                      Options="IGNORE_FACING_CHECK" 
                                      SetObjectStatusOnTrigger="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI"/>

 

Test 2.

<SpecialPower
                                      id="ModuleTag_unpackdispatch"
                                      SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeCondor"
                                      UpdateModuleStartsAttack="true" 
                                      AvailableAtStart="False" />

<SwitchLocomotorsSpecialAbilityUpdate
                                      id="ModuleTag_UnpackupdateUpdate"
                                      SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeCondor"
                                      UnpackTime="2s"
                                      BusyForDuration="2s"
                                      UseUpgradedLocomotor="false"
                                      Options="IGNORE_FACING_CHECK"
                                      SetObjectStatusOnTrigger="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI"/>

 

Test 3.

<SpecialPowerDispatchSpecialPower 
                                  id="0x7BD8B3AF"
                                  AvailableAtStart="False"
                                  SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeCondor">
<AttributeModifierAffects 
                                  Rule="UNPARSED"/>
<RequirementsFilterMP
                                  Rule="UNPARSED"/>
<RequirementsFilterStrategic 
                                  Rule="UNPARSED"/>
<SpecialPower 
                                  SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeTrigger"/>
</SpecialPowerDispatchSpecialPower>


<SpecialPower 
                                  id="0x5731B6987"
                                  SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeTrigger"
                                  UpdateModuleStartsAttack="True">
<AttributeModifierAffects 
                                  Rule="UNPARSED"/>
<RequirementsFilterMP 
                                  Rule="UNPARSED"/>
<RequirementsFilterStrategic 
                                  Rule="UNPARSED"/>
</SpecialPower>

<SwitchLocomotorsSpecialAbilityUpdate 
                                  id="0x1E1062960"
                                  SpecialPowerTemplate="SpecialPower_GrantUnpackUpgradeTrigger"
                                  UseUpgradedLocomotor="False"
                                  BusyForDuration="2s"
                                  FaceTarget="True"
                                  SetObjectStatusOnTrigger="NO_AUTO_ACQUIRE NO_ATTACK_FROM_AI"
                                  Options="IGNORE_FACING_CHECK"
                                  UnpackTime="2s"/>

 

Edited by Egozi44
line breakicide

Share this post


Link to post
Share on other sites

This is all in your gameobject <behavior> section right?

Get rid of the <specialpower> coding you dont need that.

You only need

<SwitchLocomotorsSpecialAbilityUpdate 

in your gameobject, you prob dont need the dispatch part either i posted earlier, not sure tho atm.

also i think facetarget only works if you are using a targeted specialpower, if you are using a self triggered special power (like a mcv deploy or orca sonar pulse) it doesnt work.

make sure you are using a unitability button and not a specialpower button linked to your commandset and the switchloco module.

Share this post


Link to post
Share on other sites

It's an update module, so he should have a specialpower module in there.

And yes, the dispatch is completely unnecessary.

Share this post


Link to post
Share on other sites
56 minutes ago, Lauren said:

It's an update module, so he should have a specialpower module in there.

And yes, the dispatch is completely unnecessary.

doesnt the GiveOrRestoreSpecialpower cover that part? as its a extension of the base Specialpower? Iirc? he is stil using that to trigger his replace self upgrade.

On second thought, he might also be able to skip all of that , and use a direct upgrade+button to trigger his replace self and trigger a statusbitupgrade module that gives his no_attack status? something worth trying aswell.

Share this post


Link to post
Share on other sites

Well I got from the tests that the specialpower module must be there, but I have no clue how to use the SwitchLocomotorsSpecialAbilityUpdate with it, because the moment they both in the same xml of my gameobject, the button become unpressable as if it not linked to the specialpower, unit ability mostly do the same thing and the MCV's SP is not much different from it (at least in the chain xmls of the ability button I think?)....

Looking at the Shadows or Venom didn't helped much.

So unless you can explain to imbecile like myself what I do wrong, we may better try the other method you just mentioned, I can also try sending you the xmls and you can try add to them whatever works, but I will need to know exactly what cause I need to re-add it again to the broken-style-extracted-xmls of wrathed 1.08 buggy ver  (which work th best despite extracting the xmls that way)

 

 

Edited by Egozi44

Share this post


Link to post
Share on other sites

no point in sending me anything atm, im only at my pc in short bursts. Mostly using my leftarm to do everything now and thats a pain ontop of the pain. But i might look into it later this week, when i feel more able. home for 3 months , so seems like good time to catch up on my modding stuff aswell .

Share this post


Link to post
Share on other sites

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  

×