Jump to content
Egozi44

Is it possible to make two units to merge?

Recommended Posts

 

I think you didn't got me with the gun upgrade, the gun was set to HideSubObject

but in random situations that mostly related to being damage the gun upgrade suddenly was triggered despite that the script didn't allow it

So I change all of it to ShowSubObject

Ah yes it seems i misunderstood that then.

 

Basicly this is the same issue as what you had with the Firehawk Afterburner:

 

By using the HideSubObject/ShowSubObject script you tell the gameobject when to show a mesh, but you have to do that for every state basicly, you didnt define that for the animationstates involving damages. You can either do this for every relevant animation and transitionstate or you do it through lua:

 

Atm you are using

 

 

<AI>
            <AIUpdate
                id="ModuleTag_AI"
                AILuaEventsList="GDIMARVFunctions"        --> change this to something like GDIMastodonFunctions
                AutoAcquireEnemiesWhenIdle="YES">
                <UnitAITargetChooserData
                  TargetingCompareList="DefaultTargetingCompareList"
                   RotateToTargetWhenAiming="False" 
                   CanPickDynamicTargets="False"
                   SympathyRange="100"/>
            </AIUpdate>
</AI>
 

then extract the scripts.lua scriptevents.xml from data/scripts/

 

in scripts.lua you add the folowing to the top of the file(if you add it to the top of the file it will be proccessed first and if it doesnt work it stops all scripts from working wich can serve as a test on it self):

 

 

function OnGDIMastodonCreated(self)
    ObjectHideSubObjectPermanently( self, "GUN_UPGRADE", true )
    
end
 

and in sciptevents.xml add the following(this can be at the bottom):

 

 

 <EventList Name="GDIMastodonFunctions" >
        <EventHandler EventName="OnCreated" ScriptFunctionName="OnGDIMastodonCreated" DebugSingleStep="false"/>
 </EventList>
 

you then add both of those files to:

A> \Built\MyModName\Mod\Data\Scripts\ folder

or

B> \Source\MyModName\Misc\Data\Scripts\ folder

 

I know A is the TW method of doing so, i am doubting if it works the same way for KW aswell, might need Megumi or Bibber's input on this or anyone who is more familiar with the KW file structure for that mather.

Edited by Ravendark

Share this post


Link to post

Changing the turrets to what you gave me caused them to shoot from the main cannon.... not from the back lanuchers

What to do? I think they must be in hierachy state...

 

 

 

Adding the speed to the animation didn't help much, he still skip them, I think the mastadon have script that prevent the animation in some condition.... don't know how to solve it and it look funny : /

 

 

 

 

