Traductions possibles :

Différences

Cette page vous donne les différences entre la révision choisie et la version actuelle de la page.

en:tutoway [2010/06/28 17:18]
gauthier
en:tutoway [2015/09/03 10:43] (version actuelle)
gauthier
Ligne 1: Ligne 1:
-<WRAP box>[[:en:tutomakeobj3#objects|Come back to objects]] </WRAP> +<WRAP box>[[en:tutomakeobj3#objects|Come back to objects]] </WRAP>
====== Ways ====== ====== Ways ======
 +===== Png and dat patterns =====
-===== Graphics =====+Ways requires many images (straight pieces, dead ends, curves, diagonal pieces, crossings, slopes, ...).
 +==== Road-like ways ====
-Making tracks, roads, maglev tracks, canals, etc … needs much graphics. Here are two graphical patterns for ways : the second one gives rounded turns to make the work easier.+Here is a graphical pattern and its dat pattern:
 +{{  fr:tuto:dat:road.png  }}
-{{  :fr:trame_way.png  }}+<WRAP box>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</WRAP> 
 +  
 +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.
-{{  :fr:trame_way2.png  }}+<WRAP important>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.</WRAP>
 +==== Track-like ways ====
-On this pattern, each width is made of a different grey, to use this  pattern, take the necessary line according to the way type, delete,  thanks to replace color tool and playing on the tolerance, the greys  until the right width.+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.
 +<WRAP warning>This feature is not available for catenaries.</WRAP>
-This pattern is on the ground, if you make a track for example, you'll have to make the track a bit higher than the ground.+<WRAP important>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.</WRAP>
 +Here is a second pattern following these rules:
-This is the graphical part of the .dat file, explained below.+{{  fr:tuto:dat:track.png  }}
 +<WRAP box>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</WRAP>
-<WRAP box>icon= > image.4.0\\  cursor=image.4.1\\  image[-]=image.3.1\\  image[S]=image.0.1\\  image[N]=image.0.3\\  image[W]=image.0.2\\  image[E]=image.0.0\\  image[NS]=image.0.5\\  image[EW]=image.0.4\\  image[NSE]=image.2.3\\  image[NSW]=image.2.1\\  image[NEW]=image.2.0\\  image[SEW]=image.2.2\\  image[NSEW]=image.3.0\\  image[NE]=image.1.1\\  image[SE]=image.1.3\\  image[NW]=image.1.2\\  image[SW]=image.1.0\\  imageUp[3]=image.3.3\\  imageUp[6]=image.3.2\\  imageUp[9]=image.3.5\\  imageUp[12]=image.3.4\\  diagonal[NE]=image.2.4\\  diagonal[NW]=image.1.5\\  diagonal[SE]=image.1.4\\  diagonal[SW]=image.2.5</WRAP>+==== 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:
-This .dat file pattern is usable only in one picture (replace the name of the picture as you want). There are several pictures : cursor is the picture which is used as a cursor when you build the way, icon is the picture which appears in Simutrans'toolbox, of course an icon doesn't fill a complete 128%%*%%128 tile, it must be 32%%*%%32 px and at the top left of the 128%%*%%128 square. If you draw another thing in this square it will be displayed so be careful. ImageUp[x] are slopes, the number in brackets doesn't mean anything but is needed. Diagonal[x] are the pictures used when you make a diagonal way, if these pictures aren't defined, Simutrans will use turns'pictures (that isn't very aesthetic …). The reste of the pictures are the other positions : extremities, straight lines, turns, crossings, … This is a graphical explaination to understand :+<WRAP box>image[NSE]=track.3.
 + \\  
 + \\ #becomes ..
 + \\  
 + \\ #normal view 
 + \\ image[NSE][0]=track.3.1 
 + \\ #snowy view 
 + \\ image[NSE][1]=track.3.1</WRAP>
- +<WRAP warning>This feature is not available for catenaries.</WRAP>
-{{  :fr:voie01.png  }}<WRAP tip>If you use the patterns, you won't have to know that.</WRAP>+
===== Essential parameters ===== ===== Essential parameters =====
- 
|Parameter  |Description  |Content  |Example  | |Parameter  |Description  |Content  |Example  |
|obj |object type |way || |obj |object type |way ||
-|waytype |way type |internal name |maglev_track |+|[[en:tutowaytype|waytype]] |way type |internal name |maglev_track |
|name |name |text |AMT | |name |name |text |AMT |
|cost |price (%%*%%100c) |number |390000 | |cost |price (%%*%%100c) |number |390000 |
Ligne 49: Ligne 158:
|copyright |name of the creator |text |Gauthier | |copyright |name of the creator |text |Gauthier |
|draw_as_ding |draw over things |boolean (0,1) |0 | |draw_as_ding |draw over things |boolean (0,1) |0 |
-|system_type |special parameter |number |1 | +|[[en:tutosystemtype|system_type]] |special parameter |number |1 |
- +
- +
-==== waytype ==== +
- +
- +
-[[:en:tutowaytype|Possible waytypes]] +
- +
- +
-==== System_type ==== +
- +
- +
-[[http://www.simutrans-france.fr.nf/doku.php?id=en:tutosystemtype|Possible special parameters]] +
<WRAP tip>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.</WRAP> <WRAP tip>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.</WRAP>
 +<WRAP tip>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.</WRAP>
-===== Example files ===== +<WRAP box>[[en:tutomakeobj3#objects|Come back to objects]] </WRAP>
- +
- +
-<WRAP download>You'll find here source files of MLM way. +
- +
- +
-[[http://www.simutrans-france.fr.nf/lib/exe/fetch.php?media=fr:voies.rar|Voies.rar]] </WRAP> +
- +
- +
-<WRAP box>[[:en:tutomakeobj3#objects|Come back to objects]] </WRAP> +
- +
- +
-\\ +