Issue with KGC_EquipExtension Script

K. i'm experiencing a conflict between KGC_EquipExtension and the default Game_Actor script. I'm talking about RPG Maker VX.

When I start my game, it brings up an error message that looks like this:

HELPSCREENIE_zps5891fdf5.png


Not sure what I'm really supposed to do about this...but this is the line of the game_actor script it calls

HELPSCREENIE2_zpsda818c1e.png


I've narrowed the issue down to the KGC_EquipExtension script because when I remove that script from my game it starts up normally...and there are no issues.

I am fairly certain I can't re-post the script randomly on here for reference...but here is the thread on vx.net I found it on:

http://www.rpgmakervx.net/index.php?showtopic=47481\

Any pointers for how to clear this up? Has someone dealt with or seen this problem before?
I have split your question into its own thread, as issues with scripts usually require a fair bit of discussion


The error is saying that $game_party is nil.


I can't really see any issues with the script. I'm not sure if it'd make a difference in this case, but are you actually starting a NEW game, or loading a SAVED game? If the latter, was the game saved prior to you adding this script? Playing a game and saving it, then adding a script, then attempting to continue the saved game, often causes problem if the script modifies any of the classes that exist in the save file (like actors or party) - which this one does. If that's the case, try starting a new game and see if the issue is still present.
Almost couldn't find this. 😛 Neither of those actually. The error comes up before the title screen does. It's strange. On the page I linked to where the script was found...someone else was having the exact same issue, it seems. Only...no one is responding to their comment. If it had gone to the title screen I would have certainly chose New Game, knowing how picky scripts can be about that. 

Do you know if there was ever a necessary patch to that default script needed on VX? Similar to a patch needed for variables, if I remember right? I can't think of why this wouldn't be working.
I don't recall any such thing, but then I never used VX, preferring XP, so chances are I wouldn't have heard of any issues anyway.


What else is in your list of imported scripts?


I just started a new VX project and added the script and it worked fine. Try disabling all your OTHER scripts, and leave this one enabled, and see if it works. If it does, start enabling the other scripts one by one, playing your game after each. The moment it breaks, state what script you've just enabled.


Rather than a problem with THIS script, it may just be an incompatibility between this and another.
I found the compatibility error...it was between KGC_EquipExtension and Prexus' Party Manager...for some reason. I'm wondering how I can work around that. For now I just got rid of the party manager...as it isn't a necessity. Thank you very much for the help, Shaz. I suppose this can be closed now? Unless you have some light you can shed on how I might look into a patch between these two scripts?\

EDIT: Now I'm gonna go to the other forums and see if that person I spoke of had the same issue...
If you now disable ALL your scripts EXCEPT the party order script, does the problem still happen?


If it does, then the issue is with the party script and has nothing to do with the equip extension script.


If it doesn't still happen - if it all works with JUST the party order script, then it's a compatibility problem. In that case, try swapping their order. While it COULD fix it, it could also introduce other problems. Or make no difference at all.
I know the party management script works flawlessly on it's own, I've used in other projects—and it's quite handy. They just seemingly don't play well together. I tried swapping their order around...and it presents the same error. Which is sad—they're both very good scripts, from what I can tell. However, I could seemingly event my own party manager if I end up needing one for the project in question... but at least now we as a community will be able to recognize this compatibility error in the future. Thanks for the help, Shaz.
So, give a link to BOTH scripts, and someone might be able to detect where the incompatibility is and give you a fix.


An incompatibility between scripts does not mean all is lost 😉
I posted a fix for this ages ago on a support thread somewhere on VX.net. Basically, the party manager sets up all actors as soon as $game_actors is first created. KGC_EquipExtension enforces having the correct equipment in the correct categories by going through all equipment on each actor when it is first setup and removing it, then placing it in the correct slots. $game_actors is created before $game_party, so $game_party does not when this is attempted and is referenced several times in the change_equip method

I can't find the original patch, but this is probably similar:

Spoiler
class Scene_Title alias create_game_objects_prexuspartyfix create_game_objects def create_game_objects create_game_objects_prexuspartyfix KGC::Commands.restore_equip end endclass Game_Actor alias restore_equip_nopartyshort restore_equip def restore_equip return unless $game_party restore_equip_nopartyshort endend
Here, I am shorting the restore_equip method when the actor is first set up, then instead running for all actors it after I am sure all game objects exist.

The party manager script is the one that does some pretty odd things, like creating all actors at startup (instead of when they first need to be accessed), storing data expected to be persistent in RPG:: objects, and dumping the contents of said RPG:: object in with the save.
Wow. Okay...I'm assuming this would go below them...but this order of the two scripts in question matter? Thank you very much...and I had no idea anyone had made a patch ages ago. I'll edit this post to state if it worked or not.

EDIT: it seems to work. Thank you both for your sheer amounts of awesome. Good day!
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.

Original thread: https://forums.rpgmakerweb.com/threads/issue-with-kgc_equipextension-script.22160/