Oh and I notice that after I changed something in the Locomotor long ago the mastadon stop shoot on targets that are behind him unlesss you move it (he won't auto move, but I notice that he will move if I force him to hit the ground.... maybe it something to do with the weapon? )

 

 

I changed the Locomotor to this

 

<?xml version="1.0" encoding="utf-8"?>
<AssetDeclaration xmlns="uri:ea.com:eala:asset">
<LocomotorTemplate id="GDIMastadonLocomotor" 
Surfaces="GROUND RUBBLE CRUSHABLE_OBSTACLE" 
MaxSpeedDamaged="75%" 
TurnTimeSeconds="4s"
 TurnTimeDamagedSeconds="8s"
SlowTurnRadius="3" 
FastTurnRadius="30" 
AccelerationSeconds="0.21s" 
BrakingSeconds="0.21s" 
MinTurnSpeed="50%" 
Appearance="TREADS" 
FormationPriority="NO_FORMATION" 
BackingUpSpeed="33%" 
BackingUpAngle="0.5" 
StickToGround="True" />
</AssetDeclaration>

 

He used the mammoth locomotor before, what is missing to make him move to target behind him?

 

 

(really sorry to add too much unlrelate stuff one after another xD)

Edited by Egozi44

Share this post


Link to post
<Weapon
                        Ordering="PRIMARY_WEAPON"         ---> change this to SECONDARY on both turret weapons but leave PRIMARY on the maingun ofc
                        Template="GDIMammothTankRocketPods" />
 

 

What to do? I think they must be in hierachy state...

Hierachical turret setup means it uses a parent and child setup, or a master + slave setup however it makes sense....your turrets werent working before because you didnt set a parent/master but did set child/slaves. You would've needed to define your maingun as a hierachical turret aswell (wich you didnt). Hence your master/slave chain never worked.

That aside it is to be used when your slave(child) turret bones are linked to your master(parent) bones, and that is not the case in the mastodon, as both main and sub turrets are linked to the torso/chassis and not eachother.

Hence hierachy isnt viable on the mastodont.

Take the mammoth for example, its rocketpods are linked to its main turret, hence when the main turrets turns left those rocket pods will turn with it, if your mastadont was a hierachical setup then its arse turrets would move out of axis when the main gun turns left or right.

 

as for the animation thing:

 

you can try to add a

AnimationBlendTime="10"

to it or set the flag to :

Flags="MAINTAIN_FRAME_ACROSS_STATES"

or maybe both, see if that helps

 

 

as for turning towards the target:

you copy/pasted the ai from the MARV and it has the following set to it

 

RotateToTargetWhenAiming="False"

change that to true like this:

 

 

<AI>
            <AIUpdate
                id="ModuleTag_AI"
                AILuaEventsList="GDIMARVFunctions"        
                AutoAcquireEnemiesWhenIdle="YES">
                <UnitAITargetChooserData
                  TargetingCompareList="DefaultTargetingCompareList"
                   RotateToTargetWhenAiming="true"
                   CanPickDynamicTargets="False"
                   SympathyRange="100"/>
            </AIUpdate>
</AI>
 

try that.

Edited by Ravendark

Share this post


Link to post

Hierachical turret setup means it uses a parent and child setup, or a master + slave setup however it makes sense....your turrets werent working before because you didnt set a parent/master but did set child/slaves. You would've needed to define your maingun as a hierachical turret aswell (wich you didnt). Hence your master/slave chain never worked.

That aside it is to be used when your slave(child) turret bones are linked to your master(parent) bones, and that is not the case in the mastodon, as both main and sub turrets are linked to the torso/chassis and not eachother.

Hence hierachy isnt viable on the mastodont.

Take the mammoth for example, its rocketpods are linked to its main turret, hence when the main turrets turns left those rocket pods will turn with it, if your mastadont was a hierachical setup then its arse turrets would move out of axis when the main gun turns left or right.

 

I see, the turrets moving at target still didn't work though even after change to secondry, what went worng here... everything seem fine

 

 

 

I still trying the animation thing atm

 

 

You was right about the changing RotateToTargetWhenAiming="" to true

But then the mastadon move in exaggerated way to everything it need to shoot at to the point it look funny... it may be because I changed the locomator but the mammoth one just didn't look right on it,

Is there any way to make him shoot on targets behind him without the RotateToTargetWhenAiming thing?

 

 

Thanks

Share this post


Link to post

I know A is the TW method of doing so, i am doubting if it works the same way for KW aswell, might need Megumi or Bibber's input on this or anyone who is more familiar with the KW file structure for that mather.

Completely depends on the batch file you're using.

Share this post


Link to post

Completely depends on the batch file you're using.

WED 1.7 original batchfiles that came with in my case.

Wich would be the correct method then?

 

am i assuming right this line is responsible for my question

if exist "Source\%modname%\Misc" xcopy "Source\%modname%\Misc\*.*" "Built\%modname%\Mod" /Q /Y /I /R /S
 

so if i basicly put everything related to lua into:

 

source\mymodname\Misc\Scripts\
 

 

itwould copy that over into the built folder anyway then compile it?

Edited by Ravendark

Share this post


Link to post

Yes, though I didn't write that batch file. I usually am a bit more hands on... also I skip putting my mod in big files for testing.

Share this post


Link to post

I usually am a bit more hands on... also I skip putting my mod in big files for testing.

Does that mean you don't need to compile your mod into a big for it to be able to be used ingame? Or what do you mean by that?

Share this post


Link to post

Thats exactly what she ment. ^^

Share this post


Link to post

Sorry for the delay

 

Here the x3w files filled with my love :D

lol just kidding

 

http://www.mediafire.com/download/dg0uzn03piiveiz/Mastadon.rar

 

 

 

I done what you told me with the scripts and to answer your question: the location depend on what WED ver you use

in 1.08 + you need to place it in

warthed\Mods\MyModName\Misc\DATA\Scripts

 

 

Hopefully it solve my issue

 

 

 

I added the flags and AnimationBlendTime to the animations, it caused them to work A bit better, but he still generally skip most of the "Selected to Idle" animation, but less after I add these

 

What really annoy me though is that when he move and unit interrupt or prevent him from moving... he sit right away, I saw that the script told him that if he being prevent from using the moving animation then he should use the "Out of factory" animation, I changed it to the selected animation yet the darn thing completely ignored me : 0

it imported unit... it don't seem to be coded and I don't think it even possible for it to be coded, why he ignore what I tell him to do? it can be something in the x3w files as well?

Edited by Egozi44

Share this post


Link to post

Does that mean you don't need to compile your mod into a big for it to be able to be used ingame? Or what do you mean by that?

The .big file format is just a container like mp4, mkv and stuff. It has nothing to do with the actual compiling of data. It reduces load times if you have a lot of files, but isn't that important for testing. Edited by Lauren

Share this post


Link to post

so this is your turret setup:

 

 

<Turret
TurretNameKey="b_turret01"
TurretPitch="d8262510"
TurretID="1" />
<Turret
TurretNameKey="Turret_L"
TurretPitch="Pitch_L"
TurretID="3" />
<Turret
TurretNameKey="581EBBEB"
TurretPitch="D8262510"
TurretID="4" />
 

And this is how the bones are actually linked (opened GUVEHICLEL_SKL.w3x in 3dsmax ):

 

B_TURRET01(this is your mainturrets x axis) <-- D8262510 (this is your mainturrets y axis) <-- FXWEAPON_01

<-- FXWEAPON_02

 

581EBBEB (right rocket turret x axis) <-- Pitch_L ironicly this should probably by _R for rightside where it is located

<-- Rocket_L

 

Turret_L (this is in the same location as 581EBBEB but mirrored to the otherside, so this Turret_L bone should be your left rocket turret x axis, ) <-- but nothing is linked to that bone...it should have atleast Rocket_R linked to it.

Because it hasnt have Rocket_R linked to it (the bone you launch the projectile from) everytime you tell Turret_L to rotate, Rocket_R doesnt rotate with it.

 

Going from the positions the bones are placed in your skn file, your turret setup should be more like:

 

 

<Turret
TurretNameKey="b_turret01"
TurretPitch="d8262510"
TurretID="1" />

<Turret
TurretNameKey="581EBBEB"
TurretPitch="581EBBEB"
TurretID="3" />

<Turret
TurretNameKey="Turret_L"
TurretPitch="Turret_L"
TurretID="4" />
 

But since half of those links seem to be broken none of those turrets should work at all. I am guessing when they extracted those files from TT something whent wrong or else the mastadon was a complete ****up to start with....wich wouldnt suprise me tbh.

The short story: imo i am suprised it works as far as it does....its a cluster**** imo

maybe its the w3xml importer for 3dsmax thats not working, but on the other hand opening and looking at the xml file for that skl makes not sense at all, some of the parenting indexes seem off or 'mislinked' just like in 3dsmax.

Edited by Ravendark

Share this post


Link to post

Setting them that way caused them to stop moved at all

 

Here the Original c&c4 mastadon files (extraxted them myself)

 

They seem to have every bone named and they seem to be less broken

take a look

 

http://www.mediafire.com/download/xdflxemphfpkw8j/c%26c4_mastadon.rar

 

Will it be wroth to swtich to them?

 

I know how to change the shadders to make the mastdon appear in KW, the issue is if they will ruin something else like the house colors?

Share this post


Link to post

But since half of those links seem to be broken none of those turrets should work at all. I am guessing when they extracted those files from TT something whent wrong or else the mastadon was a complete ****up to start with....wich wouldnt suprise me tbh.

 

The fact that some of the bones have weird names indicates that they were extracted with an old version of bibbers tools, so there might be something wrong with them.

Share this post


Link to post

it seems alot more consistant then the other files. i would idd use the GUVEHICLEL_SKL.w3x from this one.

 

your turret bones would be the following:

 

b_turret07 right rocket turret x axis (will double for y axis(pitch))

aa_r_01 right rocket launch/fx bone 01

aa_r_02 right rocket launch/fx bone 02

 

b_turret06 left rocket turret x axis (will double for y axis(pitch))

aa_l_01 left rocket launch/fx bone 01

aa_l_02 left rocket launch/fx bone 01

 

b_turret01 front cannon turret x bone (rotation)

b_pitch01 front cannon turret y bone (pitch)

t1_cannon01 front cannon turret launcg/fx bone 01

t1_cannon02 front cannon turret launcg/fx bone 02

 

so basicly:

 

 

<ModelConditionState
                    ParseCondStateType="PARSE_DEFAULT">
                    <Model
                        Name="W3DContainer:GUVehicleL_SKN" />
                    <WeaponFireFXBone
                        WeaponSlotID="1"
                        WeaponSlotType="PRIMARY_WEAPON"
                        BoneName="t1_cannon" />
                    <WeaponLaunchBone
                        WeaponSlotID="1"
                        WeaponSlotType="PRIMARY_WEAPON"
                        BoneName="t1_cannon" />
                   
                    <WeaponFireFXBone
                        WeaponSlotID="3"
                        WeaponSlotType="SECONDARY_WEAPON"
                        BoneName="aa_l_" />
                    <WeaponLaunchBone
                        WeaponSlotID="3"
                        WeaponSlotType="SECONDARY_WEAPON"
                        BoneName="aa_l_" />
                    <WeaponFireFXBone
                        WeaponSlotID="4"
                        WeaponSlotType="SECONDARY_WEAPON"
                        BoneName="aa_r_" />
                    <WeaponLaunchBone
                        WeaponSlotID="4"
                        WeaponSlotType="SECONDARY_WEAPON"
                        BoneName="aa_r_" />

<Turret
TurretNameKey="b_turret01"
TurretPitch="b_turret01"
TurretID="1" />
<Turret
TurretNameKey="b_turret06"
TurretPitch="b_turret06"
TurretID="3" />
<Turret
TurretNameKey="b_turret07"
TurretPitch="b_turret07"
TurretID="4" />
</ModelConditionState>
 

normaly all the other files inherit their bone positions from the .skl file..so it should be ok to just replace the old one with the one you extracted yourself. just in case remember to back up the old in.

Share this post


Link to post

I took all of the TT mastadon files and edit them to work on the mod : ),

 

