Ordering Recipes + incorrect showing of recipe

Place to get help with not working mods / modding interface.
Post Reply
StaticVoid
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Jun 18, 2014 9:06 pm
Contact:

Ordering Recipes + incorrect showing of recipe

Post by StaticVoid »

hello guys,

I been working on my own mod that extends the current transport system,
but i came across something that im so unfamiliar with that i require some help.

what i have currently
Image

Question 1:
I Fixed it, i needed to include the parent group order.
and i updated to the latest version
Question 1
Question 2:

while in inventory the recipe is correct
Image

but inside the assembly it shows that i require sulfuric acid And the finished product
Image

but when its assembling it is correct.
Image


Can anyone please explain to me how to fix these orders and recipes.

im willing to PM source codes if required

Thanks in advance.

OBAMA MCLAMA
Filter Inserter
Filter Inserter
Posts: 337
Joined: Fri May 30, 2014 4:23 am
Contact:

Re: Ordering Recipes + incorrect showing of recipe

Post by OBAMA MCLAMA »

I may not be 100% correct, or even correct at all.
I had this problem and i noticed when you launched a "new" game, the recipe's were correct.

When you change a recipe, i beleive you need to run this command in the console, And especially when you change recipe's from previous versions. So place it in the migrations file for new versions.
game.player.force.resetrecipes()

(for tech: "game.player.force.resettechnologies()" )

I'm still slowly going over learning all the functions and stuff factorio has to offer.
When i stream twitch i always answer questions and try to help, come visit me.

StaticVoid
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Jun 18, 2014 9:06 pm
Contact:

Re: Ordering Recipes + incorrect showing of recipe

Post by StaticVoid »

Thanks, i also noticed that it was not updating when i switched to the latest version and the order was fixed , i figured recipes where being stored in the save file so i kept starting a new game , these commands will surely shorten the process by being able to load save games with all factories still loaded for testing.

For the invalid recipe i think i know why its doing that i think i incorrectly closed the recipe and left a "," at the ingredients i presume the scripts think it is expecting another and resorts the the default/first fluid in the list which according to the crafting menu is sulfuric acid . I cant test this theory right now as i dont have access to my source codes right now



Edit:
This is out of my hands as soon as i add 1 item to either

Code: Select all

category = "crafting-with-fluid",
or make my own category and add it to the machines it instantly corrupts everything that have anything to do with fluid crafting

like this
Image
Image
Image


and even if i delete everything and only 1 one item

Code: Select all

{
    type = "recipe",
    name = "fill-crude-oil-barrel",
    category = "crafting-with-fluid",
    energy_required = 1,
    subgroup = "barrel",
    order = "b[fill-crude-oil-barrel]",
    enabled = "false",
    icon = "__base__/graphics/icons/fluid/fill-crude-oil-barrel.png",
    ingredients =
    {
      {type="fluid", name="crude-oil", amount=25},
      {type="item", name="empty-barrel", amount=1},
    },
    results=
    {
      {type="item", name="crude-oil-barrel", amount=1}
    }
  }

its a base item, and it instantly corrupts it



edit-2:

Even with an entirely new entity item and recipe for a chemical plant called barrel plant i still have the issue,

Image

im gonna leave it at this, i highly doubt its the mods fault more the fluid handling

YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Ordering Recipes + incorrect showing of recipe

Post by YuokiTani »

for better work with other mods i suggest to use a unique recipe/item-name - example: et-fill-crude-oil-recipe (et stands for Extended-Transport)

because, if you use a name for an item/recipe it's already in use, you overwrite this. if any mod-developer after you use a same name, he overwrite your recipe - depends on load-order of these mods. maybe it fixes/lowers also your problem with incorrect materials.

in factorio are 2 categorys/subgroups - item-subgroup and recipe-category - this are different things.

item-subgroups - have you used for separation your mod-things in your own mod-tab.
recipe-category - you need to explain factorio the machine that can build this.

a recipe can have all this (example)
category = "smelting" or "chemistry" or "crafting_with_fluid" or your own machine "et-maschine" - if you open the machine it shows only these allowed recipes
subgroup = "et-transport" or "et-barrel" - a way to order and group this

item
subgroup = "et-transport" or "et-barrel" - a way to order and group this

entity
crafting_categories = "crafting", "advanced-crafting", "crafting-with-fluid" or "et-maschine" -> the category you used in recipe

the blue and green assembly-maschine have all these crafting-categories.

StaticVoid
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Jun 18, 2014 9:06 pm
Contact:

Re: Ordering Recipes + incorrect showing of recipe

Post by StaticVoid »

You have a valid point that i should use a clear prefix which is "et-" ill get on that right away,

Part of the original post
For now ill try and rename everything with my prefix and make a custom barrel and see if it fixes anything

thanks for your input, it made me look at it all again and might have figured it out

Edit:
Added a spoiler because its fixed

Image

Thanks, it seemed that the barrel somehow ruined the raws and its now fixed because i used my own item. ill disable the original one and replace it with my own.

You saved my mod from certain death!


edit:

The mod works and has no issues except that again the recipe seems to be glitched when i add a new building to only use these items
Image
Image
Image
ill try and figure it out over time but for now its not a game breaking bug and only a gui bug

YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Ordering Recipes + incorrect showing of recipe

Post by YuokiTani »

you can use these prefix also in item-groups and recipes - if you encounter an error it's easier to find

expample: Fill-Barrel ->et-fill-barrel ;) - because you can't be sure the next mod-developer has the same idea and name this recipe also fill-barrel

another point, in orginal files items and recipes have mostly the same name. i use/recommend a suffix like -recipe for recipes. sometimes the error-message shows you the right position/file + line of error. beside that, you can easier read your code if the lines and files increase ;)

factorio counts the complete process-line for the Total-Raw Information and breaks it down to basic material. i think this 25 sulfuric-acid comes from the plastic-barrel.
you can solve this only if you check your complete process-line and recipes you have added, in relation to base-recipes or base-materials used.

StaticVoid
Burner Inserter
Burner Inserter
Posts: 12
Joined: Wed Jun 18, 2014 9:06 pm
Contact:

Re: Ordering Recipes + incorrect showing of recipe

Post by StaticVoid »

YuokiTani wrote:you can use these prefix also in item-groups and recipes - if you encounter an error it's easier to find

expample: Fill-Barrel ->et-fill-barrel ;) - because you can't be sure the next mod-developer has the same idea and name this recipe also fill-barrel

another point, in orginal files items and recipes have mostly the same name. i use/recommend a suffix like -recipe for recipes. sometimes the error-message shows you the right position/file + line of error. beside that, you can easier read your code if the lines and files increase ;)
Pretty much doing that to everything i add now keeps it cleaner and easier to spawn ingame items too.
YuokiTani wrote: factorio counts the complete process-line for the Total-Raw Information and breaks it down to basic material. i think this 25 sulfuric-acid comes from the plastic-barrel.
you can solve this only if you check your complete process-line and recipes you have added, in relation to base-recipes or base-materials used.
Is there a way to hide "total raw"?
Current is doing that for everything steel or plastic barrels

and as you can see the raw is completely wrong it even wants the product its about to make as raw
Image

YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

Re: Ordering Recipes + incorrect showing of recipe

Post by YuokiTani »

StaticVoid wrote: Is there a way to hide "total raw"?
Current is doing that for everything steel or plastic barrels
and as you can see the raw is completely wrong it even wants the product its about to make as raw
i don't know, but nobody watch the total-raw :)
i think all recipes with fluids are calculated false, all others looks i.O. - but i don't re-calculate not a single recipe ^^

Post Reply

Return to “Modding help”