airplane physics

Moderators: GSH, VSMIT, Red Devil, Commando

Post Reply
XxHAMADEHxX
Sabre
Posts: 317
Joined: Mon Aug 13, 2012 8:02 am

airplane physics

Post by XxHAMADEHxX »

So I made an airplane in blender and I just need to add textures Godwilling(Still new to this stuff)

bu the only problem is I don't know how to make the odf use airplane physics

any ideas?

Thanks
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: airplane physics

Post by MrTwosheds »

Made this some time ago. Its a Dalek flying saucer, obviously you will need to change much of it but the physics should give you a fairly good start for an aircraft. It is experimental!
It does give a human pilot full 360 degree control, but it is not a great idea to try and get the Ai to fly it like that too, as the 2d pathing remains 2d whatever you do.

Code: Select all

[GameObjectClass]
baseName = "dvwing"
geometryName = "asaucer6.xsi"
geometryScale = 1
classLabel = "aircraft"
scrapValue = 15
scrapCost = 90
customCost = 100
buildTime = 15.0
customTime = 15.0
maxHealth = 6000
maxAmmo = 6000
addHealth = 5
addAmmo = 6
aiAddHealth = 7
aiAddAmmo = 8
unitName = "Attack Saucer"
//explosionName = "xsuiscav"
aiName = "AirCraftFriend"
aiName2 = "AirCraftEnemy"
heatSignature = 2.0
imageSignature = 2.5
radarSignature = 0.5
isAssault = 0
CanSnipe = 0
armorClass = l
collisionRadius = 12.0
boxCollide = 1
Mass = 40000
SmartIsAirUnitCheck = false
LightsOnlyWhenPiloted = true

provideCount = 3
provideName1 = "dvstank"
provideName2 = "flier"
provideName3 = "VIRTUAL_CLASS_AIRCRAFT"

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 = 01111
weaponHard1 = "HP_MORTAR_1"
visualHard1 = "HP_DOCK_M1"
weaponAssault1 = 1
weaponName1 = "grailgun_a"
weaponHard2 = "HP_ROCKET_1"
visualHard2 = "HP_DOCK_r1"
weaponAssault2 = 1
weaponName2 = "gdmissile_a"
weaponHard3 = "HP_ROCKET_2"
visualHard3 = "HP_DOCK_r2"
weaponAssault3 = 1
weaponName3 = "gdmissile_a"
weaponHard4 = "HP_SPECIAL_2"
visualHard4 = "HP_DOCK_t"
weaponAssault4 = 1
weaponName4 = "gthebomb"


[CraftClass]
AllowLinkWeapons = true  // if true, weapons can be linked
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 = 450
NonWingmanProcessAttackMines = false
DoWeaponCanHitCheck = true
ClosestEnemyGoodEyes = true

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// A sane setting!
attackTask = "DefendArea"
defendTask = "DefendArea"
waitTask = "DefendArea"
velocSet(L) = -20.0 // minimum velocity
velocSet(M) = 0.0 // cruising velocity
velocSet(H) = 50.0 // maximum velocity
accelThrust = 60  // thrust acceleration
accelBrake = 30 // 10.0 // brake acceleration
accelDrag = 50 // 60.0 // drag acceleration -- affects sliding sideways
// mouse as rudder
omegaSteer(L) = 1.25  // 2.5 // steer turn rate at minimum
omegaSteer(M) = 1.5  // 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.65 // airbrake turn rate at cruising
omegaStrafe(H) = 0.55 // airbrake turn rate at maximum

//this affects steering but not sliding
alphaSteer = 2.0 // steering angular acceleration
// more = more turning from strafing
alphaStrafe = 1.0 // 0.01 // airbrake angular acceleration


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

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

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

soundThrust = "dtech4.wav"
soundTurbo = "dtech6.wav"
soundBrake = "dtech12.wav"


//[DeployableClass]
timeDeploy = 8.0 // 2.0 // time to deploy
timeUndeploy = 8.0 // 2.0 // time to undeploy
//heightDeploy = 0.0//?
soundDeploy = "elev8.wav"
soundUndeploy = "dzzowk.wav"

Last edited by MrTwosheds on Mon Oct 07, 2013 10:12 pm, edited 2 times in total.
The Silence continues. The War Of Lies has no end.
XxHAMADEHxX
Sabre
Posts: 317
Joined: Mon Aug 13, 2012 8:02 am

Re: airplane physics

Post by XxHAMADEHxX »

Thanks my friend btw how does the ai name work?
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: airplane physics

Post by MrTwosheds »

?
Same as any other I guess...

aiName = "AirCraftFriend"
aiName2 = "AirCraftEnemy"

You may notice that it is not really fast...because bz2 units are not really fast.
Also that the IsFlying= flag is not present, because it's not relevant to aircraft at all as far as i can see.
Last edited by MrTwosheds on Mon Oct 07, 2013 10:30 pm, edited 1 time in total.
The Silence continues. The War Of Lies has no end.
XxHAMADEHxX
Sabre
Posts: 317
Joined: Mon Aug 13, 2012 8:02 am

Re: airplane physics

Post by XxHAMADEHxX »

Oh because if I put something like ainame=apc it will attempt to act like an apc
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: airplane physics

Post by MrTwosheds »

No, I believe they are to describe the unit to other AI processes.

classLabel = "aircraft" and
[AirCraftClass]
gives it its aircraft behaviour.
The Silence continues. The War Of Lies has no end.
XxHAMADEHxX
Sabre
Posts: 317
Joined: Mon Aug 13, 2012 8:02 am

Re: airplane physics

Post by XxHAMADEHxX »

I see thanks bro =D
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: airplane physics

Post by MrTwosheds »

AI names do effect how the unit behaves however, ZA knows more than I about this stuff. Usually changing them to something they are not causes more problems than they solve though, an aircraft that thinks its a apc won't work well unless it is an apc.

http://zeroangel.overminddl1.com/reference/bz2ai.php
The Silence continues. The War Of Lies has no end.
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: airplane physics

Post by Red Spot »

Overall behaviour doesnt do much, except for a few classes that have some extra functionality, like scouts. You'd probably be better of spending your time on other tweaks than trying to find the exact differences between the ai processes, beyond the 'does drop mine when attacked hard' (sentry or tank), etc.

But its mostly dependend on how much time you're willing to invest and how much you're willing to ignore certain unit classes.
XxHAMADEHxX
Sabre
Posts: 317
Joined: Mon Aug 13, 2012 8:02 am

Re: airplane physics

Post by XxHAMADEHxX »

I was just afraid that ai versions of the ship would not attack.
Thats why I asked him =D
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: airplane physics

Post by Red Spot »

Stick with what the original ODF's give you..

Most processes tend to attack though, based on some criteria (bomber needs a bomb, iirc, apc needs soldiers, turret needs to deploy, etc)
Post Reply