Improve newbridges mechanism

Got an idea for a new feature in TTDPatch? Post it here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Improve newbridges mechanism

Post by thgergo »

At the noment if I modify a bridge with newbrf actions, I need to redefine all bridge sprite arrays. This ends up uncompatibitily between two sets when the first replaces the rail bridges and the second replaces the road bridges only. I would like to suggest change the sprite rearraging behaivour.

Code: Select all

  518 * 136	 00 06 01 01 00 0D 06 01 	11 22 00 00 12 22 00 00 00 00 00 00 00 00 00 00 13 22 00 00 14 22 00 00 00 00 00 00 00 00 00 00 
					 	00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
					 	00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
					 	00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
With this piece of code I would like to replace the rail bridges only, and doesnt modify the road, maglev, monorail ones. When the first entry of a bridge part is 00 (Back&Floor sprite), that part sould remain untouched, insead of that sprite having no graphic at all. Is this possible?

Secondly I would like to add new bridges, define new bridges with action 0. Is it possible to enable modifying bridges after the tubular bridge? Like in OTTD`s two new tubular bridges, they are modifiable with newgrf also. They just have higher IDs than the first tubular bridge.

Finally is it possible to add an unique minigraphic for every bridge in the select bridge dialog? At the noment cantilever, suspension, and tubular bridges in OTTD shares sprites between 3 forms for each, so having different graphic per bridge isnt possible currently.

This would be great help in coding :)
Image
Image
User avatar
Csaboka
Tycoon
Tycoon
Posts: 1202
Joined: 25 Nov 2002 16:30
Location: Tiszavasvári, Hungary
Contact:

Post by Csaboka »

The newbridges patch isn't too advanced, it just lets you replace some of TTD's internal tables with your version. You can change a "row" in bridge tables easily, but not parts of a row. That's how the current situation came to be - it's easy to replace all sprite info for a bridge, replacing only part of the info would have been more complicated.

Implementing your idea would help matters somewhat, but the best solution would be adding proper action1/2/3 support to bridge tiles. I think this is in the scope of the WIP newroutes feature, but eis_os can tell you for sure.
Reality is that which, when you stop believing in it, doesn't go away.—Philip K. Dick
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Post by thgergo »

Csaboka wrote:The newbridges patch isn't too advanced, it just lets you replace some of TTD's internal tables with your version. You can change a "row" in bridge tables easily, but not parts of a row. That's how the current situation came to be - it's easy to replace all sprite info for a bridge, replacing only part of the info would have been more complicated.

Implementing your idea would help matters somewhat, but the best solution would be adding proper action1/2/3 support to bridge tiles. I think this is in the scope of the WIP newroutes feature, but eis_os can tell you for sure.
Ideed, that will help a lot in coding. Im looking forwards in this newroutes feature. :)
Image
Image
Post Reply

Return to “Suggestions”

Who is online

Users browsing this forum: No registered users and 3 guests