I’ve been chasing a problem for a while with charlie’s item modifier.
When I tried it in a test area it always worked fine, but then when playing through my .mod the gui always failed to appear.
It’s been driving me crazy, but I just realized (and confirmed with some testing) that when you start a new game it works fine, but if I save, exit, and reload it fails every time.
Any one have an idea what might cause that, or where to start looking for the problem?
The launch script is triggered by a button in ‘playerpopup_menu.xml’ – i wouldn’t expect a problem there. But it should fire ‘gui_vn_mda_launch’
mine looks like this->
object oPlayerPc = OBJECT_SELF;
SendMessageToPC(GetFirstPC(FALSE), "\ngui_vn_mda_launch - " + GetName(oPlayerPc));
DisplayGuiScreen(oPlayerPc, "SCREEN_VN_ITEM_APPEARANCE_CHANGER", TRUE, "vn_item_appearance_changer.xml");
object oControlled = GetControlledCharacter(oPlayerPc);
SendMessageToPC(GetFirstPC(FALSE), ". oControlled= " + GetName(oControlled));
Try inserting some debug messages (into yours) and recompiling … first, see if the script even fires, then tinker
thanks kevL, that script is for the appearance changer (which is working fine), my problem is with the item modifier.
I checked a different test .mod that has it installed and it worked fine on reload, so it’s something in my mod. I haven’t changed any of the scripts.
Why does it happen only on module reload and not in a fresh game? I checked module properties, could it be OnModuleLoad script? OnClientEnter? OnModuleStart? OnPcLoaded?
It all goes smoothly until “launching GUI”. then nothing happens
hmm… I set all module properties scripts to default and got rid of the rest but the problem persists. there goes that theory…
unfortunately i don’t have the ItemModifier installed… but glancing at ‘gui_vn_mdp_moditem’ …
at the bottom it chats “Starting Item Modification GUI” ok
I’d start debugging by commenting out the entire body of that launch script, and simply issuing one command there: display a stock gui screen
- if a minimal launch-script that simply shows a regular gui works okay, then i’d guess the problem is in the ItemModifier’s code (ie, initialization in that script), or rather in how it relates to your module
You are right, I commented out the whole script and added a call for the player roster. It worked every time.
now I know where to look for the problem.
I wasn’t making any headway working on that script so I took another approach. I put the item modification files in my override folder and everything worked as it should. I then removed them one at a time while checking for functionality. I narrowed it down to vn_item_properties.xml.
I copied it from my .mod folder and placed it in my campaign folder and now everything works fine?
Oh well, I won’t argue with results.
perhaps the entire ItemModifier should go in Campaign (ie. keep things together) … or a subfolder of Campaign/ could work too (not sure)