Page 1 of 1
[0.14.7] custom-input definition changes do not affect key settings
Posted: Sun Sep 18, 2016 9:17 pm
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.
Re: [0.14.7] custom-input definition changes do not affect key settings
Posted: Sun Sep 18, 2016 9:47 pm
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.
Re: [0.14.7] custom-input definition changes do not affect key settings
Posted: Sun Sep 18, 2016 9:50 pm
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?

Re: [0.14.7] custom-input definition changes do not affect key settings
Posted: Sun Sep 18, 2016 10:03 pm
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.
Re: [0.14.7] custom-input definition changes do not affect key settings
Posted: Mon Sep 19, 2016 12:57 am
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.
Re: [0.14.7] custom-input definition changes do not affect key settings
Posted: Mon Sep 19, 2016 12:58 am
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.
Re: [0.14.7] custom-input definition changes do not affect key settings
Posted: Mon Sep 19, 2016 1:09 am
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?