I am learning to code!

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
SkeedR
Tycoon
Tycoon
Posts: 2267
Joined: 11 Jul 2004 14:55
Location: West Midlands
Contact:

Post by SkeedR »

DOH! I am so sorry for that inconvenience. Thank you OzTransLtd and Jezulkim. One thing though, i set it to 50 and it came out as 100. Also, the HP and speed are iffy. What are the maximum values for these? (in decimal, not hex please)
Last known as: Weirdy
User avatar
Jezulkim
Chairman
Chairman
Posts: 844
Joined: 04 Jan 2004 09:40
Location: Finland/Suomi

Post by Jezulkim »

Did you convert 50 to hex? HP and speed are both two byte long so I guess the maximum value is 65535 (FF FF)
Image
In order to protect the visitors of this site,
TTO Full Conversion!
This post has been lol 1337 times.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

They might be used as signed integers in odd places, so the largest "safe" value is 32,767.
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
SkeedR
Tycoon
Tycoon
Posts: 2267
Joined: 11 Jul 2004 14:55
Location: West Midlands
Contact:

Post by SkeedR »

it keeps changing my HP setting from 75 30-(30,000) to "u0" for some reason. Can you think of any reason why?
Last known as: Weirdy
User avatar
Jezulkim
Chairman
Chairman
Posts: 844
Joined: 04 Jan 2004 09:40
Location: Finland/Suomi

Post by Jezulkim »

That's a grf codec feature, it converts hex codes to letters. 75 is hex code for "u" and 30 is "0"
Image
In order to protect the visitors of this site,
TTO Full Conversion!
This post has been lol 1337 times.
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

And since both are exactly equivalent, it's nothing to worry about. Run grfcodec with the -t option if it bothers you.
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
SkeedR
Tycoon
Tycoon
Posts: 2267
Joined: 11 Jul 2004 14:55
Location: West Midlands
Contact:

Post by SkeedR »

ok, another newbie question, how do iget it to make the grf from the nfo and pcx in \sprites when the grf needs to end up in \newgrf ?
(i'll be back on in around 8-12 hours)
Last known as: Weirdy
Flamelord
Chief Executive
Chief Executive
Posts: 731
Joined: 24 Mar 2005 22:29
Location: Oregon

Post by Flamelord »

If you encode the GRF with GRFCodec by itself, it will stick the grf in the folder that grfcodec is in. Then you can just copy and paste it to the newgrf folder.
Prof. Frink
Tycoon
Tycoon
Posts: 3849
Joined: 20 Jan 2003 14:51
Location: Broadstone, Dorset
Contact:

Post by Prof. Frink »

Not entirely true - it'll put the .grf in the directory grfcodec is run from.

If you put the executables in C:\WINDOWS\System32 then you can run them from anywhere ;)
User avatar
Aegir
Tycoon
Tycoon
Posts: 2884
Joined: 09 Feb 2004 10:02
Contact:

Post by Aegir »

Prof. Frink wrote:Not entirely true - it'll put the .grf in the directory grfcodec is run from.

If you put the executables in C:\WINDOWS\System32 then you can run them from anywhere ;)
Or just add the directory to your PATH.
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 23 guests