Author: Rydygier
Author Website:

Requirements: No addons required

Version: 1.00

Short description: is an experimental SQF script that tries to model basics of ecosystem. Everything is visualised on the 2D map, nothing to see in 3D.

Date: 2020-02-03 09:03

Comments: (0)


EUG - Ecosystem Useless Gadget


Not sure, if there's any point in releasing this toy, but you never know, who's watching... Different types of weirdos are out there, so why should it collecting dust hidden in the dark corner of HDD... Anyway.

EUG is an experimental SQF script that tries to model basics of ecosystem. Everything is visualised on the 2D map, nothing to see in 3D. At this point there's no any user-friendly GUI, so any tweaking would require script editing with some global variables given in init.sqf. Every organism is in fact an array of values ("genome"), visually represented by a marker, marker characteristics correspond to certain genome values. Simulation runs in cycles, and at least with my CPU it can take even several minutes when number of organisms exceed few thousands.

Mostly for optimization purposes whole land mass is divided into square sectors. Some calculations performed each cycle per each organism require information about near(est) other organisms, which is obtainable way cheaper, if we determine the occupied sector and focus on organisms inside it. Acceptable simplification. Each species can mutate at procreation (next generation may inherit altered genome).

Initial population is generated "ex nihilo" by randomization a set number of seeds/"hatchlings" around player's position. Scenario is automated - it will open the map and start initial seeding till some plant survive. Herbivores are added at 100 plants, carnivores - at 100 herbivores. Since initial genome is random, result my strongly vary each run. It is possible, initial plant will die before any successful seeding, in that case just restart the scenario.

At shift+LMB simulation will pasue, there will be shown temporarily a marker with enviroment values at clicked pos, also nearest organism's genome will be shown and logged into RPT. LMB to resume simulation.

As for further development, no particular plans, but if something comes to mind, the file shall be updated. Feel free to experiment with the code.

There are 4 main elements of the simulation: environment, plants, herbivores and carnivores.
Modelled are only few key characteristics:
Temperature - may range from -40 to +40 C, half of the map height is warmest ("equator"), top and bottom edges are coldest ("poles"). Locally temperature depends on ASL height (the higher, the cooler).

RYD_ECO_BaseTemp = 40;//max temperature (Celsius). Minimal is always 80 degrees lower

Humidity - may range from 0 to 100%, depends mainly on ASL height (the higher, the drier), also will be higher close to the shore line.

RYD_ECO_BaseHum = 50;//base humidity at sea level
Fertility - represents not only mineral abundance of the soil, but in general - growth friendliness, say, sunlight access etc. Main factor limiting plants density - each alive plant decreases local fertility, while dead plant - increases it. For optimization purposes this value is statistically averaged per each sector (one, shared value common to whole sector area).

RYD_ECO_BaseFert = 5;//base fertility. Lowering this value may greatly reduce plant population (due to less number of successful seeds)

These organisms "eat" sunlight (accumulating energy), require certain ranges of temperature and humidity to grow and occupy local space by reducing local fertility till death. Procreation via seeding, when certain fraction of max energy capacity is reached. Each seeding certain amount of positions in seeding range are randomized, then tested against seed's requirements stored in the genome. If requirements are met - new plant begins its life there, otherwise - seed vanishes futile. Visualised by solid markers of various colors, shapes and dimensions depending on genome.

Genome structure:
These organisms "eat" plants. As animals, are mobile and will move if, in order of priority, there's a carnivore to run from, there's discomfort due to hunger (towards best found plant near) or not optimal environment parameters (towards best fitting spot in range) or at random if no plant nor better spot found. Movement costs energy. If organism is near to full of energy, it procreates by direct division (organisms of next generation inherit half of parent's energy each). Uses non-solid markers with pictures.

Similar to herbivores, but eat herbivores, not plants, feeding on a herbivore kills it (drains energy to 0, part of energy is consumed, the rest is wasted). Don't run from anything. Genome structure same, as for herbivores except last entry is true, not false. Markers as for herbivores, but turned 45 degrees.

Installation / Usage:
For usage instructions and information of how to use the EUG - Ecosystem Useless Gadget please refer to the included documentation and/or example mission.


Forum topic:
- BI forums

Enable javascript to be able to download from Armaholic please!