Change eGRVTS2.grf

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

Post Reply
sky81
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2019 05:49

Change eGRVTS2.grf

Post by sky81 » 29 Oct 2019 05:58

Hello ,

I want to change some parameters for road vehicles inside eGRVTS2.grf, I I did for some of them. But when trying to change the capacity of a road vehicle I cound not succeed. Can someone help me, please?
For example: 1 Horse Small Passenger Carriage has 6 passanger as a capacity.
If I look on action0, Property 0F is all the time 00, meaning?
But there is a action 02 look like this:
10875 * 23 02 01 BC 89 10 00 FF 00 00 00 01 06 80 0F 00 00 00 0F 00 00 00 FC 00
I saw for other vehicles that 06 above is changing to 0A for the one with 10 passengers. But when I change it, nothing happens. Can someone help me?

Here is the NFO decoded for these road vehicle:
10857 * 157 00 01 1C 01 FF 1F 00 06 00 1F DE 7A 09 00 04 DC 03 19 02 20 1D 01 00 16 00 00 00 00 1E 00 00 16
00 00 00 00 24 02 00 3F 16 00 00 00 00 25 48 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11
12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F " !\"#$%&'()*+,-./0123456789:;<=>@ABCE"
"DFGHI" 16 00 00 00 00 07 05 11 0E 09 05 0E FF 08 1A 1C 02 1A 00 0A 48 4C 00 00 13 02 14
04 18 80 10 00 0F F2 12 24 23 03
10858 * 40 04 01 7F 01 FF 1F 00 "1 Horse Small Passenger Carriage" 00
10859 * 34 04 01 03 01 FF 1F 00 C3 9E "Petite voiture à cheval" 00
10860 * 39 04 01 04 01 FF 1F 00 C3 9E "Carruaje pequeño a 1 caballo" 00
10861 * 34 04 01 0C 01 FF 1F 00 C3 9E E5 96 "®é ­å°" 8F E5 9E 8B E8 BC 89 "客馬è»" 8A
00
10862 * 34 04 01 22 01 FF 1F 00 "Carruatge petit a 1 cavall" 00
10863 * 28 04 01 24 01 FF 1F 00 C3 9E "1 Lovas Kis Hintó" 00
10864 * 34 04 01 56 01 FF 1F 00 C3 9E E5 8D 95 "头å°" 8F E5 9E 8B "载客马车" 00
10865 * 6 01 01 07 FF 01 00
10866 sprites/eGRVTS200.png 8bpp 130 13240 57 17 -25 -11 normal chunked
10867 sprites/eGRVTS200.png 8bpp 194 13240 57 17 -25 -11 normal chunked
10868 sprites/eGRVTS200.png 8bpp 258 13240 57 17 -25 -11 normal
10869 sprites/eGRVTS200.png 8bpp 322 13240 57 17 -25 -11 normal
10870 sprites/eGRVTS200.png 8bpp 386 13240 57 17 -25 -11 normal
10871 sprites/eGRVTS200.png 8bpp 450 13240 57 17 -25 -11 normal
10872 sprites/eGRVTS200.png 8bpp 514 13240 57 17 -25 -11 normal chunked
10873 * 9 02 01 E1 01 01 00 00 00 00
10874 * 9 00 01 01 01 FF 1F 00 17 50
10875 * 23 02 01 BC 89 10 00 FF 00 00 00 01 06 80 0F 00 00 00 0F 00 00 00 FC 00
10876 * 33 02 01 F6 89 0C 00 FF FF 00 00 02 DD 00 16 00 00 00 16 00 00 00 FF 00 2D 00 00 00 2D 00 00 00 FC
00
10877 * 53 02 01 BC 89 0C 00 FF FF 00 00 04 E1 00 00 00 00 00 00 00 00 00 DD 00 16 00 00 00 16 00 00 00 FF
00 2D 00 00 00 2D 00 00 00 BC 00 36 00 00 00 36 00 00 00 FC 00
10878 * 12 03 01 01 FF 1F 00 01 FF BC 00 F6 00
10879 * 23 02 01 F6 89 10 00 "ÿÿÿÿ" 01 00 80 01 00 00 00 01 00 00 00 FF FF
10880 * 9 0D 40 \D= FF 00 00 00 00 00
10881 * 9 0D 42 \D= FF 00 00 00 00 00
10882 * 9 0D 44 \D= FF 00 00 00 00 00
10883 * 6 09 01 01 \70 00 01
10884 * 9 0D 44 \D= FF 00 01 00 00 00
10885 * 9 0D 43 \D- 44 FF 01 00 00 00
10886 * 5 0D 43 \D/ 43 43
10887 * 9 0D 43 \D- FF 43 01 00 00 00
10888 * 9 09 43 04 \7= 00 00 00 00 01
10889 * 9 0D 42 \D= FF 00 01 00 00 00
10890 * 9 0D 43 \D= FF 00 00 00 00 00
10891 * 5 0D 45 \D= 00 00
10892 * 9 0D 44 \D- 45 FF 02 00 00 00
10893 * 5 0D 44 \D/ 44 44
10894 * 9 09 44 04 \7= 00 00 00 00 01
10895 * 9 0D 43 \D= FF 00 01 00 00 00
10896 * 5 0D 41 \D& 42 43
10897 * 9 09 41 04 \7= 00 00 00 00 01
10898 * 9 0D 40 \D= FF 00 0F 00 00 00
10899 * 7 06 40 01 FF 08 00 FF

