-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Structure and README update. * README update. * Docs WIP. * Docs WIP. * Textures docs. * Fields docs. * Farmlands doc. * Step by step. * Step by step. * Convert image to obj. * README update.
- Loading branch information
Showing
14 changed files
with
650 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## Farmlands | ||
|
||
It's a pretty simple component of the map, but it's also one of the most important. If you do not define the farmlands InfoLayer in Giants Editor, you will not be able to buy any land in the game. But, lucky for us, it's simple and straightforward to set up. | ||
|
||
### Setting up the Farmlands InfoLayer | ||
|
||
In the Giants Editor enable the `Terrain Info Layer Paint Mode` tool [1], then select the **farmlands** in the **Info Layer** selector [2]. Now you can choose the actual farmland number [3] and paint it on the map. | ||
Remember, that if you did not paint some region by any farmland, it will not be possible to buy it in game. You can left those for regions that are not supposed to be bought by the player (city, forest, etc.). | ||
|
||
 | ||
|
||
After painting the farmlands and saving the file, you need to edit the `config/farmlands.xml` file to match the farmlands you painted in the editor. | ||
|
||
### Editing the farmlands.xml | ||
You'll find the `farmlands.xml` file in the `config` directory of your map. Open it in a text editor and add the farmlands you painted in the editor. The file should look like this: | ||
|
||
```xml | ||
<farmlands infoLayer="farmlands" pricePerHa="60000"> | ||
<farmland id="1" priceScale="1" npcName="FORESTER" /> | ||
<farmland id="2" priceScale="1" npcName="GRANDPA" /> | ||
</farmlands> | ||
``` | ||
|
||
So, the keys here are kinda obvious, if you want to change the global price for the lands, you can do it in the `pricePerHa` attribute. The `farmland` tag contains the information about the lands. The `id` attribute is the ID of the land, the `priceScale` is the multiplier for the price of the land, and the `npcName` is the name of the NPC who owns the land. | ||
|
||
After drawing the farmlands in the Giants Editor and editing the `farmlands.xml` file, you should be able to buy the lands in the game. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Fields | ||
|
||
I guess you know what a field is. It's where we actually grow and harvest our crops. Important note: it's not mandatory to add fields in Giants Editor, since it's possible for player to create a field in game. But it would be much more convenient to create fields while working in your mod. | ||
And the coolest thing: the generator already created everything for you! Just one click and all the fields will be shown on the map. | ||
|
||
### Where the fields come from? | ||
|
||
Before we dive into details, let's talk about the source of the fields. The data for adding everything to your map (including fields) comes from the [OpenStreetMap](https://www.openstreetmap.org/). So, it may happen that something is missing or incorrect. In this case, it's recommended to go to OSM by yourself and fix the issue. It's very simple, and you can do it without any special knowledge. You'll find more information about it in the [FAQ](https://github.com/iwatkot/maps4fs/blob/main/docs/FAQ.md) section of the docs. | ||
|
||
### How to add fields to the map? | ||
The generator will automatically create all the required nodes in the `map.i3d` file, so you need only to open the map in Giants Editor, go to **Scripts** -> **Shared scripts** -> **Map** -> **Farmland fields** -> **Field toolkit** and click on the **Repaint all fields** button. | ||
After it all the fields should appear on the map. Note: due to different geometries in OSM data, some fields may not appear if they were defined as multipolygons. In this case, you need to create them manually. | ||
|
||
 | ||
|
||
To add a new field click on the **Create field** button in the toolkit. A new field will appear at the center of **fields** TransformGroup. Now all you need to do is place the **PolygonPoints** on the correct positions on the map, and after it click on the **Repaint selected field** button. |
Oops, something went wrong.