But I think something wrong with putiing the b_turrets as a Pitch

 

Like the last time when I put the Turrets as pitch they will stop move at all, same thing with the main cannon, it already have pitch, why you told me to put it as a pitch as well? : o

 

Anyway I need the turrent pitchs, do they even have ones?

 

I use aa_r and aa_l for their pitchs atm but they still don't seem to look at what they shoot at

Edited by Egozi44

Share this post


Link to post

the aa bones dont have a mesh attached to them iirc..so when they turn nothing is linked to turn with them. it might be possible that you can make the rocket turrets pitch at all because they have no real y axis bone for that.

Share this post


Link to post

Turret and pitch shouldn't use the same bone as it would mess a lot with rotation. Also there is nothing like a "y axis bone", each bone has a translation and rotation for 3d space. If there's nothing like a barrel bone then I suggest creating a new one manually.

Share this post


Link to post

I was able to add pitchs to both Turrets from other mastodon model, the question is if I need to add them to other file aside the SKL ?

 

They still didn't make them look at what they shoot at but it still better for them to have their own pitch ; )

Share this post


Link to post

Ye i brainfarted on the y axis thing....basicly that would mean it would move from left to right or such.....i mentaly pictured the pitch radius arround the y axis...wich is bad phrasing i guess.

Anyway the bone setups are as i indicated before, with the rocket turrets not having a different bone for barel elevation. the launch/fx bones are directly linked to the horizontal rotation ( guss thats more accurate phrasing).

 

