Updating localised texts using control bindings on their change

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
Muppet9010
Filter Inserter
Filter Inserter
Posts: 278
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Updating localised texts using control bindings on their change

Post by Muppet9010 »

At present, it seems if I use a custom-input key in a tooltip there isn't a way to detect when this key is changed so I can recreate the tooltips.

If I have in my locale

Code: Select all

to do stuff press: __CONTROL__my-custom-key__
1: mod has the custom-input default to CONTROL + M
2: on player join server create GUI tooltip using the above locale it shows "COTNROL + M".
2: change my control bindings to be CONTROL + T
3: look at tooltip and it still says CONTROL + M

It would be nice for either the base game to update the localisation (if possible?) or to have a control binding event that I can react to and then recreate my tooltip for that user so it uses the new control binding.

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

Re: Updating localised texts using control bindings on their change

Post by Rseding91 »

That's currently how loclization works in the game. If you change controls/language you need to restart before everything is updated.

Due to how locale is used in the game it would be near impossible to make sure anything that used a control in a translation was updated when the control changes without just restarting the game.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Muppet9010
Filter Inserter
Filter Inserter
Posts: 278
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Re: Updating localised texts using control bindings on their change

Post by Muppet9010 »

Fair enough, seemed worth asking.

Post Reply

Return to “Modding interface requests”