Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: BNG Da BZ Fool on October 04, 2008, 09:39:19 PM

Title: Aircraft Class question?
Post by: BNG Da BZ Fool on October 04, 2008, 09:39:19 PM
This class seems to lack much in the way of commander control. I can get pilots into them, but they seem to do little more then shoot at the enemy from the ground as the enemy pass directly in front of them. Does 1.3 and above address this class so that aircraft AI can actually respond to commands like follow me, attack and pick me up?

Also, is there a sub class for like helicopter types? Also, can aircraft have turrets? I played around with one type that had turrets in the XSI; I believe it was one named ivfight.xsi I thought it was pretty cool. l took apart another one called fvismcs.xsi in my modeler realized that the ship had several other models in the same file. The other ships were a mortar bike, Scion scout, sentry, part of a rocket tank, and a portion of the ISDF walker. When I tried it in the map editor I had a major AV; probably due to too many replicated hp_points generated from each of the combined models. Is this class worth bothering with or is the game just not optimized for aircraft types? Tanks, BNG.
Title: Re: Aircraft Class question?
Post by: bigbadbogie on October 04, 2008, 10:03:16 PM
Yes - you can command them in pb4a.

They have always been able to be commanded but are far better now with updated AI.
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 04, 2008, 10:05:31 PM
I have no idea what version you where playing BNG, but i do know that aircraft class has seen some improvements, not much however because people kept whining at GSH too much.

nexties, there is no sub class for helicopters. best bet is too use a well-tuned hovercraft or morphtank class. (morphtank enables them to deploy see =]) there is also no aircraft hover turret thing available. (or the aircraft equivalent of assault hover i think you meant...)

you shouldnt have gotten an av with that fighter, i know exactly which one you mean, and i use it all the time, i did have to play with it in threed a little tho to get rid of said extra HP's.

the game isnt optimized for aircraft classes im afraid.there are three people to speak to with it really..

Zero Angel can work wonders with ODF tuning values with AI. he has a website too. go ahead and ask.
SeanTheGreat seems to have them working well in his mod called bztron (even if most on this board dislike him). www.bz2md.com for that
BigBadBoogie! im pretty sure he did some magic with them in that air battle in QFmod.

let me know what you get though! i want to experiment heavily with aircrafts when i get to that stage of serenesis mod.
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 05, 2008, 02:09:18 AM
yes, 1.3 adds more ai perameters to make them stay at an altitude and some other stuff.
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 05, 2008, 09:17:10 AM
could someone post all the aircraft odf entries here maybe so we can find it easily? ive never been able to find much about them in the changelogs
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 05, 2008, 01:50:24 PM
- Again, aircraft changes. Further restricted state changes. Added

[AirCraftClass]
OverWaterFlying = true
OverWaterLanded = true

   If these values are true, then water height on the map is taken
into consideration. The flying value is used during takeoff, flying
and landed states. [NM]


- Added

[AircraftClass]
MaxTakeoffSpeed = 5.0

   Aircraft will not be able to take off unless their velocity is
under this. [NM]

- Aircraft now support the force deployed/undeployed user controls.
Further raised them off the ground when flying. Also added

[GameObjectClass]
aiName = "AirCraftFriend"
aiName2 = "AirCraftEnemy"

   This is based on MorphTankFriend/Enemy, and seems to be useful
enough in minimal testing to build an item, have it go near the
droppoint, and attack items when told to. Don't start demanding much
more, like realistic strafing. [NM]

- Added

[AirCraftClass]
aiAltitude = x // default = minAltitude + 25% of dist between min, maxAltitude
LiftSpring = 12.5 // all craft/pilots, during takeoff/landing
AILiftSpring = 2.0 // AI craft ONLY, when flying to get to aiAltitude.

   aiAltitude is the aititude that the AI will try and fly at. If the
item it's targeted at is higher, it'll try and fly at that
height. [NM]

- Fix for issue noted in comments on mantis #828. Added

[AirCraftClass]
AltitudeLookahead = 2.0 // Parallels BomberClass::AltitudeLookahead.

   This setting is used by the AI when flying, only. Looks ahead the
