RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Changing Parameters (Not a n00b Question)

Started by Kizzy, August 09, 2010, 12:36:50 AM

0 Members and 1 Guest are viewing this topic.

Kizzy

This is not a question about how to rename parameter stats which is in the Database under System

I would like to know if it possible to completely delete certain stats from the game, namely MDEF and PDEF and add in a new parameter as defense instead of dexterity.

I don't want defense to be controlled by the equipment rating, I want it to be a character parameter that grows just like Agil/Int/Str when they level up.
  Dexterity controls hitrate as I beleive, so this is different than renaming it as "defense". I would like for defense to control defense, not the hitrate. Is this possible? Can i change what the parameters control aswell?
  I tried removing MDEF from Game_Actor but it gave me an error. Is it possible to change the game's own script or is there a script I can add in which can change the parameters?

Kizzy

I'm sure theres somebody here that knows what to do >:(

Tenraah

#2
You can change the damage formulas in your game scripts.  I'll figure it out for you if you like, but I need to know how you want your hit chance to work.  Do you want it to just be a set hitrate for all attackers?  Then agility would make some characters nearly unhittable at higher levels unless you remove that from the calculations.

In the script Game_Battler3, go to about line 50, unless you've changed stuff in there already, and replace this line:
atk = [attacker.atk - self.pdef / 2, 0].max
with this:
atk = [attacker.atk - self.dex / 2, 0].max

Then go to around line 130 and change
power -= self.pdef * skill.pdef_f / 200
power -= self.mdef * skill.mdef_f / 200

to
power -= self.dex * skill.pdef_f / 200
power -= self.dex * skill.mdef_f / 200


Then go to around line 233, change
recover_hp += self.pdef * item.pdef_f / 20
recover_hp += self.mdef * item.mdef_f / 20

to
recover_hp += self.dex * item.pdef_f / 20
recover_hp += self.dex * item.mdef_f / 20


These will change the damage calculation and make dex your main defense stat, but it won't change hitrate or remove defense from item stats.  I'll get to that in a minute...

EDIT:
Go to the script Window_EquipLeft and erase the following lines:
    draw_actor_parameter(@actor, 4, 96, 1)
    draw_actor_parameter(@actor, 4, 128, 2)
...
    if @new_pdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 96, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 96, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 128, 40, 32, "->", 1)
      self.contents.font.color = normal_color
      self.contents.draw_text(200, 128, 36, 32, @new_mdef.to_s, 2)
    end



Go to the script Window_ShopStatus, line 68
        # If weapon
        if @item.is_a?(RPG::Weapon)
          atk1 = item1 != nil ? item1.atk : 0
          atk2 = @item != nil ? @item.atk : 0
          change = atk2 - atk1
        end
        # If armor
        if @item.is_a?(RPG::Armor)
          pdef1 = item1 != nil ? item1.pdef : 0
          mdef1 = item1 != nil ? item1.mdef : 0
          pdef2 = @item != nil ? @item.pdef : 0
          mdef2 = @item != nil ? @item.mdef : 0
          change = pdef2 - pdef1 + mdef2 - mdef1
        end
        # Draw parameter change values
        self.contents.draw_text(124, 64 + 64 * i, 112, 32,
          sprintf("%+d", change), 2)

change to
        # If weapon
        if @item.is_a?(RPG::Weapon)
          atk1 = item1 != nil ? item1.atk : 0
          atk2 = @item != nil ? @item.atk : 0
          change = atk2 - atk1
          # Draw parameter change values
          self.contents.draw_text(124, 64 + 64 * i, 112, 32,
          sprintf("%+d", change), 2)
        end


Go to Window_Status, line 31 & 32.  Delete them
    draw_actor_parameter(@actor, 96, 224, 1)
    draw_actor_parameter(@actor, 96, 256, 2)


After all of that, PDEF and MDEF should no longer appear anywhere in your game menus.  However there will be a little awkward empty space in the status window for each character.
Another thing I'll add: While you're making skills or items in the database, just use PDEF-F or MDEF-F to decide how much dexterity will affect the skill.
"...because, you know, whatever."