normal / expensive prototypes

Place to get help with not working mods / modding interface.
Post Reply
antichaos
Inserter
Inserter
Posts: 20
Joined: Tue Jul 29, 2014 11:44 am
Contact:

normal / expensive prototypes

Post by antichaos »

I've been wrestling with the new prototypes while updating my Assemblybots mod. I thought I'd share some things I've found and seek clarification on some other things.

First up, some (but not all) recipes now have their ingredients and results under recipe.normal and recipe.expensive. Some recipes now have an icons property instead of just icon, particularly the barrelling recipes which are generated in core data-updates.

What I would like to have confirmed is what properties can vary by difficulty, which can only exist at root level, and whether or not a property which could vary can be left at root level if you want the same value for both difficulties?

Apologies if this has been stated elsewhere, but is it possible for mods to add difficulties?

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: normal / expensive prototypes

Post by bobingabout »

From what I can tell, it's not possible to mod additional difficulties. how many difficulties there are and what they're called seems to be hard wired in a define. (Which is part of engine code, rather than data code)

As for what is required in root, and what is required per difficulty (if it is required per difficulty, any tag written is root is ignored), I have the following.

type and name OBVIOUSLY have to be in root, as they define what it is. category also seems to be root only, though not confirmed if it works in a difficulty (though I think it would be useful if you could specify crafting for normal, and crafting-with-fluid for expensive to force it to be made in a machine, for example.)
crafting_machine_tint (new tag for chemical plant working colours) seems to also be in root.

energy_required, enabled, ingredients and result/results MUST be specified in the difficulty, if a difficulty tag is specified, any of these in root are ignored, and in the case of ingredients and result/results, if they're missing the game will error.
requester_paste_multiplier seems to be in difficulty too, even though I don't know what it does.


There are other tags too including:
main_product, icon, subgroup, order, and allow_decomposition (not sure what the last one even does either) that haven't been used on any difficulty based recipes yet, so I don't know where they should go(They're all mostly fluid based recipes). All I can sugest is that you put it where you think it should go, and see if it works.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: normal / expensive prototypes

Post by Nexela »

Thanks for this Writeup Bob!

requester_paste_multiplier: This is the default amount of ingredients used when pasted into a requester A multiplier of 2 will paste 2x the ingredients.

main_product is used if you have multiple results. It defines which item locale/sort order to use if they are not specified.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: normal / expensive prototypes

Post by bobingabout »

Thanks.
I knew about main_product, I'm not not sure how it's supposed to work with normal/expensive, because some things like order I'd guess should be on the recipe root, where results are definitely on the difficulty.
Someone should probably try it and see what happens. Myself, still a little busy working through my own mods to experiment with such things.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

aober93
Filter Inserter
Filter Inserter
Posts: 453
Joined: Tue Aug 30, 2016 9:07 pm
Contact:

Re: normal / expensive prototypes

Post by aober93 »

Just what i was trying to find out myself. As it seems you cannot add a new preset, nor a new recipe modifier other than normal and expensive. So if you want your own marathon recipes, youll have to modify the existing marathon mode.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2918
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: normal / expensive prototypes

Post by Optera »

Since I stumbled across expensive fluid recipes here's a demo for making an expensive fluid recipe:

Code: Select all

  {
    type = "recipe",
    name = "basic-oil-processing",
    category = "oil-processing",
    normal = 
    {
      enabled = false,
      energy_required = 5,
      ingredients =
      {
        {type="fluid", name="crude-oil", amount=100}
      },
      results=
      {
        {type="fluid", name="heavy-oil", amount=30},
        {type="fluid", name="light-oil", amount=30},
        {type="fluid", name="petroleum-gas", amount=40}
      },
    },
    expensive = 
    {
      enabled = false,
      energy_required = 15,
      ingredients =
      {
        {type="fluid", name="crude-oil", amount=200}
      },
      results=
      {
        {type="fluid", name="heavy-oil", amount=30},
        {type="fluid", name="light-oil", amount=30},
        {type="fluid", name="petroleum-gas", amount=40}
      },
    },
    icon = "__base__/graphics/icons/fluid/basic-oil-processing.png",
    subgroup = "fluid-recipes",
    order = "a[oil-processing]-a[basic-oil-processing]"
  },

Post Reply

Return to “Modding help”