News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Dat file reference for: Buildings and Stops

Started by Ves, February 02, 2016, 11:45:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ves

Note: This guide applies to Simutrans-Extended version 12.x and above only.

Short comments on buildings:

Visitors, residents and workers
There is a new system to divide passengers into "commuting" passengers and "visiting" passengers which will travel by different rules set in simuconf.tab. If the resident/visiting- or commuting parameters are not set in buildings datfile, the values will be calculated based on the "level=" parameter and constants specified in simuconf.tab. The initial mechanism of a buildings job slots are the following:

       
  • Each building that is not a residential building has a defined number of jobs.
  • Commuting passengers travelling to that building take up one job slot each for a fixed period of time after their arrival (set in simuconf.tab and represent a working day).
  • When all job slots are occupied, the building cannot accept any more commuting passengers.
Also, a buildings willingnes to accept visitors and commuters will (as of 3/1-2016 proposed to in this thread Potential feature discusion: economic integration) depend on each other like the following:

       
  • Consumer factories with no products to sell would not accept visiting passengers (i.e. customers).
  • Consumer factories with no (or insufficient) staff available would not accept visiting passengers.
  • Consumer factories (except those with a 0 visitor demand, such as a gasworks, which would continue to use the current time based system) would consume products in proportion to the number of visiting passengers arriving, rather than based on time elapsed (a consumer industry receiving 100% of its monthly visitor demand in a month would consume 100% of its specified monthly consumption, 50% at 50%, 200% at 200% and so forth).
  • Producing factories would produce only in so far as they have enough workers (i.e., will only produce at 100% of the normal rate if they have 100% or more of the number of workers that they need; at 50% of the workers, they will produce at 50% of the normal rate, etc.).
  • Producing factories that require inputs to produce goods would not accept any commuting passengers (i.e. workers) if they do not have enough input goods to produce anything.
  • Attractions with no staff would not accept visitors.
Signal boxes
As the new signals in simutrans require signal boxes to work as inteded, the signal boxes are coded as buildings with the "type=signalbox". To read more about how they work, read the Dat file reference for: Signals and Signalboxes

From version 11.x and earlier:

Airport control towers
In Simutrans-Extended, airports must have control towers to work, unless allow_airports_without_control_towers = 1 is set in simuconf.tab. Airport control towers are station extension buildings with a special flag set in their .dat files.

Traction specific depots
It is possible to make the depots only build a certain type of vehicles based on their traction type. For example it is possible to code a depot to only allow building steam engines and another depot maybe only may build diesel engines. Maintaining a fleet of both steam- and diesel engines will then require the player to build, maintain and organize different types of depots.

---

Notes to the dat parameters below:
All buildings can use all parameters, if not specified otherwise.
{E} = Simutrans Experiemental parameter
{M} = A modified parameter from Simutrans Standard
{S} (or nothing specified) = Original Simutrans Standard parameter and can be further investigated here: Create Standard DAT files.

.dat parameters for buildings:

obj=building
Name=
copyright=
intro_year=
intro_month=
retire_year=
retire_month=


