Petrochem barreling and mods problem

Infinite Ores, Refining, Ore Processing ...

Moderator: Arch666Angel

Jaclyn
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Feb 11, 2017 12:17 am
Contact:

Petrochem barreling and mods problem

Post by Jaclyn »

What I'm trying to do is modify a few mod recipes to make a mod work with angel's ores and petrochem. I got it to work fine with angel's ores; it produces the ores without problem, but I can't seem to make it work with petrochem. What exactly I'm trying to do is make a building take an empty barrel and then spit out either a multi-phase oil barrel or natural gas barrel based on recipe. My issue is that in looking through the files for angel's petrochem, I can;t find where the recipes for barreling are. I want to see them because I've tried every name I can think of to give the result and it turns up nothing. In the files for petrochem natural gas is named "gas-natural-1." I took a leap of logic and tried naming the result "gas-natural-1-barrel" to no avail. I've also tried "natural-gas-barrel" and simply "gas-natural-1." The interesting thing is if I change the result to results and then format it like this: results= {type="fluid", name="gas-natural-1", amount=10} it will give me a crude oil barrel. Does anyone know the name the game uses for natural gas barrels and multi-phase oil barrels?
User avatar
septemberWaves
Fast Inserter
Fast Inserter
Posts: 225
Joined: Tue Jul 26, 2016 7:49 pm
Contact:

Re: Petrochem barreling and mods problem

Post by septemberWaves »

Barreling recipes should be under "fluid handling". The same tab where you find Angel's various valves. Unless you have that omnibarrelling mod installed, in which case I think it changes things but I don't know how.
Jaclyn
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Feb 11, 2017 12:17 am
Contact:

Re: Petrochem barreling and mods problem

Post by Jaclyn »

eloquentJane wrote:Barreling recipes should be under "fluid handling". The same tab where you find Angel's various valves. Unless you have that omnibarrelling mod installed, in which case I think it changes things but I don't know how.

I'm not talking in game. I'm talking within the mod files themselves.
kinnom
Filter Inserter
Filter Inserter
Posts: 706
Joined: Fri Dec 26, 2014 4:20 pm
Contact:

Re: Petrochem barreling and mods problem

Post by kinnom »

Jaclyn wrote:
eloquentJane wrote:Barreling recipes should be under "fluid handling". The same tab where you find Angel's various valves. Unless you have that omnibarrelling mod installed, in which case I think it changes things but I don't know how.

I'm not talking in game. I'm talking within the mod files themselves.
In the mod files it's written as a function
no yes yes no yes no yes yes
User avatar
Arch666Angel
Smart Inserter
Smart Inserter
Posts: 1636
Joined: Sun Oct 18, 2015 11:52 am
Contact:

Re: Petrochem barreling and mods problem

Post by Arch666Angel »

Barreling and voiding recipes are setup through a function call, you can find the function calls in __modname__/prototypes/modname-generate.lua.
The function itself can be found in the refining mods prototype folder: angels-functions
Jaclyn
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Feb 11, 2017 12:17 am
Contact:

Re: Petrochem barreling and mods problem

Post by Jaclyn »

Arch666Angel wrote:Barreling and voiding recipes are setup through a function call, you can find the function calls in __modname__/prototypes/modname-generate.lua.
The function itself can be found in the refining mods prototype folder: angels-functions
Okay, so your answer pointed me to the functions which I looked through and found out that the naming conventions for the barrels are angels-barrel-.. fluid name. For multi-phase oil the name would then be angels-barrel-liquid-multi-phase-oil. I tested this in game by adding multi=phase oil barrels to my inventory. For some reason, it only ever gives me one no matter what I set the amount to, but it works. The results portion of the recipe now looks like this:

Code: Select all

results =
	{
		{type="item", name="angels-barrel-liquid-multi-phase-oil", amount=1}
	},
I have also tried just having it be result = "angels-barrel..." to the same effect. The recipe works, no errors, but instead of giving me a multi-phase oil barrel, it gives me a crude oil barrel.I find this extremely odd since the recipe shows a picture of a multi-phase oil barrel and says that I should be getting a multi-phase oil barrel, but I still wind up with a crude oil barrel at the end. Should the result be a function call or something and not the actual item? All I've messed with are the recipes, so am I missing something I need to update elsewhere?
Jaclyn
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Feb 11, 2017 12:17 am
Contact:

Re: Petrochem barreling and mods problem

Post by Jaclyn »

I figured out what the issue was. I was doing everything correct, I just needed to start a new game.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Petrochem barreling and mods problem

Post by Nexela »

Jaclyn wrote:I figured out what the issue was. I was doing everything correct, I just needed to start a new game.

For testing in existing games you will need to do: This isn't needed if the version number changes but most internal testing doesn't increase the version number.
/c game.player.force.reset_recipes();game.player.force.reset_technologies()
Jaclyn
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sat Feb 11, 2017 12:17 am
Contact:

Re: Petrochem barreling and mods problem

Post by Jaclyn »

Nexela wrote:
Jaclyn wrote:I figured out what the issue was. I was doing everything correct, I just needed to start a new game.

For testing in existing games you will need to do: This isn't needed if the version number changes but most internal testing doesn't increase the version number.
/c game.player.force.reset_recipes();game.player.force.reset_technologies()

That's a really good thing to know. Thanks. Unfortunately I already started a new save and saved over my old one. I wasn't very far anyway. I'll keep that in mind though, because I'll probably take what I just did and turn it into a small mod that will overwrite the recipes of the mod I was changing.
Post Reply

Return to “Angels Mods”