Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
en:tutoway [2011/01/22 13:06] – édition externe 127.0.0.1 | en:tutoway [2024/06/15 02:27] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | <WRAP box>[[:en: | + | <WRAP box> |
====== 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 is a graphical |
+ | {{ fr: | ||
- | {{ : | + | <WRAP box> |
+ | \\ 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. | ||
- | {{ : | + | <WRAP important> |
+ | ==== Track-like ways ==== | ||
- | On this pattern, each width is made of a different grey, to use this pattern, delete, | + | It is possible |
+ | <WRAP warning> | ||
- | 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> |
+ | 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> | ||
+ | \\ 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 box>icon= > image.4.0\\ | + | ==== Snowy/ |
+ | 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' | + | <WRAP box> |
+ | \\ | ||
+ | \\ # | ||
+ | \\ | ||
+ | \\ #normal view | ||
+ | \\ image[NSE][0]=track.3.1 | ||
+ | \\ #snowy view | ||
+ | \\ image[NSE][1]=track.3.1</ | ||
- | + | < | |
- | {{ : | + | |
===== Essential parameters ===== | ===== Essential parameters ===== | ||
- | |||
|Parameter | |Parameter | ||
|obj |object type |way || | |obj |object type |way || | ||
- | |waytype |way type |internal name |maglev_track | | + | |[[en: |
|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: |
- | + | ||
- | + | ||
- | ==== waytype ==== | + | |
- | + | ||
- | + | ||
- | [[: | + | |
- | + | ||
- | + | ||
- | ==== System_type ==== | + | |
- | + | ||
- | + | ||
- | [[http:// | + | |
<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 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 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.</ | ||
- | ===== Example files ===== | + | <WRAP box> |
- | + | ||
- | + | ||
- | <WRAP download> | + | |
- | + | ||
- | + | ||
- | [[http:// | + | |
- | + | ||
- | + | ||
- | <WRAP box>[[:en: | + | |
- | + | ||
- | + | ||
- | \\ | + |