Unselecting a skill after battle

Window_BattleSkill#show is specific to skill windows within battles. You have no idea what you're talking about. If you're going to "correct" me, be right about it. Show runs every time the window is opened because the RM code requires the index to be explicitly set every time the window is used.

Your "correction" is unnecessarily bloated, pointless and inefficient. Absolute worst case, it would be necessary to alias the show method in the very unlikely event that an overwrite causes a conflict with a script that modifies a method that doesn't even belong in a public interface.

On top of that, the menu skill window uses the exact same last_skill.object method to detect it's remembered place. Your implementation breaks the menu functionality, by the way. That's because it's stored in a persistent data structure that's used for common behavior between various window objects. So, not only are you wrong about your solution being better, you actually introduced a bug that does exactly what you claim my script does when my script does no such thing.

Here's how you reproduce the bug in your "correction"

  1. Use a skill in the menu.

  2. Fight a battle.

  3. Go back to the skill menu after the battle.

  4. Note that the game forgot the skill menu position.

Now use my script, or no script at all. Suddenly, the menu skill window remembers it's position. I hope I'm being harsh enough for this to sink in, because I have zero tolerance for that kind of incompetence with code. You just told someone to forgo bug-free code in order to use your buggy version. They do not know any better. You just sabotaged someone because you don't know what you're talking about but you think you know better than someone that does.

/r/RPGMaker Thread Parent