[UnitDefs] Inherited vs. Instance vs. Post


#1

Comparing GBRbedfordTruck and GEROpelBlitz:

Inherited:
-Truck
description=Transport/Supply Truck;
acceleration=0.3;
brakeRate=0.96;
buildCostMetal=510;
category=MINETRIGGER SOFTVEH;
[customParams] {
buildOutside=1;
dontCount=1;
}
iconType=truck;
loadingRadius=120;
mass=300;
maxDamage=300;
maxReverseVelocity=2.25;
maxSlope=10;
maxVelocity=4.5; //4.8
maxWaterDepth=5;
movementClass=TANK_Truck;
releaseHeld=0;
script=TransportTruck.cob;
transportCapacity=15;
transportMass=750;
transportSize=1;
transportUnloadMethod=0;
unloadSpread=3;
turnRate=440;

-Vehicle
airSightDistance=1500;
canMove=1;
explodeAs=Vehicle_Explosion_Sm;
footprintX=3;
footprintZ=3;
leaveTracks=1;
noChaseCategory=AIR MINE;
radardistance=950;
seismicSignature=0;
showNanoFrame=0;
sightDistance=800;
stealth=1;
turninplace=0;

– GBRVehicle
soundcategory=GBR/Vehicle; // worth having? some units will have unit-specific sets, maybe doable via post?

Instance:
unitname=GBRBedfordTruck;
name=Bedford QL;
trackOffset=10; // actually the track tags are currently the same across both these units, but as they are linked to the 3d art it is sensible that in most cases they will differ
trackType=Stdtank;
trackWidth=13;

Post:
corpse=GBRBedfordTruck_Destroyed; // _Destroyed or _Dead mostly
objectName=GBRBedfordTruck.S3O; // .s3o
buildTime=510; // always == buildCostMetal
trackStrength=6.5; // a function of mass
selfDestructAs=Vehicle_Explosion_Sm; // always == explodeAs