Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: TheJamsh on March 10, 2009, 07:06:05 PM

Title: Can anyone help me finish this aircraft?
Post by: TheJamsh on March 10, 2009, 07:06:05 PM
Ive got an aircraft fighter for both ISDF & Scion that i want to put out.

The physics are perfect, the only problem i have is getting the AI to stay in the air when its idle, attacking or waiting/holding. using the 'AlwaysDeployed = true' function prevents the player from being able to land his/her craft with the C key, and prevents you ordering youre own aircraft to land.

The parts of the ODF you would need to look at are the following:

[GameObjectClass]
deployOnBuild = 1 // only so they can get straight into the action

[CraftClass]
AircraftAttackMustDeploy = true // doesnt seem to have any effect
subAttackClass = "ADN" // include air units, must deploy to attack, use engage range to attack. I DONT HAVE AN ATTACKTASK OR SUBATTACKTASK

[AircraftClass]
AlwaysDeployed = true // needs to be false so i can land the damn things once they are up!
attackTask = "DefendArea"
waitTask = "DefendArea"
defendTask = "DefendArea" // this and the two options above taken from an example ODF from MrTwoSheds.


Currently, if i turn 'AlwaysDeployed' to false, the aircraft land and takeoff spontaniously. even landing WHILE attacking something and while targetting another enemy aircraft. They do undeploy if i order them to 'come get me' however.


I want them to remain airborne at all times, UNLESS i order them to land (using the FORCE UNDEPLOY command in the menu).
Title: Re: Can anyone help me finish this aircraft?
Post by: BNG Da BZ Fool on March 10, 2009, 08:17:16 PM
What ODF are you using? Try the cvtalon.odf; it stays in the air even when holding and circles around the area. You can also play around with engage range to get the air unit to attack stuff by setting a move to point to engage approaching enemy targets. It'll also come pick you up as well.
Title: Re: Can anyone help me finish this aircraft?
Post by: TheJamsh on March 10, 2009, 08:26:15 PM
Its a completely custom ODF. im not going to post it here because i dont want the physics ravaged (for the moment anyway)

