Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[2 in 1] Points System + Mug Skill !

Jason

Awesome Bro

  • [2 in 1] Points System + Mug Skill !
    -----------------------------------------------------

    Hey everyone, I haven't been on this page for a while, so I think it's time to contribute something to all you people looking for nice and easy tutorials !

    Ok, this first tutorial is the main one, the Points System...

    What comes to your head when you think of this ? Well, for me, I think of a Minigame, where you can get points by competing in events, and trade your Wins at an exchange NPC for items.
    This tutorial will show you how to:
    • Make Wins, Losses, and Surrender Points
    • Make an NPC where you can trade your Wins for items
    • Make a monster visible on the map, and respawn x frames after you've killed it
    Ok get ready, we're going to take this step by step.

    [Step [1] Setting up our Variables]
    • Ok, first of all, make an Event on your map, and give it a sprite, I'm using a person for mine. When you've done that, set it's Trigger to Parallel. After, you have to go to the Event Commands, and make 3 Variables, I'm using Variables 1, 2, and 3 for this. Name them Wins, Losses, and Surrenders, or Forefits,whichever sounds best, click Set, and make sure the number 0 is in the Constant box.
      Also, add a Self Switch and turn it on (I used A)

    [Step [2] How do we see our Points/Score?]
    • Remember when I said to make the Self Switch and turn it on ? Well, this is where it comes into use, on the same Event, make a new page, and on the Preconditions make the Self Switch A be ON, and change the trigger to Action Key, also, change the sprite to whatever it was before.
      In the Event Command box, show a Message like: "Would you like to see your score ?", and then a Show Choice with Yes and No.
      Under Yes type this:
      Wins: \v[1] (This means whatever the first variable's amount is, it will appear here)
      Losses: \v[2] (Same here but with the second variable)
      Surrenders: \v[3] (And obviously same here with the third)
      Leave the No handler Empty, and Apply, and then press OK.

    [What have we done so far [?]]
    Okay, so lets see what we've done so far, if you Test Play your game, there should be an NPC stood somewhere, go and talk to him/her/it (?), and it should say Would you like to see your Score ?, press Yes, and it should show as:

    Wins: 0
    Losses: 0
    Surrenders: 0

    If so, you've followed this tutorial well so far, now, for the next bits !

    [Step [3] Making the Enemy]
    Make a new Event, and make the trigger be Player Touch or whatever it is and give it a sprite, for mine I'm using the Ghost.
    Inside the Event Command box, make an Enemy Encounter (I used Ghost*3), and tick the box with Custom Defeat Handler and Allow Escape.
    • Under the Victory Handler increase the Variable Wins by 1 (+1), and turn Self Switch B on.
    • Under the Escape Handler increase the Variable Surrenders by 1 (+1)
    • Under the Defeat Handler do a Teleport back to the map, and do Complete Healing Party, and the increase the Variable Lesses by 1 (+1)
    Now, on the same Event, make a new Page make the preconditions be Self Switch B is ON, and make it a Parallel Process
    [*IMPORTANT*] Dont give it a sprite !]
    Now, in the Event Command box make a Move Event or whatever it is, and do a Wait, choose however many frames you want, I chose 200, don't ask why, I just did. Make a Proceed with Movement, and then turn Self Switch B off.

    [What have we done so far [?]]
    What we've done here is allowed you to gain Wins, Losses and Surrenders by either Killing, Loosing, or Escaping the enemy.
    At this point I advise you to test your game to see what you think, it should work quite well.

    [Step [4] Making the Exchange NPC]
    Okay, I bet your tired now after reading all this writing, but it soon comes to an end, this is the last step.
    Make a new Event, and give it a sprite, I just chose any random one and it was Lancer 4, the ginger woman in pink armour, lol.
    In the Event Command box, make a message saying something like: "Hello here you can exchange Win Points, You currently have \v[1] Win Points", followed by another with a list of items you can buy using your points, here is my list:
    • 1 Win = 100 EXP
    • 5 Wins = Potion x10
    • 10 Wins = Mithril Weapon Set
    • 100 Wins = Instant Lv.99 *If you play the demo and achieve this, send me a screenshot, I want to see lol.
    Now, make a show choice and name each choice with the Wins items (100 EXP, Potion x10 etc.) and under each one, make a Conditional Branch, let me give you an example...

    [Example]
    We'll use the Potion x10, so under it's choice there'd be a conditional branch, with IF Variable Wins == 5, Change Items, + 10 Potions, and then make a message like: "Here are 10 Potions !, You loose 5 Points" Don't worry, you don't "Loose" them, you simply "Spend" them, if you aren't happy with this, you can change the writing lol. and then after, You have to decrease the Variable Wins by 5 (The Potions costed 5 Wins Points) which is easy enough to do.
    On the Else handler, put a message like "You don't have enough Win Points !"

    Follow the example with all of the choices, and there you go, you'll have a nice little shop where you can see how many points you have, and you can spend them on items of your choice.

    [Conclusion]
    Well, I know this has been a long Tutorial, but you have to agree, it's been worth it, this system can come in handy in many types of games, and you know, it doesn't even have to be used for Minigames, you could use it for anything, examples:

    [Examples]
    You have to kill so many chickens to get into someones house (Random eh ?), so you'd use the Wins variable, but obviously you'd rename it as Kills or something, and when x kills have been met, something will happen.

    You need to talk to 30 different people, 10 Ninjas, 10 Shopkeepers, and 10.. Pets (?), so everytime you talk to a Ninja, you'd up the Variable "Ninjas" by 1, And the same with Shopkeepers and Pets, because in my little wierd world, pets can talk, ask Tengu !

    Just a few examples but I'm sure you get what I mean.

    -----------------------------------------------------

    Second Tutorial, the Mug Skill...
    You might've seen Mug Skills on games before, where you attack the enemy, and at the same time, have a chance to steal an item, this system is just like that, and doesn't need a script (They can be awkward to set up)

    This is relatively simple, so I'm not going to part it off into different sections:

    [How to make a Mug Skill]
    First of all, go into your database, and then click the Skill tab, make a new skill, and call it Mug, give it an Icon (I used Item01), Make it's Target Enemy, make its usability Battle, choose a Cast and Target animation (I used Skill use and Emotion-?) and choose how much SP for it to use, I chose 30.

    Now go into your Common Event tab and make a new event called Mug
    Make a variable (I used 4), and call it Mug, also, on the same box on the Operand or whatever it is, make it Random Number Between 1 and choose a number, I chose 4 (1 and 4) This is how many choices of things you'll have to steal, so there'll be 25% chance of stealing each item.

    Now, if you made it 1 and 4, make 4 Conditional Branches, if you made it more, example, 1 and 9, make 9 Conditional Branches.
    In each one make it be IF Variable Mug == (Number them from 1 to 4, so in the first conditional branch, will be 1, in the second will be 2, and so on)
    And under each Conditional brach, make it add item, and choose some items, these will be the items you steal, I chose:
    • 2 Potions
    • 100G
    • Life Seed
    • Failed to steal anything

    Because there are 4 choices, that means there is a 25% chance of either one happening, so the chances of getting the same one twice in a row is 1/4, obviously the more choices you have, the less chance of getting the same one there is, if you have 10 choices, the chance of getting the same one twice is 1/10.

    Last add-on, to know what you've stole, add a message under each saying "You stole [Item name]", but actually type the item name, let me give you an example:

    [Example]
    Conditional Branch: IF Variable Mug == 3, Change Item +1 Life Seed, show message "You stole 1 Life Seed !"
    Is that easy enough?

    Also, make sure you actually allow certain classes to use this skill, I reccomend letting Thief learn it at Lv.10 or so, but for the Demo, Arshes is using it, hehe.

    -----------------------------------------------------

    [Demo]
    Yes, I know alot of you absolutely love demo's because, who wants to read writing when you can just play it ?
    The demo is hosted on Box.net, which, I think is the best filehosting website as the links don't break, or never have done for me.
    Demo:
    http://www.box.net/shared/l02306l532
    The demo includes both of these tutorials: Points System which you can spend the points, and the Mug skill, which can be used in Battle.

    -----------------------------------------------------

    If you find anything wrong with this Tutorial or need help, feel free to say/ask, I won't bite.
    I consider myself very good with events, so please don't say things like "I can do that with a script", because to be honest, I don't care, I'd rather use Events anyway, I can make 80% of all scripts by using Events.

    I hope this Tutorial helped some of you, please post if it helped, or post anyway, as I like posts, hehe.
    Thanks for reading !
 
The points system is very cool, and it's just what I had in mind for a mini-game I'm including in a game I've started. I'll be sure to credit you. :D
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top