5.9. NStationary section¶
Note
NStationarySectionParser
is responsible for parsing NStationary section. Each line of this section
describes a single stationary object (except buildings and houses).
Section example:
[NStationary]
0_Static vehicles.stationary.Stationary$Wagon1 1 152292.72 89662.80 360.00 0.0
1_Static vehicles.artillery.Artillery$SdKfz251 2 31333.62 90757.91 600.29 0.0 0 1 1
2_Static vehicles.planes.Plane$I_16TYPE24 1 134146.89 88005.43 336.92 0.0 null 2 1.0 I-16type24_G1_RoW3.bmp 1
3_Static ships.Ship$G5 1 83759.05 115021.15 360.00 0.0 60 3 1.4
Output example:
{
'stationary': [
StationaryObject(
belligerent=Belligerents.red,
id='0_Static',
code='Wagon1',
pos=Point2D(152292.72, 89662.80),
rotation_angle=0.00,
type=UnitTypes.stationary,
),
StationaryArtillery(
id='1_Static',
belligerent=Belligerents.blue,
code='SdKfz251',
pos=Point2D(31333.62, 90757.91),
rotation_angle=240.29,
type=UnitTypes.artillery,
awakening_time=0.0,
range=0,
skill=Skills.average,
use_spotter=True,
),
StationaryAircraft(
id='2_Static',
code='I_16TYPE24',
belligerent=Belligerents.red,
pos=Point2D(134146.89, 88005.43),
rotation_angle=336.92,
type=UnitTypes.aircraft,
air_force=AirForces.vvs_rkka,
allows_spawning=True,
show_markings=True,
is_restorable=True,
skin="I-16type24_G1_RoW3.bmp",
),
StationaryShip(
belligerent=Belligerents.red,
id='9_Static',
code='G5',
recharge_time=1.4,
pos=Point2D(83759.05, 115021.15),
rotation_angle=0.00,
skill=Skills.ace,
type=UnitTypes.ship,
awakening_time=60.0,
),
],
}
The output of the parser is a dictionary with stationary item which
contains a list of stationary objects.
Set of parameters may differ for different types of units:
- all objects have at least 7 parameters;
- artillery has 3 own extra parameters;
- aircrafts have 5 own extra parameters;
- ships have 3 own extra parameters.
Let’s examine all of them:
5.9.1. Usual objects¶
Usual objects — these are all objects which have usual set of parameters, namely: ballons, lights, radio stations, trains, vehicles and so on.
We use StationaryObject
data structure to store information about such objects.
Definition example:
0_Static vehicles.stationary.Stationary$Wagon1 1 152292.72 89662.80 360.00 0.0
0_StaticObject ID which is given by full mission editor. Contains
Staticword prefixed by a sequence number.Output path: idOutput type: strOutput value: original string value vehicles.stationary.Stationary$Wagon1Unit type (
stationary) and code name (Wagon1).Output path: typeOutput type: complex unit type constant Output path: codeOutput type: strOutput value: original string value 1Code number of army the object belongs to.
Output path: belligerentOutput type: complex belligerents constant 152292.72X coordinate.
Output path: pos.xOutput type: floatOutput value: original value converted to float number 89662.80Y coordinate.
Output path: pos.yOutput type: floatOutput value: original value converted to float number 360.00Angle of rotation.
Output path: rotation_angleOutput type: floatOutput value: original value converted to float number and taken modulo 360 0.0- This parameter is not used by usual objects. It has a meaning only for artillery objects (see below).
5.9.2. Artillery¶
Artillery has all the same parameters as usual objects. Also artillery in new versions of game has some extra parameters which are described below.
We use StationaryArtillery
data structure to store information about artillery.
Definition example:
1_Static vehicles.artillery.Artillery$SdKfz251 2 31333.62 90757.91 600.29 0.0 0 1 1
0.0Time of awakening (in minutes): it’s a time which will pass since enemy unit enters object’s range till object will react on that unit.
Output path: awakening_timeOutput type: floatOutput value: original value converted to float number ( 0.0for objects from old game versions)0Range of fire.
Output path: rangeOutput type: intOutput value: original value converted to integer number ( 0for objects from old game versions)1Skill level of gunners.
Output path: skillOutput type: complex skills constant ( Nonefor objects from old game versions)1Tells whether to use spotter or not.
Output path: use_spotterOutput type: boolOutput value: Trueif1,Falseotherwise (Falsefor objects from old game versions)
5.9.3. Aircrafts¶
Aircrafts have all the same parameters as usual objects. Also aircrafts in new versions of game have some extra parameters which are described below.
We use StationaryAircraft
data structure to store information about aircrafts.
Definition example:
2_Static vehicles.planes.Plane$I_16TYPE24 2 134146.89 88005.43 336.92 0.0 de 2 1.0 I-16type24_G1_RoW3.bmp 1
nullCode name of the air force. E.g.,
deorfr. For some unknown reason air force of USSR hasnullcode name inNStationarysection.Output path: air_forceOutput type: complex air forces Output value: constant ( Nonefor objects from old game versions)2Polysemantic parameter which can have next values:
Value Meaning 0 Usage of aircraft by humans is not allowed 1 Usage of aircraft by humans is allowed 2 Usage of aircraft by humans is allowed, object will be restored after successfull landing Output path: allows_spawningOutput type: boolOutput value: Trueif1or2,Falseotherwise (Falsefor objects from old game versions)Output path: restorableOutput type: boolOutput value: Trueif2,Falseotherwise (Falsefor objects from old game versions)1.0- Not used (not present in old game versions).
I-16type24_G1_RoW3.bmpSkin name.
Output path: skinOutput type: strOutput value: original string value or Noneifnull(Nonefor objects from old game versions)Default: null1Show markings or not.
Output path: show_markingsOutput type: boolOutput value: Trueif1,Falseotherwise (Nonefor objects from old game versions)
5.9.4. Ships¶
Ships have all the same parameters as usual objects. Also ships in new versions of game have some extra parameters which are described below.
We use StationaryShip data
structure to store information about ships.
Definition example:
3_Static ships.Ship$G5 1 83759.05 115021.15 360.00 0.0 60 3 1.4
60Time of awakening (in minutes): it’s a time which will pass since enemy unit enters ship’s range till ship will react on that unit.
Output path: awakening_timeOutput type: floatOutput value: original value converted to float number ( 0.0for objects from old game versions)3Skill level of gunners.
Output path: skillOutput type: complex skills constant Output value: constant ( Nonefor objects from old game versions)1.4Recharge time (in minutes) of anti-aircraft guns of the ship.
Output path: recharge_timeOutput type: floatOutput value: original value converted to float number ( 0.0for objects from old game versions)