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.

Change stats influences

Etern

Member

Hey! ^_^
I currently working on a game. Duh...XD
Anyway, I was wondering whether it is possible to change the stuff the stats do. With that, I mean to have Dex be Def and influence MDEF and PDEF the same way Str influences ATK. And then have Ag do the stuff Dex is supposed to do, (Hit %)?
 
If I understand your question right, that's going to require scripting. Most of those formulas should be in the Game_Battler 3 class. You might be able to look at the formulas that are already there and figure out how to change them yourself. You might want to back up that class in case you accidentally mess things up a bit.
 
You can change a few names in the "System" part of your database, if I'm right. That will help you in some of the things you want. Not all, though. For the rest you will have to alter the formulas in the script, as the guy above me said.
 
This is fairly easy to do, just open your script editor. To change how something is defined, like PDEF, in your example, you'll need to also look in Game_Actor.
In there, scroll down to:
# * Get Basic Physical Defense
And below:
Code:
pdef5 = armor4 != nil ? armor4.pdef : 0
add in:
Code:
statboost = $data_actors[@actor_id].parameters[3, @level]
Parameters 3 is the characters base DEX. (0 is MHP, 1 is MSP, 2 is STR, 4 is AGL, 5 is INT)
Now replace:
Code:
return pdef1 + pdef2 + pdef3 + pdef4 + pdef5
with:
Code:
return pdef1 + pdef2 + pdef3 + pdef4 + pdef5 + statboost
EDIT: Or, if you want to ignore the PDEF bonuses from armour pieces, change it to just:
Code:
return statboost

You can do the same with MDEF. Just add a new definition that defines how DEX applies to MDEF, then add it to the final calculation (the return command)

As for changing what DEX does to make it AGLs job, you'll need to goto Game_Battler 3 and look at the combat algorithms. Find instances of attacker.dex , and change them to attacker.agi
 

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