Additional properties for custom alert/nodification icons

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
jonatkins
Fast Inserter
Fast Inserter
Posts: 155
Joined: Wed Sep 30, 2015 7:29 pm
Contact:

Additional properties for custom alert/nodification icons

Post by jonatkins »

I've been playing with the add_custom_alert method to show information right of the quickbar.

While I have no troluble showing an icon with a custom message, I'd like to have the behaviour of the "Combat robotics" status icon.
factorio-notification-icon.jpg
factorio-notification-icon.jpg (12.71 KiB) Viewed 1477 times
Specifically:
  • Choose if the icon should flash or not
  • Specify a number (or a short string?) to overlay on the corner of the icon
Also, it seems the message that appears when you hover over the icon always has "Alerts" as a first line, and "see the map for more details" added at the end - neither make much sense for the mod I'm making. Shouldn't the last one, at least, depend on the "show_on_map" parameter?

I've hunted through the API docs for a while and found no sign of either if these possibilities.

Also - related - several of the alert APIs reference defines.alert_type, but the defines documentation has no entries for this.

jonatkins
Fast Inserter
Fast Inserter
Posts: 155
Joined: Wed Sep 30, 2015 7:29 pm
Contact:

Re: Additional properties for custom alert/nodification icons

Post by jonatkins »

Also, I now see that these alerts added from a mod are merged with any messages created from in-game "programmable speakers" - hence the "alert" title. I'd rather have control over a dedicated icon from the mod for this.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Additional properties for custom alert/nodification icons

Post by Rseding91 »

custom alerts were created for the programmable speaker and as such that's what they're setup to be useful for. The API is simply so you can generate them outside of speakers.

It was never designed to work independent like the combat robot system and if such a thing was to be created it would require a completely new GUI system and backing logic - not something that's likely to happen anytime soon.
If you want to get ahold of me I'm almost always on Discord.

jonatkins
Fast Inserter
Fast Inserter
Posts: 155
Joined: Wed Sep 30, 2015 7:29 pm
Contact:

Re: Additional properties for custom alert/nodification icons

Post by jonatkins »

Fair enough.

I don't suppose the existing LuaGui interface could be used to do something similar myself? I've not explored it's capabilities yet, but I've not seen any other mods create anything in that area.

Post Reply

Return to “Modding interface requests”