Difference between revisions of "ToDoNewRoutes"

From TTWiki
Jump to navigationJump to search
 
(Reformat and update)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
'''''ToDoNewRoutes -ToDo List for newroutes, newrails-enhancetunnels'''''
 
 
=ToDoNewRoutes=
 
 
 
('''WARNING:''' This is a dev scratchpad to collect ideas for a newroute grf system)
 
('''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)
+
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
 
to get a united system for allowing more flexible sprite content = newroutes
 
   
-=Action 0=-
+
==Action 0==
   
 
All TTD routes get devided into logical groups:
 
All TTD routes get devided into logical groups:
Line 16: Line 9:
 
For roads:
 
For roads:
   
  +
{| |-
||'''ID'''|'''Description'''|'''Default Number Of Sprites Needed'''
 
  +
!'''ID'''!!'''Description'''!!'''Default Number Of Sprites Needed'''
   
  +
|-
00|roads|19 (4 halfs, 4 slope, 2 straight, 4 corners, 5 junctions)
 
  +
|00||roads||19 (4 halfs, 4 slope, 2 straight, 4 corners, 5 junctions)
   
  +
|-
01|road depot|6 (4 roofs, 2 little corner pieces)
 
  +
|01||road depot||6 (4 roofs, 2 little corner pieces)
   
  +
|-
02|road crossing ground|2
 
  +
|02||road crossing ground||2
   
  +
|-
03|road pieces on bridges|6 (4 Ramp, 2 flat)
 
  +
|03||road pieces on bridges||6 (4 Ramp, 2 flat)
   
  +
|-
04|road tunnel rail ground|4
 
  +
|04||road tunnel rail ground||4
   
  +
|-
05|road tunnel|8||
 
  +
|05||road tunnel||8
  +
|}
   
What to do with Roadworks?
+
Roadworks?
   
 
For rails:
 
For rails:
   
  +
{| |-
||'''ID'''|'''Description'''|'''Default Number Of Sprites Needed'''
 
  +
!'''ID'''!!'''Description'''!!'''Default Number Of Sprites Needed'''
   
  +
|-
00|railroad|?
 
  +
|00||railroad||?
   
  +
|-
01|monorail|?
 
  +
|01||monorail||?
   
  +
|-
02|maglev|?
 
  +
|02||maglev||?
   
  +
|-
03|electric|? (layout shared with railroad!)
 
  +
|03||electric||? (layout shared with railroad!)
   
  +
|-
04|type 4|0/?
 
  +
|04||type 4||0/?
   
  +
|-
05|type 5|0/?
 
  +
|05||type 5||0/?
   
  +
|-
06|type 6|0/?
 
  +
|06||type 6||0/?
   
  +
|-
07|type 7|0/?
 
  +
|07||type 7||0/?
   
  +
|-
08|railroad depot|6
 
  +
|08||railroad depot||6
   
  +
|-
09|monorail depot|6
 
  +
|09||monorail depot||6
   
  +
|-
10|maglev depot|6
 
  +
|10||maglev depot||6
   
  +
|-
11|electric depot|0/6 (layout shared with railroad!)
 
  +
|11||electric depot||0/6 (layout shared with railroad!)
   
  +
|-
12|type 4 depot|0
 
  +
|12||type 4 depot||0
   
  +
|-
13|type 5 depot|0
 
  +
|13||type 5 depot||0
   
  +
|-
14|type 6 depot|0
 
  +
|14||type 6 depot||0
   
  +
|-
15|type 7 depot|0
 
  +
|15||type 7 depot||0
   
  +
|-
16|railroad on crossing|0/2
 
  +
|16||railroad on crossing||0/2
   
  +
|-
17|monorail on crossing|0/2
 
  +
|17||monorail on crossing||0/2
   
  +
|-
18|maglev on crossing|0/2
 
  +
|18||maglev on crossing||0/2
   
  +
|-
19|electric on crossing|0/2 (layout shared with railroad!)
 
  +
|19||electric on crossing||0/2 (layout shared with railroad!)
   
  +
|-
20|type 4 on crossing|0
 
  +
|20||type 4 on crossing||0
   
  +
|-
21|type 5 on crossing|0
 
  +
|21||type 5 on crossing||0
   
  +
|-
22|type 6 on crossing|0
 
  +
|22||type 6 on crossing||0
   
  +
|-
23|type 7 on crossing|0
 
  +
|23||type 7 on crossing||0
   
  +
|-
24|railroad tunnel|6
 
  +
|24||railroad tunnel||6
   
  +
|-
25|monorail tunnel|6
 
  +
|25||monorail tunnel||6
   
  +
|-
26|maglev tunnel|6
 
  +
|26||maglev tunnel||6
   
  +
|-
27|electric tunnel|0/6 (layout shared with railroad!)
 
  +
|27||electric tunnel||0/6 (layout shared with railroad!)
   
  +
|-
28|type 4 tunnel|0
 
  +
|28||type 4 tunnel||0
   
  +
|-
29|type 5 tunnel|0
 
  +
|29||type 5 tunnel||0
   
  +
|-
30|type 6 tunnel|0
 
  +
|30||type 6 tunnel||0
   
  +
|-
31|type 7 tunnel|0
 
  +
|31||type 7 tunnel||0
   
  +
|-
24|railroad tunnel rail|0/2
 
  +
|24||railroad tunnel rail||0/2
   
  +
|-
25|monorail tunnel rail|0/2
 
  +
|25||monorail tunnel rail||0/2
   
  +
|-
26|maglev tunnel rail|0/2
 
  +
|26||maglev tunnel rail||0/2
   
  +
|-
27|electric tunnel rail|0/2
 
  +
|27||electric tunnel rail||0/2
   
  +
|-
28|type 4 tunnel rail|0/2
 
  +
|28||type 4 tunnel rail||0/2
   
  +
|-
29|type 5 tunnel rail|0/2
 
  +
|29||type 5 tunnel rail||0/2
   
  +
|-
30|type 6 tunnel rail|0/2
 
  +
|30||type 6 tunnel rail||0/2
   
  +
|-
31|type 7 tunnel rail|0/2
 
  +
|31||type 7 tunnel rail||0/2
   
  +
|-
32|railroad tunnel rail top|0/2
 
  +
|32||railroad tunnel rail top||0/2
   
  +
|-
33|monorail tunnel rail top|0/2
 
  +
|33||monorail tunnel rail top||0/2
   
  +
|-
34|maglev tunnel rail top|0/2
 
  +
|34||maglev tunnel rail top||0/2
   
  +
|-
35|electric tunnel rail top|0/2
 
  +
|35||electric tunnel rail top||0/2
   
  +
|-
36|type 4 tunnel rail top|0/2
 
  +
|36||type 4 tunnel rail top||0/2
   
  +
|-
37|type 5 tunnel rail top|0/2
 
  +
|37||type 5 tunnel rail top||0/2
   
  +
|-
38|type 6 tunnel rail top|0/2
 
  +
|38||type 6 tunnel rail top||0/2
   
  +
|-
39|type 7 tunnel rail top|0/2
 
  +
|39||type 7 tunnel rail top||0/2
   
  +
|-
40|railroad bridge rail top|0/6(4 Ramp, 2 flat)
 
  +
|40||railroad bridge rail top||0/6(4 Ramp, 2 flat)
   
  +
|-
41|monorail bridge rail top|0/6(4 Ramp, 2 flat)
 
  +
|41||monorail bridge rail top||0/6(4 Ramp, 2 flat)
   
  +
|-
42|maglev bridge rail top|0/6 (4 Ramp, 2 flat)
 
  +
|42||maglev bridge rail top||0/6 (4 Ramp, 2 flat)
   
  +
|-
43|electric bridge rail top|0/6 (4 Ramp, 2 flat)
 
  +
|43||electric bridge rail top||0/6 (4 Ramp, 2 flat)
   
  +
|-
44|type 4 bridge rail top|0/6 (4 Ramp, 2 flat)
 
  +
|44||type 4 bridge rail top||0/6 (4 Ramp, 2 flat)
   
  +
|-
45|type 5 bridge rail top|0/6 (4 Ramp, 2 flat)
 
  +
|45||type 5 bridge rail top||0/6 (4 Ramp, 2 flat)
   
  +
|-
46|type 6 bridge rail top|0/6 (4 Ramp, 2 flat)
 
  +
|46||type 6 bridge rail top||0/6 (4 Ramp, 2 flat)
   
  +
|-
47|type 7 bridge rail top|0/6 (4 Ramp, 2 flat)||
 
  +
|47||type 7 bridge rail top||0/6 (4 Ramp, 2 flat)
  +
|}
   
 
Type 4 till type 7 are fair game for grf authors.
 
Type 4 till type 7 are fair game for grf authors.
Line 162: Line 221:
 
'''Action 0 for railvehicles:'''
 
'''Action 0 for railvehicles:'''
   
- a flag for supporting newroutes
+
- a flag for supporting newroutes (prop 05, set bit 7 maybe)
   
 
- need a new way to have the real type specifc
 
- need a new way to have the real type specifc
Line 170: Line 229:
 
- prop 05 for Track type is now allowed to have 0-7 as value.
 
- 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)
+
(The run on wrong track system code - electric on non electric rails - can get screwey)
   
 
'''Action 0 for bridges:'''
 
'''Action 0 for bridges:'''
Line 192: Line 251:
 
(sprite number in recent action 0, TTD Sprite, Special Sprite from '''other''' ID !)
 
(sprite number in recent action 0, TTD Sprite, Special Sprite from '''other''' ID !)
   
-=Action 2=-
+
==Action 2==
   
 
Variational Action 2 Variables for New Routes
 
Variational Action 2 Variables for New Routes
   
  +
{| |-
||Variable|Content
 
  +
!Variable!!Content
  +
  +
|-
  +
|40||Height above ground
  +
  +
|-
  +
|41||Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline
  +
  +
|-
  +
|42||Height above snowline? (for roads and rails, the snow grade could be adjusted then)
  +
  +
|-
  +
|43||Townzone: 0 none
  +
  +
|-
  +
|44||Is under bridge
  +
  +
|-
  +
|45||Build year (problem where to store that info, see L8)
  +
  +
|-
  +
|46||last used counter (abadoneroads/something like abadonerails, L7 is free), for stations not possible
  +
  +
|-
  +
|-||'''Only for roads''':
   
  +
|-
40|Height above ground
 
  +
|47||ttd 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
   
  +
|-
41|Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline
 
  +
|48||oneway bits
   
  +
|-
42|Height above snowline? (for roads and rails, the snow grade could be adjusted then)
 
  +
|49||town owned tile
  +
|}
   
  +
==Landscape 8==
43|Townzone: 0 none
 
   
  +
For each tile it would be nice to store the buildyear, maybe year / 10 for support later years, post 2010...
44|Is under bridge
 
   
  +
The L8 Array could be a word or a byte value
45|Build year (problem where to store that info, see L8)
 
   
  +
==Landscape usage==
-|_Only for roads_:
 
   
  +
L8 = low byte: date of build/10
46|ttd 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
 
   
  +
L7 (rail tile) = abadone counter
47|oneway bits||
 
   
  +
L7 (tunnels) = used by enhancetunnels already!
-=Landscape 8=-
 
   
  +
==Compatibility==
For each tile it would be nice to store the buildyear, maybe year / 10 for support later years, post 2010... = L8 Array.
 
   
  +
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.
-=Compatibility=-
 
   
  +
==Additonal Stuff==
The new rail stuff is incompatible to the old, unimaglev could be used to have old games fit to the new system,
 
   
  +
We should add support for busstops and road stations aswell with direct support for newroutes.
or not convert old games and tell the newroutes we work an old version and cross convert on the fly the systems.
 
   
-=Other=-
+
==Other==
   
 
Content by Lakie and eis_os
 
Content by Lakie and eis_os
  +
[[Category:TTDPatch Development]]

Latest revision as of 12:54, 31 July 2011

(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

Action 0

All TTD routes get devided into logical groups:

For roads:

ID Description Default Number Of Sprites Needed
00 roads 19 (4 halfs, 4 slope, 2 straight, 4 corners, 5 junctions)
01 road depot 6 (4 roofs, 2 little corner pieces)
02 road crossing ground 2
03 road pieces on bridges 6 (4 Ramp, 2 flat)
04 road tunnel rail ground 4
05 road tunnel 8

Roadworks?

For rails:

ID Description Default Number Of Sprites Needed
00 railroad ?
01 monorail ?
02 maglev ?
03 electric ? (layout shared with railroad!)
04 type 4 0/?
05 type 5 0/?
06 type 6 0/?
07 type 7 0/?
08 railroad depot 6
09 monorail depot 6
10 maglev depot 6
11 electric depot 0/6 (layout shared with railroad!)
12 type 4 depot 0
13 type 5 depot 0
14 type 6 depot 0
15 type 7 depot 0
16 railroad on crossing 0/2
17 monorail on crossing 0/2
18 maglev on crossing 0/2
19 electric on crossing 0/2 (layout shared with railroad!)
20 type 4 on crossing 0
21 type 5 on crossing 0
22 type 6 on crossing 0
23 type 7 on crossing 0
24 railroad tunnel 6
25 monorail tunnel 6
26 maglev tunnel 6
27 electric tunnel 0/6 (layout shared with railroad!)
28 type 4 tunnel 0
29 type 5 tunnel 0
30 type 6 tunnel 0
31 type 7 tunnel 0
24 railroad tunnel rail 0/2
25 monorail tunnel rail 0/2
26 maglev tunnel rail 0/2
27 electric tunnel rail 0/2
28 type 4 tunnel rail 0/2
29 type 5 tunnel rail 0/2
30 type 6 tunnel rail 0/2
31 type 7 tunnel rail 0/2
32 railroad tunnel rail top 0/2
33 monorail tunnel rail top 0/2
34 maglev tunnel rail top 0/2
35 electric tunnel rail top 0/2
36 type 4 tunnel rail top 0/2
37 type 5 tunnel rail top 0/2
38 type 6 tunnel rail top 0/2
39 type 7 tunnel rail top 0/2
40 railroad bridge rail top 0/6(4 Ramp, 2 flat)
41 monorail bridge rail top 0/6(4 Ramp, 2 flat)
42 maglev bridge rail top 0/6 (4 Ramp, 2 flat)
43 electric bridge rail top 0/6 (4 Ramp, 2 flat)
44 type 4 bridge rail top 0/6 (4 Ramp, 2 flat)
45 type 5 bridge rail top 0/6 (4 Ramp, 2 flat)
46 type 6 bridge rail top 0/6 (4 Ramp, 2 flat)
47 type 7 bridge rail top 0/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

Variable Content
40 Height above ground
41 Terrain type: 0 normal, 1 desert, 2 rainforest, 4 on or above snowline
42 Height above snowline? (for roads and rails, the snow grade could be adjusted then)
43 Townzone: 0 none
44 Is under bridge
45 Build year (problem where to store that info, see L8)
46 last used counter (abadoneroads/something like abadonerails, L7 is free), for stations not possible
47 ttd 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
48 oneway bits
49 town 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