Jump to content
Egozi44

Behemoth recovery bug

Recommended Posts

I found bug while messing with the behemoth, when you kill it and use engineer to recover it, it will use the Coming out of war factory animation  right after showing the getting up animation, looking at the xml it seem that User_17 is the one who causing the issue, but removing it and order the animation the same way as normal Juggernaut will result in the behemoth don't show it's bunker coming out of factory animation and will make broken cannon animation instead  (just when it goes out of the WF ofc) as the cannons also sort of have "unpacking" animation while getting out of WF, while it does solve the "recover by engi" bug it add new issue over the other.

 

I don't recall seeing it in the old days of ver 1.00 or in command school videos which showed the engi+behemoth tactic 

 

Can someone here look at the xml and see if there's a way to fix it? I don't sure what even trigger user_17, the recovery still just use user_5.

 

I will add pic and xml later but you can simply peek on the default xml as it happenes on unmodded KW as well (and I pinned it down to user_17 which seem to be relate to the bunker and cannons animation ) 

Edited by Egozi44

Share this post


Link to post

So, any idea what even trigger user_17?  D :

It don't seem to be in the war factory, faction's upgrade, or any of the sort

Edited by Egozi44

Share this post


Link to post
<AnimationState
                    ParseCondStateType="PARSE_NORMAL"
                    ConditionsYes="USER_5"
                   >
                    <Animation
                        AnimationName="GUBEHEMOTH_GTPA"
                        AnimationMode="ONCE"
                       
                        AnimationBlendTime="0"
                        AnimationSpeedFactorMin="1"
                        AnimationSpeedFactorMax="1"
                       
                        AnimationMustCompleteBlend="False"
                      
                       />
                </AnimationState>

that is the one that handles the get up animation, this is how the husk system works:

Jug gets wrecked > drops a SteelTalonsBehemothDieOCL, this holds some debri and the actual husk , then in the husk.xml there is a engineercontain with replace data, the replace on capture points to a new ocl, in that ocl there is a Tempmodelcondition + temp time and this is set to user_5.

<ObjectCreationList
		id="SteelTalonsBehemothHuskReplace">
		<CreateObject
			
			Count="1"
			Options="CLEAR_REMOVEABLES PRESERVE_LAYER USE_CREATORS_HEALTH_AS_BASE"
			Disposition="LIKE_EXISTING"
		
			TempModelCondition="USER_5"
			TempModelConditionTime="3s"
	
			DisabledWhileBusy="True">
			<CreateObject>SteelTalonsBehemoth</CreateObject>
		</CreateObject>
	</ObjectCreationList>

 

So any error you might get is found in that chain of events.

No idea what user_17 is used for but it shouldn't effect your husk transistion imo

Share this post


Link to post

The USER_17 is the result of BreakAway Games or the live team (which existed for exactly one patch of KW) having no clue what to do.

It's a workaround to have this animation without the TempModelCondition. The unti has a FireWeaponNugget which fires BehemothBuildAnimationWeapon after 0.1s of its creation. The weapon has an AttributeModifierNugget which triggers the AttributeModifier_BehemothBuildAnimation which sets USER_17.

Edited by Lauren

Share this post


Link to post
2 hours ago, Lauren said:

The USER_17 is the result of BreakAway Games or the live team (which existed for exactly one patch of KW) having no clue what to do.

It's a workaround to have this animation without the TempModelCondition. The unti has a FireWeaponNugget which fires BehemothBuildAnimationWeapon after 0.1s of its creation. The weapon has an AttributeModifierNugget which triggers the AttributeModifier_BehemothBuildAnimation which sets USER_17.

Wait what? but the default juggernaut replace coding is in there as well, so basically 2 systems are at work that suppose to do the same thing? honestly from a first glance the correct ocl structure is there, so i would remove the fireweapon stuff and try it without. That might fix the whole bug probably.

Share this post


Link to post

Thanks for the help.