level:{M} The "level" setting has a number of functions that many of them also can be overridden by other parameters and are dependent on which kind of building this is. It is mostly used together with multipliers specified either in simuconf.tab or hardcoded in Simutrans:

       
  • Provides default values for jobs, population, cost, maintenancy, capacity, etc. for all buildings if those parameters are not specified, using multiplyers in simuconf.tab
  • When a city wants to upgrade a city building, a building with a higher value of "level=" will be choosen.
  • Calculates the cost of a wayleave for building a way over or under a building (being one fifth of the simuconf.tab value "cost_buy_land" multiplied by the building's level).
  • Determines the maximum size of building ("size" defined as a value of "level") over which a bridge or elevated way might be built using the simuconf.tab value "max_elevated_way_building_level".
level=

population_and_visitor_demand_capacity:{E} If this building is "type=res", then this will specify how many inhabitans that this building has. For any other "type=", it will specify how many visitors that this building may attract, eg a museum attracting audience, a school attracting students, a store attracting costumers, a station building attracting architecture interrested people etc. Default if not specified: set in simuconf.tab based on "level=" value.
population_and_visitor_demand_capacity=

employment_capacity:{E} Specify how many "workers" (ingame job slots) this building demands for a fixed amount of time (set in Simuconf.tab). This will generate "commuting passengers" that have other travel rules than "visiting" passengers, also specified in the Simuconf.tab.
Although this is not a fully incorporated feature yet (as of 30/1-2016) the "employment_capacity=" of a building also may interfere with how many visitors the building accepts (eg a museum is closed for visitors when the staff is missing). If set to 0, there will be considered that no staff is needed (eg a monument or a statue) and then no penalties for visiting passengers. Default if not specified: set in simuconf.tab based on "level=" value.
employment_capacity=

mail_demand:{S} How much mail this building will demand every month. Default if not specified: set in simuconf.tab based on "level=" value.
mail_demand=

noconstruction:{S} No excavation pit graphics showed when under construction.
noconstruction=1

noinfo:{S} This building will not have an info window.
noinfo=1


type:{M} What kind of building this is. Dependent of what type it is, different parameters are possible or needed, eg "type=signalbox" requires additional parameters to work correctly.


City buildings:
type=resResidential building, peoples home
type=comCommercial building, where people work
type=indIndustrial building, also where people work
type=towCity townhall
type=monMonuments, like a statue people wants to visit
type=curCuriosities, buildings like schools
Player buildings:
type=stopCombined with "waytype=" it will become a stop a vehicle can use.
type=harbourWill make this into a harbour to place on the shore
type=dockSimilar to harbour, but to be placed on a flat shore
type=extensionThis will become a stationextension
type=depotVehicle depot, combined with "waytype="
type=hqYour company headquarter
type=signalboxSignalbox, to be used with the new signalling system. Read more about that here: Dat file reference for: Signals and Signalboxes




Dat-file parameters only for City Buildings:

climates:{S} A commaseparated list of climates that this building can be built in. Possible climates: desert, tropic, mediterran, temperate, tundra, rocky and arctic. Default if not specified: All climates.
climates= (Example: climates=desert,tundra,tropic climates=arctic

clusters:{S} (only "type=res", "type=com" and "type=ind") A comma separated list of clusters that this building belongs to. When to decide which building to build, the four orthogonally adjacent tiles are checked.  A building which matches any one of the clusters for any of the buildings on any of those 4 adjacent tiles will get a bonus to its chance of being built. It is recommended only to use this parameter on attached buildings and row houses. Default if not specified: Belonging to no cluster group.
clusters= (Example: clusters=1 clusters=3,5)

build_time:{S} (only "type=mon", "type=cur" and "type=tow") Defines how many inhabitants a city has to have for this building to be built. If set to zero, it will be built on the countryside.
build_time=

chance:{S} (only "type=mon" and "type=cur") The chance that this building will be built when the number of inhabitants are reached.
chance=




Dat-file parameters only for Player Buildings:

Cost and maintenance:{E} Specified in 1/100 of ingame Simutrans Credits of the building cost and the monthly maintenance. Default if not specified: set in simuconf.tab based on "level=" value.
cost=
maintenance=

allow_underground:{E} Whether this building may be built underground, overground or both. 0 means that it can be built only overground. 1 means that it can be built only underground. 2 means that it can be built either underground or overground. Default: 2
allow_underground=

enables_pax
enables_post
enables_ware:
{S} (only "type=stop", "type=harbour", "type=dock" and "type=extension") With these three parameters one can decide wether this stop or extension can accept either passengers, post or good or a combination of them.
enables_pax=1
enables_post=1
enables_ware=1


waytype:{S} (only "type=stop", "type=depot" and "type=extension") Specifies which waytype this building should be assosiated with. "type=stop" and "type=depot" wil only be buildable ON the waytile, while "type=extension" will be visible on the menu for that waytype.
waytype=road
waytype=track
waytype=tram_track
waytype=monorail_track
waytype=maglev_track
waytype=water
waytype=air
waytype=power


capacity:{E} If "type=signalbox": The maximum number of signals that can be connected to this signalbox at any given time
If "type=stop", "type=harbour", "type=dock" or "type=extension": The maximum capacity of good or passengers this building can size. Default if not specified: set in simuconf.tab based on "level=" value.
capacity=

signal_groups:{E} (only "type=signalbox") A comma separated list that specify which signal group this signalbox belongs to (Read more about that here: Dat file reference for: Signals and Signalboxes).
signal_groups= (Example: signal_groups=16,24)

radius:{E} (only "type=signalbox") The maximum distance in meters from this signalbox that any signal connected to it can be placed
radius=

hq_level:{S} (only "type=hq") This determines in which order the head quarters are being built when pressing "upgrade head quarter" in Simutrans. The smallest head quarter that is first built by the player should have "hq_level=0", the second version, which usually simulate a bigger head quarter, should have "hq_level=1", the third "hq_level=2" and so on. As head quarters should be buildable from the beginning of the game, it is wise to combine "hq_level=0" with a very early "intro_year=". NOTE: This is not to be confused with the functions of parameter "level="!.
hq_level=

traction_type[X]:{E} (only "type=depot") (Where X is a number in sequence, starting from 0, and being no higher than 255). A list of the traction types that can be built in this depot. Default: - all traction types can be built. Note that unpowered vehicles can be built in any depot. Possible traction types: bio, sail, steam, diesel, petrol, turbine, electric, hydrogene, fuel_cell and battery.
Example:
traction_type[0]=steam
traction_type[1]=sail


is_control_tower:{E} (only "type=extension") Whether this building is an airport control tower. If the setting "allow_airports_without_control_towers" is disabled in simuconf.tab, building this building connected to an airport will allow aircrafts to use the airport.
is_control_tower=1




Graphic representation for all buildings: How to code Backimages

needs_ground:{S} Wether the Simutrans painting engine needs to paint the ground underneath the building. If building graphics covers the entire tile (or tiles), this parameter is not needed.
needs_ground=1

animation_time:{S} If this building contains animations, this parameter, specified in miliseconds, tells how often to shift frames.
animation_time=

seasons:{S} Number of season graphics this building has defined with a maximum of five: spring, summer, autumn, winter and snow
seasons=

dims:{S} A comma separated list of three values (represented by A, B and C below) being number of tiles in east-west direction, number of tiles in north-south direction and number of rotations this building has. Read more about this here: Specify Dims and Backimage
dims=A,B,C (example: dims=1,2,4 dims=1,1,16)

Icon and cursor:{S} (Only "Player Buildings") Defines the icon and cursor using the same syntax as the main graphics. Note the ">" which makes the icon not zoom in and out when zooming ingame.
icon=>
cursor=

Graphical representation:{S} This is the same as in standard and the values and number of entries is dependent on the values given in "dims=". Read more about this here: Specify Dims and Backimage.
In general, one can look at the values in brackets [ ] as a six legged coordinate system (12 legged when also counting the use of frontimage) where each entry points to one specific graphic. This means that a 2x2 tile building with one rotation needs four entries, but a 2x2 tile building with four rotations would need 4x4=16 entries. If the building contains snow you would need 16x2=32 entries.
The order of the values are: [rotation][north-south][east-west][height][animation frame][season]=png-name.coordinate_vertical.coordinate_horisontal,pixeloffset_vertical,pixeloffset_horisontal

backimage[0][0][0][0][0][0]=name.0.0,0,0
frontimage[0][0][0][0][0][0]=name.0.0,0,0

A short explanation and reference for the [rotation] value:

       
  • For all buildings there can be 4 rotations:
    "dims=A,B,4"
    • [/i] = Facing south
      [1] = Facing east
      [2] = Facing north
      [3] = Facing west

         
    • For "type=res", "type=com" and "type=ind", there can be additional 4 rotations, a total of 8 rotations:
      Note that those types only can be 1x1 tiles!
      "dims=1,1,8"
      • [/i] = Street on south side
        [1] = Street on east side
        [2] = Street on north side
        [3] = Street on west side
        [4] = Street on southeast side (corner)
        [5] = Street on northeast side (corner)
        [6] = Street on northwest side (corner)
        [7] = Street on southwest side (corner)

           
      • For "type=stop", there can be up to a total of 16 rotations:
        Note that "type=stop" only can be 1x1 tile!
        If "dims=1,1,2" it will become a "drive through" stop:
        • [/i] = North-South
          [1] = East-West
          If "dims=1,1,4" it will become a "sack" stop:
          • [/i] = Entrance south
            [1] = Entrance east
            [2] = Entrance north
            [3] = Entrance west
            If "dims=1,1,8" it will become a "drive through" stop but with more graphics defined:
            • [/i] = (N-S) Middle part
              [1] = (E-W) Middle part
              [2] = (N-S) South end
              [3] = (E-W) East end
              [4] = (N-S) North end
              [5] = (E-W) West end
              [6] = (N-S) Stand alone part
              [7] = (E-W) Stand alone part
              If "dims=1,1,16" it will be possible to add additional graphics for the lower parallel stop (eg simulate platform on opposite side of dubble track). The extra entries are:
              [8] = (N-S) Lower track, Middle part
              [9] = (E-W) Lower track, Middle part
              [10] = (N-S) Lower track, South end
              [11] = (E-W) Lower track, East end
              [12] = (N-S) Lower track, North end
              [13] = (E-W) Lower track, West end
              [14] = (N-S) Lower track, Stand alone part
              [15] = (E-W) Lower track, Stand alone part
            A short Explanation of the [north-south] and [east-west] value:

                 
            • If "dims=2,2,1" it will become a 2x2 tile building with no rotation:
              • [/i] = Topmost corner (north west corner) of the building
                • [1][/i] = Rightmost corner (north east corner)
                  [1][0] = leftmost corner (south west corner)
                  [1][1] = lowermost corner (south east corner)
                  This could be expanded to "dims=16,16,4" and all tiles with graphics would then need an entry of its own using the same logic.
                A short explanaining of the [height] value:

                     
                  • [/i] = Graphics is painted directly on the base of the tile
                    [1] = Graphics is painted 128 pixels in pak128 (64 pixels in pak64, 192 pixels in pak192 etc) above the base of the tile
                    [2] = Graphics is painted an additional 128 pixels in pak128 (64 pixels in pak64, 192 pixels in pak192 etc) higher than [1]
                    [3] = Graphics is painted yet an additional 128 pixels in pak128 (64 pixels in pak64, 192 pixels in pak192 etc) higher than [2] and this is the highest possible
                  A short explanaining of the [animation frame] value:

                       
                  • The animation frames are specified together with the "animation_time=" parameter and there can in principle be an infinite number of animation frames.
                    • [/i] = First frame
                      [1] = Second frame
                      [2] = Third frame
                      etc....
                    A short explanaining of the [season] value:

                         
                    • The seasons are specified together with "seasons=" parameter:
                      If "seasons=1":
                      • [/i] = All seasons
                        If "seasons=2":
                        • [/i] = All seasons
                          [1] = Snow
                          If "seasons=4":
                          • [/i] = Summer
                            [1] = Fall
                            [2] = Winter (used also for snow)
                            [3] = Spring
                            If "seasons=5":
                            • [/i] = Summer
                              [1] = Fall
                              [2] = Winter
                              [3] = Spring
                              [4] = Snow
                            Example of a city building. Note the use of 2 "heights":
                            dims=1,1,8
                            BackImage[0][0][0][0][0][0]=images/res/1875-tenement-4f.1.0
                            BackImage[0][0][0][1][0][0]=images/res/1875-tenement-4f.0.0

                            BackImage[1][0][0][0][0][0]=images/res/1875-tenement-4f.1.1
                            BackImage[1][0][0][1][0][0]=images/res/1875-tenement-4f.0.1

                            BackImage[2][0][0][0][0][0]=images/res/1875-tenement-4f.1.2
                            BackImage[2][0][0][1][0][0]=images/res/1875-tenement-4f.0.2

                            BackImage[3][0][0][0][0][0]=images/res/1875-tenement-4f.1.3
                            BackImage[3][0][0][1][0][0]=images/res/1875-tenement-4f.0.3

                            BackImage[4][0][0][0][0][0]=images/res/1875-tenement-4f.5.0
                            BackImage[4][0][0][1][0][0]=images/res/1875-tenement-4f.4.0

                            BackImage[5][0][0][0][0][0]=images/res/1875-tenement-4f.5.1
                            BackImage[5][0][0][1][0][0]=images/res/1875-tenement-4f.4.1

                            BackImage[6][0][0][0][0][0]=images/res/1875-tenement-4f.5.2

                            BackImage[7][0][0][0][0][0]=images/res/1875-tenement-4f.5.3
                            BackImage[7][0][0][1][0][0]=images/res/1875-tenement-4f.4.3



                            Example of a train platform. Note the use of "frontimage" which makes the Simutrans painting engine paint the graphics in front of eg vehicles:
                            Dims=1,1,16
                            BackImage[0][0][0][0][0][0]=brick-platform.1.0
                            BackImage[1][0][0][0][0][0]=brick-platform.0.0
                            BackImage[2][0][0][0][0][0]=brick-platform.1.2
                            BackImage[3][0][0][0][0][0]=brick-platform.0.4
                            BackImage[4][0][0][0][0][0]=brick-platform.1.4
                            BackImage[5][0][0][0][0][0]=brick-platform.0.2
                            BackImage[6][0][0][0][0][0]=brick-platform.1.6
                            BackImage[7][0][0][0][0][0]=brick-platform.0.6

                            FrontImage[8][0][0][0][0][0]=brick-platform.1.1
                            FrontImage[9][0][0][0][0][0]=brick-platform.0.1
                            FrontImage[10][0][0][0][0][0]=brick-platform.1.3
                            FrontImage[11][0][0][0][0][0]=brick-platform.0.5
                            FrontImage[12][0][0][0][0][0]=brick-platform.1.5
                            FrontImage[13][0][0][0][0][0]=brick-platform.0.3
                            FrontImage[14][0][0][0][0][0]=brick-platform.1.7
                            FrontImage[15][0][0][0][0][0]=brick-platform.0.7



                            Example of a church ("type=cur"), build by several individual modules and meassuring 2x2 tiles. Note the snow graphics and the [1] at the "season" entry. Observe that this example lacks all the "non snow" entries ([0] at the "season" entry) to make the snow disappear:
                            seasons=2
                            dims=2,2,4
                            Backimage[0][0][0][0][0][1]=images/cur/stone-attractions-snow.1.0
                            Backimage[0][1][0][0][0][1]=images/cur/stone-attractions-snow.0.0
                            Backimage[0][0][1][0][0][1]=images/cur/stone-attractions-snow.1.3
                            Backimage[0][1][1][0][0][1]=images/cur/stone-attractions-snow.3.4

                            Backimage[1][0][0][0][0][1]=images/cur/stone-attractions-snow.4.5
                            Backimage[1][0][1][0][0][1]=images/cur/stone-attractions-snow.3.4
                            Backimage[1][1][0][0][0][1]=images/cur/stone-attractions-snow.1.1
                            Backimage[1][1][1][0][0][1]=images/cur/stone-attractions-snow.0.1

                            Backimage[2][0][0][0][0][1]=images/cur/stone-attractions-snow.3.4
                            Backimage[2][1][0][0][0][1]=images/cur/stone-attractions-snow.4.4
                            Backimage[2][0][1][0][0][1]=images/cur/stone-attractions-snow.0.2
                            Backimage[2][1][1][0][0][1]=images/cur/stone-attractions-snow.1.0

                            Backimage[3][0][0][0][0][1]=images/cur/stone-attractions-snow.0.3
                            Backimage[3][0][1][0][0][1]=images/cur/stone-attractions-snow.1.1
                            Backimage[3][1][0][0][0][1]=images/cur/stone-attractions-snow.3.4
                            Backimage[3][1][1][0][0][1]=images/cur/stone-attractions-snow.1.2




                            edit                   - Ves-Corrected some mistakes
                            edit 4/2-2016 - Ves-Added more info on graphics representation
                            edit 18/11-2016 - Ves-Added info about the two new traction types petrol and turbine

                            Moderator note: References to "Simutrans-Experimental" changed to "Simutrans-Extended" 13 February 2017.

Milko


jamespetts

Splendid, thank you for all this work: it is most useful.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

It seems that level=X does not specify sensible defaults for signalboxes. While a level=5 station extension costs 375 credits to build, a level=5 signalbox costs 21 milions... (to build and maintain)

jamespetts

Are you able to upload a pakset in which this can be reproduced? The British pakset seems to have the cost of all the signalboxes specified.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

#5
http://server.exp.simutrans.com/pak128.CS/signalbox/

Also I think that the default visitors and mail levels for signalbox should be 0, unless explicitly defined. So that level would set only prices and jobs.

Edit: i think that level for signalboxes should also set default capacity. Level 1 = 4 signals, and every higher level will double.

I like the simple setting of many parameter using levels, as I do not want to bother with exact balancing until the pakset has all necessary objects for game.

jamespetts

This appears to be a station extension building rather than a signalbox (the .pak file, at least), and has a modest cost: can you re-check that this is properly configured?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

I have probably made a mistake when uploading the files. I did lots of experiments... Files updated now.

jamespetts

#8
I still seem to be getting the same issue. Is this supposed to be the "station control building"?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

#9
Yes that's it. I added it also to the whole pakset: http://server.exp.simutrans.com/pak128.CS-Ex.zip
And this save game: http://server.exp.simutrans.com/debug-saves/trnava.sve

jamespetts

Is that the same saved game and pakset that you uploaded for the signal reassignment bug?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.


jamespetts

Splendid, thank you: I think that I have found and fixed this now. Would you be able to re-test?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Quote from: jamespetts on April 30, 2017, 02:31:34 PM
Splendid, thank you: I think that I have found and fixed this now. Would you be able to re-test?
Now the building costs seem to be reasonable, but when I build a signalbox, I get the money, instead of spending them. And if I destroy the signal box I get 10 Milion refund.
Manually specified costs seem to work well, I paid what was specified, and got half of the costs as refund when the signalbox was destroyed. Although the tooltip says the price (if specified manually) is negative.
As I was testing that I have noticed that the price paid for building station extensions is not what is being stated in tooltip - I tested with pak birtain as well as pak.cs and it affects all extensions. The price charged is slightly higher, just watch the price tag appearing after you build the station.
(And sorry for putting this in to the dat reference, insted of a separate bug thread. I originally thought the the problem is at my end.)

jamespetts

I think that I have fixed these now - would you be able to re-test? As to the station extension buildings, the price shown is just the construction cost - to that must be added the cost of land.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

A little bit better. Now I pay the specified cost, although the tooltip show negative cost if explicitly defined, and positive if implicitly defined by level
When destroying a signalbox, with explicitly defined costs, i get 50% refund. When destroying signalbox with implicit costs, I pay almost double the price of it.

jamespetts

I have fixed the issue with the tooltip.

As to the demolition costs, I use the same formula for signalboxes with implicitly defined prices as for other buildings, which use the formula of level multiplied by cst_multiply_remove_haus.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Quote from: jamespetts on April 30, 2017, 08:59:08 PM
I have fixed the issue with the tooltip.
This is OK

Quote
As to the demolition costs, I use the same formula for signalboxes with implicitly defined prices as for other buildings, which use the formula of level multiplied by cst_multiply_remove_haus.
Well although it is weird to pay more to bulldoze than to construct, but OK. What is weird is to get money for bulldozing a signalbox with explicitly defined price (50 % of construction cost).

jamespetts

I think that I have fixed the issue with demolishing signal boxes adding to revenue; would you be able to re-test?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki


jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

I am trying to make a station extension building, but I'm confused by the fact that there seem to be two different systems for images. This thread and the wiki use a system where all the images are in the same PNG file and there are numbers, e.g. "FrontImage[0][1][2][3]". The Blender script produces multiple PNG files with N/E/S/W and the tutorial for making vehicles uses a system with letters, e.g."EmptyImage[E]". For a station extension made in Blender, should I be using only numbers even though the images are in different PNG files? Any links to documentation for the system with letters would be helpful, please.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

For a single tile building, you can use the new rendering system (making sure to have a normal and snow image); however, multi-tiled buildings will need to use the old rendering system, as Tilecutter cannot deal with transparent pixels. Multi-tiled buildings also have a number of extra complexities in how their images are constructed: the .dat files need to be constructed by Tilecutter for these buildings.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Matthew

Quote from: jamespetts on June 16, 2018, 11:30:47 AM
For a single tile building, you can use the new rendering system (making sure to have a normal and snow image);

Ah, snow images are compulsory. That explains why makeobj was throwing an error for "seasons=1".

I can see that there's a texture that has been used for station building snow in the past, as it's in one of the blends. That's doable then.

Quotehowever, multi-tiled buildings will need to use the old rendering system, as Tilecutter cannot deal with transparent pixels. Multi-tiled buildings also have a number of extra complexities in how their images are constructed: the .dat files need to be constructed by Tilecutter for these buildings.

Then I will stay well clear of multi-tiled buildings for the time being. Thank you.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

Yes, the snow texture is fairly easy to set up; multi-tile buildings are rather harder (although definitely doable with a little practice - but it is probably easier to start with single tile buildings).
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

Quote from: Matthew on June 16, 2018, 11:24:56 AM
I am trying to make a station extension building, but I'm confused by the fact that there seem to be two different systems for images. This thread and the wiki use a system where all the images are in the same PNG file and there are numbers, e.g. "FrontImage[0][1][2][3]". The Blender script produces multiple PNG files with N/E/S/W and the tutorial for making vehicles uses a system with letters, e.g."EmptyImage[E]". For a station extension made in Blender, should I be using only numbers even though the images are in different PNG files? Any links to documentation for the system with letters would be helpful, please.
You can split images for one object into multiple PNG files, if you like. E.g. I often have one PNG with summer image (and all 4 rotations), and another PNG with snowy winter image (and the same 4 rotations). Just because I have the snow as a layer in gimp, and export once with this layer visible, and once with snow layer hidden.

EmptyImage/FreightImage are specific to vehicles. That allows you to have different images for empty vehicles and for vehicles loaded with different cargo (e.g. black coal, yellow/white sand, brownish iron ore, etc)
For platforms the Front/Back image is important to split picture into what is drawn behind the tracks and vehicles, and what is in front of them. For general buildings (houses, factories, stations), backimage is enough, but you can use Frontimage in clever ways - e.g. have a set of houses as a backimage, and then add some fences, gardens, and stuff as frontimage and combine them to get more houses. Or have some labels or colorful decorations to distinguish shops selling different goods (like those in pak128.Britain), or you can even use them for animations (smoke, or Simutrans Fired Chicken in pak128). Perhaps snow could be done as frontimage too.

Matthew

Quote from: Vladki on June 17, 2018, 07:50:39 PM
You can split images for one object into multiple PNG files, if you like. E.g. I often have one PNG with summer image (and all 4 rotations), and another PNG with snowy winter image (and the same 4 rotations). Just because I have the snow as a layer in gimp, and export once with this layer visible, and once with snow layer hidden.

EmptyImage/FreightImage are specific to vehicles. That allows you to have different images for empty vehicles and for vehicles loaded with different cargo (e.g. black coal, yellow/white sand, brownish iron ore, etc)
For platforms the Front/Back image is important to split picture into what is drawn behind the tracks and vehicles, and what is in front of them. For general buildings (houses, factories, stations), backimage is enough, but you can use Frontimage in clever ways - e.g. have a set of houses as a backimage, and then add some fences, gardens, and stuff as frontimage and combine them to get more houses. Or have some labels or colorful decorations to distinguish shops selling different goods (like those in pak128.Britain), or you can even use them for animations (smoke, or Simutrans Fired Chicken in pak128). Perhaps snow could be done as frontimage too.

Thank you for the explanation, Vladki. The explanation of EmptyImage is particularly helpful: I hadn't realized it was empty vehicles rather than images. It's so obvious when someone explains it to you....  :-[
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Matthew

Anyone attempting to use this reference to make a through platform may benefit from ranran's helpful tutorial on how to do:

Quote from: Ranran on June 06, 2019, 03:13:03 AM
<snip>
You have to have dims=1,1,16 to support 4 rotations.
1,1,4 is for the terminal stop.
1,1,8 is considered to be symmetrical to the track.
1,1,16 is considered to be asymmetric with respect to the track.

i.e.
Dims=1,1,16
BackImage[0][0][0][0][0][0]=upper left
BackImage[1][0][0][0][0][0]=upper right
BackImage[2][0][0][0][0][0]=upper left
BackImage[3][0][0][0][0][0]=upper right
BackImage[4][0][0][0][0][0]=upper left
BackImage[5][0][0][0][0][0]=upper right
BackImage[6][0][0][0][0][0]=upper left
BackImage[7][0][0][0][0][0]=upper right
FrontImage[8][0][0][0][0][0]=lower right
FrontImage[9][0][0][0][0][0]=lower left
FrontImage[10][0][0][0][0][0]=lower right
FrontImage[11][0][0][0][0][0]=lower left
FrontImage[12][0][0][0][0][0]=lower right
FrontImage[13][0][0][0][0][0]=lower left
FrontImage[14][0][0][0][0][0]=lower right
FrontImage[15][0][0][0][0][0]=lower left

lower/upper, left/right are the position where the water tower should stand

(Double-post because this clarifies information in OP)
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。