Smashy

Crafting Recipes with Optional items

7 posts in this topic

Just a quick query and if it does not exist will put it into suggestions.

The recipe system is excellent but would be greatly improved if possible using the current system if it would allow optional items within a recipe thus reducing the number of recipes required in the cook book.

i.e. Craft Bandage use either 4 x toilet Paper or 2 x Cloth Scraps. instead of 2 recipes it could be in the scripting that there is an either or statement.

Does anybody know if something like this exists already for Exile at all ?

Share this post


Link to post
Share on other sites
Advertisement

Hey @BaroN, yep fine for simple stuff but lets be creative.

4 x toilet paper

2 x cloth

4 x wankmags (better prisoner?)

3 recipes to create the same thing.

Now how about using all them lovely new items the fruit say to make a fruit drink, many different concoctions could be made with 1 recipe with some clauses to produce a drink allowing the use of so many items which are just plain useless.

Currently working on a survival server our recipes file is currently 10,000 lines of code and growing. With so many duplicates or variants of the same item which would drastically reduce the file size and make it easier to manage. e.g.

class CraftDirtyBandage : Exile_AbstractCraftingRecipe
{
	name = "Craft Dirty Bandage Paper";
	pictureItem = "Exitem_bandage_dirty";
	returnedItems[] =
	{
		{1, "Exitem_bandage_dirty"}
	};
	components[] =
	{
		[
			{4, "Exile_Item_ToiletPaper"},
			{2, "Exitem_cloth"},
			{2, "Exitem_betterprisoner"}
		]
	};
	category = "Medical";
};

I dont want them to re-write the whole system I am wondering if something does exist. But any one with sense can see adding in an array item which all items within are optional you can big complex recipes with multiple ways to make things. Just a thought.

Edited by Smashy

Share this post


Link to post
Share on other sites

Probably pretty simple if you check the actual crafting code, rather than the 'config' you copied above. 

Maybe hang on for someone with sense... 

Share this post


Link to post
Share on other sites

Its not quite so simple, its not just the crafting code it then needs to go through to Brama and other things they will all need to change to read the system. The config I copied above showed a base of how it could be implemented not obviously the final scripting for how Exile would handle it. 

Any how total diverging I had to explain what I was looking for to see if it existed at all already and if you dont know of any mod or thing which can do this already then I doubt very much there is one considering your knowledge on servers.

Cheers for posting much appreciated.

Share this post


Link to post
Share on other sites

Yes you could do this with a handful of overrides. No you shouldn’t do it because it’s far easier to just create multiple recipes.

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.