force.recipes different by force ?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

force.recipes different by force ?

Post by binbinhfr »

Hi,

about the force.recipes list, I wonder if it is the same list for all forces (except for the only recipe.enabled parameter which is on or off if the research has been made by the force)
It's because I don't want to duplicate some work I do on recipes scanning...
And as far as I see, this force.recipes list structure depends on the mods/recipes installed, but not on the force.
My mods on the Factorio Mod Portal :geek:

Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: force.recipes different by force ?

Post by Helfima »

Returns all recipes even hidden

Rseding91
Factorio Staff
Factorio Staff
Posts: 13249
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: force.recipes different by force ?

Post by Rseding91 »

It can be different per force. One force could have technologies disabled (not researchable at all) while the other doesn't.
If you want to get ahold of me I'm almost always on Discord.

User avatar
binbinhfr
Smart Inserter
Smart Inserter
Posts: 1524
Joined: Sat Feb 27, 2016 7:37 pm
Contact:

Re: force.recipes different by force ?

Post by binbinhfr »

Rseding91 wrote:It can be different per force. One force could have technologies disabled (not researchable at all) while the other doesn't.
It does not work in my mod. Do the manual test on a new map :
/c game.player.force.technologies["steel-processing"].enabled = false
you can check that the techno disappears in the T menu.

but then
/c game.player.print(game.player.force.recipes["steel-plate"].name)
the recipe is still in the game.player.force.recipes table
/c game.player.print(tostring(game.player.force.recipes["steel-plate"].enabled))
returns false

So for the moment, the recipes are still the same between forces, even if you disable some technos.
It's not a problem for me. I prefer to have all recipes of all installed mods, but with enabled on or off depending on technos choices of the force.
I just want a confirmation that the structure is the same between forces.
My mods on the Factorio Mod Portal :geek:

Post Reply

Return to “Modding help”