Ambient Civilian Vehicles – Arma 2
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>" to "<code style="display: block">") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{TOC|side}} | ||
'''System for Including Land Vehicles Into Environment (SILVIE)''' is, as said in title, system for spawning empty cars in villages and towns. | |||
All vehicles are created on mission start and are constantly replaced when some of them are destroyed. | |||
== Initialisation == | |||
=== Paths === | === Paths === | ||
Editor: | Editor: | ||
Modules (F7) > Ambient Civilian Vehicles | Modules (F7) > Ambient Civilian Vehicles | ||
Data: | Data: | ||
ca\modules\silvie | ca\modules\silvie | ||
=== Startup === | === Startup === | ||
=== Optional | Place SILVIE manager on map. No additional synchronising needed. | ||
Set variables to | |||
=== Optional Parameters === | |||
Set variables to BIS_silvie_mainScope with desired values: | |||
*'''townlist = <array>;''' - list of places where vehicles will be spawned. Can be location logic (created by [[BIS_fnc_locations]]), array in format [center,distance] or trigger. | * '''townlist = <array>;''' - list of places where vehicles will be spawned. Can be location logic (created by [[BIS_fnc_locations]]), array in format [center,distance] or trigger. | ||
::Example: | :: Example: <sqf inline>this setVariable ["townlist", [bis_loc_acityc_mogilevka, [position this, 3000], trigger1]];</sqf> | ||
::Default value: Whole island. | :: Default value: Whole island. | ||
*'''blackList = <array>;''' - object classes which will be excluded from list of building around which cars are generated. | * '''blackList = <array>;''' - object classes which will be excluded from list of building around which cars are generated. | ||
::Example: | :: Example: <sqf inline>BIS_silvie_mainScope setVariable ["blackList", ["house1", "house2"]];</sqf> | ||
::Default value: not yet defined | :: Default value: not yet defined | ||
*'''vehicleRarity = <array>;''' - Changing vehicle rarity numbers (e.g. to have village cars spawned in cities, or to disable spawning of given class completely with unusual number like 10). Default rarity numbers are set in config under ''rarityUrban'' value (in range from 0/village to 1/city) | * '''vehicleRarity = <array>;''' - Changing vehicle rarity numbers (e.g. to have village cars spawned in cities, or to disable spawning of given class completely with unusual number like 10). Default rarity numbers are set in config under ''rarityUrban'' value (in range from 0/village to 1/city) | ||
::Example: | :: Example: <sqf inline>BIS_silvie_mainScope setVariable ["vehicleRarity", ["skodaRed", 10, "skodaBlue", 0.8]];</sqf> | ||
::Default value: empty array | :: Default value: empty array | ||
*'''vehicleCount = <string>;''' - formula on which basis system calculates number of vehicles for location. %1 is number of buildings (blacklisted objects are excluded) in 500 metres from location. | * '''vehicleCount = <string>;''' - formula on which basis system calculates number of vehicles for location. %1 is number of buildings (blacklisted objects are excluded) in 500 metres from location. | ||
::Example: | :: Example: <sqf inline>BIS_silvie_mainScope setVariable ["vehicleCount", "round (%1 / 10)"];</sqf> | ||
::Default value (and recommended): "round ((sqrt %1) * 1.5)" | :: Default value (and recommended): "round ((sqrt %1) * 1.5)" | ||
*'''vehicleInit = <nowiki><code style="display: block"></nowiki>;''' - custom init which is executed on every car. Vehicle can be accessed using ''_this'' variable. Init is executed as separate script, so sleep or waituntil commands can be used without limitations. | * '''vehicleInit = <nowiki><code style="display: block"></nowiki>;''' - custom init which is executed on every car. Vehicle can be accessed using ''_this'' variable. Init is executed as separate script, so sleep or waituntil commands can be used without limitations. | ||
::Example: | :: Example: <sqf inline>BIS_silvie_mainScope setVariable ["vehicleInit", { _this lock true }];</sqf> | ||
::Default value: {} | :: Default value: {} | ||
*'''roadDistance = <number>;''' - when creating car around building, if there is some road closer than this value, vehicle will be attached to this road instead of to building. | * '''roadDistance = <number>;''' - when creating car around building, if there is some road closer than this value, vehicle will be attached to this road instead of to building. | ||
::Example: | :: Example: <sqf inline>BIS_silvie_mainScope setVariable ["roadDistance", 30];</sqf> | ||
::Default value: 25 | :: Default value: 25 | ||
*'''attempts = <number>;''' - number of attempts to create vehicle (failed attempt is for instance when some road is detected near building, but it is crossroad). | * '''attempts = <number>;''' - number of attempts to create vehicle (failed attempt is for instance when some road is detected near building, but it is crossroad). | ||
::Example: | :: Example: <sqf inline>BIS_silvie_mainScope setVariable ["attempts", 20];</sqf> | ||
::Default value: 10 | :: Default value: 10 | ||
=== Stored | === Stored Variables === | ||
==== | {{Feature|important|These variables are only to be read and must not be modified!}} | ||
*'''id''' = <number> - identification number of latest car. | |||
*'''currentTown''' = <number> - town where last vehicle was created (or where is planned to, if player is nearby). | ==== BIS_silvie_mainScope ==== | ||
*'''carlist''' = <array> - list of all created cars (destroyed ones are removed). | * '''id''' = <number> - identification number of latest car. | ||
* '''currentTown''' = <number> - town where last vehicle was created (or where is planned to, if player is nearby). | |||
* '''carlist''' = <array> - list of all created cars (destroyed ones are removed). | |||
==== Cars ==== | ==== Cars ==== | ||
*'''ALICE_id''' = <number> - identification number of vehicle. | * '''ALICE_id''' = <number> - identification number of vehicle. | ||
*'''ALICE_obj''' = <object> - object on which vehicle was created (can be object or road). | * '''ALICE_obj''' = <object> - object on which vehicle was created (can be object or road). | ||
*'''ALICE_twn''' = <location> - town where vehicle was created. | * '''ALICE_twn''' = <location> - town where vehicle was created. | ||
{{GameCategory|arma2|Editor Modules}} |
Latest revision as of 23:35, 28 August 2023
System for Including Land Vehicles Into Environment (SILVIE) is, as said in title, system for spawning empty cars in villages and towns. All vehicles are created on mission start and are constantly replaced when some of them are destroyed.
Initialisation
Paths
Editor:
Modules (F7) > Ambient Civilian Vehicles
Data:
ca\modules\silvie
Startup
Place SILVIE manager on map. No additional synchronising needed.
Optional Parameters
Set variables to BIS_silvie_mainScope with desired values:
- townlist = <array>; - list of places where vehicles will be spawned. Can be location logic (created by BIS_fnc_locations), array in format [center,distance] or trigger.
- Example: this setVariable ["townlist", [bis_loc_acityc_mogilevka, [position this, 3000], trigger1]];
- Default value: Whole island.
- blackList = <array>; - object classes which will be excluded from list of building around which cars are generated.
- Example: BIS_silvie_mainScope setVariable ["blackList", ["house1", "house2"]];
- Default value: not yet defined
- vehicleRarity = <array>; - Changing vehicle rarity numbers (e.g. to have village cars spawned in cities, or to disable spawning of given class completely with unusual number like 10). Default rarity numbers are set in config under rarityUrban value (in range from 0/village to 1/city)
- Example: BIS_silvie_mainScope setVariable ["vehicleRarity", ["skodaRed", 10, "skodaBlue", 0.8]];
- Default value: empty array
- vehicleCount = <string>; - formula on which basis system calculates number of vehicles for location. %1 is number of buildings (blacklisted objects are excluded) in 500 metres from location.
- Example: BIS_silvie_mainScope setVariable ["vehicleCount", "round (%1 / 10)"];
- Default value (and recommended): "round ((sqrt %1) * 1.5)"
- vehicleInit = <code style="display: block">; - custom init which is executed on every car. Vehicle can be accessed using _this variable. Init is executed as separate script, so sleep or waituntil commands can be used without limitations.
- Example: BIS_silvie_mainScope setVariable ["vehicleInit", { _this lock true }];
- Default value: {}
- roadDistance = <number>; - when creating car around building, if there is some road closer than this value, vehicle will be attached to this road instead of to building.
- Example: BIS_silvie_mainScope setVariable ["roadDistance", 30];
- Default value: 25
- attempts = <number>; - number of attempts to create vehicle (failed attempt is for instance when some road is detected near building, but it is crossroad).
- Example: BIS_silvie_mainScope setVariable ["attempts", 20];
- Default value: 10
Stored Variables
BIS_silvie_mainScope
- id = <number> - identification number of latest car.
- currentTown = <number> - town where last vehicle was created (or where is planned to, if player is nearby).
- carlist = <array> - list of all created cars (destroyed ones are removed).
Cars
- ALICE_id = <number> - identification number of vehicle.
- ALICE_obj = <object> - object on which vehicle was created (can be object or road).
- ALICE_twn = <location> - town where vehicle was created.