Wrong GRF version - need help to solve

Got a problem with TTDPatch? Get help here.

Moderator: TTDPatch Moderators

Post Reply
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Wrong GRF version - need help to solve

Post by Wile E. Coyote »

In Beta 8, definitely I must switch GRFs to version 7. I changed this:

- In Action 8, <version> to 07.
- In Actions 4, <language-ID> to 7F (for vehicles) and FF (for generic strings).

Is it needed more things to change? Or I did something wrong?
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Re: Wrong GRF version - need help to solve

Post by Patchman »

Wile E. Coyote wrote:In Beta 8, definitely I must switch GRFs to version 7. I changed this:
Why must you change? The older versions are still supported.
[edit] If it's because you're suddenly getting a "Wrong GRF version" message, it's because something else is broken but I'd need to look at the .grf file to find out what.
[edit 2] In particular, make sure you're not setting or clearing bit 31 of action D var 9E. Only ttdpbase.grf may touch that bit. If you touch it, the patch will attempt to check that your file is the right version of ttdpbase.grf, and since it isn't will generate a "Wrong version" message.
- In Action 8, <version> to 07.
- In Actions 4, <language-ID> to 7F (for vehicles) and FF (for generic strings).

Is it needed more things to change? Or I did something wrong?
The action 4 change applies to action B (error messages) and action F (town names) as well.

There are some other subtle differences, especially in the way certain callbacks and properties work, see the docs for station var.65, industry prop 11, industry tile props 0A/0B/0C, house prop 1E and the corresponding callbacks 2A/2C/2E/2F
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

Thanx a lot! Great job, as allways. :D
I found my mistake. I touched bit 31 of Action D var. 9E. Code was:

Code: Select all

   24 * 9	 0D 9E \D| FF FF 08 00 00 00
I changed it to

Code: Select all

   24 * 9	 0D 9E \D| FF FF 08 00 00 80
and it works good. Now, please explain me error.
Wiki wrote:This variable is a global bit mask of various patch features a grf file can enable. Please only set the bits using operation 08 (bitwise OR), or, if absolutely necessary, remove certain bits with operation 07 (bitwise AND). This ensures that you don't mess up the settings of other grf files.
I tried to set bit 03 like in Wiki. Do I have to set all bits, or what else?

EDIT:
Patchman wrote:Why must you change? The older versions are still supported.
I thought I have error because old versions aren't supported, and that happened after upgrade to Patch 2.5.8. :oops:
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Wile E. Coyote wrote:Thanx a lot! Great job, as allways. :D
I found my mistake. I touched bit 31 of Action D var. 9E. Code was:

Code: Select all

   24 * 9	 0D 9E \D| FF FF 08 00 00 00
I changed it to

Code: Select all

   24 * 9	 0D 9E \D| FF FF 08 00 00 80
and it works good. Now, please explain me error.
Both are wrong. You're doing var.9E=08|08, when you should be doing var.9E=(var.9E)|08, so it should be

Code: Select all

   24 * 9	 0D 9E \D| 9E FF 08 00 00 00
I'll add that as an example to var.9E.

Your new code will break if you put it before ttdpbasew.grf in newgrfw.cfg, the old code breaks if you put it after. Both touch bit 31, the old code always clears it and the new code always sets it...
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

Now it's clear how to do that. So, if I understood good, in previous versions that bit wasn't important, but now it's reserved for base sprites?
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Not "reserved", but if the bit is changed it indicates to the patch that it should verify that the file modifying it is the right version of ttdpbase.grf, to allow me to generate an error message if it's outdated.
Josef Drexler

TTDPatch main | alpha/beta | nightly | manual | FAQ | tracker
No private messages please, you'll only get the answering machine there. Send email instead.
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

All clear! Thanx a lot! :D
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
Post Reply

Return to “Problems with TTDPatch”

Who is online

Users browsing this forum: No registered users and 3 guests