Page 1 of 1
Changing locale key of built-in effect type?
Posted: Sat Jan 06, 2018 7:03 am
by Reika
In this case "turret damage", because otherwise I get one built from technical entities with names like this:
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"}
Re: Changing locale key of built-in effect type?
Posted: Sat Jan 06, 2018 9:44 am
by Rseding91
"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).
Re: Changing locale key of built-in effect type?
Posted: Sat Jan 06, 2018 8:56 pm
by Reika
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).
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"?
Re: Changing locale key of built-in effect type?
Posted: Sat Jan 06, 2018 11:23 pm
by Rseding91
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"
Re: Changing locale key of built-in effect type?
Posted: Sun Jan 07, 2018 12:43 am
by Reika
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"
Is there a way to do this automatically, since I cannot hardcode locale for every conceivable turret type?
Re: Changing locale key of built-in effect type?
Posted: Sun Jan 07, 2018 12:46 am
by Rseding91
Reika wrote:Is there a way to do this automatically, since I cannot hardcode locale for every conceivable turret type?
Not currently. The technology effect system was not built for dynamic effects and as such there are limits like this.
Re: Changing locale key of built-in effect type?
Posted: Sun Jan 07, 2018 2:15 am
by Reika
Rseding91 wrote:Reika wrote:Is there a way to do this automatically, since I cannot hardcode locale for every conceivable turret type?
Not currently. The technology effect system was not built for dynamic effects and as such there are limits like this.
OK, is it possible to
hide an effect (without removing it entirely)?
Re: Changing locale key of built-in effect type?
Posted: Sun Jan 07, 2018 1:08 pm
by darkfrei
Re: Changing locale key of built-in effect type?
Posted: Sat Jan 27, 2018 12:50 am
by Menzies2552
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"
Hi guys,
I'm having trouble with this one. I've set my locale to the following:
modifier-description.character-crafting-speed=Player crafting speed
However this doesn't add the "+N" from the modification in the technology prototype. Is there a way I can do this or have I set this up incorrectly?
It's common across the following (but not limited to):
modifier-description.character-crafting-speed=Player crafting speed
modifier-description.character-mining-speed=Player mining speed
modifier-description.character-health-bonus=Player health
modifier-description.character-inventory-slots-bonus=Inventory slots
modifier-description.character-running-speed=Player run speed
Technology effect is written like this:
effects =
{
{
type = "character-crafting-speed",
modifier = 0.2,
}
},
Also, the "quick-bars-count" modifier from the
http://lua-api.factorio.com/latest/Conc ... l#Modifier page doesn't seem to work.
If anyone has any ideas that would be awesome.