Bridge newgrf spec discussion
Posted: 29 Aug 2008 11:33
Hello
I started adding some basic code for Action2 into TTDPatch, so I try explain now how the generally direction is, and what problems we have:
In #tycoon Belugas Peter1183 and me tried to get a general direction for the action2 system, so the specs will work on TTDPatch and OTTD. Resulting newbridges introduce the OTTD bridges to TTDPatch.
TTDPatch will support overwriting all old bridges (including OTTD ones).
The cost factor in TTDPatch was rewritten to be a word value, note the calculation code works different, so the results seem to be a bit different then before.
TTDPatch won't support bridgesprite tables outside TTD/OTTD bridges.
Bridge IDs outside the TTD/OTTD bridges are dynamical allocated, TTDPatch will support loading up to around 120 bridges.
We will try to use the cargoid in Action3 to select the right bridge part, discussion wasn't finished on that part.
(note this was only presented to peter1183 and Belugas, but peter1183 already has the specs in his newroutes action draft):
Action3:
CargoID -> PartID
0 = ramps
1 = flat ramps (ramps on a slope)
7 = icons
8.. bridge middle part ids as TTD uses, aka 8+x (see below)
Middle part ids:
Layout Description
-- Bridge without middle part
-0- Bridge of length 3
-0(23)1- Bridge of even length
-0(23)4(23)1- Bridge of (uneven) lengths 5, 9, 13, 17 etc.
-0(23)253(23)1- Bridge of (uneven) lengths 7, 11, 15, 19 etc.
Default cid is used for middle parts to defined.
You have to define part ids 0,1,7 and default to get a working bridge, a simple one...
Action2:
The layout system should work in the way newhouses, still the pillar drawing is a big problem.
VarAction2:
Currently I have added:
> 40 W age -> in the specs as byte value currently, TTDPatch will handle 255 as max age.
> 41 B -> a byte of land info was: direction of bridge
We had as well as wishes:
> 42 B Bridge head information
> 43 B Type of bridge (rail, road, tram, rail+tram)
> 44 B Tt Land use under bridge -> split to
> 45 D Hhbbaall, Length, height, position
TTDPatch has no concept of bridge length, it would be very very expensive to calculate a length. (specially bridges have to redrawn a lot more often then stations)
> 46 B
> Terrain slope, as for ss in industry tile var 60 -> For the lowest pillar call, yes, otherwise flat.
> 47 B Owner/Builder, as for industry var A7
> 48 B Colour scheme (of owner), as for Cc in vehicle var 43 -> Should be doable
> 49 B random byte. -> Not sure how to do it, canals simply return 0 for bridges...
So any wishes, questions, additions, ideas for the pillars...
I started adding some basic code for Action2 into TTDPatch, so I try explain now how the generally direction is, and what problems we have:
In #tycoon Belugas Peter1183 and me tried to get a general direction for the action2 system, so the specs will work on TTDPatch and OTTD. Resulting newbridges introduce the OTTD bridges to TTDPatch.
TTDPatch will support overwriting all old bridges (including OTTD ones).
The cost factor in TTDPatch was rewritten to be a word value, note the calculation code works different, so the results seem to be a bit different then before.
TTDPatch won't support bridgesprite tables outside TTD/OTTD bridges.
Bridge IDs outside the TTD/OTTD bridges are dynamical allocated, TTDPatch will support loading up to around 120 bridges.
We will try to use the cargoid in Action3 to select the right bridge part, discussion wasn't finished on that part.
(note this was only presented to peter1183 and Belugas, but peter1183 already has the specs in his newroutes action draft):
Action3:
CargoID -> PartID
0 = ramps
1 = flat ramps (ramps on a slope)
7 = icons
8.. bridge middle part ids as TTD uses, aka 8+x (see below)
Middle part ids:
Layout Description
-- Bridge without middle part
-0- Bridge of length 3
-0(23)1- Bridge of even length
-0(23)4(23)1- Bridge of (uneven) lengths 5, 9, 13, 17 etc.
-0(23)253(23)1- Bridge of (uneven) lengths 7, 11, 15, 19 etc.
Default cid is used for middle parts to defined.
You have to define part ids 0,1,7 and default to get a working bridge, a simple one...
Action2:
The layout system should work in the way newhouses, still the pillar drawing is a big problem.
VarAction2:
Currently I have added:
> 40 W age -> in the specs as byte value currently, TTDPatch will handle 255 as max age.
> 41 B -> a byte of land info was: direction of bridge
We had as well as wishes:
> 42 B Bridge head information
> 43 B Type of bridge (rail, road, tram, rail+tram)
> 44 B Tt Land use under bridge -> split to
> 45 D Hhbbaall, Length, height, position
TTDPatch has no concept of bridge length, it would be very very expensive to calculate a length. (specially bridges have to redrawn a lot more often then stations)
> 46 B
> Terrain slope, as for ss in industry tile var 60 -> For the lowest pillar call, yes, otherwise flat.
> 47 B Owner/Builder, as for industry var A7
> 48 B Colour scheme (of owner), as for Cc in vehicle var 43 -> Should be doable
> 49 B random byte. -> Not sure how to do it, canals simply return 0 for bridges...
So any wishes, questions, additions, ideas for the pillars...