Damascus 0 Posted March 24, 2017 I've come up with a fairly ambitious idea for an RPG I'd like to design and potentially sell, but before I can get started, I need to make sure the combat system I have in mind is doable with this program. I'm pretty much a total newbie, and have only gotten the very basics of the program down so far, so with that in mind, here we go. The combat system I have in mind. Most enemies in the game do not fight to the death; some will flee or surrender at low health. First I want to make sure the nuances of that system are doable. Secondly, I also want the player to still gain EXP if the enemy flees or submits, or even if the player flees from battle, but it won't be as much as if they had merely killed the enemy. So far I know how to prompt the enemy to flee at low health, so that's a start. So here's what I'd like to know if it's possible, and how to go about it: 1) Gaining reduced EXP if either the enemy or the player flees or surrenders 2) Player is able to pursue an enemy on the map that has fled, and they retain their HP when they fled the battle. 3) Enemies on the map that have fled and have reduced HP move at a slower speed 4) Allow for dialogue choices during a battle (ex: enemy offers to surrender; player can accept and end the battle, or refuse and continue the battle) Share this post Link to post Share on other sites
Lord Vectra 414 Posted March 24, 2017 Gaining reduced EXP if either the enemy or the player flees or surrendersMake the skill "escape." Make a common event called "Escape" and then make a state called "escape." In the "escape" STATE, go to features, when you click to add something, you should see "sp-parameter." In the list of that, you'll see EXR (experience rate). Base number is 100%; 101+% means the player gains more EXP than usual, and 99-% means they gain less. In that common event, put this:Add state "Escape" all party members Abort battle On the skill, Escape, go to effects on the right, go to the "other" tab, and then go to common event and picked the common event, escape. Player is able to pursue an enemy on the map that has fled, and they retain their HP when they fled the battle. To add on to my above answer, you'll want to make a variable that equals that of the enemy(s). This is pretty long, however. Go to control variable, go to game data, go to enemy, pick the ID, and then pick "MHP." I suggest doing all 8 enemy IDs (Max # of enemies you can have in one battle unless you use scripts). Do the exact same thing for their "HP." This requires 16 variables (8 for all ID's MHP and 8 more for HP).When the battle start again, on the event page of the troop he's fighting, it should have this:Enemy 1 MHP variable = Enemy 1 MHPEnemy 1 HP variable = Enemy 1 HPEnemy 1 MHP variable =- Enemy 1 HP VariableChange HP Enemy 1: -Enemy 1 MHP variableNote: Notice the minus sign; you have to subtract.Reset it when the enemy is officially dead Important Note: If you do this, add the green to the common event BEFORE you abort battle. There is a loop hole. If you do not purse that enemy and pursue another, that new enemy will end up having their health subtracted since the variables don't reset unless the one you were pursuing died. Enemies on the map that have fled and have reduced HP move at a slower speedThat'll be a conditional branch using the above method.Enemy 1 MHP variable =- Enemy 1 HP VariableIf enemy 1 MHP variable < 50;change speed: 1endYou'll add that AFTER battle processing. Allow for dialogue choices during a battle (ex: enemy offers to surrender; player can accept and end the battle, or refuse and continue the battle) You can have dialogue by adding text to the troop's event page. Use the "Show Choices" method to give the player the decision. If they accept, just use the abort battle command unless you want them to use the "Escape" skill which you should only do if the player can be like: "I accept" then be like "Sike! Get over here!" Share this post Link to post Share on other sites
Damascus 0 Posted March 25, 2017 (edited) Let me see if I'm doing this right. I've created the skill, common event, and state as described above.In battle I have set up in the Troop tab, I made it so when the enemy's HP drops below half, I choose "Force Action" and have it use the skill Escape.When I do that, it makes the animation like the spider is attacking the player (I have a sideview battle and animations script in). The battle is aborted after that, but the party hasn't gained any EXP.PS: I've realized there's another loophole where the player can farm EXP by continually running into the creature and fleeing. I'm considering making the EXP gained proportional to damage dealt during each battle (eg: if the player pursues the creature and immediately flees, they get no ExP), OR just making the enemy disappear if someone flees.However, I still want the player to have some way to prevent a wounded enemy from retreating; I might try to code it into the battle itself. Edited March 25, 2017 by Damascus Share this post Link to post Share on other sites
Damascus 0 Posted March 27, 2017 (edited) (K it's been three days) I was able to solve most of the problems in this thread. AND in addition, I managed to solve the loophole you mentioned about damage carrying over to other enemies if you left that one alone and pursued another one. To anyone else looking to tackle these problems, here's how I did it. These scripts serve the following purpose: --Enemies flee after dropping below a certain HP% --Enemies on the map retain their HP, allowing you to to run back into them at their current HP --Enemies that have already fled once will not flee again, and you can finish them off --You still gain partial Exp for allowing an enemy to flee (you gain full Exp both if you chase a fleeing enemy and finish it off, or if you kill it before it gets the chance to flee) --The enemy disappears if you escape a battle, whether or not they've fled once already First I made a "Reduced Exp" state, and made it with the percentage you want an enemy to grant after killing it IF it's already fled from you once. (Ex: Say an enemy normally gives 10 Exp if you kill it outright. If it flees, you still get 7 Exp, and if you chase after it to finish it off, you get the remaining 3 Exp. In this case, you would set the "Reduced Exp" state to 30%.) For each enemy type, I gave them these battle events: Condition: Enemy's HP X% or below (when you want them to flee) @>Conditional Branch: Switch [0002:Enemy Fled] == OFF ---@>Text: Enemy fled! ---@>Text: You gained Y EXP ---@>Change EXP: Entire Party, +Y ---@>Control Switches: [0002:Enemy Fled] == ON ---@>Control Variables: [0001:This Enemy's Damage] = [Enemy]'s MHP ---@>Control Variables: [0001:This Enemy's Damage] -= [Enemy]'s HP ---@>Abort Battle Else ---@>Control Switches: [0002:Enemy Fled] == OFF Condition: Turn No. 0 @>Change Enemy HP: Entire Troop, - Variable [0001:This Enemy's Damage] @>Control Variables: [0001:This Enemy's Damage] = 0 @>Conditional Branch: Switch [0002:Enemy Fled] == ON ---@>Change State: Entire Party, + [Reduced EXP] @>Control Variables: [0001:This Enemy's Damage] = [Enemy]'s MHP @>Control Variables: [0001:This Enemy's Damage] -= [Enemy]'s HP Then for the enemy event on the map, which I'll say I've named SPIDER1, I give two pages, with the only difference between them being the first page has a "chase" movement, and the second has a "flee" movement (which I'm still ironing out). The switch for the second page is Switch [0001: SPIDER1 Fled] The event reads as follows: @>Conditional Branch: Switch [0001:SPIDER1 Fled] == ON ---@>Control Switches: [0002:Enemy Fled] = ON @>Control Variables: [0001:This Enemy's Damage] = Variable [0007:SPIDER1 Damage] @>Battle Processing: Test Spider ---If Win ------@>Erase Event ---If Escape ------@>Conditional Branch: Switch [0002:Enemy Fled] == ON ---------@>Control Switches: [0001:SPIDER1 Fled] = ON ---------@>Control Variables: [0001:SPIDER1 Damage] = Variable [0001:This Enemy's Damage] ---------@>Control Variables: [0001:This Enemy's Damage] = 0 ---------@>Control Switches: [0002:Enemy Fled] = OFF ---------@>Show Balloon Icon: This event, Sweat ------Else ---------@>Control Variables: [0001:This Enemy's Damage] = 0 ---------@>Control Switches: [0002:Enemy Fled] = OFF ---------@>Erase Event Basically, each map enemy stores its own individual values for how much damage its taken, and whether or not its fled. Before each battle, it swaps its individual values with global ones for the troop events to use. After a battle, they swap back (if the enemy is still alive), and the global values reset. Edited March 27, 2017 by Damascus Share this post Link to post Share on other sites
Lord Vectra 414 Posted March 28, 2017 Sry, I actually forgot about this (muh bad). I looked through what you have there, and everything seems in place, but if the party decides to not chase, then it makes the next spider troop easier (or maybe even any troop after that one).Y'know what I mean? Share this post Link to post Share on other sites
Damascus 0 Posted March 29, 2017 I'm not sure what you mean. The way I have it currently set up is so that HP values are saved to individual events. That way if one enemy flees with reduced HP, and you decide not to chase them, the next enemy will still have full HP. Share this post Link to post Share on other sites
Lord Vectra 414 Posted March 29, 2017 Ahhhh, I see now. Share this post Link to post Share on other sites