certain # of seconds, and takes the maximum ground height of the
samples as the "current" ground height. Code used to use a value of
0.0, effectively. Also, clamped both AltitudeLookahead values to the 0
.. 10.0 range -- values outside of that are clamped to the closer
endpoint. Compiles, but is untested. [NM]

- Fix for mantis #828. Added

[CraftClass]
AircraftAttackMustDeploy = false // == true for any Aircraft

   If this is true, and if the AirCraftAttack code is used (I believe
that's used if aiName = "AirCraftFriend" and aiName2 =
"AirCraftEnemy"), and if the craft has an attack order while it's
sitting on the ground, it'll request a deploy (take off). This check
is done before the weapon range checks. [NM]

- Fix for an issue noted on pb4 boards. Added

[AirCraftClass]
AlwaysDeployed = false
AlwaysUndeployed = false

   Note: setting both to true is probably a bad idea. If either of
these is true, then requests to change state are ignored. Compiles,
but is untested. [NM]

Title: Re: Aircraft Class question?
Post by: BNG Da BZ Fool on October 05, 2008, 09:49:11 PM
Very cool. Just about the only 1.2 flying type with AI control seems to be the Cerberi Talon, but even that one has a fixed flight altitude parameter making it somewhat unsuitable for an aircraft type. My favorite so far is the ivsgull, ivsgoose and ivfight, but I had to tweak the ivfight.odf settings to get it to stop wiggling when making turns; the craft looks like in was derived from modified ISDF turret parts with some tweaks.

Are there any 1.3 mods that have some decent ODF's? I heard QF mod has some, but are there any other mods with a variety of AI commandable aircraft types as I'd like to experiment with ones capable of dive bombing targets and just generally harrassing the enemy bases.
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 06, 2008, 12:53:05 AM
I do have my own Puddle Jumpers wich are aircraft class and behave good...one sec...


[GameObjectClass]
baseName = "avpdlj"
geometryName = "ivpdlj00.xsi"
geometryScale = 0.02
cockpitName = "ivscout_cockpit.xsi"
classLabel = "aircraft"
animCount = 1
animName1 = "deploy"
animFile1 = "ivpdlj_morph.xsi"
scrapValue = 0
scrapCost = 20
customCost = 20
powerCost = 2
buildTime = 35.0
customTime = 45.0
maxHealth = 3000
maxAmmo = 2000
addHealth = 0
addAmmo = 0
unitName = "Puddle Jumper"
aiName = "AirCraftFriend"
aiName2 = "AirCraftEnemy"
//canDetect = 0
canInteract = 1
needPilot = 1

heatSignature = 0.0
imageSignature = 0.0
radarSignature = 0.0

limitClass1 = "avpdlj"
limitClass1Count = 8
limitClass1Text = "No More Jumpers in Bay"

isAssault = 1

armorClass = L

/////// weapons ///////////////////

weaponMask = 00111
weaponHard1 = "HP_ROCKET_1"
weaponName1 = "gadrone_a"
weaponAssault1 = 0
weaponHard2 = "HP_ROCKET_2"
weaponName2 = "gadrone_a"
weaponAssault2 = 0
weaponHard3 = "HP_SPECIAL_1"
weaponName3 = "gcloak_c"
weaponAssault3 = 0
weaponHard4 = "HP_SPECIAL_2"
weaponName4 = "gcloak_a"
weaponAssault4 = 0
weaponHard5 = "HP_SPECIAL_1"
weaponName5 = "gpjshld"
weaponAssault5 = 1

//////////////////////////////////

//lightHard1 = "hp_light_1"
//lightName1 = "spotblue2"
//lightHard2 = "hp_light_2"
//lightName2 = "spotblue2"
//lightHard3 = "hp_light_3"
//lightName3 = "spotblue2"
//lightHard4 = "hp_light_4"
//lightName4 = "spotblue2"

[CraftClass]
rangeScan = 750.0f
periodScan = 0.0f
velocJam = 10.0f
engageRange = 800
PathingType = 4

braccelFactor = 0.05f;
strafeFactor = 0.1f;
steerFactor = 1.0f;
omegaFactor = 0.4f;
velFactor = 0.2f;

avoidSpeed = 40;
topSpeed = 80;

