Help to create recipes

Started by Ezawa, December 24, 2017, 10:15:10 AM

Previous topic - Next topic

Ezawa

I'm making a mod that adds attachments in the game's weapons like scope, extended magazines...

I was wondering if you could make some recipes like this.

Rifle to S.E. rifle

Normal rifle + scope + exetended magazines = S.E. rifle
Or
Rifle with scope + Extended magazines = S.E. rifle
Or
Rifle with extended magazines + scope = S.E. rifle

How would I do that in XML? I only know how to leave a recipe, do not know if it is possible to do so with varying variations...

(text translated by Bing, I do not know English)

dburgdorf

#1
I'm sure it would be possible to create recipes with variable ingredients with C# coding, but you absolutely cannot do it with XML alone. If you're working solely with XML, what you've got listed above would have to be defined as three distinct recipes.

(Edit: You can, of course, create recipes in XML with variable ingredients if you use "stuff," but I don't see any way in which that would be relevant to this specific question.)
- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?

Ezawa

how i can do this? can show me a exemple pls?

dburgdorf

Quote from: Ezawa on December 24, 2017, 11:51:16 AMhow i can do this? can show me a exemple pls?

I just said that you *can't* do what you want to do, at least not unless you're willing to put in the time and effort to learn some C# programming. Again, so long as you're working solely with XML, the three different ways you listed for making an "S.E. Rifle" will have to be three separate recipes.

- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?