ToDoNewRoutes

From TTWiki

Jump to: navigation, search

(WARNING: This is a dev scratchpad to collect ideas for a newroute grf system)

This page is for collecting ideas for newroads (Lakie) and enhancetunnels(eis_os) to get a united system for allowing more flexible sprite content = newroutes

Contents

Action 0

All TTD routes get devided into logical groups:

For roads:

IDDescriptionDefault Number Of Sprites Needed
00roads19 (4 halfs, 4 slope, 2 straight, 4 corners, 5 junctions)
01road depot6 (4 roofs, 2 little corner pieces)
02road crossing ground2
03road pieces on bridges6 (4 Ramp, 2 flat)
04road tunnel rail ground4
05road tunnel8

Roadworks?

For rails:

IDDescriptionDefault Number Of Sprites Needed
00railroad?
01monorail?
02maglev?
03electric? (layout shared with railroad!)
04type 40/?
05type 50/?
06type 60/?
07type 70/?
08railroad depot6
09monorail depot6
10maglev depot6
11electric depot0/6 (layout shared with railroad!)
12type 4 depot0
13type 5 depot0
14type 6 depot0
15type 7 depot0
16railroad on crossing0/2
17monorail on crossing0/2
18maglev on crossing0/2
19electric on crossing0/2 (layout shared with railroad!)
20type 4 on crossing0
21type 5 on crossing0
22type 6 on crossing0
23type 7 on crossing0
24railroad tunnel6
25monorail tunnel6
26maglev tunnel6
27electric tunnel0/6 (layout shared with railroad!)
28type 4 tunnel0
29type 5 tunnel0
30type 6 tunnel0
31type 7 tunnel0
24railroad tunnel rail0/2
25monorail tunnel rail0/2
26maglev tunnel rail0/2
27electric tunnel rail0/2
28type 4 tunnel rail0/2
29type 5 tunnel rail0/2
30type 6 tunnel rail0/2
31type 7 tunnel rail0/2
32railroad tunnel rail top0/2
33monorail tunnel rail top0/2
34maglev tunnel rail top0/2
35electric tunnel rail top0/2
36type 4 tunnel rail top0/2
37type 5 tunnel rail top0/2
38type 6 tunnel rail top0/2
39type 7 tunnel rail top0/2
40railroad bridge rail top0/6(4 Ramp, 2 flat)
41monorail bridge rail top0/6(4 Ramp, 2 flat)
42maglev bridge rail top0/6 (4 Ramp, 2 flat)
43electric bridge rail top0/6 (4 Ramp, 2 flat)
44type 4 bridge rail top0/6 (4 Ramp, 2 flat)
45type 5 bridge rail top0/6 (4 Ramp, 2 flat)
46type 6 bridge rail top0/6 (4 Ramp, 2 flat)
47type 7 bridge rail top0/6 (4 Ramp, 2 flat)

Type 4 till type 7 are fair game for grf authors.

Action 0 for first 8 rail ids:

- names

- compatible mask for rails, aka rail type 3(electric) is compatible to 0 (via or mask)

- system flags, will draw catenary, makes electrif traction engines work, copy of action 0(train) traction type?

(Idea: The caternary could be added into the sprite table system, so even two caternary systems could be done, very hard)

Action 0 for railvehicles:

- a flag for supporting newroutes (prop 05, set bit 7 maybe)

- need a new way to have the real type specifc

(sample an narrow gauge isn't allowed to work on normal rail, but doesn't depend anymore on maglev)

- prop 05 for Track type is now allowed to have 0-7 as value.

(The run on wrong track system code - electric on non electric rails - can get screwey)

Action 0 for bridges:

- deny new route system

Action 0 has to support for each of the above IDs, serveral standard/default layouts and custom layouts. The custom layouts can be used for more advanced stuff and are selectable via action 2 callback.

How drawing works:

TTDPatch will use a callback (if enabled for id) to get a spritelayout number.

If not, it will use the default number for the layout.

Get Ground Sprite, dword 0 for none

Draw normal sprites until we find 80h (as stations)

Each entry allows some special bit settings in the spritenumber.

(sprite number in recent action 0, TTD Sprite, Special Sprite from other ID !)

Action 2

Variational Action 2 Variables for New Routes

VariableContent
40Height above ground
41Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline
42Height above snowline? (for roads and rails, the snow grade could be adjusted then)
43Townzone: 0 none
44Is under bridge
45Build year (problem where to store that info, see L8)
46last used counter (abadoneroads/something like abadonerails, L7 is free), for stations not possible
47ttd road type 0 - on bare land, 1 - on grass, 2 - paved, 3 - with streetlights, 5 - tree-lined, 6 - on grass with road works, 7 - paved with road works
48oneway bits
49town owned tile

Landscape 8

For each tile it would be nice to store the buildyear, maybe year / 10 for support later years, post 2010...

The L8 Array could be a word or a byte value

Landscape usage

L8 = low byte: date of build/10

L7 (rail tile) = abadone counter

L7 (tunnels) = used by enhancetunnels already!

Compatibility

The new rail stuff is incompatible to the old, unimaglev could be used to have old games fit to the new system, or not convert old games and tell the newroutes we work an old version and cross convert on the fly the systems.

Additonal Stuff

We should add support for busstops and road stations aswell with direct support for newroutes.

Other

Content by Lakie and eis_os

Personal tools
advertisement