Quet

Villager
Member
Joined
Nov 1, 2015
Messages
21
Reaction score
5
First Language
español
Hello.

Is there a way for me to search for a specific command and not an event?

I've been testing my game and found a bug which I can't seem to figure out. The main character starts as a class with Heal and another skill. However, at some point in my testing it suddenly had those skills gone and instead it had Thunder. I have no idea how that happened, so I suspect I have a leftover command somwhere and I can't find it. Is there any sort of tool or plugin for such scenarios?

Thank you
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,971
First Language
English
Primarily Uses
RMMV
Not really.

You could have changed the actor's class, or you could have had something remove those skills and add the other.

Save this into your plugins folder (any name, with a .js extension) and play with the console on (hit F8 when playing, and go to the Console tab). When a skill is learned or removed, you'll get the buzzer sound and the console will show some output. Then you'll just have to figure out what event triggered it. This might not work if it was done through a plugin.

Code:
var shaz_Game_Actor_learnSkill = Game_Actor.prototype.learnSkill;
Game_Actor.prototype.learnSkill = function(skillId) {
  shaz_Game_Actor_learnSkill.call(this, skillId);
  SoundManager.playBuzzer();
  console.log('Learned skill ' + $dataSkills[skillId].name);
}

var shaz_Game_Actor_forgetSkill = Game_Actor.prototype.forgetSkill;
Game_Actor.prototype.forgetSkill = function(skillId) {
  shaz_Game_Actor_forgetSkill.call(this, skillId);
  SoundManager.playBuzzer();
  console.log('Forgot skill ' + $dataSkills[skillId].name);
}

I haven't tested this, so if it doesn't work or you get any errors in the console, come back and post them.
 

Quet

Villager
Member
Joined
Nov 1, 2015
Messages
21
Reaction score
5
First Language
español
Thank you, I'll give it a shot. Also, I forgot to mention, there is no class with Thunder at all, there was one before but I removed it long ago, and I honestly don't remember ever making a command to remove such skills, I can't seem to reproduce the bug.... So I'm very puzzled about what happened. Even thought so far I haven't managed to reproduce it, so the concern exists that the bug is still there.
 

Shaz

Keeper of the Nuts
Global Mod
Joined
Mar 2, 2012
Messages
46,153
Reaction score
16,971
First Language
English
Primarily Uses
RMMV
You didn't just load a saved game that was made when you DID have that skill attached to a class, did you?
 

Quet

Villager
Member
Joined
Nov 1, 2015
Messages
21
Reaction score
5
First Language
español
I don't think so, since it's registered in the second save slot and I didn't used it until recently...
I'm pretty sure all assets such like actors, experience and all stats are updated even in old saves right? What you say seems to be the only explanation despite of me being sure I didn't use that save slot... I'll keep checking what happened. I appreciate the help you are providing though! Thank you very much.

Also, about the plugin you sent me, it does buzz, but it does at the title screen. So maybe is not working as intented? But in any case if the bug doesn't appear anymore (if it's even one), I suppose the plugin wont find it regardless.
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,926
Reaction score
11,873
First Language
German
Primarily Uses
RMMV
I'm pretty sure all assets such like actors, experience and all stats are updated even in old saves right?
no, that is wrong.

some things are updated because they need to be loaded again, but a lot of other things are not.
for example changes in the plugin manager are never updated in savefiles, requiring you to start a new game whenever there is a change in the plugin manager.
and some actor data will stay as well (that is why there is the initialize option on the change member command - it's there because actor data specifically is not updated unless commanded to do so.
 

Quet

Villager
Member
Joined
Nov 1, 2015
Messages
21
Reaction score
5
First Language
español
I see, so characters could retain skills even if they are changed in the database later, correct? So the character having thunder from a past class could be why it happened?
But despite of that though, I think I never used that save slot, I checked the date in which the save was created and it says yesterday, and I deleted that class long ago... Unless the creation date of the saves also updates. Even though the 1st save creation data says it has months and I use it all the time. Maybe the only way to pinpoint the issue is waiting until it happens again.
 

Andar

Regular
Regular
Joined
Mar 5, 2013
Messages
39,926
Reaction score
11,873
First Language
German
Primarily Uses
RMMV
there are a lot of things that could have happened to get that result.

for example you could have change the skill IDs. The game remembers "skill number x learned", it does not remember the skill names. If the actor had skill #17 learned at a time it was for example a healing skill, and you then reorganise the database so that skill #17 is now a poison skill, then the game will list the actor as knowing the poison skill - it cannot identify the other skill number where you moved the healing to.
or you could have used yanfly's class change plugin - that plugin even has a specific description on how to handle skills because too many users ignored the basics and ended up with every character having every skill as soon as the class change plugin was installed.
or half a dozen other ways that we can't even guess without knowing more about your project.
 

Latest Threads

Latest Profile Posts

ko dying.png
is it me or is the site just being really oof at the moment??? I'm sitting here like Ray waiting mad long for something to load lol.
Larvae.gif
They're larvae, not fightae, honest!
I've made a big emphasis on visually representing things to make the game as accessible as possible.

MP.png

Grimoires will consist of 5 - 10 pages of skills (still finalizing that max number)

Since each actor is able to take multiple actions per turn, each skill will cost 1-5 pages
This prevents more powerful skills from being uber spammed during an actors turn.
Cats are so easy. I noticed the gray one would never nap in the office while I worked, so I put a blanket on the spare chair in here and now she won't leave.
1701793108356.png
still work in progress, had not much time at the weekend^^

Forum statistics

Threads
136,774
Messages
1,269,759
Members
180,514
Latest member
Ikana
Top