its also for the latest public beta, ive tried a few different attackTasks (SAVVehicleAttackTask and ArcherSubAttack seem to work ok, but not fool proof.

also found out if you set altitudeLookahead for an aircraft too high it wont be able to land. ever.
Title: Re: Can anyone help me finish this aircraft?
Post by: mrtwosheds on March 10, 2009, 08:39:11 PM
From the sound of it he's using a variant my experimental aircraft odf,  :-)

I admit that its just stuff I threw together from various places, and Im not even too sure how my own ones are behaving at the moment...
here's the the latest one, I hope it helps, and please post anything you figure out, as this is uncharted territory for us all.

[GameObjectClass]
baseName = "dvwing"
geometryName = "dvpara00.xsi"
classLabel = "aircraft"
geometryScale = 0.875
scrapValue = 10
scrapCost = 65
customCost = 75
buildTime = 10.0
maxHealth = 4000
maxAmmo = 5000
addHealth = 5
addAmmo = 6
aiAddHealth = 7
aiAddAmmo = 8
unitName = "ParaDalek"
//explosionName = "xsuiscav"
aiName = "AirCraftFriend"
aiName2 = "AirCraftEnemy"
heatSignature = 4.0
imageSignature = 0.5
radarSignature = 2.0
isAssault = 0
CanSnipe = 0
armorClass = l
//collisionRadius = 8.0
boxCollide = 1
Mass = 15000
SmartIsAirUnitCheck = false
LightsOnlyWhenPiloted = true
provideCount = 2
provideName1 = "dvpara"
provideName2 = "flier"

requireCount = 3
requireName1 = "dbfact"
requireText1 = "Dalek Factory Required"
requireName2 = "Dbemper"
requireText2 = "Emperor Required"
requireName3 = "dbmaster"
requireText3 = "Build Master Dalek"

lightHard1 = "hp_light_1"
lightName1 = "eyeblue"
lightHard2 = "hp_light_3"
lightName2 = "earlight"

weaponMask = 00011
weaponHard1 = "HP_special_1"
visualHard1 = "HP_DOCK_S"
weaponAssault1 = 1
weaponName1 = "gparabb"
weaponHard2 = "HP_special_2"
visualHard2 = "HP_DOCK_T"
weaponAssault2 = 1
weaponName2 = "gparabb"
weaponHard3 = "HP_cannon_1"
visualHard3 = "HP_DOCK_H"
weaponAssault3 = 0
weaponName3 = ""
weaponHard4 = "HP_cannon_2"
visualHard4 = "HP_DOCK_P"
weaponAssault4 = 0
weaponName4 = ""
weaponHard5 = "HP_SHIELD_1"
weaponAssault5 = 1
weaponName5 = ""


[CraftClass]
AircraftAttackMustDeploy = true
PathingType = 4 // -1 = auto, 0 = Hover, 1 = Walker, 2 = Person, 3 = Tracked, 4 = Flyer
UseAssaultSpecials = true
rangeScan = 450.0f
periodScan = 4.0f
velocJam = 5.0f
engageRange = 300
NonWingmanProcessAttackMines = false
DoWeaponCanHitCheck = true
ClosestEnemyGoodEyes = true
//weaponPitch = .35
selectWaitMsg = "iobey.wav"
selectAttackMsg = "intrlok.wav"
selectFollowMsg = "iobey.wav"
selectGoMsg = "extallhum.wav"
selectOtherMsg = "iobey.wav"
canHunt = 1
goMsg = "extallhum.wav"
attackMsg = "regasnme.wav"
followMeMsg = "dmove.wav"
followMsg = "iobey2.wav"
repairMsg = "iobey2.wav"
reloadMsg = "iobey.wav"
rescueMsg = "identifh.wav"
recycleMsg = "exterm.wav"
otherMsg = "extallhum.wav"
holdMsg = "stay.wav"

user1Msg = ""  
killedMsg = "supreme.wav"
diedMsg = ""


[AirCraftClass]
AltitudeLookahead = 1.0
attackTask = "DefendArea"
defendTask = "DefendArea"
waitTask = "DefendArea"
velocSet(L) = 5.0 // minimum velocity
velocSet(M) = 15.0 // cruising velocity
velocSet(H) = 40.0 // maximum velocity
accelThrust = 20  // thrust acceleration
accelBrake = 10 // 10.0 // brake acceleration
accelDrag = 50 // 60.0 // drag acceleration -- affects sliding sideways
// mouse as rudder
omegaSteer(L) = 1.5  // 2.5 // steer turn rate at minimum
omegaSteer(M) = 1.25  // 2.0 // steer turn rate at cruising
omegaSteer(H) = 1.0 // 1.5 // steer turn rate at maximum
// strafe affecting rudder
omegaStrafe(L) = 0.75 // airbrake turn rate at minimum
omegaStrafe(M) = 0.55 // airbrake turn rate at cruising
omegaStrafe(H) = 0.35 // airbrake turn rate at maximum

//this affects steering but not sliding
alphaSteer = .75 // steering angular acceleration
// more = more turning from strafing
alphaStrafe = .1 // 0.01 // airbrake angular acceleration


alphaDamp = 17 // 12 // damping angular acceleration
//a low values under 5 get insanely tippy
pitchPitch = 1.57 //  maximum pitch angle

rollSteer = 0.5 // 0.5 // maximum roll angle from steering
rollStrafe = 0.5 //0.5 // maximum roll angle from airbraking

//added stuff
OverWaterFlying = true
OverWaterLanded = true
MaxTakeoffSpeed = 34.0
aiAltitude = 40 // default = minAltitude + 25% of dist between min, maxAltitude
LiftSpring = 30.0 // all craft/pilots, during takeoff/landing
AILiftSpring = 30.0 // AI craft ONLY, when flying to get to aiAltitude.
minAltitude = 35.0
maxAltitude = 200.0  
alphaLevel = 7 //5 // 10.0 // how fast you can change pitch/ overall manuver

soundThrust = "dtech4.wav"
soundTurbo = "dtech6.wav"
soundDeploy = "elev8.wav"
soundUndeploy = "dzzowk.wav"
soundBrake = "dtech12.wav"
timeDeploy = 6.0 // 2.0 // time to deploy
timeUndeploy = 2.0 // 2.0 // time to undeploy

[Lod1]
geometryName = "dvpara01.xsi" ;geometry for lod1
distance = 50


Title: Re: Can anyone help me finish this aircraft?
Post by: TheJamsh on March 10, 2009, 08:57:01 PM
Yeh it started off with you're one, the paraglider has really solid physics. Anyone elses that were posted tended to be really jumpy when piloted by humans (i looked at BBB's antigrav fighters and GBD's space fighters). Ive probably doubled the amount of entries lol... its ridiculous.

I seem to have ironed out most problems so far apart from two. They are incredibly dumb when it comes to attacking ground units (they come close, look RIGHT at them, then end up ploughing into the floor, usually exploding on impact or bouncing away out of control trying to right themselves, they end up getting too far away and losing their target, so you never see it again...)

The other problem is, i want them to STAY in the air if they have just killed something off. currently, once they have finished with their target, they will land, then search for a new target, you have to get really close to be counted as one before the thing takes off again.

They attack air units perfectly, really good dogfighters. MrTwoSheds will see it before most people because its going into my private recycler variant.
Title: Re: Can anyone help me finish this aircraft?
Post by: mrtwosheds on March 10, 2009, 09:36:55 PM
I have not found a way to stop them grounding, all I can do is deploy and undeploy them to get them in the air again.

As far as staying in the air after a kill, I have noticed that they are much better at this in a real game than they are in the editor.
Title: Re: Can anyone help me finish this aircraft?
Post by: TheJamsh on March 10, 2009, 10:27:49 PM
For the first point, the only way ive found to get them to randomly stick on the ground is use 'AlwaysDeploy = 1' under [AircraftClass]

I havent tested them in the actual game. i know it sometimes works better than the editor for some random reasons. The spontanius deploying and undeploying is a bit of a nightmare...
Title: Re: Can anyone help me finish this aircraft?
Post by: Red Devil on March 11, 2009, 04:52:20 AM
As I said on irc, having a large engageRange is key.  I set mine to 1300 and they immediately took off to go attack the enemy.

Also, blastDist and attackRange aither need to be equal to engageRange or removed.

The one I have takes right off and heads for the enemy base, repeatedly strafing them with rockets and follows after Scavs as they get its attention.

Oh heck I'll just post what I have so far, combining what MTS posted and what I've tweaked and a couple tweaks of what J posted:

[GameObjectClass]
baseName = "ivtank"
geometryName = "ivtank00.xsi"
classLabel = "aircraft"
geometryScale = 0.875
scrapValue = 10
scrapCost = 65
customCost = 75
buildTime = 10.0
maxHealth = 4000
maxAmmo = 5000
addHealth = 5
addAmmo = 6
aiAddHealth = 7
aiAddAmmo = 50
unitName = "Airplane"
//explosionName = "xsuiscav"
aiName = "AirCraftFriend"
aiName2 = "AirCraftEnemy"
heatSignature = 4.0
imageSignature = 0.5
radarSignature = 2.0
isAssault = 0
CanSnipe = 0
armorClass = L
collisionRadius = 8.0
boxCollide = 1
Mass = -1
SmartIsAirUnitCheck = false
LightsOnlyWhenPiloted = true
pilotConfig = "ispilo"

//provideCount = 2
//provideName1 = "dvpara"
//provideName2 = "flier"

//requireCount = 3
//requireName1 = "dbfact"
//requireText1 = "Dalek Factory Required"
//requireName2 = "Dbemper"
//requireText2 = "Emperor Required"
//requireName3 = "dbmaster"
//requireText3 = "Build Master Dalek"

//lightHard1 = "hp_light_1"
//lightName1 = "eyeblue"
//lightHard2 = "hp_light_3"
//lightName2 = "earlight"

weaponMask = 00011
weaponHard1 = "HP_cannon_1"
visualHard1 = "HP_DOCK_H"
weaponAssault1 = 0
weaponName1 = "gfafmsl_c"

weaponHard2 = "HP_cannon_2"
visualHard2 = "HP_DOCK_P"
weaponAssault2 = 0
weaponName2 = "gfafmsl_c"

weaponHard3 = "HP_special_1"
visualHard3 = "HP_DOCK_S"
weaponAssault3 = 1
weaponName3 = "gjax"

weaponHard4 = "HP_special_2"
visualHard4 = "HP_DOCK_T"
weaponAssault4 = 1
weaponName4 = "gjax"

weaponHard5 = "HP_SHIELD_1"
weaponAssault5 = 1
weaponName5 = ""


[CraftClass]
AircraftAttackMustDeploy = true
PathingType = 4 // -1 = auto, 0 = Hover, 1 = Walker, 2 = Person, 3 = Tracked, 4 = Flyer
UseAssaultSpecials = true
rangeScan = 600.0f
periodScan = 1.0f
velocJam = 5.0f
engageRange = 1300
NonWingmanProcessAttackMines = false
DoWeaponCanHitCheck = true
ClosestEnemyGoodEyes = true
//weaponPitch = .35

//MaxWeaponPitch = 0.0
//MinWeaponPitch = 0.0

//selectWaitMsg = "iobey.wav"
//selectAttackMsg = "intrlok.wav"
//selectFollowMsg = "iobey.wav"
//selectGoMsg = "extallhum.wav"
//selectOtherMsg = "iobey.wav"
canHunt = 1
//goMsg = "extallhum.wav"
//attackMsg = "regasnme.wav"
//followMeMsg = "dmove.wav"
//followMsg = "iobey2.wav"
//repairMsg = "iobey2.wav"
//reloadMsg = "iobey.wav"
//rescueMsg = "identifh.wav"
//recycleMsg = "exterm.wav"
//otherMsg = "extallhum.wav"
//holdMsg = "stay.wav"

user1Msg = "" 
//killedMsg = "supreme.wav"
diedMsg = ""


[AirCraftClass]
AltitudeLookahead = 5.0
attackTask = "DefendArea"
defendTask = "DefendArea"
waitTask = "DefendArea"
velocSet(L) = 20.0 // minimum velocity
velocSet(M) = 40.0 // cruising velocity
velocSet(H) = 60.0 // maximum velocity
accelThrust = 40  // thrust acceleration
accelBrake = 40 // 10.0 // brake acceleration
accelDrag = 30 // 60.0 // drag acceleration -- affects sliding sideways

// mouse as rudder
omegaSteer(L) = 1.5  // 2.5 // steer turn rate at minimum
omegaSteer(M) = 1.25  // 2.0 // steer turn rate at cruising
omegaSteer(H) = 1.0 // 1.5 // steer turn rate at maximum
// strafe affecting rudder
omegaStrafe(L) = 0.75 // airbrake turn rate at minimum
omegaStrafe(M) = 0.55 // airbrake turn rate at cruising
omegaStrafe(H) = 0.35 // airbrake turn rate at maximum

//this affects steering but not sliding
alphaSteer = .75 // steering angular acceleration
// more = more turning from strafing
alphaStrafe = 0.1 // 0.01 // airbrake angular acceleration


alphaDamp = 15 // 12 // damping angular acceleration
//a low values under 5 get insanely tippy
pitchPitch = 1.57 //  maximum pitch angle

rollSteer = 0.57  // 0.5 // maximum roll angle from steering
rollStrafe = 1.57 // 0.5 // maximum roll angle from airbraking

//added stuff
OverWaterFlying = true
OverWaterLanded = false
MaxTakeoffSpeed = 5.0
aiAltitude = 50 // default = minAltitude + 25% of dist between min, maxAltitude
LiftSpring = 30.0 // all craft/pilots, during takeoff/landing
AILiftSpring = 30.0 // AI craft ONLY, when flying to get to aiAltitude.
minAltitude = 10.0
maxAltitude = 200.0 
alphaLevel = 5 //5 // 10.0 // how fast you can change pitch/ overall manuver

soundThrust = "amb_wind.wav"
soundTurbo = "amb_wind.wav"
//soundDeploy = "elev8.wav"
//soundUndeploy = "dzzowk.wav"
//soundBrake = "dtech12.wav"
//timeDeploy = 1.0 // 2.0 // time to deploy
//timeUndeploy = 1.0 // 2.0 // time to undeploy

[DeployableClass]                                                     <---------  Added this section the other day.  Helps.
timeDeploy = 5.0 // 2.0 // time to deploy
timeUndeploy = 5.0 // 2.0 // time to undeploy
heightDeploy = 5.0
soundDeploy = "avartle0.wav"
soundUndeploy = "avartle4.wav"

[Lod1]
geometryName = "ivtankL1.xsi" ;geometry for lod1
distance = 50

Title: Re: Can anyone help me finish this aircraft?
Post by: Red Devil on March 11, 2009, 05:47:26 AM
Just found that adding a [DeployableClass] section and its entries makes a *big* difference on takeoffs.
Title: Re: Can anyone help me finish this aircraft?
Post by: TheJamsh on March 11, 2009, 11:38:52 AM
yeh already got deployable class in there.

The thing is, i DONT want them to randomly take off and blitz around annihalating everything, i want them to attack morel ike hover tanks, but stay in the air when done.
Title: Re: Can anyone help me finish this aircraft?
Post by: Red Devil on March 12, 2009, 05:58:45 PM
Not sure that's possible now because they would have to just circle around when not attacking.  Even the (awesome) aircraft in BF2: AIX2 never stop attacking.  Well, the choppers follow a back-and-forth pathing from one side of the map to the other and attack things within range, but that's hard to avoid.


I don't see that section in the ones you sent over, so, for the sake of calrity, this is what I added to mine a few days ago:

[DeployableClass]
timeDeploy = 5.0 // 2.0 // time to deploy
timeUndeploy = 5.0 // 2.0 // time to undeploy
heightDeploy = 5.0
soundDeploy = "avartle0.wav"
soundUndeploy = "avartle4.wav"
Title: Re: Can anyone help me finish this aircraft?
Post by: TheJamsh on March 12, 2009, 06:36:21 PM
i had a problem setting minAltitude as low as 5.0, they tended to whiz around at ground level smashing into base buildings, only gaining height if another aircraft at higher altitude zipped past.

i like the physics of the ones ive got, very Top Gun inspired, just the deploying and undeploying i need to figure out.

there must be some kind of attack task that stays deployed when its finished attacking. i know morphtanks do, but i dont think i can use that AI...


BTW RD, the aircraft didnt accept anything under deployable class... didnt read it in at all. are you sure youre using:
aiName = "AircraftFriend"
aiName2 = "AircraftEnemy"
Title: Re: Can anyone help me finish this aircraft?
Post by: Red Devil on March 12, 2009, 09:38:44 PM
Yes, look up.  Which map are you using to test with?  I'm using Dunes and the ships fly up over the dunes nicely.  And using [Deployclass] definitely affects the behavior of the ships i'm using, so I'm keeping it.  :-)
Title: Re: Can anyone help me finish this aircraft?
Post by: BNG Da BZ Fool on March 12, 2009, 11:12:53 PM
It seems logical to include the addHealth statement on units that tend to collide with building structures just to insure their' useful life. Air types are ideally suited to ground force protection (use a relatively short engage range so they stick close) as well as air to air and ground assault tasking. I'm not sure, but landing them between attacks might make them somewhat vulnerable to long range mortar type units. I also noticed that you should never ever set the flight altitude beyond the service range of your service units if you want to repair them as well. I set mine to like 40 meters and tweaked the settings on my service vehicle to make sure they were within a reasonable service range. What might really be cool is a land based hovertype aircraft carrier something like the Cerberi Demon only with true aircraft types deployed to guard specific deployed assets.   
Title: Re: Can anyone help me finish this aircraft?
Post by: TheJamsh on March 12, 2009, 11:19:52 PM
im using dunes also, just a blank map. fiddling around with things atm, definately going to bring this into DM somehow...

going to blag youre posted ODF and toy with it...

EDIT: After making a mockup from yours i came up with some things,

They still deploy and undeploy between attacking their targets.

They do use different physics setings to mine, which might be useful. mine tend to spin off out of control, but i have high turn rates and high damping, which might be the problem. They again mine are designed as dog.

There are so many restrictions with aircraft. gah. i did make mine so they would take more damage from hits to ground and objects, but because they flew out of control a lot of them died because of hootty flying.

Best bet BNG is to use a flag in the airplanes ODF to make sure that service trucks wont consider it a service target. With the speeds mine travel at, you wouldnt want a service truck trying to track you while youre gun towers get slaughtered by maulers.
Title: Re: Can anyone help me finish this aircraft?
Post by: mrtwosheds on March 13, 2009, 06:38:46 PM
QuoteThey still deploy and undeploy between attacking their targets.
When I use my paradaleks in an mpi game they can successfully bomb an entire base into oblivion, with out landing once.
In the editor, they land after destroying their one specified target.
Title: Re: Can anyone help me finish this aircraft?
Post by: Red Devil on March 14, 2009, 12:08:20 AM
How many targets are there and how close together are they?  If there's just one or a few close together and the engageRange is low and the next target is outside the engageRange, then they won't see it and will land.  I've also noticed that giving them a big accelThrust will help them undeploy and an aiAltitude of 80 will help them stay aloft.  I was playing around with them last night and they were flying around attacking ground targets and air targets very well.
Title: Re: Can anyone help me finish this aircraft?
Post by: TheJamsh on March 15, 2009, 12:41:39 AM
maybe the editor is the problem then.

ive set a huge engage range, aiAltitude doesnt have a huge effect.

Oh RD, the deployable section you added isnt read by the aircraft odf. i think the difference you noticed was that the settings that should be under aircraft class defaulted back to their original values after finding nothing there.