The thing is that simply remove user_17 (or it's trigger) will break the getting up animation of the bunker and cannon and Not the animation of the behemoth itself (the bunker and cannons also have unpack animation or else the bunker will pop out of the war factory) .

There's any way to make a user/upgrade/trigger that will show the animation only once for every behemoth unit per life time even after being respawn from husk? I thought about user that trigger it and then being replaced by other user or some other trigger that can come only from the war factory,

any ideas?

Edited by Egozi44

Share this post


Link to post

try changing :
 

<AnimationState
                    ParseCondStateType="PARSE_NORMAL"
                    ConditionsYes="USER_17"
                 

etcetc

            </AnimationState>

 

into

<AnimationState
                    ParseCondStateType="PARSE_NORMAL"
                    ConditionsYes="COMING_OUT_OF_FACTORY"
  etcetc              
                </AnimationState>

 

and remove the fireweapon module

Edited by Ravendark

Share this post


Link to post

Thanks, will try it, Is there any point in delete the fireweapon module if user_17 won't be used anyway?

Share this post


Link to post

Well, there certainly is no point in keeping the fireweapon update if the state isnt used anymore - at best it does nothing, at worst it will cause some other bug down the line.

Share this post


Link to post

I see, well either way I still run into issues, changing user_17  condition or removing it  (and now also removing the fireweapon module) will fix the recovery animation as I stated in the first post but it still show broken Coming out of factory animation,

this time however it looked different, it will show the bunker and cannons alright but will stop middle way and show the behemoth just walking outside normally, I done some tests and also tried to change the condition of the AttributeModifier_BehemothBuildAnimation from user_17 to COMING_OUT_OF_FACTORY while removing all the user_17 models (I must do either way or the game will crush from having the same models and conditions twice)  but it didn't help.

I think now it have something to do with the animation frame time code (that in the game object) or something else that stop it mid way?

 

Or maybe I can try something else and somehow make the fireweapon module code to work only if it come out of factory? I don't sure if I  can set condition for it though

 

 

 

Edit, looking at the animation there are few things that may look weird  (at least for me)

 

				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="USER_17"
					StateName="STATE_built"
					EnteringStateFX=""
					FrameForPristineBonePositions="0"
					ShareAnimation="False"
					AllowRepeatInRandomPick="False"
					SimilarRestart="False">
					<Animation
						AnimationName="GUBEHMBLDA_BLDA"
						AnimationMode="ONCE"
						Distance="0"
						AnimationBlendTime="5"
						AnimationSpeedFactorMin="1"
						AnimationSpeedFactorMax="1"
						WeaponTimingOrdering="PRIMARY_WEAPON"
						WeaponTimingSlotID="1"
						AnimationPriority="1"
						FadeBeginFrame="-1"
						FadeEndFrame="-1"
						AnimationMustCompleteBlend="False"
						UseWeaponTiming="False"
						FadingIn="False" />
				</AnimationState>

 

 

				<AnimationState
					ParseCondStateType="PARSE_NORMAL"
					ConditionsYes="COMING_OUT_OF_FACTORY"
					StateName="STATE_built"
					EnteringStateFX=""
					FrameForPristineBonePositions="0"
					ShareAnimation="False"
					AllowRepeatInRandomPick="False"
					SimilarRestart="False">
					<Animation
						AnimationName="GUBEHMBLDA_BLDA"
						AnimationMode="ONCE"
						Distance="0"
						AnimationBlendTime="0"
						AnimationSpeedFactorMin="1"
						AnimationSpeedFactorMax="1"
						WeaponTimingOrdering="PRIMARY_WEAPON"
						WeaponTimingSlotID="1"
						AnimationPriority="1"
						FadeBeginFrame="-1"
						FadeEndFrame="-1"
						AnimationMustCompleteBlend="False"
						UseWeaponTiming="False"
						FadingIn="False" />
				</AnimationState>

 

Animation will start and end in -1 (don't know if it alright unless the Behemoth start standing)

Only user_17 have AnimationBlendTime set to 5

The animationpriority set low (though there aren't any other animations that have bigger priority so I don't think it issue unless that mean the game can randomly ignore it)

 

 

Edited by Egozi44

Share this post


Link to post

Yeah, sounds like the unit is skipping the end of the animation.

 

After looking at the KW code, try this: Go to MOVING and take a look at the script:

					<Script>
						Prev = CurDrawablePrevAnimationState()
						if Prev == "STATE_built" then
						CurDrawableSetTransitionAnimState("TRANS_built")
						end
					</Script>

That transitionstate doenst exist, so either copy it from the Juggernaught, or use this:

 

					<Script>
						Prev = CurDrawablePrevAnimationState()
						if Prev == "STATE_Built" then
							CurDrawableAllowToContinue()
						end
					</Script>

 

Share this post


Link to post

Thanks for your time, I tried almost anything you all suggest here or anything I know and still got it broken in one way or another, I don't understand the mechanism behind that animation thingy but it may be coded... and if it does I can't do anything to solve it :/

Here a pic of how it looks like when the behemoth's bunker and cannons don't start "unpacked" in case you curious....

 

 

sshot0020 1

Share this post


Link to post

can you upload the current xml again?

I think your problem is basicly that the build animation is using a different model, and even if we can force the unit to finish the animation, the modelstate might have ended allready and the different model will ruin the animation.

 

Try increasing BuildFadeInOnCreateTime to something like 5s and see if that helps. You also might want to speed up the animation.

 

Or you could try to force the modelcondition, but I would choose LUA instead of the weird fireweaponstuff.

Share this post


Link to post

Already deleted it, but it easy to recreate it,  and it the result I got in 99% of my testing anyway (aside that one time I made him to somehow not show this broken model, but after few secs he just standed midway and walk outside the WF instead , unfortunately I was stupid enough to not save this xml cause I was sure I could recreate it easily...)

To create this broken animation/model all you need to do is delete the user_17 model and animation or delete fireweapon.

The animation start normally for few secs and then the model changes to what you see in the picture above so it may be fast animation or model shifting as you said but I can't find what wrong in the xml, even mimic the original Juggernaut xml will result in the same thing probably cause the behemoth have different time for the animations.

 

I never really used the lua for anything aside hiding or showing sub objects, how can I use it as trigger for user_17? and is it possible to make it to use the coming out of factory condition so it won't repeat itself when the behemoth recover?

Edited by Egozi44

Share this post


Link to post

If only there was a way to give the fireweapon a condition it may solve it, normal conditionyes won't work though

 

 

Edit

Increasing or decreasing the BuildFadeInOnCreateTime will result in the behemoth just wait standing in the war factory till it his cue to move (if  Increasing) , Or just spawn standing from the air (if  decreasing) and start move fast to the exit .

As for speeding up the animation, I don't sure which part to speed but I assume it will make it look funny.

 

I think the lua will be the best option but don't sure how to trigger the modelcondition from it,

Is three any unit out there that uses lua for it model?

 

Edited by Egozi44

Share this post


Link to post

I think I understand what going on, EA made another model (only for the war factory) for the behemoth that use user_17 as trigger right? (that model can't be view with the x3wviewer as well no matter what shader you use btw) that model is the one the behemoth skip if we delete user_17 and the trigger  and go straight to the PARSE_DEFAULT model which... despite working well with the war factory animation in the viewer.. seem to not work with it in-game,

 

So while the behemoth skip the model that don't have trigger that let it appear temporarily, it will use the default model and will look broken.

 

So any ideas how I can use that model on for coming out of factory condition? adding it as condition don't work as long as it don't have something that trigger it, and adding COMING_OUT_OF_FACTORY in the animation AttributeModifier don't seem to work from my few first tests

 

At least now I got why they used fireweapon module that only work for few secs...

Edited by Egozi44

Share this post


Link to post

Thats basicly what I meant when I said

Quote

I think your problem is basicly that the build animation is using a different model, and even if we can force the unit to finish the animation, the modelstate might have ended allready and the different model will ruin the animation.

 

The build model works fine as far as I know, just looked at the version in my TWA folder and I cant remember ever messing with it.

There is even a animation for the default Behemoth model, GUBEHEMOTH_BLDA. However, with this animation, the bunker is visible through the roof of the factory, hence EA had to do a new model and animatte the bunker for the build up anim.

 

I think by default, BuildFadeInOnCreateTime triggers the JUST_BUILD state for the set amount of time while COMING_OUT_OF_FACTORY only applies until the unit reaches the rally point or gets another order.

Share this post


Link to post
Quote

Thats basicly what I meant when I said

Quote

 

The build model works fine as far as I know, just looked at the version in my TWA folder and I cant remember ever messing with it.

There is even a animation for the default Behemoth model, GUBEHEMOTH_BLDA. However, with this animation, the bunker is visible through the roof of the factory, hence EA had to do a new model and animatte the bunker for the build up anim.

 

I got what you meant back then, what I meant was that I think I realized how the switch for the bunker animation work : P

The strange thing though is that the bunker animation not visible at the x3wviwer

I thought abut trying to use the GUBEHEMOTH_BLDA model as default  but was sure it won't look right,

 

Maybe I can try to add COMING_OUT_OF_FACTORY USER_17 to all the necessary conditions and see how it goes...

Unless you know of better way to trigger it like LUA?

 

 

 

Edited by Egozi44

Share this post


Link to post

Uhm, GUBEHEMOTH_BLDA is the build animation for the default model, so yeah, the bunker is not animated in that one.

The unit with the animated bunker are GUBehmBlda_BLDA, GUBehmBlda_SKN, GUBehmBlda_SKL (not sure if thats included in the _SKN in KW.

 

Quote

Maybe I can try to add COMING_OUT_OF_FACTORY USER_17 to all the necessary conditions and see how it goes...

I fail to see how this is supposted to work oO

 

As far as I understand, you want the build anim to play at full lenght.

So, my suggestion is this: Remove everything relating to JUST_BUILD and COMING_OUT_OF_FACTORY from the Behemoth, we cant use the default system anyway.

Then add the folling to the Behemoth LUA scripting:

ExecuteAction("UNIT_SET_MODELCONDITION_FOR_DURATION", self, "USER_17", "4")

 

If my memory serves me right, this should give him the USER_17 state for 4 seconds after he has been build. Also make sure that the USER_17 animation is right below the default anim..

 

Of course, the next step would finding a way to make sure he doesnt get the model state when resurrected....

Share this post


Link to post

Sorry meant to GUBEHMBLDA_SKN,

 

Quote

So, my suggestion is this: Remove everything relating to JUST_BUILD and COMING_OUT_OF_FACTORY from the Behemoth, we cant use the default system anyway.

You meant to delete the all the models and animations that have JUST_BUILD and COMING_OUT_OF_FACTORY and the weapon thingy? exclude user_17's right?

 

 

Quote

Of course, the next step would finding a way to make sure he doesnt get the model state when resurrected....

That what this topic is all about ;)

 

 

 

Edited by Egozi44

Share this post


Link to post
27 minutes ago, Egozi44 said:

You meant to delete the all the models and animations that have JUST_BUILD and COMING_OUT_OF_FACTORY and the weapon thingy? exclude user_17's right?

Yes, both states are pointless and the weapon wont be needed anymore

 

28 minutes ago, Egozi44 said:

That what this topic is all about ;)

True, but lets see if this LUA idea even works before we make it more complicated.

Share this post


Link to post

Ok, I tried it, unless I mess up something it don't seem like it working

I added

<EventList Name="STJuggernaughtFunctions" Inherit="BaseScriptFunctions">
        <EventHandler EventName="OnCreated" ScriptFunctionName="OnSTJuggernaughtCreated" DebugSingleStep="false"/>
</EventList>
 

 

to the scriptevents

 

And this to the LUA script:

function OnSTJuggernaughtCreated(self)
 ObjectHideSubObjectPermanently( self, "MuzzleFlash_01", true )
 ObjectHideSubObjectPermanently( self, "MuzzleFlash_02", true )
 ObjectHideSubObjectPermanently( self, "MuzzleFlash_03", true )
 ExecuteAction("UNIT_SET_MODELCONDITION_FOR_DURATION", self, "USER_17", "4")
end

 

And ofc was sure to add it to the Behemoth's AILuaEventsList,  and deleted all the out of war factory models and animations.

Edited by Egozi44

Share this post


Link to post

can you try again with 4 insteat of "4" as the last value? not sure how the values need to be entered.

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×