Announcement

Collapse
No announcement yet.

Creating a "number counter"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Creating a "number counter"

    Hey there. First time posting. Okay, here's the scoop. I'm trying to set up a sort of "counter" that will keep a running score of something. Let's say that every time you examine an object you receive an "exploration point." I want to go to an NPC and have him tell me just how many exploration points I've found so far in total...and have him give me a reward based on how many I've found. How do I set up something like this?
    Believe nothing...except for the possibility of everything.

    -Miyka'el

    #2
    Re: Creating a "number counter"

    I've been trying to figure out something similar in my game for telling the player what percentage he/she is done with the game, and lately have been thinking about this very topic, so I'll share what I have been considering so far. Anyone who sees any flaws in my logic, please let me know.

    This is what I would recommend. There may be other ways of doing this, but for what it's worth. Set up an invisible event in front of your NPC, that way you can use variables as conditions to the event. Using variables is the only way I can think of to do this.

    In the event access screen, in Mode 1, go down to the first condition and press X. Then under occurrence type select "Value<=Specified Value"

    The screen looks like this:

    Value<=Specified Value
    Shared Variables
    123....Variable 01 123...0


    Change it to this:

    Value<=Specified Value
    Shared Variables
    123....Variable 01 123...3


    Then push the O button.

    You are back in the event access screen.
    Go down to Event Code and press X

    Now create a VAL Conditional Branch
    with
    Variable 1=0
    Variable 1=1
    Variable 1=2
    Variable 1=3
    and in the variable 1=3 event code you will need to modify to mode 2 of the event.

    Programming different things to happen for each variable

    Now for mode 2 of the event, you'll need to
    go down to the first condition and press X. Then under occurrence type select "Value<=Specified Value"

    The screen looks like this:

    Value<=Specified Value
    Shared Variables
    123....Variable 01 123...0


    Change it to this:

    Value<=Specified Value
    Shared Variables
    123....Variable 01 123...7


    Then push the O button.

    You are back in the event access screen.
    Go down to Event Code and press X

    Now create a VAL Conditional Branch
    with
    Variable 1=4
    Variable 1=5
    Variable 1=6
    Variable 1=7
    and in the variable 1=7 event code you will need to modify to mode 3 of the event.

    etc.

    keep following that pattern. Now, what I've explained aboveThis will work for up to 79 of those "exploration points" because from what I understand you can have 20 modes (I've never created an event with that many yet). Now, if you want more exploration points counted, then you can have val conditional branches within Val conditional branches, but remember that you are limited to a certain number of lines of programming per mode.

    Each time you want the player to receive an "exploration point," you will need, for this example, to increase shared Variable 01 by 1.

    Of course, you'll have to write down that Shared Variable 01 is being used for your "Exploration Point" system, so don't use tha variable for anything else.
    Last edited by Pagerron; 06-23-2006, 07:54 PM.
    " I am the way, the truth, and the life. No one comes to the Father but by me. " - Jesus

    Comment


      #3
      Re: Creating a &quot;number counter&quot;

      OMG....this hurts my brain. Is this the ONLY way to do this? Are you saying that I need to manually type in what the NPC is going to say for each and every point? If you have 5 points, I have to have a mode for him saying "You have 5 points" and if you have 6 points I need a mode for him saying "You have 6 points"? There's no type of output command for variables in NPC dialogue? Also bare in mind that I am at my limit for the number of events in the area that this NPC is located.

      I plan on having a similar NPC in each town...all of which know how many total points you have...and reward you accordingly.
      Believe nothing...except for the possibility of everything.

      -Miyka'el

      Comment


        #4
        Re: Creating a &quot;number counter&quot;

        Yes, I know. The limits in RPG Maker 3 can be, well, limiting. But we can still make good games. I keep telling myself that, and hoping it's true. No, it is true. We just have to work within the system.

        One of the people on here, Perversion, created a game fairly recently for RPG maker 3 called Series 1: Destiny Beckons. He uses a system where your actions put you on a good vs. evil scale. I've played the game and his system works. I never actually looked at the programming of it, though. Just today he explained a little about it here. Maybe this can be helpful. Just scroll down to find his post.

        http://www.pavilionboards.com/forum/...ead.php?t=7262

        I hope someone else can share any other suggestions that they have too.
        Last edited by Pagerron; 06-23-2006, 08:19 PM.
        " I am the way, the truth, and the life. No one comes to the Father but by me. " - Jesus

        Comment


          #5
          Re: Creating a &quot;number counter&quot;

          Page, why would you need the invisible event in front? Val Control Branches work for characters, too...
          But yeah, now that I think about it, thats a really good alternitive to currency, because the variable can be easily lowered.
          Still, it's time like this I wish I was using Qbasic, where I could just type
          PRINT "You have ";ep;" exploration points."
          Aw well, you win some, you lose some.

          Comment


            #6
            Re: Creating a &quot;number counter&quot;

            Yeah, you know, that's true. It would yield the same result without using them, wouldn't it? Well, I guess I was just thinking that having conditions to the modes was a necessity and NPCs can't have any conditions to their modes.
            Last edited by Pagerron; 06-23-2006, 08:32 PM.
            " I am the way, the truth, and the life. No one comes to the Father but by me. " - Jesus

            Comment


              #7
              Re: Creating a &quot;number counter&quot;

              *sigh* Well...it looks like I'll have to scrap this idea then. Unless.....


              What if every time he examined something that was worth a "point", he would get a treasure item? Does the game allow you to have more than one of the same treasure item? I know there's a function that allows certain event scripts to run depending on weather or not you have various treasure items. Could I maybe use this somehow? (Though I'm assuming the NPC still wouldn't be able to tell me how many treasure items I'm holding. Or can it?)
              Believe nothing...except for the possibility of everything.

              -Miyka'el

              Comment


                #8
                Re: Creating a &quot;number counter&quot;

                I don't think it counts how many of a certain type of treasure item you're holding. At least, it doesn't list more than one of the same type.

                If anything, you could always just have the guy tell you how many "points" you have in increments of five, eg. "You have at least 5 points", "you have at least 10 points", etc.
                Last edited by ErikaFuzzbottom; 06-23-2006, 08:56 PM.
                "What if like...there was an exact copy of you somewhere, except they're the opposite gender, like you guys could literally have a freaky friday moment and nothing would change. Imagine the best friendship that could be found there."

                Comment


                  #9
                  Re: Creating a &quot;number counter&quot;

                  You may be on to something. Keep in mind, though, that your characters have a very limited inventory. But you CAN have a combination affect. Like, trade in 5 pearls, get a Diamond, trade in 5 diamonds, get a ruby, etc. etc. It would take an varaible as well (otherwise you could trade in items you don't have) and liberal use of the <= and >= commands, but it could be done.
                  Do you get my idea, or should I explain it?

                  Comment


                    #10
                    Re: Creating a &quot;number counter&quot;

                    No I get it...but would the NPC actually be able to tell you how many "diamonds" you have?
                    Believe nothing...except for the possibility of everything.

                    -Miyka'el

                    Comment


                      #11
                      Re: Creating a &quot;number counter&quot;

                      But thats the thing. You could just open your backpack and see how many diamonds you have. Y'see, it would work something like this: Player fills up his backpack with 10 gems, goes to the NPC, and trades em for a diamond. He would repeat the process until he had 10 diamonds, then trade those in for a ruby. The whole time, all the items are held by the character, and the space they take is simply minimized.
                      This would probably require a bank, which I think could be done, give me a bit of time to think about it.

                      Comment


                        #12
                        Re: Creating a &quot;number counter&quot;

                        How would the guy know you had 10 diamonds?
                        "What if like...there was an exact copy of you somewhere, except they're the opposite gender, like you guys could literally have a freaky friday moment and nothing would change. Imagine the best friendship that could be found there."

                        Comment


                          #13
                          Re: Creating a &quot;number counter&quot;

                          The accompying variable. See, he mentioned "treasure item" which meant he did not plan on this items coming from random encounters. Thus, when you got the item, the variable would go up one. The variables are the real ways of deteriming what the character has, the items are just for the characters sake. The code would function without them.

                          Comment


                            #14
                            Re: Creating a &quot;number counter&quot;

                            Lot's of great ideas. I'll have to tinker around with it and let you know. Thanks for the valuable input.
                            Believe nothing...except for the possibility of everything.

                            -Miyka'el

                            Comment


                              #15
                              Re: Creating a &quot;number counter&quot;

                              Originally posted by hitogoroshi
                              The accompying variable. See, he mentioned "treasure item" which meant he did not plan on this items coming from random encounters. Thus, when you got the item, the variable would go up one. The variables are the real ways of deteriming what the character has, the items are just for the characters sake. The code would function without them.

                              In Series 1, I actually did have random battles drop (a percentage of the time) treasure items. In the field or dungeon where the item was possible to be acquired, I placed an invisible auto event, conditional upon recognizing that you had the treasure item. If you did, then I had a variable increase by one. The only problem with this system was that I only figured out a way to get one of these items per area, or the auto-event would loop and crash the game. It might be possible to have it add to the variable each time the same item is found, but it's kind of pointless, considering the treasure screen only shows one of that particular treasure item even if you technically have more than one. Using this method, I devised a system whereby if you had one of these treasure items, (broken shard 1), you could trade it in to an NPC for an item. When you went to the next field map, it's possible to get broken shard 2. If you turn both shards in, you get a better item. Same thing with the third area; another broken shard. If you turn in all of them, you get the best item the guy will give you. So that's an idea.

                              Comment

                              Working...
                              X