b_turret06 b_turret07 are the rotation bones for the rocket turret mesh....or you can use them for elevation. But using both could give problems. the aa_r and aa_r bones are linked those those respectively.

 

the main cannon turret actually a barrel/elevation bone b_turret01, hence why its pitch should work.

 

A side question for Megumi:

 

Mosst if not all ingame turrets ar basicly setup like this:

turretbase(rotation) with the barrel(elevation) ontop. Yoru basic tank thing barrel on turret on chassis.

 

Now i have a Wolverine like unit planned and have been wondering about how it would behave if i flip the rotation with the elavation: basicly the elevation bone is attached to the chassis(shoulder of the wolverine) and the rotation of the minigun/barrel is basicly its elbow...would elevation here being more dominant in movement then rotation create some weird angles?

Edited by Ravendark

Share this post


Link to post

Well until she answer let change the focus for a bit from the turrets to the animations as I can live with them moving like that, it still will be better for them to actually face the target but if there's no way you or anyone else know, and since I don't sure how to make them elevation I will move to stuff you may know how to help me with (if you do know how to make them elevation or have other methods to try to make them look at target, tell me, I tried a few stuff ,myself but they all failed so far)

 

 

Ok for the animations

As I said before the Mastadon can't shot targets that behind him, and as you said changing the RotateToTargetWhenAiming to true make him move but when he shoot moving target that still in it range (in other words don't required him to move or chase it) he will rotate in really funny way, without move the legs or anything, so my question here if there's a way to either fix the rotate space (rather than speed since the speed is alright... the issue is that he don't take enough space between each rotation and don't use it legs since it low space rotation move.... it look worse than the mammoth's rotation because the Mastadon have legs and no wheels) or add some sort of AcceptableAimDelta and range to the weapon so the weapon can still move without the Mastadon need to actually move his body, adding RotatingTurret="True" to the weapon made it look better but the weapon still have it blind points where it won't shoot unless the Mastadon will move his body to face the target, another thing we can try is to add/change something in the locomotor, but I don't sure what

 

 

 

 

