Status
Not open for further replies.

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
I have the weirdest bug ever.

If I use a stat boosting item or an HP healing item in the menu on a particular character (actor #2), whoever is in position #1 looses 150HP a time.

This happens irrespective of which character is in position#1

This happens irrespective of what position actor #2 has in the party.

The loss is 150HP irrespective of how strong the HP healing item is.

It happens if I boost actor #2's stats using an item, but not if I boost by using the 'Stat Bonus' script that I have.

It does not happen if I use a healing item on actor #2 in battle; this only happens in the Menu.

In terms of game play time I am up to 11 hours and it has only recently happened.

I can't be sure of exactly when it occurred, as my previous save file is at 7:30 hours; however, I think I would have noticed it before if it had happened a while back.

I cannot even begin to guess what is causing this, so I therefore have no idea what to look for to put it right.

Does anyone have any thoughts about this?
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
Most likely, there is a script error here.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
No new scripts installed, no new configurations done, no scripts deleted, and I can use an older save file without having this problem, so there is no obvious reason to connect this with scripts.

In addition, I went back to my previous save file, played and saved again - no problem.  If it were something in the scripts it should have affected the new save file, and it hasn't.
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
And yet it happened.... Is the effect a constant 150 HP loss or is it only the first time using the item? Is there any common event called with the usage of the item?

Perhaps there is a HP boost that is temporarily lost when using an item? Or something else that made HP recalculated?

This is a weird glitch.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
it is 150HP loss constant; this is with the bog standard 200HP healing potion and the 500HP potion that have been around since the beginning of the game.  

There are no common events using healing items - or allocating permanent stat boost items either. 

And I have no HP boost anywhere, so it is not that which is being lost.  As it is 150HP every time an item is used, if I use several items to heal up actor #2 the character in position #1 will die.
 

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
The fault is most likely tied with something under item_apply.

As it is the character #1 being affected, perhaps search the script with something like "leader.hp" or "members[0].hp". And maybe "150", if the drain is constant.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
When you say "search the script" which script are you referring to?

EDIT

Did a global search and neither leader.hp nor members[0].hp are in any script I'm using.  Searching for 150 just pulls up things like colour, and x or y when drawing something; nothing at all to do with HP.
 
Last edited by a moderator:

ShadowLurk

Tanoshii~
Veteran
Joined
Feb 14, 2014
Messages
226
Reaction score
53
Primarily Uses
Then the problem might be outside the script. Or some dynamic things like a script that allows a formula eval.

You mentioned that older saves work fine. is there any event that is activated by that point?

One more thing. As you mentioned that the problem only arose in the menu, perhaps check the Scene_Item.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,728
Reaction score
15,308
First Language
English
Primarily Uses
RMMV
Can you zip up your project and load it up somewhere, then provide a link?


Are you ABSOLUTELY CERTAIN you are not using ANY custom scripts? You ONLY have RTP scripts and have never made any mods or additions? Have you changed the damage formula on any of the items that cause this? Can you show a screenshot of the items tab with one of them selected?
 

C-C-C-Cashmere (old)

Resident Weirdo
Veteran
Joined
Mar 7, 2014
Messages
832
Reaction score
341
First Language
English
Primarily Uses
It happens if I boost actor #2's stats using an item, but not if I boost by using the 'Stat Bonus' script that I have.
You do have scripts. Its possibly to do with that exact script.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
Can you zip up your project and load it up somewhere, then provide a link?

Are you ABSOLUTELY CERTAIN you are not using ANY custom scripts? You ONLY have RTP scripts and have never made any mods or additions? Have you changed the damage formula on any of the items that cause this? Can you show a screenshot of the items tab with one of them selected?
My less than clear wording - when I said that there were no new scripts added, deleted, configured, I meant between the time when the save file that works fine was made and now.  

I have picked up from that earlier save file and am playing my way towards the part of the game where whatever it is must have happened.  I am therefore playing at the moment with exactly the scripts, items, forumulae etc. which are present in the problem save file, and everything is working absolutely fine.  If it were a straightforward script issue then it should be affecting the current save file and it's not.

The items concerned don't have damage formulae; the healing items have 'Effect' 'Recover HP' and then either 200 or 500HP.  Here is a screenshot showing one of the offending stat boosts.  Absolutely vanilla flavour.

Sampleitem_zpsa5226c37.png


I have done as you suggested, and am uploading a zip file to dropbox.  With my connection this will take a while.  I'll send you a pm with the link when it's finished.

@CashmereCat

That script went in at the beginning of the project and has not been reconfigured since.  It works by giving stat bonus points at every level; these have been allocated throughout the game without a hitch.  I cannot see how it would interact with healing items in the menu.  Also it works independently of the position of the character in the party and I cannot see how it would identify only the character in position #1, as it works by actor ID, not by position.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,728
Reaction score
15,308
First Language
English
Primarily Uses
RMMV
Disable Hime's Effect Manager and the three effect scripts you've created below it, and the problem no longer happens.


Re-enabling them one by one, it appears the Thorn Mail script is the one that's doing it.


Aaydan is wearing the Thorn Tunic, which has an effect of thorn_mail 150. There's a familiar number ;) And the "problem" would likely have started shortly after you equipped the armor, which is why you haven't encountered it yet in your second game.


It seems that the script is getting mixed up with an item when used OUT of battle, and is assigning the "user" to (perhaps) be the first party member, which explains why the 150 HP hit is going to your leader.


Possibly the easiest solution, if you are CERTAIN that you ONLY want thorn mail to have an effect when in battle, would be to change this line of the script:

return if user == selfto this:
Code:
return if user == self || !$game_party.in_battle
It fixes the problem for me, but Hime may come up with a better solution. It's possible that it's targetting the leader as the user because of one of your other scripts.
Moving to Script Support
 
Last edited by a moderator:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
The feeling of relief that rushed over me when I read this was only equaled by the joy of seeing it work for myself.  Yes, I am certain that I only want it to work in battle, so your solution is perfect.

Thank you so very, very much; this has been a life-saver!  
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,728
Reaction score
15,308
First Language
English
Primarily Uses
RMMV
I wonder what would happen in battle if you chose a different actor to give a healing potion to Aaydan? I actually suspect the person who gave him the potion would then lose HP, which is not what you want to happen either.


Check that and let me know. It might be that you just want to check if the user is a friend, and stop processing if that's the case.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
Checked, and yes, you're right, the other character loses HP.  As I don't know how to check if the user is a friend, and stop processing, could you tell me what to alter?  

thanks.
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,728
Reaction score
15,308
First Language
English
Primarily Uses
RMMV
Yep, same line. Just add this to the end of what I gave you up there:

|| user.actor? == self.actor?So that says if they're on the same team, it won't do the processing. So an enemy healing an enemy (not that an enemy is going to be equipped with thorn armor) will not reduce the first one's HP, and an ally healing an ally when the second one has thorn armor will not cause the first to lose HP.
The other check I gave you, I think still needs to be in there, as I really don't know what it's doing for the 'user' when accessed from the menu.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
well, check if the user is an actor and the target is also an actor... or check if the user is an enemy and the target is also an enemy


EDIT: ninja'd
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,512
Reaction score
12,002
First Language
English
Primarily Uses
RMVXA
Okay, put it in and it works fine.  Unless you can think of another potential hitch, I think this is now solved.

My undying gratitude!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
43,728
Reaction score
15,308
First Language
English
Primarily Uses
RMMV
No, I can't think of any other potential hitches :)


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.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Welp, people are trying to quit my team because I can't code. Where's the dancing blob emoji when I need it?
My home state baseball team is going back to the World Series for the first time since 1999. I remember when they went in 1995 and won, that was like the best day of my life. (I'm a huge baseball fan and yes I'm talking about the Braves).

Forum statistics

Threads
116,054
Messages
1,095,314
Members
151,400
Latest member
cashmelo
Top