I am setting the effect's effect_key value but this is having no effect:
Code: Select all
effectcp.effect_key = {"modifier-description." .. effect.turret_id .. "-attack-bonus"}
Code: Select all
effectcp.effect_key = {"modifier-description." .. effect.turret_id .. "-attack-bonus"}
Then is there any way at all to fix this issue, without localizing the technical entities and then having players wonder "what is a gun turret range 6"?Rseding91 wrote:"effect_key" has no effect for any modifier outside of the "custom" one.
Because effects aren't prototypes they're all generic and the locale keys are auto-generated from the modifier type. The modifier has no prototype associated so you can't define extra settings outside of what the modifier naively supports (what it modifies, and by how much).
Is there a way to do this automatically, since I cannot hardcode locale for every conceivable turret type?Rseding91 wrote:It's looking for a locale key, that key can show what ever text you want it to.
You can set "modifier.description.gun-turret-rangeboost-6-attack-bonus" = "Cow" for all it matters and it will show "Cow: +N"
Not currently. The technology effect system was not built for dynamic effects and as such there are limits like this.Reika wrote:Is there a way to do this automatically, since I cannot hardcode locale for every conceivable turret type?
OK, is it possible to hide an effect (without removing it entirely)?Rseding91 wrote:Not currently. The technology effect system was not built for dynamic effects and as such there are limits like this.Reika wrote:Is there a way to do this automatically, since I cannot hardcode locale for every conceivable turret type?
http://lua-api.factorio.com/latest/even ... h_finishedReika wrote:OK, is it possible to hide an effect (without removing it entirely)?
Hi guys,Rseding91 wrote:It's looking for a locale key, that key can show what ever text you want it to.
You can set "modifier.description.gun-turret-rangeboost-6-attack-bonus" = "Cow" for all it matters and it will show "Cow: +N"