Jump to content

Recommended Posts

Posted

Coming back to Vintage story to make some mods again. Working on a plant mod and getting this error:

Quote

System.ArgumentException: Attempted to resolve the recipe ingredient wildcard Item game:flower-{cowparsley} but there are no such items/blocks!

Good news is my mod code is not throwing any errors when loading. bad news is I get this error when I open the hand book and click on the Reed basket. Here is my code, pretty basic currently:

 

[
  {
    ingredientPattern: "C_C	CCC",
    ingredients: {
      "C": { type: "item", code: "game:flower-{cowparsley}", quantity: 5 }
    },
    name: "primitive basket",
    width: 3,
    height: 2,
    output: { type: "item", code: "game:basket-normal-reed"  }
  }
]

 

Posted

try "flower-cowparsley-free", in the vanilla poultice recipe "flower-horsetail-free" is used, so this must work. flower-cowparsley-free is in the block codes table on the wiki also

Posted (edited)

Tried all the following combinations with crashing result:

 

      "C": { type: "item", code: "game:flower-cowparsley-{free}", quantity: 5 }
      "C": { type: "item", code: "game:flower-{cowparsley-free}", quantity: 5 }
      "C": { type: "item", code: "game:flower-{cowparsley}-free", quantity: 5 }
Gives reipe error on load      

"C": { type: "item", code: "game:flower-cowparsley-free", quantity: 5 }

Open to ideas. Anyone else worked with flowers? 

 

 


Update:

Also tried:

 "C": { type: "item", code: "game:{flower}-{cowparsley}-free", quantity: 5 }

 "C": { type: "item", code: "game:{flower}-{cowparsley-free}", quantity: 5 }

 "C": { type: "item", code: "game:{flower}-cowparsley-{free}", quantity: 5 }

 "C": { type: "item", code: "game:{flower}-{cowparsley}-{free}", quantity: 5 }
 "C": { type: "item", code: "game:{flower}-cowparsley-free", quantity: 5 }

 

Edited by Micah Holmes
Posted
1 hour ago, Micah Holmes said:

Found the answer:

 

      "C": { type: "block", code: "game:flower-cowparsley-free", quantity: 5 }

I had the type as a "item" but flowers are "block" type. Works now thanks everyone 

I see it worked when you removed those angle brackets {} from the code. May I ask why you were trying to use them? I am new to modding myself. 

Posted
1 hour ago, genovefa said:

I see it worked when you removed those angle brackets {} from the code. May I ask why you were trying to use them? I am new to modding myself. 

Those are called variant substitutions and can carry information from an ingredient into the output in a recipe, if used correctly.

Example:

{
	"ingredientPattern": "S,D",
	"width": 1,
	"height": 2,	
	"ingredients": {
		"S": {
			"type": "item",
			"code": "game:saw-*",
			"isTool": true
		},
		"D": {
			"type": "block",
			"code": "game:door-solid-*",
			"name": "wood"
		}
	},
	"output": {
		"type": "block",
		"code": "game:door-sleek-windowed-{wood}"
	}
}

The recipe above will accept any solid door variation as ingredient "D", save the content of "*" in the variable called "wood", which in turn can be used to output the exact same value, making the creation of recipes much easier and resource-friendly because in this example you don't have to create 12 recipes for the Vanilla woods, but only one.

  • Like 2
  • Thanks 1
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.