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.

Overkill

Ok this is a pretty basic request, but i dont know how basic it would be to make.
You know how in the final fantasy games if you kill a monster by way over its hp then you get an overkill.
I was wondering in there was anyway or if someone could make a script where if you overkill you get "Overkill" message and extra exp by i dunno for example 10% of however much damadge you went over by?
 
Hm, sounds good. I'd love to have this too.

Can't you do this by simply finding the damage variable though? I use RTAB, so I probably can't use it... But I might be able to make an add-on if someone finds out how it would work.
 
This is theoretical. Going through a book... really.

To display an overkill flag, you'd have to create an overkill value in Game_Battler, like this:
Code:
  attr_accessor :overkill                 # overkill flag
Then, in Game_Battler's initialize... set it to false.
Well, you'd probably have to edit (or alias/replace) the attack_effect definition in Game_Battler 3. Your target would be on or around line 71, after a random number formula (# Dispersion) routine.

After that, compare that final value (self.damage) to the battler's health (self.hp) to get your value. If the value is... an overkill value (yer choice... percent of health... whatever)... then you turn the 'overkill' flag I mentioned to true.

Now, you have to go into Sprite_Battler, and around line 108 (#Damage), get the damage statement to accept the 'overkill' flag to show, like it does the 'critical' flag. Then turn it off with an @battler.overkill = false statement.

Now, adding an extra percentage to your exp. Dunno.

Probably have to do this in Scene_Battle.... really rough outline...

Set @overkill_total to false
If (somewhere) @battler.overkill == true... then @overkill_total = true
.....(doesn't matter if only 1 overkill or 5 overkill kills)....

If Victory... if @overkill_total == true...
...exp = exp + (exp / 10)
...@overkill_total = false (just in case)
end

Oh, and to get the 'OverKill' message to show up on the screen, you have to edit the
SPRITE MODULE itself. It has the 'Damage' statement that is invoked IN Sprite_Battler that I mentioned above. An example of the 'damage' statement can be found in the Remodeled Damage Display script... though it replaces the text displays with images.

Probable redesign would start with...
def damage(value, critical, overkill)
...so when you call damage, you'd include both the critical AND overkill flags.

Technically, you could have a "CRITICAL OVERKILL" message if both flags were true. :D

Again, this is pretty rough... and though it means actually CHANGING the system, these changes would probably work with RTAB as well... as long as no other RTAB Add-On script overwrites it.
 

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