Town Generator – Arma 2

From Bohemia Interactive Community
Revision as of 20:41, 28 December 2010 by Galzohar (talk | contribs)
Jump to navigation Jump to search

ARMA 2: Operation Arrowhead ONLY

GITA - Generator of Integrated Town Areas

Module for creating villages or towns without need to place buildings one by one.

Initialization

Startup

F7 > Town Construction Set

Every module manager serves as city center. Town will be created around every one of them. Manager have to be placed on suitable position (e.g. not on roads and buildings)!

Optional parameters

Set variables to town manager with desired values

  • random = <number>; - Unique number (seed).
Example: this setvariable ["random",23];
Seems like this needs to be an integer.
Default value: Based on city position (e.g. as long as position of module manager was not changed, town will be generated same every time)
  • townName = <string>; - Town name (will be displayed as label on map)
Example: this setvariable ["name","Takmyr"];
Default value: Randomly chosen from list od several Afghan names.
  • townSize = <number>; - Town radius (in metres). No houses will be crated behind this border.
Example: this setvariable ["townsize",150];
If set too small, town construction will be interrupted with an error hint message and no markers will be drawn.
Default value: 500
  • houseCount = <number>; - Number of buildings in town.
Example: this setvariable ["housecount",42];
Default value: 50
  • houseRotation = <number>; - Maximal value from random number (in degrees), which tells how much will be direction of newly created building different from neighbouring building.
Example: this setvariable ["houserotation",10];
Default value: 7
  • houseSpacing = <number>; - Coeficient of distance between bounding boxes. Numbers below 1 means overlapping bounding boxes.
Example: this setvariable ["houseSpacing",0.6];
Default value: 0.9
  • coefMisc = <number>; - Coeficient of misc stuff amount. 1 means number of misc objects is same as number of houses, 2 means twice more misc stuff than houses.
Example: this setvariable ["coefMisc",0.5];
Default value: 1.5
  • destroyed = <number>; - Amount of houses destroyed when city is created. 0 is no building destroyed, 1 means all of them.
Example: this setvariable ["destroyed",0.5];
Default value: 0
  • houseClassesStart = <array>; - List of building classes for first building created (can be used for mosques or town halls, which should be in the center and present only once).
Example: this setvariable ["houseclassesstart",["Land_A_Mosque_big_minaret_1_EP1"]];
Default value: Mosques and minaret
Other usable values; "Land_A_Mosque_big_minaret_2_EP1", "Land_A_Mosque_big_minaret_2_dam_EP1","Land_A_Mosque_big_minaret_1_EP1","Land_A_Minaret_EP1","Land_A_Minaret_dam_EP1","Land_A_Mosque_small_1_EP1","Land_A_Mosque_small_2_EP1","Land_A_Villa_EP1","Land_A_Villa_dam_EP1"
  • houseClasses = <array>; - List of building classes.
Example: this setvariable ["houseclasses",["Land_House_C_2","Land_House_C_3","Land_House_C_3_dam"]];
Default value: Majority of expansion buildings
  • wallClasses = <array>; - List of wall classes. Every item is in format [class,rotation,distanceCoef,seaLevelParallel]
Example: this setvariable ["wallclasses",[["Land_Wall_L3_5m",90,0.8,false]]];
Default value: Expansion walls
  • miscClasses = <array>; - List of misc classes. Misc objects can be garbage heaps, tires, bags, ...
Example: this setvariable ["miscclasses",["Land_Misc_Garb_3","Land_Misc_Garb_4","Land_Misc_Garb_Heap"]];
Default value: Expansion misc objects
  • wreckClasses = <array>; - List of wrecks to be placed between houses.
Example: this setvariable ["wreckclasses",["datsun01Wreck","datsun02Wreck"]];
Default value: Expansion wrecks
  • noEnd = <boolean>; - if not nil, module will not end loading screen by itself (endLoadingScreen have to be used in mission)
Example: this setvariable ["noEnd",true];
Default value: nil


Stored variables

Variables stored in town logics

  • "status" = <number>; - when 1, town construction was completed
  • "houseList" = <array>; - list of all spawned buildings in town
  • "townCenter" = <array>; - position of avarage town center (differs from town manager position)
  • "townDiameter" = <number>; - distance from town center to furthermost building

Global variables

  • bis_gita_init = <boolean>; - when not nil and true, all towns were initialized. Seems to become true even while some towns may still be under construction, so to make sure towns are ready, use the "status" variable described above.