• English
  • Français (French)

Ways

Png and dat patterns

Ways requires many images (straight pieces, dead ends, curves, diagonal pieces, crossings, slopes, …).

Road-like ways

Here is a graphical pattern and its dat pattern:

obj=way
waytype=
name=
cost=
maintenance=
topspeed=
copyright=
draw_as_ding=0
system_type=0

intro_year=1800
intro_month=1
retire_year=2999
retire_month=1

icon⇒ source.0.2
cursor=source.0.3
image[-]=source.5.3
image[N]=source.1.0
image[S]=source.1.1
image[E]=source.1.2
image[W]=source.1.3
image[NS]=source.0.0
image[EW]=source.0.1
image[NE]=source.2.0
image[SE]=source.2.1
image[SW]=source.2.2
image[NW]=source.2.3
diagonal[NE]=source.3.0
diagonal[SE]=source.3.1
diagonal[SW]=source.3.2
diagonal[NW]=source.3.3
image[NEW]=source.4.0
image[NSE]=source.4.1
image[SEW]=source.4.2
image[NSW]=source.4.3
image[NSEW]=source.5.0
imageUp[3]=source.6.0
imageUp[6]=source.6.1
imageUp[9]=source.6.2
imageUp[12]=source.6.3
imageUp2[3]=source.7.0
imageUp2[6]=source.7.1
imageUp2[9]=source.7.2
imageUp2[12]=source.7.3

On the right half of the second line, there is a square containing the way's icon. The grey button at top left of this square will be the final icon, everything else in the square must be removed, including the red frame. There is a red tile at the right of the icon square, it is the image which will be used as a cursor when building the way. The fact that this tile is elevated from the bottom of the square is intended, you just have to place your cursor image on it.

On the right of the 6th line, the red tile is the image which is displayed when a single way unit is not connected to anything around it.

Please notice that the use of soft and hard slopes depends on the pakset you play with. In pak128, hard slopes are rarely possible (only low speed roads can be built on hard slopes). To prevent players from building on hard slopes (as well as building slopes and curves with airports'runways), just place nothing in these images and remove their definition from the dat file.

Track-like ways

It is possible to define several images for each crossing so the game changes them according to the directions in which they are used. Therefore, we can have more realistic track switches. Pak128's tracks feature this.

This feature is not available for catenaries.

Moreover, in pak128, tracks don't have proper curves. Indeed, the images used as curves are diagonal pieces of straight tracks. To do so, just use diagonal images and define them as curves in the dat file, then remove the diagonal definitions from the dat file.

Here is a second pattern following these rules:

obj=way
waytype=
name=
cost=
maintenance=
topspeed=
copyright=
draw_as_ding=0
system_type=0

intro_year=1800
intro_month=1
retire_year=2999
retire_month=1

icon⇒ track.0.2
cursor=track.0.3
image[-]=track.6.3
image[N]=track.1.0
image[S]=track.1.1
image[E]=track.1.2
image[W]=track.1.3
image[NS]=track.0.0
image[EW]=track.0.1
image[NE]=track.2.0
image[SE]=track.2.1
image[SW]=track.2.2
image[NW]=track.2.3
image[NEW]=track.3.0
image[NSE]=track.3.1
image[SEW]=track.3.2
image[NSW]=track.3.3
image[NEW1]=track.4.0
image[NSE1]=track.4.1
image[SEW1]=track.4.2
image[NSW1]=track.4.3
image[NEW2]=track.5.0
image[NSE2]=track.5.1
image[SEW2]=track.5.2
image[NSW2]=track.5.3
image[NSEW]=track.6.0
image[NSEW1]=track.6.1
image[NSEW2]=track.6.2
imageUp[3]=track.7.0
imageUp[6]=track.7.1
imageUp[9]=track.7.2
imageUp[12]=track.7.3
imageUp2[3]=track.8.0
imageUp2[6]=track.8.1
imageUp2[9]=track.8.2
imageUp2[12]=track.8.3

Snowy/Winter view

Ways can have snowy images. To define them, a parameter must be added to the name of each image, equal to 0 for normal (summer) view and 1 for snowy (winter) view. Here is an example:

image[NSE]=track.3.1

#becomes …

#normal view
image[NSE][0]=track.3.1
#snowy view
image[NSE][1]=track.3.1

This feature is not available for catenaries.

Essential parameters

Parameter Description Content Example
obj object type way
waytype way type internal name maglev_track
name name text AMT
cost price (*100c) number 390000
maintenance maintenance cost (*100c) number 7500
topspeed max speed (km/h) number 750
max_weight max weight (t) number 100
intro_year introduction year number 2025
intro_month introduction month number 1
copyright name of the creator text Gauthier
draw_as_ding draw over things boolean (0,1) 0
system_type special parameter number 1

To make a fence, waytype = track; system_type = 255 and draw_as_ding = 1. Draw_as_ding draws the fence over graphics which are behing it. Don't forget to make topspeed = 0.

To make an elevated way, system_type = 1 is used. If there are graphics beneath the way, like pillars, you will have to place them higher on the image so it still fit into the squares. Use offsets in the dat file to make your graphics appear at the right place in game.