Have the '__TYPE__name__' localisation syntax work for recipes and technologies

User avatar
tiriscef
Fast Inserter
Fast Inserter
Posts: 101
Joined: Thu Mar 28, 2019 8:45 pm
Contact:

Have the '__TYPE__name__' localisation syntax work for recipes and technologies

Post by tiriscef »

Heya,

in locales you can insert the name of some other prototypes with a `__(TYPE)__(name of prototype)__` syntax, as explained in this wiki tutorial. This only seems to work with items, entities, tiles and fluids - which I guess are the types that the base game uses.

And in my case it would be useful to have this also work with technologies and recipes.

(I don't know if there are more types where this would make sense if one wanted to be exhaustive. Maybe fuel categories.)
Rseding91
Factorio Staff
Factorio Staff
Posts: 16104
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Have the '__TYPE__name__' localisation syntax work for recipes and technologies

Post by Rseding91 »

It works for everything. I believe the issue you are running into is that most recipes do not have dedicated locale defined and instead use the locale from the item or fluid they produce.
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 16104
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Have the '__TYPE__name__' localisation syntax work for recipes and technologies

Post by Rseding91 »

Actually I was wrong, I thought I did this a while ago but it turns out I didn’t.
If you want to get ahold of me I'm almost always on Discord.
curiosity
Filter Inserter
Filter Inserter
Posts: 689
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Have the '__TYPE__name__' localisation syntax work for recipes and technologies

Post by curiosity »

Rseding91 wrote: Fri Sep 20, 2024 5:47 pm It works for everything. I believe the issue you are running into is that most recipes do not have dedicated locale defined and instead use the locale from the item or fluid they produce.
The locale macro works regardless, it's only the data stage that gets tricky.
Bilka
Factorio Staff
Factorio Staff
Posts: 3634
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Have the '__TYPE__name__' localisation syntax work for recipes and technologies

Post by Bilka »

Okay, added __TECHNOLOGY__ and __RECIPE__ built-in locale parameters for 2.0.67.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Implemented mod requests”