Page 1 of 1

[Solved] Modifying Vanilla Recipes 0.12

Posted: Tue Jul 28, 2015 12:07 pm
by ClayC
Hey guys,
I am working on including a new storage tank into my new mod and I managed to get everything working so far... but the problem I am facing is simple in context, I want to modify the vanilla storage tank to include the vlaue fast_replaceable_group in it's entity.

Is there a quick and easy way to do this?

Thanks in advance

Re: Modifying Vanilla Recipes 0.12

Posted: Tue Jul 28, 2015 1:26 pm
by McGuten
the easily form is copy entity in your mod and insert this it

Re: Modifying Vanilla Recipes 0.12

Posted: Tue Jul 28, 2015 2:48 pm
by Xyfi
In data.lua:

Code: Select all

data.raw["storage-tank"]["storage-tank"].fast_replaceable_group = "storage-tanks";
I have tested it, with a second type of storage-tank and it works.

Btw. McGuten's method also works, but you'll have a bigger chance of conflicting with other mods, since you'll overwrite the whole entity.

Re: Modifying Vanilla Recipes 0.12

Posted: Tue Jul 28, 2015 3:14 pm
by McGuten
Xyfi wrote:In data.lua:

Code: Select all

data.raw["storage-tank"]["storage-tank"].fast_replaceable_group = "storage-tanks";
I have tested it, with a second type of storage-tank and it works.

Btw. McGuten's method also works, but you'll have a bigger chance of conflicting with other mods, since you'll overwrite the whole entity.
yeah, i know it but him question about easy form so... it is a easy form

Re: Modifying Vanilla Recipes 0.12

Posted: Tue Jul 28, 2015 4:03 pm
by ClayC
Xyfi wrote:In data.lua:

Code: Select all

data.raw["storage-tank"]["storage-tank"].fast_replaceable_group = "storage-tanks";
I have tested it, with a second type of storage-tank and it works.

Btw. McGuten's method also works, but you'll have a bigger chance of conflicting with other mods, since you'll overwrite the whole entity.

Thanks that's exactly what I wanted :D

I'm going to take this opportunity to ask you if there is a way to see the whole array in data.raw? so I can know what elese is in there.

Re: Modifying Vanilla Recipes 0.12

Posted: Tue Jul 28, 2015 4:58 pm
by Xyfi

Re: Modifying Vanilla Recipes 0.12

Posted: Tue Jul 28, 2015 7:12 pm
by ClayC

awesome thanks a bunch :)

Re: [Solved] Modifying Vanilla Recipes 0.12

Posted: Sun Aug 02, 2015 2:48 pm
by chernosliv
Would somebody help me with recipes? I need to apply recipe changes in current map, but it works only on new map.

Re: [Solved] Modifying Vanilla Recipes 0.12

Posted: Sun Aug 02, 2015 3:19 pm
by orzelek
chernosliv wrote:Would somebody help me with recipes? I need to apply recipe changes in current map, but it works only on new map.
Run this:

Code: Select all

/c game.player.force.reset_recipes()
from console after loading save with modified recipes to update the save.
Ideally it should be in migration script of mod.
Might need to use players[1] if in multiplayer.

Re: [Solved] Modifying Vanilla Recipes 0.12

Posted: Mon Aug 03, 2015 1:56 am
by chernosliv
orzelek wrote: Run this:

Code: Select all

/c game.player.force.reset_recipes()
from console after loading save with modified recipes to update the save.
Ideally it should be in migration script of mod.
Might need to use players[1] if in multiplayer.
Thanks for advice it works.

Re: [Solved] Modifying Vanilla Recipes 0.12

Posted: Mon Aug 03, 2015 6:56 am
by ClayC
orzelek wrote:
chernosliv wrote:Would somebody help me with recipes? I need to apply recipe changes in current map, but it works only on new map.
Run this:

Code: Select all

/c game.player.force.reset_recipes()
from console after loading save with modified recipes to update the save.
Ideally it should be in migration script of mod.
Might need to use players[1] if in multiplayer.
is there anything else like this that reset like the technologies etc?

Re: [Solved] Modifying Vanilla Recipes 0.12

Posted: Mon Aug 03, 2015 4:29 pm
by johanwanderer
ClayC wrote:is there anything else like this that reset like the technologies etc?
/c game.player.force.reset_technologies()

The wiki has information on all these methods.