Simutrans

Simutrans

Not enough ratings
Uploading Content to the Steam Workshop
By HaydenRead
This guide provides information on creating and uploading content to the Steam Workshop.
   
Award
Favorite
Favorited
Unfavorite
Types of Content
Simutrans supports uploading 4 different types of content to the Steam Workshop.

These item types are:
Addons
Addons are single '.pak' files containing details of a vehicle, building, or other object to be added to an existing PakSet.
Maps
Maps are '.ppm' images that can be loaded as heightmaps into Simutrans.
PakSets
PakSets are a collection of configuration files and '.pak' files that make up a cohesive game environment.
Scenarios
Scenarios are a set of additional game rules, goals or other settings coded into a text file, and also often (but not always) including an exisitng save game that the scenario is played on.
Uploading Content to the Steam Workshop
Upon launching the Steam Uploader, it will display a standard window with File, Windows, Help.

To upload content for the first time, you will need to go to File -> New, and select the appropriate content type.

For all content types it will prompt for a Title, Description, and Visibility.

Addons
Addons will also prompt for you to select the .pak file of the Addon, and which PakSet the addon is designed to work with (note that it will only show PakSets that it can detect installed on your system, and will default to pak128.

For an addon it will also prompt you to select a preview image.

Maps
As maps are PakSet independent, and it can create the image from the .ppm file, selecting a Map will only prompt for the Map file to be uploaded.

PakSets
For PakSets it will prompt you to select the Folder in which the PakSet is located and a Preview file for the PakSet. Note that the actual install name of the PakSet will match the name of the folder that the PakSet was stored in.

Scenario
For Scenarios it will prompt you to select the scenario.nut file within the Scenario directory. It will upload the entire directory to Steam. You will also need to select a preview image, and the PakSet the Scenario is designed for.

Final Steps
Once all the details are entered, go to File -> Upload to Steam

Make sure if you may want to be able to make changes in future to save the item after it has been uploaded to Steam, and then if you wish to alter the item again in future, you can Open the item again. (This will store the Steam Workshop ID of the item in the file, along with the other configuration options you have selected).
Creating an Addon
Introduction
MakeObj is a program that creates pak files. It merges the png image file with the dat file in a single pak file, that is compatible with Simutrans and is ready to be used in the game.

A wiki on creating pak files can be found at Simutrans Wiki[simutrans-germany.com]
An old guide can be found at this location[forum.simutrans.com]

Both the command line tool makeobj, and the graphical tool Tilecutter will be installed as part of the workshop tools
Creating a Map
Maps can be created in any image application that supports saving to ppm format.

One free application that supports this is Gimp[www.gimp.org].

When creating a height map if working in GreyScale, black is the deepest point, while white is the heighest point.

The color to height conversion is calculated by one of 4 methods, depending on if the given pakset uses 'half-heights' or not, and if it uses an old method or new method for calculation.

The formula is:
h0 = r*2+g*3+b
then one of
Old Method
h1=h0/32-28
h1=h0/16-14
New Method
h1=h0/24-34
h1=h0/48-18

Sea level is by default set to h1=-4, however it can be set as low as h1=-10 or h1=-20 depending on if 'half-heights' are used or not.
The table below gives a conversion of height to greyscale value (from 0 - 255).
Depth
h0/32-28
h0/16-14
h0/24-34
h0/48-18
-34
0
-33
4
-32
8
-31
12
-30
16
-29
20
-28
0
24
-27
6
28
-26
11
32
-25
16
36
-24
22
40
-23
27
44
-22
32
48
-21
38
52
-20
43
56
-19
48
60
-18
54
64
0
-17
59
68
8
-16
64
72
16
-15
70
76
24
-14
75
0
80
32
-13
80
11
84
40
-12
86
22
88
48
-11
91
32
92
56
-10
96
43
96
64
-9
102
54
100
72
-8
107
64
104
80
-7
112
75
108
88
-6
118
86
112
96
-5
123
96
116
104
-4
128
107
120
112
-3
134
118
124
120
-2
139
128
128
128
-1
144
139
132
136
0
150
150
136
144
1
155
160
140
152
2
160
171
144
160
3
166
182
148
168
4
171
192
152
176
5
176
203
156
184
6
182
214
160
192
7
187
224
164
200
8
192
235
168
208
9
198
246
172
216
10
203
176
224
11
208
180
232
12
214
184
240
13
219
188
248
14
224
192
15
230
196
16
235
200
17
240
204
18
246
208
19
251
212
20
216
21
220
22
224
23
228
24
232
25
236
26
240
27
244
28
248
29
252
Creating a PakSet
Creating a PakSet is a large undertaking requiring the creation at minimum of the following files:
menuconf.tab (Menu configuraiton for the PakSet)
and the following pak files as a minimum:
  • crossing.*.pak
  • cursor.*.pak
  • misc.*.pak
  • symbol.*.pak
  • symbol.Builder.pak
  • menu.*.pak
  • ground.*.pak
  • good.None.pak
  • good.Passagiere.pak
  • good.Post.pak
  • config/*.tab
  • building.*_CITY.pak
  • way.city_road.pak
  • way.*_road.pak
  • building.CarDepot.pak

Additional details on creating a PakSet can be found on the simutrans-germany.com Wiki Site.[simutrans-germany.com]
Creating a Scenario
Scenario files are essentially a text script file(s), often with an associated save game that forms the starting point of the Scenario.

The scenario file is called 'scenario.nut'

The API Details can be found at Simutrans-Squirrel-API[dwachs.github.io]

Another way to learn is to simply open up the scenario.nut file from an existing scenario and take a look at how it is coded.