maps4fs 0.9.93__py3-none-any.whl → 1.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- maps4fs/generator/background.py +279 -227
- maps4fs/generator/component.py +220 -32
- maps4fs/generator/config.py +15 -11
- maps4fs/generator/dem.py +81 -98
- maps4fs/generator/game.py +19 -3
- maps4fs/generator/grle.py +186 -0
- maps4fs/generator/i3d.py +239 -25
- maps4fs/generator/map.py +29 -18
- maps4fs/generator/qgis.py +5 -5
- maps4fs/generator/texture.py +233 -38
- maps4fs/logger.py +1 -25
- maps4fs/toolbox/background.py +63 -0
- maps4fs/toolbox/dem.py +3 -3
- maps4fs-1.1.6.dist-info/LICENSE.md +190 -0
- {maps4fs-0.9.93.dist-info → maps4fs-1.1.6.dist-info}/METADATA +111 -58
- maps4fs-1.1.6.dist-info/RECORD +21 -0
- maps4fs/generator/path_steps.py +0 -83
- maps4fs/generator/tile.py +0 -55
- maps4fs-0.9.93.dist-info/LICENSE.md +0 -21
- maps4fs-0.9.93.dist-info/RECORD +0 -21
- {maps4fs-0.9.93.dist-info → maps4fs-1.1.6.dist-info}/WHEEL +0 -0
- {maps4fs-0.9.93.dist-info → maps4fs-1.1.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,190 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for describing the origin of the Work and
|
141
|
+
reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
Copyright 2024 [iwatkot](https://github.com/iwatkot)
|
179
|
+
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
181
|
+
you may not use this file except in compliance with the License.
|
182
|
+
You may obtain a copy of the License at
|
183
|
+
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
185
|
+
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
189
|
+
See the License for the specific language governing permissions and
|
190
|
+
limitations under the License.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: maps4fs
|
3
|
-
Version:
|
3
|
+
Version: 1.1.6
|
4
4
|
Summary: Generate map templates for Farming Simulator from real places.
|
5
5
|
Author-email: iwatkot <iwatkot@gmail.com>
|
6
6
|
License: MIT License
|
@@ -14,7 +14,7 @@ Classifier: Operating System :: OS Independent
|
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
License-File: LICENSE.md
|
16
16
|
Requires-Dist: opencv-python
|
17
|
-
Requires-Dist: osmnx
|
17
|
+
Requires-Dist: osmnx>=2.0.0
|
18
18
|
Requires-Dist: rasterio
|
19
19
|
Requires-Dist: folium
|
20
20
|
Requires-Dist: geopy
|
@@ -31,8 +31,11 @@ Requires-Dist: pympler
|
|
31
31
|
<p align="center">
|
32
32
|
<a href="#Quick-Start">Quick Start</a> •
|
33
33
|
<a href="#Overview">Overview</a> •
|
34
|
-
<a href="
|
34
|
+
<a href="docs/step_by_step.md">Create a map in 10 steps</a> •
|
35
|
+
<a href="#How-To-Run">How-To-Run</a><br>
|
35
36
|
<a href="docs/FAQ.md">FAQ</a> •
|
37
|
+
<a href="docs/map_structure.md">Map Structure</a> •
|
38
|
+
<a href="docs/tips_and_hints.md">Tips and Hints</a> •
|
36
39
|
<a href="#Modder-Toolbox">Modder Toolbox</a><br>
|
37
40
|
<a href="#Supported-objects">Supported objects</a> •
|
38
41
|
<a href="#Generation-info">Generation info</a> •
|
@@ -42,7 +45,8 @@ Requires-Dist: pympler
|
|
42
45
|
<a href="#DDS-conversion">DDS conversion</a> •
|
43
46
|
<a href="#For-advanced-users">For advanced users</a> •
|
44
47
|
<a href="#Resources">Resources</a> •
|
45
|
-
<a href="#Bugs-and-feature-requests">Bugs and feature requests</a>
|
48
|
+
<a href="#Bugs-and-feature-requests">Bugs and feature requests</a><br>
|
49
|
+
<a href="#Special-thanks">Special thanks</a>
|
46
50
|
</p>
|
47
51
|
|
48
52
|
|
@@ -61,36 +65,54 @@ Requires-Dist: pympler
|
|
61
65
|
</div>
|
62
66
|
|
63
67
|
🗺️ Supports 2x2, 4x4, 8x8, 16x16 and any custom size maps<br>
|
68
|
+
🔄 Support map rotation 🆕<br>
|
69
|
+
🌾 Automatically generates fields 🆕<br>
|
70
|
+
🌽 Automatically generates farmlands 🆕<br>
|
64
71
|
🌍 Based on real-world data from OpenStreetMap<br>
|
65
|
-
🏞️ Generates height using SRTM dataset<br>
|
72
|
+
🏞️ Generates height map using SRTM dataset<br>
|
66
73
|
📦 Provides a ready-to-use map template for the Giants Editor<br>
|
67
74
|
🚜 Supports Farming Simulator 22 and 25<br>
|
68
75
|
🔷 Generates *.obj files for background terrain based on the real-world height map<br>
|
69
76
|
📄 Generates scripts to download high-resolution satellite images from [QGIS](https://qgis.org/download/) in one click<br>
|
70
|
-
|
77
|
+
📕 Detailed [documentation](/docs) and tutorials <br>
|
78
|
+
🧰 Modder Toolbox to help you with various tasks <br>
|
71
79
|
|
72
80
|
<p align="center">
|
73
81
|
<img src="https://github.com/user-attachments/assets/cf8f5752-9c69-4018-bead-290f59ba6976"><br>
|
74
|
-
🌎 Detailed terrain based on real
|
75
|
-
<img src="https://github.com/user-attachments/assets/
|
76
|
-
🛰️ Realistic background terrain
|
82
|
+
🌎 Detailed terrain based on real-world data.<br><br>
|
83
|
+
<img src="https://github.com/user-attachments/assets/dc40d0bb-c20b-411c-8833-9925d0389452"><br>
|
84
|
+
🛰️ Realistic background terrain with satellite images.<br><br>
|
85
|
+
<img src="https://github.com/user-attachments/assets/6e3c0e99-2cce-46ac-82db-5cb60bba7a30"><br>
|
86
|
+
📐 Perfectly aligned background terrain.<br><br>
|
77
87
|
<img src="https://github.com/user-attachments/assets/80e5923c-22c7-4dc0-8906-680902511f3a"><br>
|
78
88
|
🗒️ True-to-life blueprints for fast and precise modding.<br><br>
|
79
|
-
<img src="https://github.com/user-attachments/assets/
|
80
|
-
|
81
|
-
|
89
|
+
<img width="480" src="https://github.com/user-attachments/assets/1a8802d2-6a3b-4bfa-af2b-7c09478e199b"><br>
|
90
|
+
🌾 Field generation with one click.<br><br>
|
91
|
+
<img width="480" src="https://github.com/user-attachments/assets/4d1fa879-5d60-438b-a84e-16883bcef0ec"><br>
|
92
|
+
🌽 Automatic farmlands generation based on the fields.<br><br>
|
93
|
+
|
94
|
+
📹 A complete step-by-step video tutorial is here!
|
95
|
+
<a href="https://www.youtube.com/watch?v=Nl_aqXJ5nAk" target="_blank"><img src="https://github.com/user-attachments/assets/4845e030-0e73-47ab-a5a3-430308913060"/></a>
|
96
|
+
<p align="center"><i>How to Generate a Map for Farming Simulator 25 and 22 from a real place using maps4FS.</i></p>
|
82
97
|
|
83
98
|
## Quick Start
|
84
99
|
There are several ways to use the tool. You obviously need the **first one**, but you can choose any of the others depending on your needs.<br>
|
85
100
|
### 🚜 For most users
|
86
|
-
**Option 1:**
|
101
|
+
**Option 1:** Open the [maps4fs](https://maps4fs.streamlit.app) on StreamLit and generate a map template in a few clicks.<br>
|
102
|
+
<i>Note, that StreamLit community hosting has some limitations, such as: <br>
|
103
|
+
1. Maximum map size is 4096x4096 meters. <br>
|
104
|
+
2. Advanced settings are disabled. <br>
|
105
|
+
3. Texture dissolving is disabled (they will look worse). </i><br>
|
106
|
+
|
107
|
+
If you run the application locally, you won't have any of these limitations and will be able to generate maps of any size with any settings you want and nice looking textures.<br>
|
108
|
+
So, jump to [Docker version](#option-2-docker-version) to launch the tool with one command and get the full experience.<br>
|
87
109
|
|
88
110
|

|
89
111
|
|
90
112
|
### 😎 For advanced users
|
91
|
-
**Option 2:**
|
113
|
+
**Option 2:** Run the Docker version in your browser. Launch the following command in your terminal:
|
92
114
|
```bash
|
93
|
-
docker run -d -p 8501:8501 iwatkot/maps4fs
|
115
|
+
docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs
|
94
116
|
```
|
95
117
|
And open [http://localhost:8501](http://localhost:8501) in your browser.<br>
|
96
118
|
If you don't know how to use Docker, navigate to the [Docker version](#option-2-docker-version), it's really simple.<br>
|
@@ -114,7 +136,7 @@ So, if you're new to map making, here's a quick overview of the process:
|
|
114
136
|
|
115
137
|
### Previews
|
116
138
|
|
117
|
-
The generator also creates
|
139
|
+
The generator also creates multiple previews of the map. Here's the list of them:
|
118
140
|
1. General preview - merging all the layers into one image with different colors.
|
119
141
|
2. Grayscale DEM preview - a grayscale image of the height map (as it is).
|
120
142
|
3. Colored DEM preview - a colored image of the height map (from blue to red). The blue color represents the lowest point, and the red color represents the highest point.
|
@@ -126,34 +148,44 @@ Parameters:
|
|
126
148
|
- coordinates: 45.15, 19.71
|
127
149
|
- size: 16 x 16 km
|
128
150
|
|
129
|
-
##
|
151
|
+
## Step by step
|
152
|
+
Don't know where to start? Don't worry, just follow this [step-by-step guide](docs/step_by_step.md) to create your first map in 10 simple steps.<br>
|
130
153
|
|
131
|
-
|
132
|
-
<a href="https://www.youtube.com/watch?v=ujwWKHVKsw8" target="_blank"><img src="https://github.com/user-attachments/assets/6dbbbc71-d04f-40b2-9fba-81e5e4857407"/></a>
|
133
|
-
<i>Video tutorial: How to generate a Farming Simulator 22 map from real-world data.</i>
|
154
|
+
## How-To-Run
|
134
155
|
|
135
156
|
### Option 1: StreamLit
|
136
|
-
🟢 Recommended for all users
|
157
|
+
🟢 Recommended for all users.
|
158
|
+
🛠️ Don't need to install anything.
|
159
|
+
🗺️ Supported map sizes: 2x2, 4x4 km.
|
160
|
+
⚙️ Advanced settings: disabled.
|
161
|
+
🖼️ Texture dissolving: disabled.
|
137
162
|
Using the [StreamLit](https://maps4fs.streamlit.app) version of the tool is the easiest way to generate a map template. Just open the link and follow the instructions.
|
138
163
|
Note: due to CPU and RAM limitations of the hosting, the generation may take some time. If you need faster processing, use the [Docker version](#option-2-docker-version).<br>
|
139
164
|
|
140
165
|
Using it is easy and doesn't require any guides. Enjoy!
|
141
166
|
|
142
167
|
### Option 2: Docker version
|
143
|
-
🟠 Recommended for users who want
|
168
|
+
🟠 Recommended for users who want bigger maps, fast generation, nice-looking textures, and advanced settings.
|
169
|
+
🛠️ Launch with one single command.
|
170
|
+
🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
|
171
|
+
⚙️ Advanced settings: enabled.
|
172
|
+
🖼️ Texture dissolving: enabled.
|
144
173
|
You can launch the project with minimalistic UI in your browser using Docker. Follow these steps:
|
145
174
|
|
146
175
|
1. Install [Docker](https://docs.docker.com/get-docker/) for your OS.
|
147
176
|
2. Run the following command in your terminal:
|
148
177
|
```bash
|
149
|
-
docker run -d -p 8501:8501 iwatkot/maps4fs
|
178
|
+
docker run -d -p 8501:8501 --name maps4fs iwatkot/maps4fs
|
150
179
|
```
|
151
180
|
3. Open your browser and go to [http://localhost:8501](http://localhost:8501).
|
152
181
|
4. Fill in the required fields and click on the `Generate` button.
|
153
182
|
5. When the map is generated click on the `Download` button to get the map.
|
154
183
|
|
155
184
|
### Option 3: Python package
|
156
|
-
🔴 Recommended for developers
|
185
|
+
🔴 Recommended for developers.
|
186
|
+
🗺️ Supported map sizes: 2x2, 4x4, 8x8, 16x16 km and any custom size.
|
187
|
+
⚙️ Advanced settings: enabled.
|
188
|
+
🖼️ Texture dissolving: enabled.
|
157
189
|
You can use the Python package to generate maps. Follow these steps:
|
158
190
|
|
159
191
|
1. Install the package from PyPI:
|
@@ -166,7 +198,7 @@ import maps4fs as mfs
|
|
166
198
|
|
167
199
|
game = mfs.Game.from_code("FS25")
|
168
200
|
```
|
169
|
-
In this case the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
|
201
|
+
In this case, the library will use the default templates, which should be present in the `data` directory, which should be placed in the current working directory.<br>
|
170
202
|
Structure example:<br>
|
171
203
|
|
172
204
|
```text
|
@@ -202,12 +234,15 @@ The map will be saved in the `map_directory` directory.
|
|
202
234
|
## Modder Toolbox
|
203
235
|
The tool now has a Modder Toolbox, which is a set of tools to help you with various tasks. You can open the toolbox by switching to the `🧰 Modder Toolbox` tab in the StreamLit app.<br>
|
204
236
|
|
205
|
-

|
206
238
|
|
207
|
-
### Tool
|
239
|
+
### Tool Categories
|
208
240
|
Tools are divided into categories, which are listed below.
|
209
|
-
#### Textures and DEM
|
210
|
-
- **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image.
|
241
|
+
#### For Textures and DEM
|
242
|
+
- **GeoTIFF windowing** - allows you to upload your GeoTIFF file and select the region of interest to extract it from the image. It's useful when you have high-resolution DEM data and want to create a height map using it.
|
243
|
+
|
244
|
+
#### For Background terrain
|
245
|
+
- **Convert image to obj model** - allows you to convert the image to the obj model. You can use this tool to create the background terrain for your map. It can be extremely useful if you have access to the sources of high-resolution DEM data and want to create the background terrain using it.
|
211
246
|
|
212
247
|
## Supported objects
|
213
248
|
The project is based on the [OpenStreetMap](https://www.openstreetmap.org/) data. So, refer to [this page](https://wiki.openstreetmap.org/wiki/Map_Features) to understand the list below.
|
@@ -225,13 +260,13 @@ The project is based on the [OpenStreetMap](https://www.openstreetmap.org/) data
|
|
225
260
|
The list will be updated as the project develops.
|
226
261
|
|
227
262
|
## Generation info
|
228
|
-
The script will generate the `generation_info.json` file in the `output` folder. It
|
263
|
+
The script will generate the `generation_info.json` file in the `output` folder. It is split into different sections, which represent the components of the map generator. You may need this information to use some other tools and services to obtain additional data for your map.<br>
|
229
264
|
|
230
265
|
List of components:
|
231
266
|
- `Config` - this component handles the `map.xml` file, where the basic description of the map is stored.
|
232
267
|
- `Texture` - this component describes the textures, that were used to generate the map.
|
233
268
|
- `DEM` - this component describes the Digital Elevation Model (the one which creates terrain on your map), which was used to generate the height map and related to the `dem.png` file.
|
234
|
-
- `I3d` - this component describes the i3d file, where some specific attributes properties and
|
269
|
+
- `I3d` - this component describes the i3d file, where some specific attributes properties, and paths to the files are stored.
|
235
270
|
- `Background` - this component describes the 8 tiles, that surround the map.
|
236
271
|
|
237
272
|
Below you'll find descriptions of the components and the fields that they contain.<br>
|
@@ -252,9 +287,9 @@ Example of the `Config` component:
|
|
252
287
|
}
|
253
288
|
},
|
254
289
|
```
|
255
|
-
The `Overview` section contains information to create an overview image, which represents the in-game map. You can use the `epsg3857_string` to obtain the satellite images in the QGIS. So this section describes the region of the map plus the borders. Usually, it's
|
290
|
+
The `Overview` section contains information to create an overview image, which represents the in-game map. You can use the `epsg3857_string` to obtain the satellite images in the QGIS. So this section describes the region of the map plus the borders. Usually, it's exactly 2X the size of the map.<br>
|
256
291
|
And here's the list of the fields:
|
257
|
-
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it
|
292
|
+
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it is required to obtain the satellite images in the QGIS,<br>
|
258
293
|
- `"south"` - the southern border of overview region,<br>
|
259
294
|
- `"west"` - the western border of overview region,<br>
|
260
295
|
- `"north"` - the northern border of overview region,<br>
|
@@ -299,7 +334,7 @@ And here's the list of the fields:
|
|
299
334
|
|
300
335
|
### Background
|
301
336
|
|
302
|
-
The background component
|
337
|
+
The background component consists of the 8 tiles, each one representing the tile, that surrounds the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on.<br>
|
303
338
|
Example of the `Background` component:
|
304
339
|
|
305
340
|
```json
|
@@ -321,7 +356,7 @@ Example of the `Background` component:
|
|
321
356
|
And here's the list of the fields:
|
322
357
|
- `"center_latitude"` - the latitude of the center of the tile,<br>
|
323
358
|
- `"center_longitude"` - the longitude of the center of the tile,<br>
|
324
|
-
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it
|
359
|
+
- `"epsg3857_string"` - the string representation of the bounding box in the EPSG:3857 projection, it is required to obtain the satellite images in the QGIS,<br>
|
325
360
|
- `"height"` - the height of the tile in meters,<br>
|
326
361
|
- `"width"` - the width of the tile in meters,<br>
|
327
362
|
- `"north"` - the northern border of the tile,<br>
|
@@ -330,7 +365,7 @@ And here's the list of the fields:
|
|
330
365
|
- `"west"` - the western border of the tile,<br>
|
331
366
|
|
332
367
|
## Texture schema
|
333
|
-
maps4fs uses a simple JSON file to define the texture schema. For each
|
368
|
+
maps4fs uses a simple JSON file to define the texture schema. For each ofthe supported games, this file has unique entries, but the structure is the same. Here's an example of the schema for Farming Simulator 25:
|
334
369
|
|
335
370
|
```json
|
336
371
|
[
|
@@ -366,39 +401,39 @@ maps4fs uses a simple JSON file to define the texture schema. For each of suppor
|
|
366
401
|
Let's have a closer look at the fields:
|
367
402
|
- `name` - the name of the texture. Just the way the file will be named.
|
368
403
|
- `count` - the number of textures of this type. For example, for the **dirtMedium** texture there will be two textures: **dirtMedium01_weight.png** and **dirtMedium02_weight.png**.
|
369
|
-
ℹ️ There's one texture that
|
404
|
+
ℹ️ There's one texture that has count `0`, it's the waterPuddle texture from FS22, which is not present in FS25.
|
370
405
|
- `tags` - the tags from the OpenStreetMap data. Refer to the section [Supported objects](#supported-objects) to see the list of supported tags. If there are no tags, the texture file will be generated empty and no objects will be placed on it.
|
371
406
|
- `width` - the width of the texture in meters. Some of the objects from OSM (roads, for example) are lines, not areas. So, to draw them correctly, the tool needs to know the width of the line.
|
372
|
-
- `color` - the color of the texture. It's used only in the preview images and
|
407
|
+
- `color` - the color of the texture. It's used only in the preview images and has no effect on the map itself. But remember that previews are crucial for the map-making process, so it's better to set the color to something that represents the texture.
|
373
408
|
- `priority` - the priority of the texture for overlapping. Textures with higher priorities will be drawn over the textures with lower priorities.
|
374
409
|
ℹ️ The texture with 0 priority considers the base layer, which means that all empty areas will be filled with this texture.
|
375
|
-
- `exclude_weight` - this only used for the forestRockRoots texture from FS25. It
|
410
|
+
- `exclude_weight` - this is only used for the forestRockRoots texture from FS25. It just means that this texture has no `weight` postfix, that's all.
|
376
411
|
|
377
412
|
## Background terrain
|
378
|
-
The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it
|
379
|
-
So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `
|
380
|
-
If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a
|
413
|
+
The tool now supports the generation of the background terrain. If you don't know what it is, here's a brief explanation. The background terrain is the world around the map. It's important to create it because if you don't, the map will look like it's floating in the void. The background terrain is a simple plane that can (and should) be textured to look fine.<br>
|
414
|
+
So, the tool generates the background terrain in the form of the 8 tiles, which surround the map. The tiles are named as the cardinal points, e.g. "N", "NE", "E" and so on. All those tiles will be saved in the `background` directory with corresponding names: `N.obj`, `NE.obj`, `E.obj`, and so on.<br>
|
415
|
+
If you don't want to work with separate tiles, the tool also generates the `FULL.obj` file, which includes everything around the map and the map itself. It may be a convenient approach to work with one file, one texture, and then just cut the map from it.<br>
|
381
416
|
|
382
417
|

|
383
418
|
|
384
|
-
➡️ *No matter which approach you choose, you still need to adjust the background terrain to connect it to the map without any gaps. But with a
|
419
|
+
➡️ *No matter which approach you choose, you still need to adjust the background terrain to connect it to the map without any gaps. But with a single file, it's much easier to do.*
|
385
420
|
|
386
|
-
If you're willing to create a background terrain, you will need
|
421
|
+
If you're willing to create a background terrain, you will need Blender, the Blender Exporter Plugins, and the QGIS. You'll find the download links in the [Resources](#resources) section.<br>
|
387
422
|
|
388
|
-
If you're afraid of this task, please don't be. It's really simple and I've
|
423
|
+
If you're afraid of this task, please don't be. It's really simple and I've prepared detailed step-by-step instructions for you, you'll find them in the separate README files. Here are the steps you need to follow:
|
389
424
|
|
390
425
|
1. [Download high-resolution satellite images](docs/download_satellite_images.md).
|
391
426
|
2. [Prepare the i3d files](docs/create_background_terrain.md).
|
392
427
|
3. [Import the i3d files to Giants Editor](docs/import_to_giants_editor.md).
|
393
428
|
|
394
429
|
## Overview image
|
395
|
-
The overview image is an image that is used as in-game map. No matter what the size of the map, this file is always `4096x4096 pixels`, while the region of your map is `2048x2048 pixels` in center of this file. The rest of the image is just here for nice view, but you still may add satellite pictures to this region.<br>
|
430
|
+
The overview image is an image that is used as an in-game map. No matter what the size of the map, this file is always `4096x4096 pixels`, while the region of your map is `2048x2048 pixels` in the center of this file. The rest of the image is just here for a nice view, but you still may add satellite pictures to this region.<br>
|
396
431
|
|
397
432
|
<img width="400" src="https://github.com/user-attachments/assets/ede9ea81-ef97-4914-9dbf-9761ef1eb7ca">
|
398
433
|
|
399
434
|
Cool image by [@ZenJakey](https://github.com/ZenJakey).
|
400
435
|
|
401
|
-
So, the same way you've downloaded the satellite images for the background terrain, you can download them for the overview image. Just use the `epsg3857_string` from the `generation_info.json` file. You'll find the needed string in the `Config` component in the `Overview` section:
|
436
|
+
So, in the same way, you've downloaded the satellite images for the background terrain, you can download them for the overview image. Just use the `epsg3857_string` from the `generation_info.json` file. You'll find the needed string in the `Config` component in the `Overview` section:
|
402
437
|
|
403
438
|
```json
|
404
439
|
"Config": {
|
@@ -408,35 +443,43 @@ So, the same way you've downloaded the satellite images for the background terra
|
|
408
443
|
},
|
409
444
|
```
|
410
445
|
|
411
|
-
After
|
446
|
+
After that, you need to resize the image to 4096x4096 pixels and convert it to the `.dds` format.
|
412
447
|
|
413
448
|
## DDS conversion
|
414
|
-
The `.dds` format is the format used in the Farming Simulator for the textures, icons, overview and preview images. There
|
449
|
+
The `.dds` format is the format used in the Farming Simulator for the textures, icons, overview, and preview images. There a plenty of options to convert the images to the `.dds` format, you can just google something like `png to dds`, and the first link probably will help you with it.<br>
|
415
450
|
|
416
451
|
List of the important DDS files:
|
417
452
|
- `icon.dds` - 256x256 pixels, the icon of the map,
|
418
|
-
- `preview.dds` - 2048x2048 pixels, the preview image of the map on loading screen,
|
453
|
+
- `preview.dds` - 2048x2048 pixels, the preview image of the map on the loading screen,
|
419
454
|
- `mapsUS/overview.dds` - 4096x4096 pixels, the overview image of the map (in-game map)
|
420
455
|
|
421
456
|
## For advanced users
|
422
457
|
The tool supports the custom size of the map. To use this feature select `Custom` in the `Map size` dropdown and enter the desired size. The tool will generate a map with the size you entered.<br>
|
423
458
|
|
424
|
-
⛔️ Do not use this feature, if you don't know what you're doing. In most cases the Giants Editor will just crash on opening the file, because you need to enter
|
459
|
+
⛔️ Do not use this feature, if you don't know what you're doing. In most cases, the Giants Editor will just crash on opening the file, because you need to enter specific values for the map size.<br><br>
|
425
460
|
|
426
|
-

|
427
462
|
|
428
463
|
You can also apply some advanced settings to the map generation process. Note that they're ADVANCED, so you don't need to use them if you're not sure what they do.<br>
|
429
464
|
|
430
|
-
|
465
|
+
### DEM Advanced settings
|
466
|
+
|
467
|
+
- Multiplier: the height of the map is multiplied by this value. So the DEM map is just a 16-bit grayscale image, which means that the maximum available value there is 65535, while the actual difference between the deepest and the highest point on Earth is about 20 km. Just note that this setting mostly does not matter, because you can always adjust it in the Giants Editor, learn more about the DEM file and the heightScale parameter in [docs](docs/dem.md). By default, it's set to 1.
|
431
468
|
|
432
|
-
-
|
469
|
+
- Blur radius: the radius of the Gaussian blur filter applied to the DEM map. By default, it's set to 21. This filter just makes the DEM map smoother, so the height transitions will be more natural. You can set it to 1 to disable the filter, but it will result in a Minecraft-like map.
|
433
470
|
|
434
|
-
-
|
471
|
+
- Plateau height: this value will be added to each pixel of the DEM image, making it "higher". It's useful when you want to add some negative heights on the map, that appear to be in a "low" place. By default, it's set to 0.
|
435
472
|
|
436
|
-
|
473
|
+
### Texture Advanced settings
|
474
|
+
|
475
|
+
- Fields padding - this value (in meters) will be applied to each field, making it smaller. It's useful when the fields are too close to each other and you want to make them smaller. By default, it's set to 0.
|
476
|
+
|
477
|
+
### Farmlands Advanced settings
|
478
|
+
|
479
|
+
- Farmlands margin - this value (in meters) will be applied to each farmland, making it bigger. You can use the value to adjust how much the farmland should be bigger than the actual field. By default, it's set to 3.
|
437
480
|
|
438
481
|
## Resources
|
439
|
-
In this section you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
|
482
|
+
In this section, you'll find a list of the resources that you need to create a map for the Farming Simulator.<br>
|
440
483
|
To create a basic map, you only need the Giants Editor. But if you want to create a background terrain - the world around the map, so it won't look like it's floating in the void - you also need Blender and the Blender Exporter Plugins. To create realistic textures for the background terrain, the QGIS is required to obtain high-resolution satellite images.<br>
|
441
484
|
|
442
485
|
1. [Giants Editor](https://gdn.giants-software.com/downloads.php) - the official tool for creating maps for the Farming Simulator.
|
@@ -444,8 +487,18 @@ To create a basic map, you only need the Giants Editor. But if you want to creat
|
|
444
487
|
3. [Blender Exporter Plugins](https://gdn.giants-software.com/downloads.php) - the official plugins for exporting models from Blender to i3d format (the format used in the Farming Simulator).
|
445
488
|
4. [QGIS](https://qgis.org/download/) - the open-source GIS software that you can use to obtain high-resolution satellite images for your map.
|
446
489
|
5. [CompressPngCom](https://www.compresspng.com/) - the online tool to compress the PNG images. May be useful to reduce the size of the satellite images.
|
447
|
-
6. [AnyConv](https://anyconv.com/png-to-dds-converter/) - the online tool to convert the PNG images to the DDS format. You'll need this format for the textures, icons, overview and preview images.
|
490
|
+
6. [AnyConv](https://anyconv.com/png-to-dds-converter/) - the online tool to convert the PNG images to the DDS format. You'll need this format for the textures, icons, overview, and preview images.
|
448
491
|
|
449
492
|
## Bugs and feature requests
|
450
493
|
➡️ Please, before creating an issue or asking some questions, check the [FAQ](docs/FAQ.md) section.<br>
|
451
494
|
If you find a bug or have an idea for a new feature, please create an issue [here](https://github.com/iwatkot/maps4fs/issues) or contact me directly on [Telegram](https://t.me/iwatkot) or on Discord: `iwatkot`.
|
495
|
+
|
496
|
+
## Special thanks
|
497
|
+
|
498
|
+
Of course, first of all, thanks to the direct [contributors](https://github.com/iwatkot/maps4fs/graphs/contributors) of the project.
|
499
|
+
|
500
|
+
But also, I want to thank the people who helped me with the project in some way, even if they didn't contribute directly. Here's the list of them:
|
501
|
+
|
502
|
+
- [Ka5tis](https://github.com/Ka5tis) - for investigating the issue with a "spiky terrain" and finding a solution - changing the `DisplacementLayer` size to a higher value.
|
503
|
+
- [Kalderone](https://www.youtube.com/@Kalderone_FS22) - for useful feedback, suggestions, expert advice on the map-making process and highlihting some important settings in the Giants Editor.
|
504
|
+
- [OneSunnySunday](https://www.artstation.com/onesunnysunday) - for expert advice on Blender, help in processing background terrain, and compiling detailed tutorials on how to prepare the OBJ files for use in Giants Editor.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
maps4fs/__init__.py,sha256=da4jmND2Ths9AffnkAKgzLHNkvKFOc_l21gJisPXqWY,155
|
2
|
+
maps4fs/logger.py,sha256=B-NEYpMjPAAqlV4VpfTi6nbBFnEABVtQOaYe6nMpidg,1489
|
3
|
+
maps4fs/generator/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
4
|
+
maps4fs/generator/background.py,sha256=dnUkS1atEqqz_ryKkcfP_K9ZcwMHZVs97y-twZMpD44,15881
|
5
|
+
maps4fs/generator/component.py,sha256=sihh2S35q0o38leEU-dpi0is6kYCuxXiWUISAtiQErM,17351
|
6
|
+
maps4fs/generator/config.py,sha256=b7qY0luC-_WM_c72Ohtlf4FrB37X5cALInbestSdUsw,4382
|
7
|
+
maps4fs/generator/dem.py,sha256=rc7ADzjvlZzStOqagsWW0Vrm9-X86aPpoR1RhBF_-OE,16025
|
8
|
+
maps4fs/generator/game.py,sha256=2oA77i9lyNYOlhtOZft6KiPTxgGJbX1Gam1TosMNLis,7407
|
9
|
+
maps4fs/generator/grle.py,sha256=IVbvzF_azItxLE_ZxaM_suQflEZjJuMgHmv1En51G7A,7592
|
10
|
+
maps4fs/generator/i3d.py,sha256=SzjAxYacbBQ030N2sHh9c-dhWoG3iADJqCrHBox6vWI,12268
|
11
|
+
maps4fs/generator/map.py,sha256=7UqLjDZgoY6M0ZxX5Q4Rjee2UGWZ64a3tGyr8B24UO0,4863
|
12
|
+
maps4fs/generator/qgis.py,sha256=Es8hLuqN_KH8lDfnJE6He2rWYbAKJ3RGPn-o87S6CPI,6116
|
13
|
+
maps4fs/generator/texture.py,sha256=uSt563KomSVUndl25IgEIi0YuhBQbnhPIoQKa-4A3_E,26016
|
14
|
+
maps4fs/toolbox/__init__.py,sha256=zZMLEkGzb4z0xql650gOtGSvcgX58DnJ2yN3vC2daRk,43
|
15
|
+
maps4fs/toolbox/background.py,sha256=9BXWNqs_n3HgqDiPztWylgYk_QM4YgBpe6_ZNQAWtSc,2154
|
16
|
+
maps4fs/toolbox/dem.py,sha256=z9IPFNmYbjiigb3t02ZenI3Mo8odd19c5MZbjDEovTo,3525
|
17
|
+
maps4fs-1.1.6.dist-info/LICENSE.md,sha256=pTKD_oUexcn-yccFCTrMeLkZy0ifLRa-VNcDLqLZaIw,10749
|
18
|
+
maps4fs-1.1.6.dist-info/METADATA,sha256=W5x23vIOjkx-xxq4L0VIWVIA9pCgOniTQvbFqiTUVFs,28942
|
19
|
+
maps4fs-1.1.6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
20
|
+
maps4fs-1.1.6.dist-info/top_level.txt,sha256=Ue9DSRlejRQRCaJueB0uLcKrWwsEq9zezfv5dI5mV1M,8
|
21
|
+
maps4fs-1.1.6.dist-info/RECORD,,
|