Another animation questions:

As you probably know because I mention it before, the Mastadon will go to idle animation while he interrupt in the Move animation, Now if he will want to go to the bathroom it can cause Real issue if someone interrupt him while he in hurry D: !

So in order to make everyone feel more comfortable and make me clean less Mastadon's Sh@t ^^ can you take a look at the Mastadon's xml I posted and tell me how I can force him to Not go to the idle animation while he uses the moving animation : D ?

 

 

Really thanks for the help so far btw

Edited by Egozi44

Share this post


Link to post

A side question for Megumi:

 

Mosst if not all ingame turrets ar basicly setup like this:

turretbase(rotation) with the barrel(elevation) ontop. Yoru basic tank thing barrel on turret on chassis.

 

Now i have a Wolverine like unit planned and have been wondering about how it would behave if i flip the rotation with the elavation: basicly the elevation bone is attached to the chassis(shoulder of the wolverine) and the rotation of the minigun/barrel is basicly its elbow...would elevation here being more dominant in movement then rotation create some weird angles?

Never tried it but it would be a weird looking thing. Remember the elbow in nature is a hinge, that does rotate the y axis (pitch) (and there are two bones in your lower arm to support x rotation (roll)). Rotation around the z (up) axis (yaw) on this point would just look wrong for everyone as that's not what one is accustomed to see. Every yaw rotation for your arms is done in the shoulder. Edited by Lauren

Share this post


Link to post

Ye i figured asmuch, thanks for the answer megumi.

 

 

As for the turning arround animation, you could try to add a animationstate that has conditionsYes="ATTACKING TURN_LEFT" and another aniationstate for attacking turn_right.

 

IIRC BFME used the QuadrupedDraw for its mamaluke (that the correct name for those elephants?), you could try to experiment with that as in theory its designed for 4 legged vehicles. Maybe it works better but imo i doubt it, Basicly its all about correct animations and transitions.

Share this post


Link to post

Mumakil. (Or Oliphaunts)

Edited by Lauren

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.

×