[Solved] Modifying Vanilla Recipes 0.12

Place to get help with not working mods / modding interface.
ClayC
Inserter
Inserter
Posts: 24
Joined: Fri Nov 21, 2014 8:01 am
Contact:

[Solved] Modifying Vanilla Recipes 0.12

Post 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
Last edited by ClayC on Thu Jul 30, 2015 12:34 pm, edited 1 time in total.
McGuten
Filter Inserter
Filter Inserter
Posts: 310
Joined: Tue Jun 24, 2014 3:06 pm
Contact:

Re: Modifying Vanilla Recipes 0.12

Post by McGuten »

the easily form is copy entity in your mod and insert this it
Image
Xyfi
Inserter
Inserter
Posts: 40
Joined: Tue May 20, 2014 7:10 am
Contact:

Re: Modifying Vanilla Recipes 0.12

Post 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.
McGuten
Filter Inserter
Filter Inserter
Posts: 310
Joined: Tue Jun 24, 2014 3:06 pm
Contact:

Re: Modifying Vanilla Recipes 0.12

Post 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
Image
ClayC
Inserter
Inserter
Posts: 24
Joined: Fri Nov 21, 2014 8:01 am
Contact:

Re: Modifying Vanilla Recipes 0.12

Post 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.
Xyfi
Inserter
Inserter
Posts: 40
Joined: Tue May 20, 2014 7:10 am
Contact:

Re: Modifying Vanilla Recipes 0.12

Post by Xyfi »

ClayC
Inserter
Inserter
Posts: 24
Joined: Fri Nov 21, 2014 8:01 am
Contact:

Re: Modifying Vanilla Recipes 0.12

Post by ClayC »


awesome thanks a bunch :)
chernosliv
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Aug 01, 2015 2:31 am
Contact:

Re: [Solved] Modifying Vanilla Recipes 0.12

Post by chernosliv »

Would somebody help me with recipes? I need to apply recipe changes in current map, but it works only on new map.
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [Solved] Modifying Vanilla Recipes 0.12

Post 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.
chernosliv
Burner Inserter
Burner Inserter
Posts: 14
Joined: Sat Aug 01, 2015 2:31 am
Contact:

Re: [Solved] Modifying Vanilla Recipes 0.12

Post 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.
ClayC
Inserter
Inserter
Posts: 24
Joined: Fri Nov 21, 2014 8:01 am
Contact:

Re: [Solved] Modifying Vanilla Recipes 0.12

Post 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?
johanwanderer
Fast Inserter
Fast Inserter
Posts: 157
Joined: Fri Jun 26, 2015 11:13 pm

Re: [Solved] Modifying Vanilla Recipes 0.12

Post 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.
Post Reply

Return to “Modding help”