By combining Maps4FS with the Giants Editor Procedural Generator tools we can generate textures/foliage/trees and other i3d objects in our map based on publicly available info maps of the area.
- Download the PG scripts from gitlab
Code Button
/ download this directory /zip
-
Unzip the PG_Scripts into the
Farming Simulator 25\data\maps\proceduralPlacements
folderThe .lua files need to be directly in the
proceduralPlacements
folder.
- Generate your map with Maps4FS as usual.
- Open the map in the Giants Editor
- Remove the Trees group object
- Open
Window/Procedural Placement...
and go to theRule
tab. - Before proceding, click back on your main window and save your map.
- Press
Place Objects
When running bigger rulesets this can take several minutes.
The editor will completly "hang" during this generation. Don't worry, just let it do it's thing.
- You can tweak the ruleset and masks and rerun the generation. Or use this as a base to start detailing your map from.
- Open
Window/Procedural Placement...
and go to theRule
tab. - Select the rule you want to edit. ex.
T_Forests
- Add or remove layers with the
X
buttons and theAdd Object
button. - Finally press
Place Objects
to see your changes.
- Open
Window/Procedural Placement...
and go to theRule
tab. - Select the rule you want to edit. ex.
F_Acres
- Make the borderIn value bigger to shrink the field. To increase the field increase the borderOut value.
- Often times multiple rules will need to be adjusted. ex. also update the
T_Acres
rule. - Finally press
Place Objects
to see your changes.
-
Open
Window/Procedural Placement...
and go to theObjects
tab. -
Press
Add i3d reference
-
Select the object you want to add.
In the default game folder you can find the basegame tree objects:
Farming Simulator 25\data\maps\trees
-
Give it a name.
-
Go to the Rules tab and press
Add Rule
-
Enter a name for the rule. ex. R_Grasslands
-
Fill in a distance between the objects in
Object Min Distance
-
Fill in the name of the mask you want to scatter the object in
genMaskName
. ex. Grasslands -
Click
Add Object
and select your previously created object -
Press
Apply
Rules starting with:
- MaskName -> Loads and links a Mask with a genMaskName
- T_ => Fill a mask with a texture
- F_ => Fill a mask with foliage
- Clear_ => Clears selected objects in a mask
- R_ => I3D reference objects (trees)
- Substract_ => Removes a layer from another layer
- Loading masks
- Mask operations
- Texturing
- Foliage
- References
A big rule-set can become slow very fast.
If you want to repeatedly generate things to see how it looks it is adviced to disable all the main rules and only activate the rules you want to run.
Disable Main Rules
- Select each rule you want to run and press
Apply
to activate it - Press
Place Objects
Restarting the editor or pressing the Enable Main Rules
button will reactivate everything.
The default ruleset includes a ClearAll rule at the start.
This rule is a hard-resets for all the objects and takes a longer time to run. It can be disabled while working, and reenabled when generating the final result.
Generate a new mask data/masks/PG_buildings.png
based on info-maps tagged with building
when running the generator.
{
"name": "concrete",
"count": 2,
"tags": { "building": true },
"procedural": ["PG_buildings"]
},
Adding multiple PG_names to the procedural
parameter generates a mask for each PG_name.
{
"name": "grassDirtPatchy",
"count": 2,
"tags": { "landuse": "meadow" },
"procedural": ["PG_meadows", "PG_grasslands"]
},