[AirCraftClass]
MaxTakeoffSpeed = 2.0
OverWaterFlying = true //change to false to make submersable
OverWaterLanded = true
aiAltitude = 75
LiftSpring = 12.5
AILiftSpring = 2.0

[AirCraftClass]

velocSet(L) = -62.7 // minimum velocity
velocSet(M) = 0.0 // cruising velocity
velocSet(H) = 120.4 // maximum velocity
accelThrust = 86.8 // thrust acceleration
accelBrake = 105.0 // brake acceleration
accelDrag = 86.3 // drag acceleration //34
omegaSteer(L) = 1.0 // steer turn rate at minimum
omegaSteer(M) = 1.6 // steer turn rate at cruising
omegaSteer(H) = 0.8 // steer turn rate at maximum
omegaStrafe(L) = 0.0 // airbrake turn rate at minimum
omegaStrafe(M) = 0.0 // airbrake turn rate at cruising
omegaStrafe(H) = 0.0 // airbrake turn rate at maximum
alphaSteer = 13.0 // steering angular acceleration
alphaStrafe = 10.0 // airbrake angular acceleration
minAltitude = 75.0 // minimum altitude
maxAltitude = 300 // maximum altitude
alphaLevel = 4.8 // leveling angular acceleration
alphaDamp = 12.0 // damping angular acceleration
pitchPitch = 2.0 // maximum pitch angle //3
rollSteer = 1.8 // maximum roll angle from steering
rollStrafe = 2.5 // maximum roll angle from airbraking
accelJump = 1.5
timeDeploy = 3.0 // time to deploy
timeUndeploy = 4.0 // time to undeploy
soundDeploy = "iapc04.wav"
soundUndeploy = "iapc4.wav"

soundThrust = "pdljeng.wav"
soundTurbo = "pdljeng.wav" //imiss03a.wav



Replace etc specific parts, (weapons, models sounds) with your own, but that's a fairly nice menuverable aircraft, fast, rolls when u hit strafe, ai flies pretty okay. Although I would put homing missiles of some kind on them, not actual guns cause they're probably still not a great shot.
Title: Re: Aircraft Class question?
Post by: bigbadbogie on October 06, 2008, 01:03:12 AM
Does the deploy animation work?
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 06, 2008, 01:05:56 AM
If I recall, No. But I may not have done the model right. But, off hand, I would guess no rather then yes.
Title: Re: Aircraft Class question?
Post by: Zero Angel on October 06, 2008, 09:21:00 AM
Helicopters usually rely on the other bz2 classes to emulate them and need some trickery. Theres a few classlabels you can use to emulate helicopter behavior:

MorphTank or wingman classes
Hover units are affected by terrain, so I don't recommend them if you want to make a convincing helicopter. But if you want to do it anyways you will want to have the jump thrusters set to a negative value, and make the special weapon into one which provides upwards thrust (like a jetpack), so that way you have good up/down controls. You might also want to set switchMask = 00000 to prevent the weapons from changing to/from combat/assualt versions.

SAV and APC classes
These two classes can change height quickly, by pressing the deploy ('c') key. You probably didnt know this, but the APC class can be equipped with weapons as well as weapons (like machineguns) and even given an AI which will attack with these weapons and pick you up.

These are also similar, but with two major differences. The SAV class will be able to move while deployed and undeployed (the 1.3 'fury' unit is an example of this) -- whereas the APC class cannot move while deployed, but can deploy any kind of object (like pods, soldiers, daywreckers, even buildings). AI's which understand the deploy command (like MorphTankFriend/Enemy) seem to work best with these classes.
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 06, 2008, 04:17:22 PM
There is also a wingman/hoverassault classes, you can use to make the jump button go down, and give them a jetpack like weapon to go up, and the hoverassualt can have a turret. (Like 1.3 the Fury Heavy Assault Tank)
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 06, 2008, 08:40:56 PM
Quote from: Zero Angel on October 06, 2008, 09:21:00 AM
Helicopters usually rely on the other bz2 classes to emulate them and need some trickery. Theres a few classlabels you can use to emulate helicopter behavior:

MorphTank or wingman classes
Hover units are affected by terrain, so I don't recommend them if you want to make a convincing helicopter. But if you want to do it anyways you will want to have the jump thrusters set to a negative value, and make the special weapon into one which provides upwards thrust (like a jetpack), so that way you have good up/down controls. You might also want to set switchMask = 00000 to prevent the weapons from changing to/from combat/assualt versions.

