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.

Character statistics explanation

When I had rm2k way back when it had an extensive help file explaining everything, but now I have bought RM XP and cant find such a file. I have figured out that you can right click and click "what's this"  but that's not good enough.  I want to know:

How does the game decide how much physical damage is dealt using Strength, Attack, and Defense attributes.  I'm trying to make weapons, armor, and monsters from scratch but I'm having a lot of trouble getting the numbers right.

does anybody have a link to a document or a thread that might have this stuff in it?  I did a bunch of searches but couldn't find anything.

The more i mess with statistics and battles the stranger it seems.  I will have a character with a 20 attack weapon and 75 strength doing 300 damage to a creature with 20 defense  points, but another character without a weapon but with 50 strength doing no damage at all.
 
I did but all the explanation text in my script editor is made up of Japaneses/unrecognized characters  like "基本ダメージを計算" which i can deal with using Google.  even then I don't have any programing knowledge outside of a computer literacy class I took in college. 
and what i see in the scrip doesn't look like the damage that is output during battle anyway, it seems like i get a lot of damage thats either 0 or 100+ and the variable seems to be the character's strength.  But when i look at the code i cant decipher how it works.  since i cant read the code very well I'm lost on what's going on.  for example.  what does " attacker.hit)" mean in the context of " hit_result = (rand(100) < attacker.hit)" I get everything leading up to attacker.hit, but attacker.hit isnt defined.
 
It's bizarre, my project is in Japanese but when i start a new project it's all in English.

Could it be because my old project was started a long time ago, like 2 years ago when i was a poor student :down:. Back then I was using the version that was mostly in Japaneses?  I know that I never payed for the program before and it never asked me to, this was the first time I have paid for it. Now everything is in English in the new projects so i guess i can just import maps and things...

I guess that's what I get.  Thanks guys, the scripts still don't make much since but the help file works well.
 
Actually, I know what this is like. I too used the PK edition a long time ago before purchasing the new version. You're gonna have to create a new project, save it, close it, close RMXP.

Use windows explorer to Copy everything from your old project ~except~ scripts.rxdata, to the new projects folder (overwriting everything). Now open the new project, and the old project simulataneously, and copy across any custom scripts you have. However, the base scripts will now be in english and you can understand them.

Hope that helps. As you know, this site doesn't support the PK version, but I don't see the need to crucify you merely because you can't transfer your stuff to the legal version.
 
Thanks, eharper, 100% fixed.

But I still have a problem with the combat statistics.  I think I'm just going to try and program a simpler combat system.  Where should i go to learn the basic commands and maybe a simple scripting tutorial? 

or if anyone knows about a script with a better combat formulas?  all i want is to be able to know how powerful monsters that i make actually are compared to the characters.
 
Check out game_battler 3, as has been said, scrolling down a tiny bit to:
Code:
  #--------------------------------------------------------------------------
  # * Applying Normal Attack Effects
  #     attacker : battler
  #--------------------------------------------------------------------------
  def attack_effect(attacker)

The normal method for damage is the rather peculiar:
Code:
      #OLDMETHOD: atk = [attacker.atk - self.pdef / 2, 0].max  
      #OLDMETHOD: self.damage = atk * (20 + attacker.str) / 20
As in, your attack and foes PDEF are compared and used to create a maximum value for damage, then your strength bonus is applied ~afterwards~

We can't really give you specifics help, because how you want to do it is totally up to you. If you want Intelligence to matter for damage, then, heck, go for it. You can even change how the game detects hits and such like.

Personally, for hit detection, I discard the base double hit detection and use:
Code:
    phyhit = (attacker.atk + attacker.dex + 10) #Accuracy + Skill + 10
    phyeva = (self.agi + self.eva + 10) #Speed + Luck + 10
    phyhitres = (phyhit - phyeva)
    #Weapons with Seeking property always hit 99% of the time.
      if attacker.element_set.include?(SEEK_ELEMENT)
        hit_result = (rand(1) < phyhitres)
      else
        hit_result = (rand(100) < phyhitres)
      end
    # If hit occurs
    if hit_result == true
My system uses ATK as a weapons Accuracy % rating.
  • So I define a non-global variable called "Phyhit", which is equal to the attackers Accuracy % plus a % bonus from skill + 10.
  • Then I define "PhyEva", which is equal to the defenders (called "Self") Speed/AGL and Luck/EVA + 10.
  • I then subtract one from the other and check if a weapon has the 'Seeking Element'.
  • If so, then the algorithim is pretty much discarded, if not, a random number between 0 and 100 is generated, and checked versus the hit %.
  • If that number is now less than "Phyhitres", the attack connects, and "Hit_result" is reported as true.

Hopefully that helps: Just look at the stuff thats already there. Read your Ruby help file you'll find you now have with the english version.

EDIT: If you want a list of aspects that you can use in the code, check out this way old topic:
http://www.rmxp.org/forums/index.php?topic=3853
 

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