weird stat reduction bug

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

weird stat reduction bug

Post by Willy Elektrix »

This is a really weird bug. I don't expect anyone to have any insight into this.

I watched Pepsi Ranger's playthrough of Void Pyramid and noticed a strange anomaly. On one map, he opens the menu and checks his stats. He walks 12 steps, uses a teleporter to go to a different map, and then checks his stats again. For some reason, one of his stats has reduced by one.

Between his stats being correct, and his stats being lower, he does not do anything that could possibly affect them. He does not fight a battle or use items. An on-step script runs, but it has nothing in it that would affect his stats.

This one instance is the only time this has ever happened in Void Pyramid (to my knowledge).

I don't expect anyone to have an answer, but I wondered if this was related related to a know bug of some sort.

I've checked and rechecked every one of the few scripts that triggers between the first and second time he checks his stats. None of them should affect the stats. Likewise, I am unable to duplicate the bug while playing the game myself.

Dare I ask...any ideas?
Last edited by Willy Elektrix on Fri Mar 11, 2016 2:42 am, edited 1 time in total.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Which stat is it? Was it higher than its maximum value? Also, looking at the game, it's not clear whether the "Dungeon Stats" are stored as global variables or as hero stats, which is it?

I think that that this is almost certainly caused by a script, quite likely one you're not even aware is running, because there's virtually nothing else that could cause it. The mechanism could be something indirect, like the "map cure" or "use item" commands. Do you use timers at all? Do scripts ever get piled up (as seen in the script debugger), suspending each other?
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

TMC wrote:Which stat is it? Was it higher than its maximum value? Also, looking at the game, it's not clear whether the "Dungeon Stats" are stored as global variables or as hero stats, which is it?

I think that that this is almost certainly caused by a script, quite likely one you're not even aware is running, because there's virtually nothing else that could cause it. The mechanism could be something indirect, like the "map cure" or "use item" commands. Do you use timers at all? Do scripts ever get piled up (as seen in the script debugger), suspending each other?
Dungeon Stats are tracked with a global variable, and they are also hero stats.

I never use "map cure" or "use item". I also never use timers. Scripts rarely get piled up. In Pepsi's case, the only script that ran any time recently was an on-step script (which has no way to affect the heroes stats), and the battle script (which can only raise the heroes stats). In any case, the battle script was clearly resolved.

This is pretty perplexing. I've looking and looked, but I'm just going to have to ignore it for now. There is not enough information to track this down, especially since I can't duplicate it.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

If they are stored in both global variables and hero stats, is it conceivable that those two could become out of sync, and then something happens to to re-sync them, causing an apparent change the value that is displayed?

The game recording feature I mentioned in the Void Pyramid thread would be ideal for working out this sort of inexplicable behaviour. After Callipygous I hope to have it silently record every game by default so that can examine the recording after the fact if you need it. But anyway, short of extra information, yes, you might be better off not spending more time on it if you're out of ideas.
Last edited by TMC on Sun Mar 13, 2016 11:11 am, edited 1 time in total.
Post Reply