Question based fighting system

● ARCHIVED · READ-ONLY
Started by Tecromancer 2 posts View original ↗
  1. We do a project in Math class were we make games that test your math knowlege i stead of making boardgames like the others I wanted to make my game in RPG maker vx. I didt the first first few questions but i only made events were you have multiple choice questions but i wonder now if i could make the questions in the fighting system to make an endboss who gets damage from right answers.

    And because i started using rpg maker today i need a bit help.

    Thank You !

    Tecromancer
  2. If you want to use the existing combat system, I think you'd need someone to script something to allow you to input questions. But you actually can trip this out with just the basic event commands. It's kind of time consuming and tedious though. For a full walkthrough on how to do it, see the spoiler below.

    Spoiler
    So start out by creating your enemy event. Set it to same as characters and action button. In the command space, define a variable as your enemy's health (whatever HP value you want your boss to have). Fade out your current background music and play your battle music. You'll have to manually create a picture to be your battler/background. Show picture command and resize as needed so it fits the whole screen. Set a switch to be on when you want to be in battle and turn it on. Add a "call common event" command. Turn on self-switch A. New event page conditions when self switch A is on. Leave this page blank.

    In your database, on the common events tab, set your common event to parallel with your battle switch as the trigger. Create a label (we'll call this label 1). Create a conditional branch to check the variable you used to define your enemy's health is greater than 0. Make sure you leave the "set handling when conditions do not apply box" checked. In the "else" option, erase picture, fade out your battle music, play your background music, turn your battle switch off and exit event processing.

    Back in the "enemy HP is greater than 0" box, show text, ask your question. For your answers, you can either do multiple choice (show choices command) or you can set another variable as being equal to the answer and use the input number command to answer. (If you choose the latter option, you'll need a second label here as well as a conditional branch to check if the answer is correct. For multiple choice just use the not correct steps for the wrong choices and the correct steps for the right choice; make sure you disallow cancellation when you set the choices.) If it's not correct, jump back to your second label and have them reattempt. You can add penalty damage here if you want or just keep them in an infinite loop until they get the right answer. If it's correct, then set a new variable (we'll call it variable 2) as random with a range between 0 and whatever the maximum damage you want the player to be able to do.

    **THESE NEXT STEPS ARE GOING TO BE REPEATED A BUNCH OF TIMES**

    Create a new conditional branch when variable 2 equals 1. Play whatever battle animation you want and show text saying "you scored a hit for 1 point of damage" or something. Set your enemy health value to subtract 1. Create a third variable (variable 3) as random between 0 and however much damage you want your enemy to be able to do to the player. Create a new conditional branch for when variable 3 equals 1. Show text saying "you have taken 1 damage" or whatever. Change Actor HP command to subtract 1. Jump to label command to return to label 1. Repeat for every possible value for variable 3.

    Repeat for every possible value for variable 2.