Main Menu
  • Welcome to The RPG Maker Resource Kit.

Pulling a Recipe out of a Hat...

Started by epson777341, June 19, 2009, 03:05:01 AM

0 Members and 1 Guest are viewing this topic.

epson777341

So, I'm using Cmpsr2000's Crafting system, I was wondering If anyone knows if it's possible to randomize the recipe received. I was thinking of maybe, like, tying a variable to the recipe learnt value, then randomizing the variable, but, then I realized that I absolutely suck at scripting, So my attention turned  towards asking you guys for help, I looked here for the solution, but, I couldn't find it.

Any Ideas?

Grafikal

I don't recall how you use recipes in the script, but you could just event it. If a recipe is an actual item then just randomize the items you get that are recipes or if you call script just randomize which call script is used to learn a recipe. etc.

epson777341

Well, yeah, that was the other option,

"If Variable: Random = 7
    Then
         Teach this one
     else
If Variable: Random = 8
     then
         teach this one
     else
...
"
Gets really really old, especially since I have like, 381 Recipes.

modern algebra

By teach this one, is that a call script command? Or giving an item? Because if it is a call script that you have to pass an ID for, all you would need is to replace the ID with $game_variables[random_variable_id]

or even just rand (381)

epson777341

Thanks! That helped a lot, I understand now.  It was through the scripting.