How to display a popup message at game startup in GRFMaker?

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
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

How to display a popup message at game startup in GRFMaker?

Post by Purno »

How can I display those red error boxes with the text I want, at game startup (either in the main menu, or when the game actually started (or both)), in GRFMaker? (A piece of NFO code which I can just enter in GRFMaker would do too, I guess).
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: How to display a popup message at game startup in GRFMaker?

Post by Maedhros »

Action B, severity 03.
No-one's more important than the earthworm.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: How to display a popup message at game startup in GRFMaker?

Post by PikkaBird »

Action B, Maedhros wins.
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: How to display a popup message at game startup in GRFMaker?

Post by Purno »

Damn, GRFMaker won't allow me to fill in a text message in non-hexidecimal characters it seems...

Thanks for your help, but I'm afraid I need to do this without NFO code...
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13235
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: How to display a popup message at game startup in GRFMaker?

Post by Hyronymus »

Purno, can you condense your questions to a single topic with coding questions? Or check the TTDPatch Wiki.
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: How to display a popup message at game startup in GRFMaker?

Post by Purno »

Why should totally different questions be in the same topic? Makes no sense, they're different subjects after all...
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
Hyronymus
Tycoon
Tycoon
Posts: 13235
Joined: 03 Dec 2002 10:36
Location: The Netherlands
Contact:

Re: How to display a popup message at game startup in GRFMaker?

Post by Hyronymus »

They all have to do with coding, that's how I "value" them. But really, you van find your answers on the TTDPatch Wiki, in the GRF Specs section.
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: How to display a popup message at game startup in GRFMaker?

Post by Purno »

Hyronymus wrote:you van find your answers on the TTDPatch Wiki, in the GRF Specs section.
Last time I checked the TTDPatch Wiki did not cover GRFMaker.

EDIT: And btw, the whole Graphics forum has to do with 'coding'...
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: How to display a popup message at game startup in GRFMaker?

Post by AndersI »

I agree with purno here. It is much easier to find something again when there's only one question in the thread, with a matching title.
User avatar
orudge
Administrator
Administrator
Posts: 25223
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Re: How to display a popup message at game startup in GRFMaker?

Post by orudge »

Purno wrote:Last time I checked the TTDPatch Wiki did not cover GRFMaker.
But you said in your first post:
Purno wrote:(A piece of NFO code which I can just enter in GRFMaker would do too, I guess).
If you take a look at the actual wiki entry you were linked to, you can see that it's really very straightforward to display a popup. For instance:

<sprite-num> * <length> 0B 01 7F FF "This is my warning messaage!"

would display that warning message, prefixed by "Warning:" (the 01). If GRFMaker requires you to have the text written in hexadecimal, use something like this:

http://www.dolcevie.com/js/converter.html

and replace the colons with spaces, as so:

<sprite-num> * <length> 0B 01 7F FF 54 68 69 73 20 69 73 20 6D 79 20 77 61 72 6E 69 6E 67 20 6D 65 73 73 61 61 67 65 21

(I'm not sure if you have to fill in sprite num or length yourself in GRFMaker).

Anyway, don't be frightened just because it's hex, if you look at the docs, you see it's really quite simple. :)
User avatar
jvassie
Tycoon
Tycoon
Posts: 3421
Joined: 18 Dec 2002 18:00
Location: High Wycombe, England
Contact:

Re: How to display a popup message at game startup in GRFMaker?

Post by jvassie »

orudge wrote:
Purno wrote:Last time I checked the TTDPatch Wiki did not cover GRFMaker.
But you said in your first post:
Purno wrote:(A piece of NFO code which I can just enter in GRFMaker would do too, I guess).
If you take a look at the actual wiki entry you were linked to, you can see that it's really very straightforward to display a popup. For instance:

<sprite-num> * <length> 0B 01 7F FF "This is my warning messaage!"

would display that warning message, prefixed by "Warning:" (the 01). If GRFMaker requires you to have the text written in hexadecimal, use something like this:

http://www.dolcevie.com/js/converter.html

and replace the colons with spaces, as so:

<sprite-num> * <length> 0B 01 7F FF 54 68 69 73 20 69 73 20 6D 79 20 77 61 72 6E 69 6E 67 20 6D 65 73 73 61 61 67 65 21

(I'm not sure if you have to fill in sprite num or length yourself in GRFMaker).

Anyway, don't be frightened just because it's hex, if you look at the docs, you see it's really quite simple. :)
Gentle Owen, Meek and Mild :P

A hex converter is probably the best way to go id say.
(British) Modular Stations Set - Thread: | Website:
Swiss Set - Thread: | Website:
Route Map Creator
My Screenshot Thread
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: How to display a popup message at game startup in GRFMaker?

Post by AndersI »

Purno wrote:Damn, GRFMaker won't allow me to fill in a text message in non-hexidecimal characters it seems...
Huh? What am I not understanding in your question? (New block --> Message block ...)
Attachments
Example22.png
Example22.png (4.18 KiB) Viewed 1171 times
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: How to display a popup message at game startup in GRFMaker?

Post by Purno »

Owen, I'm looking for a clear way to put it in my GRFMaker code. Hexidecimal code isn't really clear.

AndersI, I tried that, but it just didn't work. (Message did not appear). Do I need to trigger it somehow or something?
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: How to display a popup message at game startup in GRFMaker?

Post by Maedhros »

The red message box will only appear with severity 03, which will also stop the grf from loading (and it'll only appear in TTDPatch, too).
No-one's more important than the earthworm.
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: How to display a popup message at game startup in GRFMaker?

Post by Purno »

So, how can I display a message in both TTDPatch and OpenTTD that'll still continue to load the GRF, in GRFMaker?
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: How to display a popup message at game startup in GRFMaker?

Post by Maedhros »

As far as I know, you can't.
No-one's more important than the earthworm.
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Re: How to display a popup message at game startup in GRFMaker?

Post by Purno »

Thank you :)
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Post Reply

Return to “Graphics Development”

Who is online

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