sky81
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2019 05:49

Re: Change eGRVTS2.grf

Post by sky81 » 30 Oct 2019 06:19

I found out that if I change in Action0 property 0F (capacity) to set bit0 (in this case: inside those 157 bytes at the end where it states 0F F2 into 0F 01) then if I change :
10875 * 23 02 01 BC 89 10 00 FF 00 00 00 01 06 80 0F 00 00 00 0F 00 00 00 FC 00 into
10875 * 23 02 01 BC 89 10 00 FF 00 00 00 01 03 80 0F 00 00 00 0F 00 00 00 FC 00 then I will get 6+3 passengers=9. and if I would change into
10875 * 23 02 01 BC 89 10 00 FF 00 00 00 01 00 80 0F 00 00 00 0F 00 00 00 FC 00 then I will get 6+0=6 passengers.
But I could not get bellow 6 passengers which will be the default value.

Where it is written this default value? Because I try lots of combination but never could lower the capacity with less then 6.

Can someone help?

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9332
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Change eGRVTS2.grf

Post by planetmaker » 31 Oct 2019 16:41

I moved this thread to the graphics development forum. Here is the right place and it might hopefully attract more visibility to people who know NFO well enough.

User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 700
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: Change eGRVTS2.grf

Post by Gwyd » 31 Oct 2019 19:08

My understanding of NFO is pretty weak but I'm certain that the vehicle is question is actually constructed of two parts, meaning that there is probably another vehicle part with property 06 set to 00 (unavailable in all climates) which has capacity set to 6. Also somewhere in there you'd expect to find callback 16 describing what is attached to the horse part of the horse and carriage
Attachments
horse-and-carriage.PNG
horse-and-carriage.PNG (768 Bytes) Viewed 827 times

sky81
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2019 05:49

Re: Change eGRVTS2.grf

Post by sky81 » 01 Nov 2019 06:28

I think you are correct that the default value is in another place. But how can I find where? I search for vehicle ID (I guess FF 1F 00 or FF 1F), but not find anywher. Also, how can I identify callback 16, because I don't really know how to do that.

Thank you

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9332
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Change eGRVTS2.grf

Post by planetmaker » 01 Nov 2019 09:22

The horse carriages are (most likely) articulated vehicles which consist of two vehicles (horses and carriage) attached to eachother. Each has its own unique ID.

Were I to design the set, I'd create one carriage - and adjust the available capacity via callback to match the number of horses pulling it, querying the parent vehicle ID. Going by that thought: The lead vehicle (e.g. horses) should have a callback to attach further articulated vehicles. That callback will tell you the possible vehicle IDs of the carriage.

https://newgrf-specs.tt-wiki.net/wiki/N ... _callbacks (NML) or https://newgrf-specs.tt-wiki.net/wiki/C ... e_.2816.29 (NFO)

sky81
Engineer
Engineer
Posts: 6
Joined: 29 Oct 2019 05:49

Re: Change eGRVTS2.grf

Post by sky81 » 01 Nov 2019 12:20

Thank you for your reply. Still, I don't know how I can identify callback 16. Is it 85 0C 16?
Still, other articulated vehicle with horses, have a default capacity of 10 passengers, others 8 mails. All of this, I could modify like descibed in previous post, only the default value I could not find to change it.

User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9332
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Change eGRVTS2.grf

Post by planetmaker » 01 Nov 2019 16:07

sky81 wrote:
01 Nov 2019 12:20
Thank you for your reply. Still, I don't know how I can identify callback 16. Is it 85 0C 16?
Still, other articulated vehicle with horses, have a default capacity of 10 passengers, others 8 mails. All of this, I could modify like descibed in previous post, only the default value I could not find to change it.
Well, maybe capacity is handled via callback, too? Then you will possibly never see any default value which is being used for the capacity property.

phobos2077
Engineer
Engineer
Posts: 24
Joined: 13 Nov 2019 16:17

Re: Change eGRVTS2.grf

Post by phobos2077 » 18 Nov 2019 19:27

Just stumbled upon this thread after having the same question as OP. However I've used NML sources instead of messing around with NFO: viewtopic.php?f=67&t=62841&start=160#p1226809
To change the capacity of horse vehicles, see (for examle) item_BUS_HORSE_TRAILER_1 in 1_horse-base.pnml. Changing cargo_capacity there works. So as I understand horse carriages are implemented as articulated vehicles and you have to set parameters for the actual horse trailer as a part of the whole vehicle.

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], piratescooby and 8 guests