The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: LunaticHowl on March 27, 2007, 06:20:25 AM

Title: Custom statistics and skills
Post by: LunaticHowl on March 27, 2007, 06:20:25 AM
Hey, I'm pretty new to the RPG Maker XP community, but not game design in general. ;) This seems like a really awesome community!

I was wondering if there's any way to redefine a character's attributes. I already have the calculated the formulas and have a big ol' Excel sheet that defines everything. But doing this sort of redefines a few things.

Each character has six attributes instead of four (Strength, Dexterity, Agility, Endurance, Intelligence, Resistance), and derived statistics (such as a percentage of agility and a smaller percentage of dexterity combining to become a "Evasion" stat, which is compared to the attacker's "hit" stat (derived from dex and level), to determine the percentage chance to hit).

I realize that this is likely possible using loads of variables and switches and functions, but my question is, would it be easier/possible to do it in script?

Also, how can I change a character's face portrait when certain events happen in battle? (such as when they take damage, when they attack, when the battle is over, etc)
Title: Re: Custom statistics and skills
Post by: LunaticHowl on March 31, 2007, 07:25:06 PM
Nothin'? Anybody? Maybe I posted in the wrong place.
Title: Re: Custom statistics and skills
Post by: Rune on March 31, 2007, 08:17:20 PM
No, you posted it in the right place... (I think :-\ )
You just have to be patient...
Title: Re: Custom statistics and skills
Post by: LunaticHowl on April 04, 2007, 09:34:14 AM
No luck so far, it seems.

I've been dabbling around in RPGXP's system, and it's a little overwhelming!
If anyone could set me on the right path, I'd appreciate it.
It seems I'd have to change some of the basic formulas that RPGXP uses to calculate damage in battle, but I'm not sure how to go about doing that.
Title: Re: Custom statistics and skills
Post by: Zan on April 04, 2007, 05:47:57 PM
Quote from: LunaticHowl on April 04, 2007, 09:34:14 AM
No luck so far, it seems.

I've been dabbling around in RPGXP's system, and it's a little overwhelming!
If anyone could set me on the right path, I'd appreciate it.
It seems I'd have to change some of the basic formulas that RPGXP uses to calculate damage in battle, but I'm not sure how to go about doing that.
I can give you one change.  This will make Strength factor into Attack.
In Game_Actor, search for "def base_atk"
You'll find a section that looks like this:
def base_atk
    weapon = $data_weapons[@weapon_id]
    return weapon != nil ? weapon.atk : 0
  end

To modify it, change the third line to this:

    return (weapon != nil ? weapon.atk : 0) + (0.9*base_str)
This will make it so a character's Attack is equal to 90% of their Strength, plus the Attack Power of their weapon.  If you want a different percentage, just change the 0.9 to something else, or remove it completely if you want 100% Strength.
Title: Re: Custom statistics and skills
Post by: LunaticHowl on April 05, 2007, 02:51:18 AM
This helps. I've played around in it a little more--I figured out how to add a statistic, but other than compiling a formula like I have in my Excel document I don't know how I'd get it to update correctly when they level.