iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
 
Reply to this topicStart new topic
> Critical Skills (v1.4), Allow skills to deal critical damage.
Rating 5 V
Mithran
post Nov 15 2008, 02:17 AM
Post #1


Scripter
Group Icon


Type: Coder
Alignment: True Neutral




Critical Skills 1.4
by Mithran


Introduction
Ever wish that you could get skills to deal critical damage instead of just normal attacks? No? Well, here it is anyway.

Features
- Allows specificed skills to critical through the use of note tags
- customization section to allow or disallow certain types of skills the ability to crit by default
- allows you to set the critical rate of each skill (default value is the battler's normal crit rate)

How to Use
Insert above main and follow the instructions at the top of the script. If you also use my Skill Functions script, place it below Skill Functions

Demo
None needed.

Script
Spoiler:
CODE
#<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
#-  Mithran's Critical Skills v 1.4
#-  Last update April 16, 2009
#-  
#-  This script will allow skills to inflict critical damage
#-  
#-  Usage:  Insert the following tags in the note section of skills to modify
#-          Critical rate and ability to critical.  By default, all skills will
#-          with the box "Physical Attack" checked be able to critical.
#-          
#-  <CANCRIT> Specify to allow this skill to be able to crit
#-  <CANNOTCRIT> Specify to disallow this skill to be able to crit
#-  These options superceed all of the following.  If neither is specified, the
#-  default in the cusomization section is used.  
#-  
#-  <Setcrit #> Sets a number chance for the specified skill to crit
#-  If the number is not specificed, the chance for this skill to crit will be
#-  zero. Examples:
#-  <setcrit 50>  - 50% chance for the skill to crit  
#-  <setcrit>   - 0% chance for the skill to crit
#-  
#-  <Pluscrit #> or <Minuscrit #>
#-  Sets a number chance to be added to the battler's normal crit
#-  chance before determining the skill's chance to crit.  
#-  Examples:
#-  (Actor crit value default is 4)
#-  <pluscrit 4> - 8% chance for the skill to crit
#-  <minuscrit 2> - 2% chance for the skill to crit
#-  
#-  <Autocrit> - This skill, if able to crit, will have 100% chance to deal
#-  a critical hit.  Autocrit will ignore prevent critical option on armors.
#-  If you want a skill to automatically critical but not ignore critical
#-  protection, simply <setcrit 100>
#-
#-  <display critical type #>
#-  Sets the vocab to be displayed when the attack is critical
#-  0 - Use Ambiguous
#-  1 - Use Physical
#-  2 - Use Magical
#-  5 - Custom 1
#-  6 - Custom 2
#-  7 - Custom 3
#-  Defaults are automatically determined by my phsical/magical ambiguity
#-  script, if installed
#-  If an invalid index is set, defaults to the text used by Physical attacks
#-  
#-  <show zero dmg crit>
#-  <hide zero dmg crit>
#-  Sets whether to allow the critical to register if the attack deals zero
#-  damage (combined of mp and hp damage).  If you hide a critical, it will
#-  not register for other scripts, such as Advacned State Probability
#-  This option overrides the default set in the module.
#-  
#-  KGC Rate Damage support - Skills tagged to use rate damage will never
#-  critical, no matter what other settings are set here.
#-  
#-  Skill Functions support - Skills tagged as exact damage damage will never
#-  critical, no matter what other settings are set here.
#-  
#-  Install: Insert above Main.  If you use my Skill Functions script
#-  place it below that.
#<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

#==============================================================================#
#                           * Customization *                                  #
#==============================================================================#

$imported = {} if $imported == nil
$imported["MithranCriticalSkills"] = true

module Vocab
  CritToEnemyBase = "An excellent hit!!"
  # If a physical attack critical
  CritToActorBase = "A painful blow!!"
  # If a physical attack critical
  CritToEnemyAmbig = "An excellent hit!!"
  # If an ambiguous critical (most skills are ambigous, so recommend leaving this)
  CritToActorAmbig = "A painful blow!!"
  # If If an ambiguous critical (most skills are ambigous, so recommend leaving this)
  CritToEnemyMagic = "A devistating blast!!"
  # If magical critical
  CritToActorMagic = "An excrutiating blast!!"
  # If magical critical

  
# Custom critical text spots
# three are available.  Use the <display critical type n> tag to choose one
  CritToEnemyCustom1 = "Booom!!"
  # n = 5
  CritToActorCustom1 = "Booom!!"
  # n = 5
  CritToEnemyCustom2 = "Whaaam!!"
  # n = 6
  CritToActorCustom2 = "Whaaam!!"
  # n = 6
  CritToEnemyCustom3 = "Smaaash!!"
  # n = 7
  CritToActorCustom3 = "Smaaash!!"
  # n = 7

  
  CritToEnemyZero = "A calcualted maneuver!"
  # If zero damage is dealt and critical is still on (superceeds other options)
  CritToActorZero = "A phantasmal strike!"
  # If zero damage is dealt and critical is still on (superceeds other options)
  CritToEnemyHeal = "An excellent heal!"
  # If a heal is critical (superceeds other options)
  CritToActorHeal = "An exceptional heal!"
  # If a heal is critical (superceeds other options)


end

module Mithran
  module CriticalSkills
    SKILLS_CAN_CRIT = true
    # If true, skill can crit by default.  
    # If false, only skills specified with the <CANCRIT> tag will be able to
    # deal critical damage
    NONPHYSICAL_CAN_CRIT = true
    # If false, disallows skills that do not have the box "Physical Attack"
    # checked in the database to deal critical damage by default.
    # If true, these skills are allowed to crit.
    # This setting is overridden by adding the <CANCRIT> tag.
    MAGIC_CAN_CRIT = true
    # Uses phyiscal/magical ambiguity fix if installed.
    # When false, disallows skills defined as magic to deal critical damage
    # by default. (By default, these are skills with spi_f > 0)
    # If true, these skills are allowed to crit.
    # This setting is overridden by adding the <CANCRIT> tag.
    
    ALLOW_ZERO_DMG_CRIT = false
# If this value is false, critical will be turned off automatically when
# an attack scores zero total damage.
# This is mainly for display, but also if you use another script that increases
# other parameters due on a critical (such as Advanced State Probability)
# Recommend leaving this on false and turning the option on indiviudally for
# heavy state inflicting attacks, if you use probability
    ALLOW_HEALS = true
# If this option is false, heals will never crit.  This overrides even the CANCRIT tag.
# If it is true, heals (base damage in the database must be 0 or lower)
# will be able to critical
# 'Absorbed attacks' due to element reversal, however, will never critical
    
#==============================================================================#
#                       * End Customization *                                  #
#==============================================================================#
    # AutoCrit String Tag
    AUTOCRIT = /<(?:AUTOCRIT|auto_critical)>/i
    # Chance of this specific to critical - String Tag
    SKILL_CRIT_CHANCE = /<(?:SETCRIT|skill_crit_chance)(\s+\d+)?>/i
    # Added chance of this skill to critical - String Tag
    PLUS_CRIT_CHANCE = /<(?:PLUSCRIT|add_crit_chance)(\s+\d+)?>/i
    MINUS_CRIT_CHANCE = /<(?:MINUSCRIT|subtract_crit_chance)(\s+\d+)?>/i
    CAN_CRIT = /<(?:CANCRIT|allow_critical)>/i
    CANNOT_CRIT = /<(?:CANNOTCRIT|disallow_critical)>/i
    DISPLAY_CRIT = /<display[\s_]?(?:critical|cri|crit)[\s_]?type[\s_]?(\d+)>/i
    SHOW_ZERO_DMG = /<(hide|show)[\s_]?(?:zero|0)[\s_]?(?:dmg|damage)[\s_]?(?:critical|cri|crit)>/i

  end
end

class StrProc < Proc
  unless $@
  alias to_ss to_s
  def to_s
    return self.call
  end
  end

  def +(str)
    return self.call + str
  end
  
  def -(str)
    return self.call + str
  end
  

end

module Vocab
  
  CriticalToEnemy = StrProc.new {
  case $crilasthit
  when 0
    CritToEnemyAmbig
  when 1
    CritToEnemyBase
  when 2
    CritToEnemyMagic
  when 5
    CritToEnemyCustom1    
  when 6
    CritToEnemyCustom2
  when 7
    CritToEnemyCustom3
  when 10
    CritToEnemyZero
  when 20
    CritToEnemyHeal
  else
    CritToEnemyBase
  end
  }
  CriticalToActor = StrProc.new {
  case $crilasthit
  when 0
    CritToActorAmbig
  when 1
    CritToActorBase
  when 2
    CritToActorMagic
  when 5
    CritToActorCustom1    
  when 6
    CritToActorCustom2
  when 7
    CritToActorCustom3
  when 10
    CritToActorZero
  when 20
    CritToActorHeal
  else
    CritToActorBase
  end
  }
  
end


class RPG::UsableItem
  
  #============================================================================
  # Allows the skill critical parameters to be seen outside the instance      
  #============================================================================
  
  attr_accessor :autocrit                 # autocrit - ignores prevent critical
  attr_accessor :skill_crit_chance        # skill critical chance
  attr_accessor :plus_crit_chance         # plus critical chance
  attr_accessor :crit_override            # use skill critical modifier
  attr_accessor :display_crit_mode        # which critical message to display
  attr_accessor :show_zero_damage         # crit is turned off if zero damage

  # By default, no useable skill or item will be allowed to crit
  # Redefined by subclass RPG::Skill to allow some skills to crit
  def critical_allowed
    return false
  end

  unless method_defined?(:magical?)
  def magical?
    return spi_f > 0
  end
  end

  unless method_defined?(:ambiguous?)
  def ambiguous?
    return !(physical_attack || magical?)
  end
  end

  def display_crit_mode
    create_critical_skill_cache if @display_crit_mode == nil
    return @display_crit_mode
  end

  def create_critical_skill_cache
    @autocrit = false
    @skill_crit_chance = nil
    @crit_override = false
    @plus_crit_chance = 0
    if ambiguous?
      @display_crit_mode = 0
    elsif physical_attack
      @display_crit_mode = 1
    elsif magical?
      @display_crit_mode = 2
    else
      @display_crit_mode = 1
    end
    @allow_crit = false
    @show_zero_damage = Mithran::CriticalSkills::ALLOW_ZERO_DMG_CRIT
  end

  def critical_allowed
    create_critical_skill_cache if @allow_crit == nil
    return @allow_crit
  end
  
end

class RPG::Skill < RPG::UsableItem
  
    
  #============================================================================
  # This method does the actual creating of the skill critical
  # attributes through parsing the note file and checking for the specific tags
  #============================================================================
  
  def create_critical_skill_cache
    @autocrit = false
    @skill_crit_chance = nil
    @crit_override = false
    @plus_crit_chance = 0
    @allow_crit = Mithran::CriticalSkills::SKILLS_CAN_CRIT
    # if the attack is not physical and skills are allowed to crit by default
    
    if ambiguous?
      @display_crit_mode = 0
    elsif physical_attack
      @display_crit_mode = 1
    elsif magical?
      @display_crit_mode = 2
    else
      @display_crit_mode = 1
    end
        
    @show_zero_damage = Mithran::CriticalSkills::ALLOW_ZERO_DMG_CRIT
    
    if physical_attack == false && @allow_crit == true
      # skill will be allowed to crit if nonphysical can crit
      @allow_crit = Mithran::CriticalSkills::NONPHYSICAL_CAN_CRIT
    end
    # if the attack contains spirt_f value and is allowed to crit by default
    if magical? && @allow_crit == true
      # skill will be allowed to crit if magical skills can crit
      @allow_crit = Mithran::CriticalSkills::MAGIC_CAN_CRIT
    end
    self.note.split(/[\r\n]+/).each { |line|
      case line
      when Mithran::CriticalSkills::AUTOCRIT
        # if AutoCrit string tag is found
        @autocrit = true
      when Mithran::CriticalSkills::SKILL_CRIT_CHANCE
        # if skill crit chance tag is found, set the skill crit chance
        @skill_crit_chance = $1.to_i
      when Mithran::CriticalSkills::PLUS_CRIT_CHANCE
        # if plus crit chance tag is found, set the plus crit of this skill
        @plus_crit_chance += $1.to_i
      when Mithran::CriticalSkills::MINUS_CRIT_CHANCE
        # if plus crit chance tag is found, set the plus crit of this skill
        @plus_crit_chance -= $1.to_i
      when Mithran::CriticalSkills::CAN_CRIT
        # allow this skill to critical, overriding the default
        @allow_crit = true
      when Mithran::CriticalSkills::CANNOT_CRIT
        # disallow this skill to critical, overriding the default
        @allow_crit = false
      when Mithran::CriticalSkills::DISPLAY_CRIT
        n = $1.to_i
        if n >= 0 && n <= 7
          @display_crit_mode = n
        end
      when Mithran::CriticalSkills::SHOW_ZERO_DMG
        @show_zero_damage = ($1.downcase == "show")
      end
    }
    if $imported["RateDamage"] #KGC Rate Damage Support
      @allow_crit = false if rate_damage_max? || rate_damage?
      # rate damage skills will never critical
    end
    if defined?(Mithran::SkillFunctions)
      @allow_crit = false if @exact_damage
    end
    # if a skill critical chance is specified, override normal crit chance
    @crit_override = true unless @skill_crit_chance == nil
  end
end

class Game_Battler
  alias make_obj_damage_value_skillcrit_mithran make_obj_damage_value
  def make_obj_damage_value(user, obj)
    make_obj_damage_value_skillcrit_mithran(user, obj)
    make_obj_critical_damage_value(user, obj) if obj.critical_allowed
  end
  
  def make_obj_critical_damage_value(user, obj)
    if $imported["DamageLimit"]
      return if @pre_critical && !@critical
    end
    @critical = determine_obj_critical(user, obj) unless @pre_critical != nil
    @critical = true if @pre_critical
    if @hp_damage < 0 && obj.base_damage >= 0
      @critical = false
    elsif @hp_damage <= 0 && @mp_damage < 0 && obj.base_damage >= 0
      @critical = false
    elsif @hp_damage <= 0 && obj.base_damage <= 0
      @critical = false if !Mithran::CriticalSkills::ALLOW_HEALS
    elsif @hp_damage <= 0 && @mp_damage < 0 && obj.base_damage <= 0
      @critical = false if !Mithran::CriticalSkills::ALLOW_HEALS
    end
    @mp_damage *= 3 if @critical
    @hp_damage *= 3 if @critical
    if @hp_damage == 0 && @mp_damage == 0
      @critical = false if !obj.show_zero_damage
    end
  end
  
  def obj_critical_probability(user, obj)
    critchance = user.cri # set base critical chance
    critchance += obj.plus_crit_chance # critical chance increased by skill
    critchance = obj.skill_crit_chance if obj.crit_override
    # critical chance is set to the skill specific value if specified
    return critchance
  end
  
  def determine_obj_critical(user, obj)
    result = (rand(100) < obj_critical_probability(user, obj)) # roll to determine critical hit
    result = false if prevent_critical # criticals prevented?
    result = true if obj.autocrit # autocrits if skill is autocrit
    return result
  end
  
end
      
class Scene_Battle
  alias display_critical_skillcrit display_critical
  def display_critical(target, obj = nil)
    $crilasthit = 1
    if obj != nil
      $crilasthit = obj.display_crit_mode
    end
    if target.hp_damage == 0 && target.mp_damage == 0
      $crilasthit = 10
    elsif (target.hp_damage <= 0 || target.mp_damage <= 0) && !obj.nil? && obj.base_damage <= 0
      $crilasthit = 20      
    end
    display_critical_skillcrit(target, obj)
  end
  
end


FAQ
Q: My skill wont crit, why not?
A: By default, skills with a spirit_f value and skills without the physical attack box checked in the database will not crit. This can be changed in the customization section or through the use of the <CANCRIT> string tag. Also check your options for allowing criticals when no damage is dealt or heal criticals and make sure they are set correctly, because they will disallow even skills with the <CANCRIT> tag.

Q: My skill never crits, no matter what I set!
A: Skills that deal negative damage (absorbed elements) will never critical. If KGC Rate Damage is installed, skills tagged as rate damage will never critical. Exact damage skills set by my Skill Functions script will never critical.

Q: My skill says critical, but the damage is way off! What gives?
A: You probably have the order wrong. This script needs to go below most scripts that modify skill damage, and absolutely must go below my Skill Functions script.

Credit and Thanks
- Mithran

Author's Notes
Please credit if used. This is my second posted script. Feedback is welcome.

This post has been edited by Mithran: Apr 19 2009, 04:30 PM


--------------------
Go to the top of the page
 
+Quote Post
   
CrimsonPride
post Feb 11 2009, 03:40 AM
Post #2



Group Icon


Type: Designer




I hope this isn't considered necroposting.

For some reason none of my skills can actually crit, even with Autocrit etc. Is this compatible with sideview systems like Tankentai?
Go to the top of the page
 
+Quote Post
   
Mr. Bubble
post Feb 11 2009, 03:57 AM
Post #3



Group Icon


Type: Undisclosed
Alignment: Unaligned




It should be working since I've been using it.


--------------------
I no longer support Tankentai.
Go to the top of the page
 
+Quote Post
   
CrimsonPride
post Feb 11 2009, 04:10 AM
Post #4



Group Icon


Type: Designer




Hmm. I've got all the options in the configuration set to "true", I have "<CANCRIT>" and "<Autocrit>" in the notes box for the skill, and it's placed below "Skill Functions" in the script editor.. I can't seem to figure out what I've messed up.
Go to the top of the page
 
+Quote Post
   
Mithran
post Feb 11 2009, 05:20 AM
Post #5


Scripter
Group Icon


Type: Coder
Alignment: True Neutral




QUOTE (CrimsonPride @ Feb 10 2009, 08:10 PM) *
Hmm. I've got all the options in the configuration set to "true", I have "<CANCRIT>" and "<Autocrit>" in the notes box for the skill, and it's placed below "Skill Functions" in the script editor.. I can't seem to figure out what I've messed up.


Skills set to 'exact damage' in Skill Functions will not crit. Healing skills (negative base damage) wont crit. If KGC_RateDamage is imported, rate damage skills wont crit either. Barring any of these issues, Im not quite sure what the problem is. If you send me a demo, I'll take a look at it, though.

Oh, one other thing. Each tag must be on a seperate line for the script to read them, such as:
CODE
<cancrit>
<autocrit>


If you did it like this:
CODE
<cancrit> <autocrit>


Only one tag will be read, the other will be ignored. Maybe thats the problem.


--------------------
Go to the top of the page
 
+Quote Post
   
CrimsonPride
post Feb 11 2009, 06:33 AM
Post #6



Group Icon


Type: Designer




QUOTE (Mithran @ Feb 11 2009, 12:20 AM) *
Skills set to 'exact damage' in Skill Functions will not crit. Healing skills (negative base damage) wont crit. If KGC_RateDamage is imported, rate damage skills wont crit either. Barring any of these issues, Im not quite sure what the problem is. If you send me a demo, I'll take a look at it, though.

Oh, one other thing. Each tag must be on a seperate line for the script to read them, such as:
CODE
<cancrit>
<autocrit>


If you did it like this:
CODE
<cancrit> <autocrit>


Only one tag will be read, the other will be ignored. Maybe thats the problem.


They're on a separate line, exact damage is not set, it's not a healing skill, and it's not a rate damage skill. Hmm. Would the arrangement of the imported scripts have something to do with it? Right now my scripts go (using a spoiler tag for length)

» Click to show Spoiler - click again to hide... «


I'm hoping this is a simple fix >.< thanks smile.gif

This post has been edited by CrimsonPride: Feb 11 2009, 06:34 AM
Go to the top of the page
 
+Quote Post
   
Mithran
post Feb 11 2009, 06:39 AM
Post #7


Scripter
Group Icon


Type: Coder
Alignment: True Neutral




QUOTE (CrimsonPride @ Feb 10 2009, 10:33 PM) *
They're on a separate line, exact damage is not set, it's not a healing skill, and it's not a rate damage skill. Hmm. Would the arrangement of the imported scripts have something to do with it? Right now my scripts go (using a spoiler tag for length)

» Click to show Spoiler - click again to hide... «


I'm hoping this is a simple fix >.< thanks smile.gif


Enelvon's resist script completely overwrites the skill damage formula. I know that the resist script should be above ANY scripts that alter skill damage in any way. Not sure about his luck script too, but you might want to kick that one up a few spots to be sure.


--------------------
Go to the top of the page
 
+Quote Post
   
CrimsonPride
post Feb 11 2009, 06:51 AM
Post #8



Group Icon


Type: Designer




It's resist/luck the entire time? I had no idea sleep.gif alright thanks a lot smile.gif its greatly appreciated.

EDIT: I moved Enelvon's scripts directly above yours and now it all works flawlessly smile.gif

This post has been edited by CrimsonPride: Feb 11 2009, 06:54 AM
Go to the top of the page
 
+Quote Post
   
Mithran
post Mar 16 2009, 01:49 PM
Post #9


Scripter
Group Icon


Type: Coder
Alignment: True Neutral




Just a few minor changes. This is not the final version, I am just preparing it for another project.

Update

v 1.2
- New Feature: Vocab changer. Change the vocab when different 'types' of attacks score a critical hit. Customize the message used for each skill. Only works on battle systems that actualy display text, of course. Should not interfere in any way with others.
- New Feature: Options to allow or disallow skills (both globally and indiviudally) skills that deal zero damage to be 'critical'. Different 'critical hit' message for zero damage hits. This will have no affect on the damage output of the skill, since it is zero anyway, but will affect the ability of the attack to inflict states (if you use my advanced state probability script).
- New Feature: Option to allow or disallow healing (globally only) skills to be 'critical'. If you want to disable the ability for a certain heal skill to be critical, you can still use the other options.
- Improvement: Now acknolwedges my "Physical Magical Ambiguity Fix" script when selecting the default skills that can/cannot critical (based on the options set), and the default message displayed when each 'type' criticals.
- Coding: Minor method rewrites for future project compability.

Modified script is in original post.


--------------------
Go to the top of the page
 
+Quote Post
   
Mithran
post Apr 2 2009, 03:51 AM
Post #10


Scripter
Group Icon


Type: Coder
Alignment: True Neutral




Just a minor update.

Update

v 1.3
Bugfix - Fixed a crashing error when using items.

Previous changes:
Spoiler:

v 1.2
- New Feature: Vocab changer. Change the vocab when different 'types' of attacks score a critical hit. Customize the message used for each skill. Only works on battle systems that actualy display text, of course. Should not interfere in any way with others.
- New Feature: Options to allow or disallow skills (both globally and indiviudally) skills that deal zero damage to be 'critical'. Different 'critical hit' message for zero damage hits. This will have no affect on the damage output of the skill, since it is zero anyway, but will affect the ability of the attack to inflict states (if you use my advanced state probability script).
- New Feature: Option to allow or disallow healing (globally only) skills to be 'critical'. If you want to disable the ability for a certain heal skill to be critical, you can still use the other options.
- Improvement: Now acknolwedges my "Physical Magical Ambiguity Fix" script when selecting the default skills that can/cannot critical (based on the options set), and the default message displayed when each 'type' criticals.
- Coding: Minor method rewrites for future project compability.


Modified script is in original post.


--------------------
Go to the top of the page
 
+Quote Post
   
Mithran
post Apr 19 2009, 04:29 PM
Post #11


Scripter
Group Icon


Type: Coder
Alignment: True Neutral




Another minor update.

Update

v 1.4
Compatability - Minor update for compatability with the newest version of Damage Limit / Critical Damage Selection.

Previous changes:
Spoiler:

v 1.3
Bugfix - Fixed a crashing error when using items.

v 1.2
- New Feature: Vocab changer. Change the vocab when different 'types' of attacks score a critical hit. Customize the message used for each skill. Only works on battle systems that actualy display text, of course. Should not interfere in any way with others.
- New Feature: Options to allow or disallow skills (both globally and indiviudally) skills that deal zero damage to be 'critical'. Different 'critical hit' message for zero damage hits. This will have no affect on the damage output of the skill, since it is zero anyway, but will affect the ability of the attack to inflict states (if you use my advanced state probability script).
- New Feature: Option to allow or disallow healing (globally only) skills to be 'critical'. If you want to disable the ability for a certain heal skill to be critical, you can still use the other options.
- Improvement: Now acknolwedges my "Physical Magical Ambiguity Fix" script when selecting the default skills that can/cannot critical (based on the options set), and the default message displayed when each 'type' criticals.
- Coding: Minor method rewrites for future project compability.


Modified script is in original post.


--------------------
Go to the top of the page
 
+Quote Post
   
MakoInfused
post Apr 24 2009, 02:14 AM
Post #12



Group Icon






Hi Mithran, first off this is a really awesome script.

I'm not sure if your too concerned with compatibility between this script and others...but I was wanting to use this script with another and was wondering if you can patch this script to work with it.

Anyways, I found a problem when using your script in conjunction with the KGC_ChangeSystemTerms. (Try it out for yourself and you'll see tongue.gif )
But basically I get this error when saving a game:

QUOTE
Script 'Scene_File' line 214: TypeError occurred.
no marshal_dump is defined for class StrProc


I just got into scripting so I'm not sure exactly what this means. I'm not sure why a system terms script would have a conflict with your script...seems a bit strange to me.

So if you can just take a look at this, it would be much appreciated.

PS: I did try to switch up the order of the two scripts and tried it out that way, but this did not remedy the situation. I don't know if that means anything to you, but I figured to mention it.


--------------------
Go to the top of the page
 
+Quote Post
   
Mithran
post Apr 24 2009, 07:37 AM
Post #13


Scripter
Group Icon


Type: Coder
Alignment: True Neutral




QUOTE (MakoInfused @ Apr 23 2009, 07:14 PM) *
Hi Mithran, first off this is a really awesome script.

I'm not sure if your too concerned with compatibility between this script and others...but I was wanting to use this script with another and was wondering if you can patch this script to work with it.

Anyways, I found a problem when using your script in conjunction with the KGC_ChangeSystemTerms. (Try it out for yourself and you'll see tongue.gif )
But basically I get this error when saving a game:

I just got into scripting so I'm not sure exactly what this means. I'm not sure why a system terms script would have a conflict with your script...seems a bit strange to me.

So if you can just take a look at this, it would be much appreciated.

PS: I did try to switch up the order of the two scripts and tried it out that way, but this did not remedy the situation. I don't know if that means anything to you, but I figured to mention it.


Well, its because I changed the system terms for CriticalToActor and CriticalToEnemy and I did it in such a way that other scripts wont be able to alter them. To fix it, you'll have to comment out the following lines in the KGC script:

lines 124 - 125
CODE
    @system_terms[57] = Vocab::CriticalToEnemy
    @system_terms[58] = Vocab::CriticalToActor


and lines 203 - 204
CODE
    Vocab::CriticalToEnemy        == @system_terms[57]
    Vocab::CriticalToActor        == @system_terms[58]

(Those two lines seem incorrect to me, so I probably have an old version of the script)
You can change critical terms through my script.


--------------------
Go to the top of the page
 
+Quote Post
   
MakoInfused
post Apr 24 2009, 11:53 PM
Post #14



Group Icon






QUOTE (Mithran @ Apr 24 2009, 08:37 AM) *
Well, its because I changed the system terms for CriticalToActor and CriticalToEnemy and I did it in such a way that other scripts wont be able to alter them. To fix it, you'll have to comment out the following lines in the KGC script:

lines 124 - 125
CODE
    @system_terms[57] = Vocab::CriticalToEnemy
    @system_terms[58] = Vocab::CriticalToActor


and lines 203 - 204
CODE
    Vocab::CriticalToEnemy        == @system_terms[57]
    Vocab::CriticalToActor        == @system_terms[58]

(Those two lines seem incorrect to me, so I probably have an old version of the script)
You can change critical terms through my script.


Ahh, ok. Worked like a charm thanks a lot!
Ya I see now what you did, I guess I wasn't paying too close attention before blink.gif. It's quite clear that you changed the system terms...lol woops. But I'm still a bit perplexed about the way in which you changed it, so that no matter what order they're in other scripts can't alter the terms. Anyways thanks again for the quick response. Keep cranking out the awesome scripts.


--------------------
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 30th July 2014 - 04:08 AM

RPGMakerVX.net is an Privacy Policy, Legal.