SAV and APC classes
These two classes can change height quickly, by pressing the deploy ('c') key. You probably didnt know this, but the APC class can be equipped with weapons as well as weapons (like machineguns) and even given an AI which will attack with these weapons and pick you up.

These are also similar, but with two major differences. The SAV class will be able to move while deployed and undeployed (the 1.3 'fury' unit is an example of this) -- whereas the APC class cannot move while deployed, but can deploy any kind of object (like pods, soldiers, daywreckers, even buildings). AI's which understand the deploy command (like MorphTankFriend/Enemy) seem to work best with these classes.


REALLY interested in that stuff, and i didnt know about switch class... care to go into further detail about what you got there?
Title: Re: Aircraft Class question?
Post by: Zero Angel on October 07, 2008, 09:01:17 AM
Well, SwitchMask is specifically for morphtank units, and I believe goes under [MorphTankClass] (or maybe [CraftClass]) -- It works on the same principle as WeaponMask, where the last entry controls the first weapons hardpoint. The default configuration for Switchmask is 11111 -- so all weapons will change when the ship morphs.

The APC and SAV stuff is pretty straightforward. Take an unit of that class that almost does what you want, and modify it so that it does exactly what you want. :)

Look at this: http://zeroangel.overminddl1.com/reference/bz2ai.php#aicombat

The AI's that say 'Morph to Attack', are the ones you most likely want to use for helicopter type units. I havent mentioned the AirCraftFriend/Enemy class there, nor have experimented with it much -- as it is a brand new AI type -- but it works similar to MorphTankFriend/Enemy AI.
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 07, 2008, 01:41:02 PM
Should update that site some :)
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 07, 2008, 02:29:20 PM
well i was using morph tank for my helicopter testing model and thats staying...

what im interested in is getting APC's to use gun turrets, the APC standard XSI has a turret on it but how can i get it too work?
Title: Re: Aircraft Class question?
Post by: Red Devil on October 07, 2008, 04:41:42 PM
I got it to work a few years ago, but wasn't skilled enough in xsi's at the time to get it to swivel.
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 07, 2008, 04:51:11 PM
well actually i had a look and i think its labelled properly, but the center is wrong, someone should fix that...
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 07, 2008, 08:22:24 PM
APC's can't have turrets anyway, it'd have to be a hoverassault class that has a special that poops out pilots.
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 07, 2008, 09:38:04 PM
poops :lol:

what a disgusting concept. remidns me of Ace Ventura... Lizard should have made the Swarm do that :D
Title: Re: Aircraft Class question?
Post by: BNG Da BZ Fool on October 09, 2008, 08:22:04 PM
Is it fair to say that 1.2 units may or may not work in version 1.3 and higher? Much of what I've made so far is heavily based around 1.2, but I would like to use them in 1.3 if possible...BNG.
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 09, 2008, 08:27:10 PM
Most of them will WORK. Alot of it just won't take advantage of the new features.
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 09, 2008, 09:36:01 PM
also remember that physics properties have been changed, so any physics and handling properties in the ODF's will have to be altered if you want them to behave the same way in PB4a. they change in every beta...

my vehicles tuned for pb3 actually drive around as if they are on ice now. thats kind of good because i can mimic ice for my mod perfectly now, even if they were tuned to perfection before hand... ah well!
Title: Re: Aircraft Class question?
Post by: mrtwosheds on October 11, 2008, 12:19:19 PM
Last time I tried (1.2) Apc's can be persuaded to fire their guns, when deployed, but it is not capable of rotating its turret and still being an apc. So it can shoot at anything that happens to be in front of it when it lands...this is not effective.
That was using an apc model modified with all the bits required for a turret.
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 11, 2008, 01:32:54 PM
nielk1's attacher craft class code will enable you to control APC's but the gun turret will act as though piloted by a different unit, will be turretable though.

how did you get the thing to use its weaps?
Title: Re: Aircraft Class question?
Post by: Tempest Storm on October 11, 2008, 05:54:59 PM
IIRC the APC class does not use the AIprocess to deploy soldiers rather it is built into the classlabel to dumb soldiers out when it deploys. Because of this you can give an APC class unit a different AI process that knows how to fire its weapons and can still drop off soldiers when it lands. I believe the APC model also has turrets defined correctly already, but the class just doesn't support them. :(
Title: Re: Aircraft Class question?
Post by: mrtwosheds on October 11, 2008, 10:48:11 PM
Like TS said.
Without some thing like nielk1's code it is useless.
The turret axis in the stock model is in the wrong place to rotate if it could.
It can only fire when deployed, stationary, and when there is something to shoot at in its sights, it cannot aim left right up or down.
Title: Re: Aircraft Class question?
Post by: Nielk1 on October 12, 2008, 04:09:24 AM
My code is just BBB's code with bells and whistles. (and MP safe)
Title: Re: Aircraft Class question?
Post by: Zero Angel on October 12, 2008, 09:32:46 AM
Quote from: mrtwosheds on October 11, 2008, 10:48:11 PM
Like TS said.
Without some thing like nielk1's code it is useless.
The turret axis in the stock model is in the wrong place to rotate if it could.
It can only fire when deployed, stationary, and when there is something to shoot at in its sights, it cannot aim left right up or down.
APC class can fire whatever position it's in. It all depends on the AI. Fighting AI's which know how to deploy can attack while its landing (deploying). The thing about APC class is that it can only deploy objects (like soldiers) while its landing, but otherwise it behaves OK. Also, APC's dont have turrets, like assault tanks, but they can still attack with weapons, its just that their only axis is up/down to whataver direction their facing -- not up/down + left/right like an assault tank.
Title: Re: Aircraft Class question?
Post by: bigbadbogie on October 12, 2008, 08:41:32 PM
I am sure that I once made an APC that would turn and shoot like a unit when deployed, it just couldn't move.
Title: Re: Aircraft Class question?
Post by: SkyNET on October 12, 2008, 11:39:45 PM
I thought the APC turret was going to be made useable in 1.3? It really should be.
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 13, 2008, 01:51:21 PM
i agree. APC's are easy pickings... the turret will have to have its centre point re-done first...

GSH wont be working on BZII for a while, so i dont think well be seeing it soon, i hear hes busied up pretty good...
Title: Re: Aircraft Class question?
Post by: GSH on October 13, 2008, 05:08:36 PM
Why *should* the APC's turret be driveable by the AI? I've added a ton of new things to 1.3. With this qualification: I think the new things will benefit the game. APC turrets just don't meet that cutoff. Sorry, but that's just the way I feel.

-- GSH
Title: Re: Aircraft Class question?
Post by: Commando on October 13, 2008, 05:32:34 PM
There are other classes that would benefit more from having turret support added to them.  For example a service truck.  It isn't rare for STs to get stuck on buildings while they back up to service an item located behind them which is why a turret would be useful.
Title: Re: Aircraft Class question?
Post by: General BlackDragon on October 13, 2008, 08:21:44 PM
That is true.

What happens when you give an assault tank a service truck AI anyway?
Title: Re: Aircraft Class question?
Post by: bigbadbogie on October 13, 2008, 08:25:28 PM
An APC turret may be helpful, but why not just use my dll method instead?
Title: Re: Aircraft Class question?
Post by: Tempest Storm on October 14, 2008, 08:34:35 AM
Quote from: General BlackDragon on October 13, 2008, 08:21:44 PM
That is true.

What happens when you give an assault tank a service truck AI anyway?

My guess would be nothing. I think that the repair/rearm ability of the service class in built within the classlabel itself; the player is capable of servicing friendly and allied units/buildings while piloting a service class unit by targeting them with the HUD. It seems that the AI process simply is used to make use of the CMD_SERVICE.
Title: Re: Aircraft Class question?
Post by: TheJamsh on October 14, 2008, 01:08:14 PM
surely it would be better to just reduce the chance of it getting stuck or going beserk...

@ GSH, its not neccesary, i guess 'should' is the wrong word... the wrod is 'it would be nice hehe'. i wonder if the FE guys could make use of it, particularly with the cerberi drone carrier. or similar... it would also be a great modding asset...

not trying to write blank cheques or anything. and not un-grateful for what youve done...