This is heavily based on the modding tutorial on the wiki.
The problem is described here https://github.com/adamwong246/chernobyl/issues/1 and the code is up to date.
I'm not sure if this is confusion with Factorio or with Lua, because this is my first time using Lua. Sorry if this is a dumb question!
Help me understand why my recipe names are wrong.
- adamwong246
- Fast Inserter
- Posts: 148
- Joined: Tue Dec 01, 2020 5:01 am
- Contact:
Re: Help me understand why my recipe names are wrong.
Since you have not provided a localised_name for the item, it defaults to its place_result - in this case its placed_as_equipment_result. Since it is placed as an Exoskeleton, that is the name it gets.
You would need to set:
Then your locale file can specify the name for the item, which will override the default behaviour.
You would need to set:
Code: Select all
localised_name = "item-name.foot-generator"
Re: Help me understand why my recipe names are wrong.
Looks like you missed [recipe-name] for it in the locales.
- adamwong246
- Fast Inserter
- Posts: 148
- Joined: Tue Dec 01, 2020 5:01 am
- Contact:
Re: Help me understand why my recipe names are wrong.
Should this be set upon the item or the recipe?
PFQNiet wrote: ↑Wed Jan 27, 2021 5:27 pmSince you have not provided a localised_name for the item, it defaults to its place_result - in this case its placed_as_equipment_result. Since it is placed as an Exoskeleton, that is the name it gets.
You would need to set:
Then your locale file can specify the name for the item, which will override the default behaviour.Code: Select all
localised_name = "item-name.foot-generator"
- adamwong246
- Fast Inserter
- Posts: 148
- Joined: Tue Dec 01, 2020 5:01 am
- Contact:
Re: Help me understand why my recipe names are wrong.
It should be set on the item. The recipe will default to the name of its main product.
- adamwong246
- Fast Inserter
- Posts: 148
- Joined: Tue Dec 01, 2020 5:01 am
- Contact:
Re: Help me understand why my recipe names are wrong.
Again, making that change causes a crash with ""Equipment with name 'foot-generator' does not exist""
- adamwong246
- Fast Inserter
- Posts: 148
- Joined: Tue Dec 01, 2020 5:01 am
- Contact:
Re: Help me understand why my recipe names are wrong.
Ok guys, thanks for the help. I have a half-solution which I can live with for now... I don't want to wrestle with localization right now but I'll fix it later. https://github.com/adamwong246/chernoby ... 5f8f36bf9d