Jump to content

Recommended Posts

This script lets you implement damage limits for database objects, which of course limits the maximum amount of damage a battler or skill can deal. You can put the damage limit tags on just about any database object (including equipments and states). There is a default damage limit for any battlers not using any damage limit tags. You can also set separate limits as well as a default limit for hp/mp regen/poison effects. Instructions are in the script.

 

Script

Version 3.3: http://www.crimson-castle.co.uk/rpgmakerscripts/DamageLimitV3-3.txt

Edited by Shadowmaster9000

Share this post


Link to post
Share on other sites

I have updated the script so you no longer have to use Tsukihime's Feature Manager in order to use the Damage Limit script. I have also added a separate damage limit for HP/MP Regen effects so you're not stuck on using the Default Damage Limit if in case you wanted to give the two of them different limits. However the notetags have changed, any database object you want to apply a damage limit to you must use the notetag below:

<damage limit: n>

Where n is the value you want the damage limit be for that object.

Edited by Shadowmaster9000

Share this post


Link to post
Share on other sites

Hi, I've discovered a strange incompatibility and was wondering if it could be fixed at all?

 

I make use of CDR's Rows script (https://ceodoremaker.wordpress.com/2013/04/26/cdr-rows/) which allows me to have a front and back row for my party. Those in the back row receive and deal half as much physical damage but magic damage is unchanged (in my setup).

 

Whether I put your damage limit script before or after the Row script, it does it's limiting before the row script does it's modification to the damage.

 

Example:

 

My character deals 20,000 raw damage with a sword in the front row, your script brings it down to my requested 9,999. Fine.

Same character deals 20,000 raw damage with a sword from the back row, your script brings it down to my requested 9,999 after which the Row script divides it by 2 to a maximum of 5,000 damage... Not what I wanted.

 

What I wanted:

Character deals 20,000 raw damage with a sword from the back row, the row script divides it by 2 to a maximum of 10,000 damage, your script further brings it down to my requested 9,999.

 

To work around this I created a "back row" state which anyone in the back row gets, it's limit is 19,998 so that if I do full damage it gets divided by 2 to 9,999 (which your script doesn't touch since it's under the maximum). This is a very hacky way of doing it especially since that means the character's spells are no longer limited to 9,999 by default and I need to add the limit to each individual spell and ability @.@.

 

I'm not entirely sure if this can be fixed on your end or if it has to be fixed on Ceodore's end, but I figure there's no harm in asking.

 

Otherwise, this is a great script, works well with all the other scripts in my catalogue.

Share this post


Link to post
Share on other sites

Admittedly I haven't tested this snippet yet, but out of curiosity try putting the snippet below under my damage limit script and see if it fixes anything:

class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Calculate Damage
  #--------------------------------------------------------------------------
  alias :make_damage_value_dmglimit :make_damage_value
  def make_damage_value(user, item)
    make_damage_value_dmglimit(user, item)
    @max_limit = user.battler_limit if user.battler_limit > 0
    @max_limit = user.battler_limit if user.battler_limit > 0 && item.damagelimit < 1
    @max_limit = item.damagelimit if item.damagelimit > 0
  end
end

If that doesn't work then I might have to make an extra patch to make CDR's Rows script work with the Damage Limit script (because I don't think I'll be able to do it the other way round sadly).

Share this post


Link to post
Share on other sites

BOOM!!! I strike back with a vengeance! I have updated this script with many more new features:

  • You can now set separate regen limits for multiple database objects (excluding skills and items) using the regen limit notetag in the instructions.
  • You can now set whether you want the highest damage limit to be used or give each database object a priority, with the database objects with the higher priority overriding the limits of database objects of lower priority regardless of whether their limit is higher or not.

You can get the newest version of this script below:

 

http://www.crimson-castle.co.uk/rpgmakerscripts/DamageLimitV3-0.txt

Edited by Shadowmaster9000

Share this post


Link to post
Share on other sites

Shadowmaster, is it possible to set everything in the game to cap at 9,999 damage? I hate to have to go through every single skill/monster to set notetags.

 

If there is through the means of your "defaultdamagelimit" section on line 88, I did set this to 9999... however I'm still critting at 25k to 27k on a skill attack... I even went so far as to change "defaultskillpriority" on line 127 to false to ensure nothing in the skills is causing the limit to overcome the 9999. I'm still not comfortable with ruby scripting, so I'm just stabbing in the dark and trying something new (helps me learn... a little). Didn't want to bother you with this, as I'm sure it's something easy and I'm just missing something or blind to something already written in the explanation portion of the script.

 

Altimos

Share this post


Link to post
Share on other sites

XD It's not a bother. If you didn't let me know, I wouldn't of realized that the default damage limit wasn't working at all because I did a stupid mistake of letting one of the other limits override the default damage limit regardless of whether it was being used or not (and when a limit is set to 0, it gets ignored when the damage is being calculated).

 

This new version should fix that problem now. I've also reduced the number of lines of code for better efficiency.

 

Version 3.1: http://www.crimson-castle.co.uk/rpgmakerscripts/DamageLimitV3-1.txt

Edited by Shadowmaster9000

Share this post


Link to post
Share on other sites

Perfect, everything that I can see and within the limited scope of knowledge that I have, it's PERFECT!!! It also works perfectly too, already tried it.

 

Now I don't have to go and update each note box for some 460 items/weapons/armor, 170 skills, and 330 monsters.

 

Thanks Shadowmaster... man if I had you're knowledge working with Ruby... the things I could do... like rule the WORLD!!!

 

Haha, anyways thanks for the quick turnaround on this, you made my day.

 

Altimos

Share this post


Link to post
Share on other sites

Script 'Damage_Limit' line 385: NameError occurred

 

undefined local variable or method 'regenlimit' for #<Game_Actor:0x6edce10>

I'm using version 3.2

 

The only fix I've found is to outright remove the conditional statement from that line. commenting out the conditional still gives the error. even replacing regenlimit with DamageLimit::DefaultRegenLimit does nothing

Edited by Ctelin Ajira

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted