RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Request] Cooking Skill with chance to fail...

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 66
RMRK Junior
Hello guys! As alwais, i'm fasting improving my skill in event creation and this time i'm dying under the pressure of thousand ingredients and conditional branch, so i will try to Ask for help if someone can. I think the kind of script i'm requesting will be very usefoul for many people, so i give a try.

I'm using RPGMaker VX and many script of YEM and Modern Algebra. I'm using multiple Diary and one of them is the Cookbook, who sho in itself all the Recipes of each single think a player can cook, but just if he first learn those by npc, quests, and talking.

My idea is simple, i've already make with event woodcutting, mining and fishing, but i've problems with cooking since i cannot use the system i'm using for the other kind of jobs.
What i will like to have in this script, is:

Using a tag in the items to say <This is a Recipe>
Give to just 1 character the skill to cook [is the Cook Character obviously ^^] or the chance to have different character, cook different things.
Go to a stove and diplay just the recipe list, asking to the player how much of each single recipe to combine. Since he has the cookbook, he could use the Recipes listed in it to cook...or just try and mix how he please.
My best hope will be, if he find a new recipe, a script call to add that to the book.
And saying this, i can use the Sinthethys Shop, but it has two major problems.
First, he show all the ingredients if you have the right recipe in inventory, and that to me is a problem. i will like to hide the single ingredients, so the player must use what he find during the game in his cookbook or just try his luck mixing at random.
Second, there isnt the chance to fail! I will like to have his skill building up after each cook, also if it messed up and burn all recipe.
I'm trying to do it with events, but i cant find a good system, so i'm asking for a script, since alle the Cooking System i see around are just like: "mix 1 with 2 and get 3" if you have ingrdients, you do. no chance to fail.
And i really need the chance to fail, since some of the recipe i intend to use, are quite powerfoul to use...
So is there a chance?

Now i'm drifting lost in the conditionals branch...and each single recipe is around 40 line code...tooo much, just for cookin, i must admit. It is like this:
Quote
Text: What ingredients will you like to cook?
Label: Ingredients
Choice 1: Flour
  Control Variables: [0011 Flour in Inventory] = [Flour] in Inventory
  Input Number [0001 Flour] 4 digits
   Conditional Branch: Variable [0001 Flour] <=[0011 Flour in Inventory]
   Jump to Label: Ingredients
   Else:
   Text: You dont have that much Flour!
   Jump to Label: Ingredients

Choice 2: Sugar
  Control Variables: [0012 Sugar in Inventory] = [Sugar] in Inventory
  Input Number [0002 Sugar] 4 digits
   Conditional Branch: Variable [0002 Sugar] <=[0012 Sugar in Inventory]
   Jump to Label: Ingredients
   Else:
   Text: You dont have that much Sugar!
   Jump to Label: Ingredients

Choice 3: Milk

 ok i think you get it...is the same, repeated for ALL ingredients...
Then to the bottom...
Choice 44: Ok i'm ready to cook
   Call Common Event "Ingredients List"
Choice 45: No, i dont whant to cook

And that is just the recipe list...
then in the common event, is aaaaaalll way long conditional branch. i will post just one recipe to make clear how i'm working and what i need.

Quote
Common Event "Ingredients List"

Conditional Branch: Variable [0001 Flour]  = 3
 Conditional Branch: Variable [0002 Sugar] = 2
  Conditional Branch: Variable [0003 Salt] = 1
   Conditional Branch: Variable [0001 Egg] = 2
    Text: Nice, now i will try to make some Plain Cookies! How much of them i
            will try to cook?
      Label: Quantity
      Input Number [0200 Quantity] 4 digits
       Control Variables: [0001 Flour ]*[0200 Quantity]
       Control Variables: [0002 Sugar ]*[0200 Quantity]
       Control Variables: [0003 Salt ]*[0200 Quantity]
       Control Variables: [0004 Egg]*[0200 Quantity]
       Conditional Branch: Variable [0001 Flour] <=[0011 Flour in Inventory]
         Conditional Branch: Variable [0002 Sugar ] <=[0012 Sugar in Inventory]
           Conditional Branch: Variable [0003 Salt] <=[0013 Salt in Inventory]
             Conditional Branch: Variable [0004 Egg] <=[0014 Egg in Inventory]
             Control Variables: [1000: Difficulty] = 15
             Control Variables: [1001: Cooking Now] = Random No 0-20
             Control Variables: [1001: Cooking Now]+[1002: Cooking Skill]
               Control Variables: [1003: Cooking Practice] + [0200 Quantity]
                Label: Skill Leveling
               Conditional Branch: Variable [1002: Cooking Skill] <=9
                 Conditional Branch: Variable [1003: Cooking Practice] >= 50
                     Control Variables: [1002: Cooking Skill] +1
                     Control Variables: [1003: Cooking Practice] -50
                             Text: Wow my Cooking Skill improved!
                             Now i am a Level \v[1002] Cook!
                      Jump to Label: Skill Leveling
                    Else:
                  Conditional Branch: Variable [1001: Cooking Now] >= [1000: Difficulty]
                  SE Item 1,80,100
                  Text:Good! I've Cooked \v[0200 Quantity] Plain Cookies!
                  Change Iems: [Plain Cookies] + [0200 Quantity]
                  Label: Finish
                  Change Iems: [Flour] -[0001 Flour]
                  Change Iems: [Sugar] - [0002 Sugar ]
                  Change Iems: [Salt] - [0003 Salt]
                  Change Iems: [Egg] - [0004 Egg]
                  Control Variables: [0001 Flour ] = 0
                  Control Variables: [0002 Sugar ] = 0
                  Control Variables: [0003 Salt ] = 0
                  Control Variables: [0004 Egg] = 0
                  Exit Event Process
                  Else:
                  Text: Damn...i overburned all...nothing gain...
                  Jump to Label Finish
               Else:
             
             Else:
             Text: You dont have that much Eggs!
              Jump to Label: Reset Ingredients
           Else:
           Text: You dont have that much Salt!
           Jump to Label: Reset Ingredients
         Else:
         Text: You dont have that much Sugar!
         Jump to Label: Reset Ingredients
       Else:
       Text: You dont have that much Flour!
       Jump to Label: Reset Ingredients
       
     Branch End 
   Label: Reset Ingredients
   Control Variables: [0001 Flour] / [0200 Quantity]
   Control Variables: [0002 Sugar] / [0200 Quantity]
   Control Variables: [0003 Salt] / [0200 Quantity]
   Control Variables: [0004 Egg] / [0200 Quantity]
   Jump to Label Quantity

As you can see..is pretty long to configure AND this is just one Recipe...
I plan to do around 50 or so Recipes...so...can someone help me, before the conditional brances kill me? ^^

Thanks for your time.
     
« Last Edit: September 22, 2011, 04:19:19 AM by fenicearcana »