Editing Nfo

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
timofp
Engineer
Engineer
Posts: 50
Joined: 09 Oct 2010 13:04

Editing Nfo

Post by timofp »

Hey all,

For private use i wan't to change some introduction dates of buildings in the Swedisch House set, I used the sourcecode and opend the nfo file in notepad+++. I looked on the nfo specifications and searched the interent the whole day, but i'm stuck.

This is where I'm, I think this is the information of one building in the pack

Code: Select all

   // Flats 8 id 35
 1778 * 35	 00 07 0D 01 35
			 08 2F //substitute building type
			 09 01 //building flags
			 0A \b35 FF //availability years
			 0B \b90 //population
			 0C \b30 //mail generation
			 0D 06 //pass acceptance
			 0E 02 //mail acceptance
			 0F FE //food/goods acceptance
			 10 \w100 //LA reting decrease
			 11 \b130 //remove cost multiplier
			 12 07 DC //name
			 13 0C F8 //1111 1000 0000 1100 F8 0C climate availability/townzones
			 18 20 //probability
And the line I want to change is

Code: Select all

	 0A \b35 FF //availability years
This means that the current value is b35 FF or just b35, I'm not sure. But what is the decimal value of this, i always get the weird result of 2869 in this case.

What am I doing wrong here, what value do i have to change to edit the year the building starts to grow and what value do i have to enter to let it grow from for example 1950.
Attachments
swehouses.nfo
(407.79 KiB) Downloaded 138 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Editing Nfo

Post by planetmaker »

Availability is a two-byte property: http://newgrf-specs.tt-wiki.net/wiki/Ac ... s_.280A.29

... 0A <start> <end> ...

where <start> and <end> are the years counted from 1920 for which the house becomes available and unavailable for building respectively. Values of 00 and FF respectively indicate 'since ever' and 'forever'. The escape sequence \bXX can be used to use decimal instead of hexadecimal bytes.
timofp
Engineer
Engineer
Posts: 50
Joined: 09 Oct 2010 13:04

Re: Editing Nfo

Post by timofp »

Oh i think i get it, so b35 means it's available from 1955 untill forever.

One more question, does the game always build the last available buildings? because if i use this set unmodified in game old buildings are not build in the years 2000, however in the Nfo they are set to FF for de second date.

Also, in this line, does the second 0A indicate starts from the beginning? or does it mean 10, so the start date is 1940

Code: Select all

0A 0A FF //availability years
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Editing Nfo

Post by FooBar »

The 0A means 10 (decimal), so start in 1930.

You can change that to 00 to have the building at game start, but then you also must read the warning in planetmaker's link, to make sure that you don't break things.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests