Custom pop-up messages?

Place to get help with not working mods / modding interface.
User avatar
Versepelles
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat May 28, 2016 1:42 pm
Contact:

Custom pop-up messages?

Post by Versepelles »

Is it possible to create custom pop-up messages in freeplay, like the intro and game-end messages? Player.set_ending_screen_data(...) provides a one-time message that fires when a rocket is launched, but I'd like to have multiple of these, if possible.
User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 254
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: Custom pop-up messages?

Post by DedlySpyder »

Like box with the arrow pointer to the player? I believe it uses this.
User avatar
Versepelles
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat May 28, 2016 1:42 pm
Contact:

Re: Custom pop-up messages?

Post by Versepelles »

DedlySpyder wrote:Like box with the arrow pointer to the player? I believe it uses this.
That's close; I think I actually meant the box with a grey background that triggers when the player launches a rocket. Is there a way to message the player in that style, aside from the initial win instance? The game.show_message_dialog(...) method only works for a single player, which isn't quite what I'm looking for.
User avatar
DedlySpyder
Filter Inserter
Filter Inserter
Posts: 254
Joined: Fri Jun 20, 2014 11:42 am
Contact:

Re: Custom pop-up messages?

Post by DedlySpyder »

I'm not really sure what you mean, unless you're talking about the game over (with kill stats) screen? If you want something like that you could just use a GUI frame with a button to close it.
User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3749
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Custom pop-up messages?

Post by DaveMcW »

Versepelles wrote:I actually meant the box with a grey background that triggers when the player launches a rocket. Is there a way to message the player in that style, aside from the initial win instance?
Just copy the player.gui code from Factorio\data\base\scenarios\freeplay\control.lua
User avatar
Versepelles
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Sat May 28, 2016 1:42 pm
Contact:

Re: Custom pop-up messages?

Post by Versepelles »

DedlySpyder wrote:I'm not really sure what you mean, unless you're talking about the game over (with kill stats) screen? If you want something like that you could just use a GUI frame with a button to close it.
Didn't even think of that! Been used to top and left for so long, never used center. Thanks!
Post Reply

Return to “Modding help”