Resource altenative.

Started by Nirahiel, January 17, 2015, 02:13:48 PM

Previous topic - Next topic

Nirahiel

Taken from a PM to Tynan :
Quote from: Nirahiel
Hi, i'd like to know if there is a way (I suppose not) to make it so we can provide alternatives to resources.
Example, let's say I add a special, really nutritive plant, that's worth 2 regular plants.
Now a basic meal can be crafted with 10 basic plants, or maybe 8 basic and 1 special, or 6 basics and 2 specials, etc ... well you get the idea.

Thanks in advance :)
Quote from: Tynan
You would just make a plant that produces a double-size harvest.

And please ask this sort of thing on the forums.
I guess i wasn't clear enough.
I don't want to produce twice as much items per plant, I want a single item to be worth 2 items (or more).
Same could apply to other stuff. Let's say I create a new metal that's really good, twice as good as steel, and now all recipes that require steel can use this new metal instead, even with a ratio. (Example, recipe needs 50 steel to craft something, pawns use 15 of this special metal (which is worth 30 steel) and 20 steel instead. Or maybe 5 special metal and 40 steel. Or 25 special metal and 0 steel.
Of course if the recipe asks for e.g. 5 steel, you can't go with pure special metal only. You'd need at least 1 steel for 2 special metal for this recipe.

Or the other way around. If I have a recipe that requires 10 meat and 10 veggies (the lavish meal) and instead of meat i have this weird paste that tastes a bit like meat but isn't meat, and I need 3 times more to feel like it's meat, then a pawn could make this meal using 10 veggies and 30 of this weird paste instead :)

Hope it's clear enough, and hope someone can tell me if it's doable.
Thanks :)

Shinzy

#1
    <stuffProps>
      <volumePerUnit>0.05</volumePerUnit>
    </stuffProps>

that'll be what you need!
that's the Gold's volume so you'll need to change the value quite a bit
Edit: and by asking on the forums you just may or may not* have solved a very irksome problem I've had past ..like forever actually
so

(*I just noticed one very interesting line in the resource.xmls while I was skimming through it so ;D)

Nirahiel

So when using this I can create a food plant of volume 2 and pawn will use 5 plants to make a meal ? Can I create an item that can be used instead of steel or gold ? If the recipe asks for food I can just create any food. If it asks specifically for potato I can't create an alternative potato while keeping the existing one can I ?

Shinzy

if you wish a recipe to use multiple kinds of potatoes
you can either
X; Make a new category for only potatoes (you'd have to modify the vanilla potato)
J; Have the recipe use PlantsRaw category and then use <exceptedThingDefs> to single out all the plants you don't want to be used (This ofcourse may cause exploits with other mods that add veggies as you can't except all of them)
D; Figure out if you can somehow just the-opposite-of-except things, then except the entire plant gategory un-except vanilla potato and your giant mutant potato 
Or F; Some other very innovative outside the box way that you might figure out while slipping in the bathroom and hitting your head on the bathtub

I would recommend going with option J! cause I know that atleast works ;D and if someone with fancy vegetable mods wants to come and exploit stuff and make tater stew out of tofu then they're darned welcome to do so! I don't judge ...at all! >:(

Nirahiel

Yeah that's what I thought.
It would be so cool to have some sort of dictionary (like forge ore dictionary) where i could create my mutant potato with a volume of 5 for example, and register it as an alternative to the potato.
Now any recipe requiring exactly 10 potatoes (and not any kind of veggies) can be made with either 10 potatoes or 5 potatoes and 1 mutant, or 2 mutants.
Also I don't want to create a new recipe, this idea was to enable the new item to be used with vanilla recipes as well.
(So option J won't work without base XML edits, neither will option X, I don't think option D is doable. And F ... well i don't have a bathtub anywway :) )

Shinzy

Quote from: Nirahiel on January 18, 2015, 05:45:52 AM
Yeah that's what I thought.
It would be so cool to have some sort of dictionary (like forge ore dictionary) where i could create my mutant potato with a volume of 5 for example, and register it as an alternative to the potato.
Now any recipe requiring exactly 10 potatoes (and not any kind of veggies) can be made with either 10 potatoes or 5 potatoes and 1 mutant, or 2 mutants.
Also I don't want to create a new recipe, this idea was to enable the new item to be used with vanilla recipes as well.
(So option J won't work without base XML edits, neither will option X, I don't think option D is doable. And F ... well i don't have a bathtub anywway :) )

ooh! well! then you don't really need to do anything except your new potato and make sure it's categorized as raw plant like the other vegetables, change the volume of your potato and then people can use it in their cooking recipe if they wish and they should need fewer of them

the vanilla recipe uses anything as a material that is PlantRaw category so you can add to the category
and it can then be used in any vanilla recipe that uses stuffs from that category, okay? okay!

and not owning a bathtub! good job! there sharks in them, showers are much better