Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Variables
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Variables

Started by Kojinus, May 06, 2009, 11:29:16 PM

0 Members and 1 Guest are viewing this topic.

Kojinus

I'm working on an Alchemy system, and I have it so that upon making a potion, you have a chance to level up your Alchemy.


<>Message: Hmm... This appears to be an Alchemy table.
:               No one is currently using it.
:               Would you like to try your hand at potion making?
<>Show Choices: Sure, why not?/Nah, I don't want it to blow up.
: [Sure, why not?] Handler
   <> Message: What potion would you like to make?
   <> Label: 1
   <> Show Choices: Minor Health Potion/Minor Mana Potion/Antidote/More...
    :[Minor Health Potion] Handler
       <> Message: To make a Minor Health Potion
        :                You are required to have a
        :                Grimsweed, Parsat, and an
        :                Empty BVial. Are you sure
       <> Message: You want to make this potion?
       <> Show Choices: Yeah./No, I changed my mind.
       :[Yeah] Handler
          <> Branch if Grimsweed Possessed
              <> Branch if Parsat Possessed
                  <> Branch if Empty Vial Possessed
                      <>Message: You mix the two herbs into the vial
                       :               and shake it up a little.
                        <>Change Items: Empty Vial 1 Remove
                        <>Change Items: Parsat 1 Remove
                        <>Change Items: Grimsweed 1 Remove
                        <>Variable Oper: [017:Health Potion] Set, Rnd [0-5]
                        <>Branch if Var [0017:Health Potion] is 2 Less/Equal
                           <>Change Items: Minor Health Potion 1 Add
                           <> Message: You made ONE Health Potion(s)!
                           <>
                          :End
                          <>Branch if Var[0017:Health Potion] is 3
                            <>Message: You created ONE Health Potion(s)!
                             :              You gained an Alchemy level!
                            <>Variable Oper: [0018:Alchemy] + . 1
                            <> Change Items: Minor Health Potion 1 Add
                            <>
                          : End
                           <>Branch if Var [0017:Health Potion] is 4 or more
                              <>Change Items: Minor Health Potion 2 Add
                              <>Message: You made TWO Health Potions(s)!
                              <>
                           : End
                           <>
                         : Else Handler
                           <>
                        : End
                        <>
                     : Else Handler
                       <>
                    : End
                   <>
                : Else Handler
                  <>
               : End
                <>
             : [No, I changed my mind] Handler
                <> Jump to Label: 1
                <>
             : End
            <>
         : [Minor Mana Potion] Handler
           <>
         : [Antidote] Handler
           <>
         : [More...] Handler
           <>
        : End
        <>
      : [Nah, I don't want it to blow up.] Handler
         <>
      : End
      <>




And then I have a little book above the table, and I want it to tell me what level my Alchemy is. But I can't figure out how to display the value stored in the [0018:Alchemy] Variable. D: Is it possible?

modern algebra

\v[18] in a Message should do it.

If you don't want to show a message, you'd need to do some picture eventing to show it.

Kojinus