Total Bridge Renewal Set: version 1.12

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

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

Re: Total Bridge Renewal Set

Post by thgergo »

nguwland wrote: Image
The new cantilever bridge spanning at great hights, and in the background you see the stone viaducts.
TTDpatchs seems keep rejecting my recolour sprite changes... That bridge is supposed to be gray... I dont know what I did wrong, OTTD handles those correctly if I add a recolour sprite for a bridge... :| And your viaducts doesnt show any variety on colours I guess?
Anyway thanks for the respond, ill finish the big arch soon:) well, if I have time...
Image
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Total Bridge Renewal Set

Post by DaleStan »

Are you using GRM for the recolor sprites? If not, some set that you have loaded only in Patch may be putting a different recolor sprite there.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Total Bridge Renewal Set

Post by thgergo »

DaleStan wrote:Are you using GRM for the recolor sprites? If not, some set that you have loaded only in Patch may be putting a different recolor sprite there.
I still doesnt know whats GRM stands for:(
I dont know why its not working... Its uses an original recolour sprite (sprite No."1E 03"), the red cantilevel bridges recolour sprite... But its replaced with action A to make it gray...
So, I suppose ttdpatch rejects even its original recolour sprites at all:(
Can you explain me why TTDpatch rejecting this piece of nfo code?
Image
Image
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: Total Bridge Renewal Set

Post by OzTrans »

I assume you are using property 0D in action-0 for bridges to define your bridge; there you need to add the colour code to the sprite number(s) to get colour translation.

Code: Select all

The sprite numbers can be any of TTD's sprite numbers. You can add the following to get colour translation:

Added value Colour  
31D8000h concrete  
3218000h red steel  
3208000h yellow steel 
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Total Bridge Renewal Set

Post by thgergo »

OzTransLtd wrote:I assume you are using property 0D in action-0 for bridges to define your bridge; there you need to add the colour code to the sprite number(s) to get colour translation.

Code: Select all

The sprite numbers can be any of TTD's sprite numbers. You can add the following to get colour translation:

Added value Colour  
31D8000h concrete  
3218000h red steel  
3208000h yellow steel 
I couldnt find out whats the meaning of that "3218000h" things... Where I have to attach that?
I have just checked how is the other bridge replacement works... , just place a recolour sprite after the real sprites... I couldn`t find a reason, why other sets work with this method and mine doesnt ?( In addition this works under OTTD... Strange. Can someone why my code fails under TTDpatch, what I`m doing wrong?
Attachments
my code.PNG
the code of my big gray cantilever bridge...
(69.39 KiB) Downloaded 255 times
Image
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Total Bridge Renewal Set

Post by DaleStan »

Why PNG?

You can post NFO files. You can put comments in NFO files.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: Total Bridge Renewal Set

Post by OzTrans »

thgergo wrote: ... I couldnt find out whats the meaning of that "3218000h" things... Where I have to attach that? ...
I'm not (yet) really familiar with recolour sprites, but property 0D in action-06 for bridges defines (from the wiki) :

a) the sprite number for a particular bridge part
b) whether recolouring is required

Sample, you use sprite 2511 in trg1r.grf and want to recolour in grey :

2511d > 0x09CF, to that you add 0x031D8000 for (grey) concrete = 0x031D89CF; then you place that as DWord in the sprite data table. If you use an action-06 to define that data you just need to calculate your new value once you have determined the sprite number and then replace 4 bytes rather than 2.

Why it works in OpenTTD and not in TTDPatch, I don't know, but there are a lot of differences and may be a few bugs too.
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Total Bridge Renewal Set

Post by thgergo »

OzTransLtd wrote:
thgergo wrote: ... I couldnt find out whats the meaning of that "3218000h" things... Where I have to

2511d > 0x09CF, to that you add 0x031D8000 for (grey) concrete = 0x031D89CF;
It shouldnt be 0x09CF + 0x31D80000 = 0x31D809CF ?
Im replacing two Words rather, than adding two words into one big Dword... I suppose that shouldnt be a problem. I use this way becouse it makes my life easier, every sprite has got an own variable, whats refer to its sprite number. I even call recolour sprites dinamically in other sprites... If i`m correct, I did everything in the correct way, but I dont know whats the difference between my work, and bridgeset such as ttrs3, that is working like as mine, as I saw its nfo code, maybe it replaces the whole Dword.
Anyway thanks for the help OzTransLtd :)
DaleStan wrote:Why PNG?
I cant add highlights via comments, and this png is smaller than my nfo
Attachments
bridgerenewal.nfo
(83.75 KiB) Downloaded 272 times
Image
Image
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: Total Bridge Renewal Set

Post by OzTrans »

thgergo wrote: ... It shouldnt be 0x09CF + 0x31D80000 = 0x31D809CF ?
Unless the wiki is wrong, the significant bytes of the recolour value is 2.5 bytes long (i.e. 0x031D8000); this would make it just a bit difficult to set the recolour value and the sprite number separately. Otherwise, there would not be a problem setting the sprite data 2 + 2.

Just a few thoughts ...

You reference the recolour sprite before you define it; try move them to the top of the nfo. It may make a difference.

Also, do you distinguish between the Windows and DOS palette ?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Total Bridge Renewal Set

Post by DaleStan »

My understanding of the sprite number is as follows:

Code: Select all

   Bits    Meaning
   0..13   Sprite number
  14..15   Usage encoding (0=normal, 1=transparent, 2=recolored)
  16..29   Recolor sprite number, ignored if bits 14..15 are 0.
  30..31   Special flag bits, meaning location dependent.
Note especially the little detail about the recolor sprite having no effect if bits 14..15 are 0. Are you sure your overwriting left the correct value in those bits?

EDIT: Fix the meanings of bits 14 & 15.
Last edited by DaleStan on 11 Sep 2007 05:15, edited 1 time in total.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
OzTrans
Tycoon
Tycoon
Posts: 1680
Joined: 04 Mar 2005 01:07

Re: Total Bridge Renewal Set

Post by OzTrans »

Nice one ... why is that information not in the wiki ?

That would explain why it works in OpenTTD and not in TTDPatch. OpenDevs most probably didn't know about bit 15, but used recolour sprite anyway.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Total Bridge Renewal Set

Post by DaleStan »

It is. It has to be, because, *yadda*yadda*yadda* Well, anyway.

*poke* And, in fact, there it is. On the Action2HousesIndustryTiles page. I generalized a bit from the details there, but all the information is acquired from the wiki.

Except, of course, that I got the meanings of bits 14 and 15 backwards.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Total Bridge Renewal Set

Post by thgergo »

Thanks for that information, this should help :)
But if the 7th and 8th bits are reserved for this, the most big sprite id is very limited too, with the maximum sprite No. 16383. Isnt this will lead to id conflicts, if the id is bigger than 16383, and this bridgeset is the last grf, what the game reads? Without the last 2 bits its even unable to call a sprite with the full two byte, or the sprite id maximum is only 16384? I still doesnt know enulogh about those things, I have thought the maximum is 65535...
Image
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Total Bridge Renewal Set

Post by DaleStan »

Oskar performed some very inventive games so that different types of sprite access query different "namespaces". No namespace may have more than 16K sprites, but in total you can load 64K sprites.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Total Bridge Renewal Set

Post by thgergo »

Improving the set is developing slowly, but I have something to show up. How is the orientation looks like? I havent done anything with the non-steel parts. And the bridgeheads is getting closer to be completed too :)
Attachments
arch.PNG
arch.PNG (7.14 KiB) Viewed 6197 times
bridgeheads.PNG
bridgeheads.PNG (5.1 KiB) Viewed 6195 times
Image
Image
User avatar
eis_os
TTDPatch Developer
TTDPatch Developer
Posts: 3603
Joined: 07 Mar 2003 13:10
Location: Germany
Contact:

Re: Total Bridge Renewal Set

Post by eis_os »

DaleStan wrote:Oskar performed some very inventive games so that different types of sprite access query different "namespaces". No namespace may have more than 16K sprites, but in total you can load 64K sprites.
As the sprite loader and nfo system can't handle more then 64k sprites, the hard limit had to be reduced to 64k sprites, generally my sprite system can support post 64k sprites per nfo feature id... Ohh and if a feature needs more the 16k sprites I do have emergency ideas too...
TTDPatch dev in retirement ... Search a grf, try Grf Crawler 0.9 - now with even faster details view and new features...
Image
Gebbe
Engineer
Engineer
Posts: 63
Joined: 13 Nov 2006 12:23
Location: Holland

Re: Total Bridge Renewal Set

Post by Gebbe »

Today I've downloaded the test grf. It seems great! If they will support US-roadsets, I think I will use it most times when I play OTTD :).
On nightlies it is possible to build a bridge over diagonal tracks... is it still possible to take that in mind by developing??? I would really appreciate it when that looks reallistic, and not as it is with the original bridges: there it doesn't look great when you build diagonal track under a bridge, because the pillars are sometimes placed at the rails :S. (Sorry if I'm to late, because developing is already beyond the stage of take this in mind :$)

But keep on working! I will look out to (is this right english? :S) the first official release of this set :D

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

Re: Total Bridge Renewal Set

Post by thgergo »

Gebbe wrote:Today I've downloaded the test grf. It seems great! If they will support US-roadsets, I think I will use it most times when I play OTTD :).
On nightlies it is possible to build a bridge over diagonal tracks... is it still possible to take that in mind by developing??? I would really appreciate it when that looks reallistic, and not as it is with the original bridges: there it doesn't look great when you build diagonal track under a bridge, because the pillars are sometimes placed at the rails :S. (Sorry if I'm to late, because developing is already beyond the stage of take this in mind :$)

But keep on working! I will look out to (is this right english? :S) the first official release of this set :D

Gebbe
I have kept in mind that, the cantilever bridges should support diagoinal tracks under bridges.
Image
Image
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: Total Bridge Renewal Set

Post by athanasios »

:D You are a good boy. Thanks a lot!
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
User avatar
thgergo
Route Supervisor
Route Supervisor
Posts: 391
Joined: 29 Mar 2005 12:44
Location: Hungary

Re: Total Bridge Renewal Set

Post by thgergo »

DaleStan wrote:My understanding of the sprite number is as follows:

Code: Select all

   Bits    Meaning
   0..13   Sprite number
  14..15   Usage encoding (0=normal, 1=recolored, 2=transparent)
  16..29   Recolor sprite number, ignored if bits 14..15 are 0.
  30..31   Special flag bits, meaning location dependent.
Note especially the little detail about the recolor sprite having no effect if bits 14..15 are 0. Are you sure your overwriting left the correct value in those bits?
After a while I wasnt very active in continuing the set, today I have looked into fix this recolour problem. But somehow I have found something else in the real grfs, the 15th byte sets the sprite to recoloured, not the 14th, as I can understand in your post.
After reading wikipage what you have mentioned, there is something else. I have found this:

Code: Select all

0: draw sprite normally, 1: draw sprite in transparent mode, 2: recolor sprite
That differs than your understanding :mrgreen:
Anyway I have tried to get some cool semi-transparent bridges with the transparent mode, but my OTTD was crashing :| Is there any documentation how to use those?
Image
Image
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Semrush [Bot] and 28 guests