Ok, so I have a system in my game where inns serve more pseudo-realistic purposes than in most video games. Instead of being fully healed from everything I want it to heal everyone's hp by 10%, mp by 20%, remove some negative states and fully restore your rest and exposure levels (basic needs and such) also inns have the option of being able to purchase hot meals, and you can switch parties at them. I didn't think this would be a problem at all, as there are options to restore stats by a % in the maker, however these options only appear in items/skills effects (for some very strange and unknown reason.)
Now I know that this effect can be achieved by variable manipulation as well, and I resolved to do this until I realized that doing so would also restore the hp/mp of members that are not currently in the party. I guess I'll still do that if it's the only way but in a game with three parties adding checking each individual actors current/max hp and mp values and restoring them only if they are in the current party while checking everything else as well gives me a headache right now, then doing it for every inn in the game, some of which have fewer or more options than others and I'm left wondering why the hell you can't just easily do these things as a % through events as well.
You can calculate that manually. Set a variable to the actor's MHP, divide it by 10 and restore HP by that variable. 🙂
I said this, for some reason it posted when I was only halfway done with the post though I think...
Then do it with variables, it's the only way. You'll have to do the extra effort.
How many actors do you have in total? You could simply check if an actor is in the party, and if yes, calculate the stuff for him. So you don't actually need to take the party constellation into consideration or anything like that. 🙂
I'm not sure if this is what you meant is giving you headaches. If that's the case, well, it doesn't sound that overwhelming to me ... I've done more tedious things in my projects, so well, I guess that's just how it goes.
Variable 1 = mhp
Variable 2 = Variable 1 / 10
Change HP Actor 1 Increase by Variable 2
Variable 1 = mmp
Variable 2 = Variable 1 / 5
Change MP Actor 1 Increase by Variable 2
(You can just overwrite these 2 variables every time, repeat for each actor)
Pretty simple lol.
You can also use only 1 variable. 🙂
The main problem is that I don't like having event pages that are twenty yards long or more that I have to recreate multiple times in the game but just different enough that I can't just copy/paste (because I can't easily edit them when they go on and on like that, I keep having to go back to the top and making sure I'm editing the right place) so when you combine accounting for 20+ actors checking who is in the party currently and checking and changing their stats only if they are in the current party while also checking for all of the other things the inn needs to check against every damn character it becomes unwieldy.
I just thought that maybe since the option to restore these things by % was already in there somewhere there would be maybe a script call or something I could use to get that feature to run in an event instead. Didn't mean to piss off anyone into self-righteously scolding me for my laziness or anything...I just don't like overly cluttered events, and this particular one is long enough without the 20+ actors all being healed by a variable, much less cluttered if It can just check for the party leader and then heal the current party based on that.
(Just one last thought, if someone states they know a way to do something but asks if there is perhaps a better way to do it, while stating that he will do it the base way regardless if necessary then maybe the comments about how to do it the way he already admitted he knows existed and talking about how easy you think that method is aren't necessary. A simple "there isn't another way to do this" would suffice I think.
Thank you Tsukihime, that works out perfectly, I thought it might exist, I was playing around with making a snippet for it...
class Game_Interpreter
def Inn_Life()
$game_party.members.each do |m|
m.hp += (m.mhp * 0.10).to_i
end
end
end
class Game_Interpreter
def Inn_Spirit()
$game_party.members.each do |m|
m.mp += (m.mmp * 0.20).to_i
end
end
end
sloppy I know but I am not a scripter by any means, anyway thank you, I sort of knew that the means had to be in there somewhere and with your method I can adjust the values at will. This can be closed now.
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.