Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
EmilyAnnCoons

[XP] Setting HP, MP, ATK, PDEF, and MDEF

Question

Ok, so, what I need is a way to be able to take a person's HP and SP and set them to an exact amount. I'm looking over the events, and the only systems let me add and subtract HP and SP, but not directly set them. Is there a way to do that with scripts or something? Also, does anyone have a way to set the ATK, PDEF, and MDEF to something specific as well? To be honest, I need a way to increase and decrease ATK, PDEF, and MDEF without modifying the item, as well as changing the animation.

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

You just want to make sure they don't gain to much HP and/or SP? I believe you can set that up in the Database, or do you mean something else since you're directly setting them in the Database (I think)?

Share this post


Link to post
Share on other sites
  • 0

I literally need to directly set their HP and SP with some kind of code. Basically, you cast a spell, and instead of adding a whole new actor to the group, it changes the battle graphic, name, and stats of the character to match the monster you summoned. As such, the summoner still gains experience, and the monster can still grow stronger (through a series of various conditional branches in the event). But I need to be able to say "Set Actor's HP to x" with x being a variable. This way, when you summon the monster, it has its own set of HP, and it isn't using the character's HP.

Share this post


Link to post
Share on other sites
  • 0

To set the HP to what you want you can do this with a call script.

$game_actors[1].hp = 100

 

You can also do Maximum HP

$game_actors[1].maxhp = 100

 

You can do much more by simply changing what is after $game_actors[1].

hp
maxhp
sp
maxsp 
level
exp
str
dex
agi
int
atk
pdef
mdef
eva

Share this post


Link to post
Share on other sites
  • 0

Awesome, SP should work the same then. How would I set that if I needed the number to be a specific variable?

 

EDIT: Never mind, figured it out lol

 

EDIT2: All the commands work except for ATK, PDEF, and MDEF...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...