Main Menu
  • Welcome to The RPG Maker Resource Kit.

Display enemy Element Table?

Started by shintashi, June 11, 2010, 03:10:23 AM

0 Members and 1 Guest are viewing this topic.

shintashi

is there a way to display/decrypt the enemy's element table so I can make comments on them or add them up numerically?

Like if the assignments are

fire A
ice C
thunder C
water B
...

etc.

How can I access what these values are, or possibly change them?

tSwitch

read up on RPG::Enemy.element_ranks

jftr: I found that by searching the in-program help file for 'enemy' then going to the enemy class listing.


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

shintashi

Quote from: NAMKCOR on June 11, 2010, 04:00:11 AM
read up on RPG::Enemy.element_ranks

jftr: I found that by searching the in-program help file for 'enemy' then going to the enemy class listing.

p $data_enemies[1].element_ranks

spat out some mess, so I tried this


p $data_enemies[1].element_ranks[9]
p $data_enemies[1].element_ranks[8]
p $data_enemies[1].element_ranks[10]


and got some pretty good results, like 1,3, and 3, which I presume mean A, C, and C?
In what ways can these values be changed? Like only in battle and then they reset, or is it permanent for the run time of the game until restart?



cozziekuns

Should be permanent. You could always change it back later using the same code.

shintashi

Quote from: cozziekuns on June 12, 2010, 12:48:28 AM
Should be permanent. You could always change it back later using the same code.

can I address player characters using this? or would I end up targeting their classes?

cozziekuns

Like Nam said, just do a search of "element" in the help file index and see what happens.

shintashi

Quote from: cozziekuns on June 12, 2010, 12:55:28 AM
Like Nam said, just do a search of "element" in the help file index and see what happens.

good point.

I've checked the outputs and what's in the helpfile is off by 1 point. This array uses 1-6, rather than 0-5. Something important to remember, as F should read 5 but actually reads as 6.

tSwitch

the help files are, incidentally, very helpful.
I learned a lot about RGSS just by looking things up :)

I don't know if they can be changed, I've never tried.  Give it a shot.


FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

modern algebra

They can be changed, but they will be reset the next time the game loads the data objects, generally through Scene_Title after restarting unless you or someone else codes them in to reload somewhere else. But really NAM's right, if you want to know whether you can do something, just try it. If it works, it's a lot faster than asking us, and if it doesn't, you can always ask us after and see if there's another way.