Page 1 of 1

force.recipes different by force ?

Posted: Fri Jul 22, 2016 9:41 am
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.

Re: force.recipes different by force ?

Posted: Fri Jul 22, 2016 10:09 am
by Helfima
Returns all recipes even hidden

Re: force.recipes different by force ?

Posted: Fri Jul 22, 2016 10:59 am
by Rseding91
It can be different per force. One force could have technologies disabled (not researchable at all) while the other doesn't.

Re: force.recipes different by force ?

Posted: Fri Jul 22, 2016 12:56 pm
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.