|
PmWiki
pmwiki.org
edit SideBar
|
Unit configuration syntax
| Filename: | index.unit |
| Location: | themes/species/*/units/*/ |
| Description: | unit configuration |
General info
index.unit contains almost all the information about a single unit. This includes unit's health, armor, weapons, etc. It also contains model's size and animation ranges even though the model is stored in a separate file.
[Boson Unit] group
This group contains some general info about the unit
- Id=Number
A unique (!) ID for this unit. Must be > 0. No default!
- Name=Text
The Name of the unit. Should be short, no more than 2 or 3 words. One if possible. Default is "Unknown".
- Description=Text
A (short) free text describing this unit. Is displayed (for example) in the commandframe when producing a unit of this type.
- IsFacility=boolean
True if this is a facility, false if this is a mobile unit. See the following sections for info about mobile- and facility-specific config keys. Default is false.
- UnitWidth=Number
The width of the unit in cells. You can use floating point numbers - e.g. 1.5 will make the unit occupy 1.5 cells. Please don't use values like 1.3333 (might cause rounding trouble) or 1.23876381687 (nonsense value). Default is 1.0
- UnitHeight=Number
The height of the unit in cells. You can use floating point numbers - e.g. 1.5 will make the unit occupy 1.5 cells. Please don't use values like 1.3333 (might cause rounding trouble) or 1.23876381687 (nonsense value). Default is 1.0
- UnitDepth=Number
The height in z-direction of the unit in cells. You can use floating point numbers - e.g. 1.5 will make the unit occupy 1.5 cells. Please don't use values like 1.3333 (might cause rounding trouble) or 1.23876381687 (nonsense value). Default is 1.0
- Health=Number
Health. More health = can take more hits and live longer. Must be > 0 (not = 0 !). Default is 100.
- Armor=Number
More armor = hits cause less damage. Must be >= 0. Default is 0.
- Shields=Number
Absorb hits. Reload themselves. Must be >= 0. Default is 0.
- MineralCost=Number
How much mineral do you have to pay if you build this? Must be >= 0. Default is 100.
- OilCost=Number
How much oil do you have to pay if you build this? Must be >= 0. Default is 0.
- SightRange=Number
The sight range of this unit. the sight range is how far (in cells!) this unit can see. Must be >= 0. Default is 5 (currently).
- PowerConsumed=Number
How much power (electricity) this unit requires for being operational. When the unit is out of power, certain tasks are not working anymore (for example reloading the weapon) or are much slower (productions). Note that this field is possible for both, facilities and mobile units. For mobile units this can be explained by having some "invisible small men walking around and delivering batteries"  Must be >= 0. Default is 0.
- PowerGenerated=Number
How much power (electricity) this unit generates. Note that this field is possible for both, facilities and mobile units. For mobile units this can be explained by having some "invisible small men walking around and delivering batteries"  Unit should only either generate or consume power, not both. Must be >= 0. Default is 0.
- TerrainType=Number
The default terrain type of the unit. One of 1 (Land), 2 (Water), 4 (Air - Plane) or 8 (Air - Helicopter). You must decide for one - even if the unit is some kind of mixture. If so you will probably use Land (1). The default is 1 (=Land Unit) See also the unit editor, which may contain more up to date information!
- Producer=Number
Specifies which kind of factory is able to produce this unit. Possible values are: 0=war factory (heavy land units, all types of vehicles), 1=shipyard (all ships), 2=airport (all aircrafts), 3=barracks (soldiers, human units), 10=command bunker (all facilities). Please note that there is currently only a single factory for every Producer type, but we might add more one day (e.g. a mobile factory). The possible productions of those factories will also depend on the Producer type. The default is the factory producing units of the current TerrainType.
- ProductionTime=Number
The number of seconds needed to produce this unit Must be >= 0. Default is 5.
- Requirements=List
List is comma separated list of unit IDs. Player must have built all those units before he can build this unit. Default is an empty list.
- SupportMiniMap=bool
If true then this player has a minimap when he has a unit of this type. The minimap disappears when all units of the player which have SupportMiniMap=true are gone. The minimap is only displayed, if the player has sufficient power (or if the unit does not consume any power). Default is false.
- ExplodingDamage=Number
How much damage is applied to nearby units when this unit explodes (is destroyed) Default is 0
- ExplodingDamageRange=Number
In how big radius nearby units will be damaged when this unit explodes. Default is 0
- ExplodingFragmentCount=Number
How many fragments of of the unit are created when it explodes. Fragments damage units nearby. Must be >= 0. Default is 0.
- ExplodingFragmentDamage=Number
How much damage the fragments cause. Default is 10.
- ExplodingFragmentDamageRange=Number
Default is 0.5.
- RemoveWreckageImmediately=Bool
If True, the wreckage of this unit is removed immediately from the map (i.e. is hidden), otherwise it remains on the map for a short while. Default is false.
- ExplodingFragmentFlyEffects=List
Comma separated list of effects which will be used when fragment of this unit is flying. Can be used to create smoke/fire trails for fragments. Default is an empty list.
- ExplodingFragmentHitEffects=List
Comma separated list of effects which will be created when a fragment of this unit hits terrain or other unit and explodes. Can be used to create small explosions for hitting fragments. Default is an empty list.
- HitPoint=Vector
Defines "hitpoint" of this unit. Hitpoint is used for shooting, all units will shoot at this point when attacking this unit. It should be point on the unit's surface. Vector consists of 3 floating-point numbers, separated by commas, e.g. 1.2,0.6,-0.3 and is relative to the center of the unit. Default is 0,0,0 (center of the unit).
- DestroyedEffects=List
Comma separated list of effects which will be created when this unit is destroyed. You can create e.g. smoke and explosion with this. Default is an empty list.
- ConstructedEffects=List
Comma separated list of effects which will be created when this unit is constructed. You can create e.g. light smoke for factory chimneys with it. Default is an empty list.
- Weapons=Number
How many weapons this unit has. See below for more information about weapons. Default is 0.
[Boson Mobile Unit] group
This group exists only for mobile units and has options specific to mobiles, such as speed.
- Speed=Number
Maximum speed of the unit, in cells per second. This is a floating-point number so values like "0.45" are possible as well. Must be >= 0. Default is 0
- AccelerationSpeed=Number
Acceleration speed of the unit, in cells per second per second. E.g. if this is 0.5 then when unit accelerates, it's speed will increase by 0.5 every second, until maximum speed is reached. Default is 1.0
- DecelerationSpeed=Number
Deceleration speed of the unit, in cells per second per second. E.g. if this is 0.5 then when unit decelerates, it's speed will decrease by 0.5 every second, until it stops completely. Default is 2.0
- RotationSpeed=Number
How fast this unit can rotate, in degrees per second. Default is 90.0
- CanGoOnLand=boolean
Whether this unit can go over land. This is true by default for TerrainType = Land or Aircraft.
- CanGoOnWater=boolean
Whether this unit can go over water. This is true by default for TerrainType = Water or Aircraft.
- CrushDamage=Number
If another unit's maximum health is less than this, then this unit can crush it (= drive over it and destroy it). Default is 0.
- MaxSlope=Number
Maximum slope that this unit can climb. Default is 30.
- WaterDepth=Number
For land units: maximum depth of the water where this unit can still move. For water units: minimum depth of the water where this unit can still move. Default is 0.25.
- TurnRadius=Number
Radius of the circle made when this unit turns. Not used yet. Default is 5.
- PreferredAltitude=Number
For aircrafts, this specifies preferred altitude of flying. Note that some deviations are possible (e.g. when flying over a canyon) - it doesn't mean that unit's altitude will always be this. Default is 3.
[Boson Facility] group
This group exists only for facilities and has options specific to them.
- ConstructionSteps=Number
Time the facility takes to be built. This is more or less the number of frames displayed in the construction animation. Default is 20
[Sounds] group
Sounds are stored in $KDEDIR/share/apps/boson/themes/species/${species}/sounds/ You can add different sounds for different facility actions. The value for a sound effect is the filename without extension.
- OrderAttack=filename
When a facility gets the order to attack someone. Default is order_attack.
- OrderMove=filename
When the facility gets the order to move. Default is order_move.
- OrderSelect=filename
When a facility gets selected. Default is order_select.
- ReportDestroyed=filename
When a facility gets destroyed. Default is report_destroyed.
- ReportProduced=filename
When a facility finished producing something. Default is report_produced.
- ReportUnderAttack=filename
When a facility comes under attack. Default is report_underattack.
[Model] group
Contains information about the model of the unit, such as it's size and animations.
- Size=Number
Specify the size of the model of this unit. Note that this takes preference over the sizes specified in the [Boson Unit] group - you can use it to have model which is bigger or smaller than the collision box of the model. If this isn't speficied, unit's width is used instead.
- Animation-Idle-Start=Number
(see above for general information) Default is 0.
- Animation-Idle-End=Number
(see above for general information) Default is 0.
- Animation-Idle-Speed=Number
(see above for general information) Default is 1. The "Idle" action specifies the frames/animation of the unit when it does nothing, i.e. is idle.
- Animation-Wreckage-Start=Number
(see above for general information) Default is 0.
- Animation-Wreckage-End=Number
(see above for general information) Default is 0.
- Animation-Wreckage-Speed=Number
(see above for general information) Default is 0. The "Wreckage" action specifies the frames/animation of the unit when it is destroyed
[Weapon_x] group
Of course every unit may have weapons. The number of weapons must be set in the main group if you use them - see above for information about it. For every weapon, there must be a group with the name Weapon_x where x is the number of
the weapon, starting with 0. E.g. if the unit has 3 weapons, it must have groups Weapon_0, Weapon_1 and Weapon_2. Note that units may have only one repairing weapon. If you specify multiple repairing weapons, only first the one is used. For help on soundfiles look under [Sounds]
- Name=Text
At the moment this is only for the handbook.
- Type=String
String that identifies the shot type. Currently supported are Bullet, Rocket, Missile, Mine, ''Bomb'. Default is Rocket.
- Bullet
Reaches it's target immediately, no matter how far it is.
- Rocket
Dummy rocket which flies to a specified point and then explodes.
- Missile
Missile actually pursues it's target when the target moves (= homing).
- Mine
Mine is first placed on the ground and when any unit touched it, it explodes (even if it's your own unit, so be careful).
- Bomb
Bomb is dropped from an airplane, it falls freely and once it touches ground or any unit, it explodes (you can think of it as of a falling mine).
- Damage=Number
The damage this unit makes to other units when firing. Can also be negative - the unit repairs then. Default is 0.
- DamageRange=Number
In how big range this weapon's shot can damages other units? E.g. if it's 2, all units two or less cells away from the explosion will get damaged. Must be >= 0. Default is 1.
- FullDamageRange=Number
Specifys the range where all units will be fully damaged. Must not be bigger than DamageRange. Default is a quarter of DamageRange.
- Range=Number
Range of this weapon. Must be >= 0. Default is 0.
- MaxFlyDistance=Number
For missiles, this specifies maximum distance that the missile can fly. After flying this distance, the missile explodes, even if it hasn't reached it's target yet. Default is Range * 1.5
- Reload=Number
How many seconds does it take to reload the weapon. Must be >= 0. Default is 0.
- CanShootAtAirUnits=Bool
Can this unit shoot at aircrafts? Default false.
- CanShootAtLandUnits=Bool
Can this unit shoot at ground units? Default false.
- Speed=Number
Speed of the shot of this weapon, in cells per second. If it's 0, the shot will hit the target immediately (speed is infinite). Default is 0
- AccelerationSpeed=Number
For missiles and rockets, it defines how fast they will accelerate after they are fired. For bombs, defines how fast it will start falling towards the ground. Specified in cells per second per second. Default is 4
- TurningSpeed=Number
For missiles, specifies how fast the missile can turn, in degrees per second. Default is 120.
- TakeTargetVeloIntoAccount=boolean
Whether target's velocity is taken into account when shooting. Default is false.
- Height=Number
What's the height of missile of this weapon when it flies. If you increase this, your missiles will fly with bigger arc. Default is 0.25.
- StartAngle=Number
For missiles, it defines vertical starting angle of the missile. If it's 0, missile will start flying horizontally; if it's 90, it will fly straight up at first. And if it's -1, missile will immediately start flying towards the target. Default is -1
- AutoUse=boolean
Defines whether unit can automatically use this weapon. You can disable it for some more powerful weapons to prevent units from "wasting" them. If this is set to false, player has to give an order to fire the weapon. Defual is true.
- Model=Filename
Model of this weapon. If weapon's speed is 0, model will never be visible, so you won't need it. Default is "missile.3ds"
- Offset=Vector
Defines offset of this weapon, relative to the unit's center. This is where the projectile of the weapon should be right after firing. It is used to position shooting effects and also the projectile. Vector consists of 3 floating-point numbers, separated by commas, e.g. 1.2,0.6,-0.3. Default is 0,0,0 (center of the unit).
- HitEffects=List
List of ids of the effects created when the weapon hits it's target. Target point is _not_ a unit, it might be any point. Default is empty list.
- FlyEffects=List
Default is empty list.
- ShootEffects=List
List of ids of the effects created when the unit is firing the weapon. Default is empty list.
- SoundShoot=Soundfile
Sound file which is played when the weapon shoots. Default is shoot.
- SoundFly=Soundfile
Sound file which is played during the weapons flies. (for missiles) Not yet used. Default is missile_fly.
- SoundHit=Soundfile
Sound file which is played when the weapon hits it's target. Not yet used. Default is hit.
- TurretMeshes=List
List of mesh names (of the unit model) that are considered to be the "turret" of this weapon. These meshes are rotated towards the point this weapon shoots at. This list must contain _ALL_ meshes that are part of the turret, otherwise you will experience unusual behaviour. For example if a model has a layout like this: - Base - Turret - Gun - Gun2 - SomeNicePartOfGun2 - SomeOtherMesh then the list should contain Turret,Gun,Gun2,SomeNicePartOfGun2.
- AmmunitionType=String
The name of the ammunition this weapon uses. This can be any name you like, however it doesn't make any sense to use fantasy names, as the player won't have any ammunition of this type then. Use an ammunition that is actually provided by the player. Default is "Generic" ammunition.
- RequiredAmmunition=Number
How much of the "AmmunitionType" ammunition is required for one shot of this weapon. Default is 1.
[ProductionPlugin] group
The production plugin is usually a facility-only plugin. One day we might use this for mobile factories, too. Note: this has never been tested, but I definitely want to support this!
- ProducerList=List
The List is a comma separated list of Producer IDs. The facility will be able to produce all units with the "Producer" entry that is listed here. Default is an empty List.
[RepairPlugin] group
(not yet supported)
[HarvesterPlugin] group
For mineral/oil miners. Well - doesn't make any sense for facilities
- CanMineMinerals=boolean
Whether this unit can mine minerals. Default is false.
- CanMineOil=boolean
Whether this unit can mine oil. Default is false.
- MaxResources=number
The maximal amount of resourced that can be mined until the unit needs to return to a refinery. Must be > 0. Default is 100.
- MiningSpeed=number
How fast this unit mines, in resources per second. Default is 10
- UnloadingSpeed=number
How fast this unit unloads at the refinery, in resources per second. Default is 10
[RefinePlugin] group
For refineries - places where the resources must be brought by harvesters.
- CanRefineOil=Boolean
True if this is an oilrefinery. Default is false
- CanRefineMinerals=Boolean
True if this is a mineralrefinery. Default is false
[ResourceMinePlugin] group
For resource mines.
- CanProvideMinerals=Boolean
True if this is an oil mine/tower. Default is false
- CanProvideOil=Boolean
True if this is a mineral mine. Default is false
[AmmunitionStoragePlugin] group
- CanStore=List
List of ammunition types that this unit can store.
- MustBePickedUp=List
List of ammunition types which the other units have to pick up from this unit. Must be a subset of CanStore.
[RadarPlugin] group
This group is for radars. Radars in Boson work much like real radars - radar transmits a signal, part of the signal reflects off the target and is received by the radar. If the received signal is strong enough, the target is detected.
- TransmittedPower=Number
How much power is transmitted by this radar. Default is 10000.0
- MinReceivedPower=Number
Minimum amount of power which has to be received by the radar to detect the target. Default is 0.001
- DetectsLandUnits=boolean
Whether this radar can detect ground units. Default is true.
- DetectsAirUnits=boolean
Whether this radar can detect air units. Default is true.
|