[0.14.7] custom-input definition changes do not affect key settings

Bugs that are actually features.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

[0.14.7] custom-input definition changes do not affect key settings

Post by Adil »

When custom input is first defined during data stage, it is, apparently written down into config.ini of the game.
If later definition is changed, the key sequence in config.ini is unchanged. Rather confusing.

How else would you expect user-customizable settings to work? The game has no way of knowing if the user made the key sequence what it is or if it was the default from before and should change to the new default.

That's by design. Use the "reset" button in controls if you want to go back to defaults.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15912
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.7] custom-input definition changes do not affect key settings

Post by Rseding91 »

When custom input is first defined during data stage, it is, apparently written down into config.ini of the game.
If later definition is changed, the key sequence in config.ini is unchanged. Rather confusing.
How else would you expect user-customizable settings to work? The game has no way of knowing if the user made the key sequence what it is or if it was the default from before and should change to the new default.

That's by design. Use the "reset" button in controls if you want to go back to defaults.
If you want to get ahold of me I'm almost always on Discord.
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: [0.14.7] custom-input definition changes do not affect key settings

Post by Zeblote »

Rseding91 wrote:The game has no way of knowing if the user made the key sequence what it is or if it was the default from before and should change to the new default.
Don't write the value into config.ini until the user changed it. Then when you load the keybinds from config.ini, if a value isn't found, use the default.

Is this topic weird for anyone else?

Image
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [0.14.7] custom-input definition changes do not affect key settings

Post by Adil »

Rseding91 wrote: That's by design. Use the "reset" button in controls if you want to go back to defaults.
How do I hit a reset button through the api?
Why is the key sequence defined in data.lua at all then? Pretty much every other object doesn't store its data anywhere outside the mod and is affected to a full extent by changes of its prototype.
Why not move the default keys of custom input into separate file, values from which are used if player hasn't set default ones.

Also, custom input keys currently linger in the config after the related mod is disabled.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15912
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.7] custom-input definition changes do not affect key settings

Post by Rseding91 »

Zeblote wrote:
Rseding91 wrote:The game has no way of knowing if the user made the key sequence what it is or if it was the default from before and should change to the new default.
Don't write the value into config.ini until the user changed it. Then when you load the keybinds from config.ini, if a value isn't found, use the default.
That's not how any of the control settings work.
Zeblote wrote:Is this topic weird for anyone else?
It for some reason didn't include the [quotes] brackets when I hit reply.
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15912
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.14.7] custom-input definition changes do not affect key settings

Post by Rseding91 »

Adil wrote:
Rseding91 wrote: That's by design. Use the "reset" button in controls if you want to go back to defaults.
How do I hit a reset button through the api?
Why is the key sequence defined in data.lua at all then? Pretty much every other object doesn't store its data anywhere outside the mod and is affected to a full extent by changes of its prototype.
Why not move the default keys of custom input into separate file, values from which are used if player hasn't set default ones.

Also, custom input keys currently linger in the config after the related mod is disabled.
It's defined in the data because that's the default value. If you didn't define it then it would be blank and every person who used the mod would have to manually define what they wanted to use for the control to use it.
If you want to get ahold of me I'm almost always on Discord.
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: [0.14.7] custom-input definition changes do not affect key settings

Post by Zeblote »

Rseding91 wrote:
Zeblote wrote:
Rseding91 wrote:The game has no way of knowing if the user made the key sequence what it is or if it was the default from before and should change to the new default.
Don't write the value into config.ini until the user changed it. Then when you load the keybinds from config.ini, if a value isn't found, use the default.
That's not how any of the control settings work.
I don't see why it can't work like that?
Post Reply

Return to “Not a bug”