Town Generator – Arma 2
Jump to navigation
Jump to search
No edit summary |
Lou Montana (talk | contribs) m (Text replacement - " (={2,})([^ = ])(.*)([^ = ])(={2,}) * " to " $1 $2$3$4 $5 ") |
||
(14 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | |||
{{Feature|arma2oa|Only available in {{arma2oa}}.}} | |||
''GITA - Generator of Integrated Town Areas'' | ''GITA - Generator of Integrated Town Areas'' | ||
Line 10: | Line 10: | ||
''F7 > Town Construction Set'' | ''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)! | 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)! Non-flat terrain will allow building placement but give very odd results. Even slight elevations may result in non-enterable buildings, either just for AI or for both players and AI, depending on the actual terrain under the building. | ||
=== Optional parameters === | === Optional parameters === | ||
====Set variables to town manager with desired values==== | ==== Set variables to town manager with desired values ==== | ||
*'''random = <number>;''' - Unique number (seed). | *'''random = <number>;''' - Unique number (seed). | ||
::Example: ''this setvariable ["random",23];'' | ::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) | ::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) | ||
*''' | *'''name = <string>;''' - Town name (will be displayed as label on map) | ||
::Example: '' | ::Example: ''this setvariable ["name","Takmyr"];'' | ||
::Default value: Randomly chosen from list | ::Default value: Randomly chosen from list of several Afghan names. | ||
*'''townSize = <number>;''' - Town radius (in metres). No houses will be crated behind this border. | *'''townSize = <number>;''' - Town radius (in metres). No houses will be crated behind this border. | ||
::Example: ''this setvariable ["townsize",150];'' | ::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 | ::Default value: 500 | ||
Line 34: | Line 36: | ||
::Example: ''this setvariable ["houserotation",10];'' | ::Example: ''this setvariable ["houserotation",10];'' | ||
::Default value: 7 | ::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. | *'''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];'' | ::Example: ''this setvariable ["coefMisc",0.5];'' | ||
::Default value: 1.5 | ::Default value: 1.5 | ||
Line 48: | Line 50: | ||
*'''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). | *'''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",[" | ::Example: ''this setvariable ["houseclassesstart",["Land_A_Mosque_big_minaret_1_EP1"]];'' | ||
::Default value: Mosques and minaret | ::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. | *'''houseClasses = <array>;''' - List of building classes. | ||
Line 77: | Line 80: | ||
=== Stored variables === | === Stored variables === | ||
====Variables stored in town logics==== | ==== Variables stored in town logics ==== | ||
*'''"status" = <number>;''' - when 1, town construction was completed | *'''"status" = <number>;''' - when 1, town construction was completed | ||
*'''"houseList" = <array>;''' - list of all spawned buildings in town | *'''"houseList" = <array>;''' - list of all spawned buildings in town | ||
Line 84: | Line 87: | ||
==== Global variables ==== | ==== Global variables ==== | ||
*'''bis_gita_init = <boolean>;''' - when not nil and true, all towns were initialized | *'''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. | ||
{{GameCategory|arma2|Editor Modules}} |
Latest revision as of 18:36, 31 January 2021
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)! Non-flat terrain will allow building placement but give very odd results. Even slight elevations may result in non-enterable buildings, either just for AI or for both players and AI, depending on the actual terrain under the building.
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)
- name = <string>; - Town name (will be displayed as label on map)
- Example: this setvariable ["name","Takmyr"];
- Default value: Randomly chosen from list of 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.