So I was modifying jeg’s training module to implement the SoZ party Editor in it.
The idea was to call it from using a placeable, just like in the SoZ campaign.
So I made a new campaign just for jeg’s training module, set the options to allow party creation (max size 4), and made the placeable that calls the party editor GUI.
Too bad there’s a big problem, when the UI is called the party limit is someway reduced to 0, and I can’t add any character to party. In fact, not even the main character is recognized in the list.
What could be going wrong now? I took a look at various scripts inside the SoZ campaign itself and there seems to be nothing wrong. Any help would be appreciated.
Don’t forget you also need the function in your module on load:-
SetRosterNPCPartyLimit(6);
I have this in mine to limit to six in party. NB: I also have four in the campaign set, but that is to do with the number of “real” players PCs possible and you need this party size limiter too - which allows companions as well. (Henchmen do not count.)
I would say check out my module for a working example, but it’s not yet currently available - unless you really need it.
Here is my own comment beside it:
// SET PARTY “CREATION” SIZE INSIDE CAMPAIGN EDITOR (MUST DO SEPERATE CHECK WITH GetRosterNPCPartyLimit)
// ASSUMES 1 PLAYER PLUS 5 COMPANIONS/CREATED PCS. IF THERE ARE 2 PLAYERS, THEN ONLY 4 OF THESE 6 CAN BE ADDED, ETC.
// I.E. FOR EVERY ADDED PLAYER, THE NUMBER OF COMPS/CREATED PCS THAT CAN BE ADDED DROPS BY 1.
// THIS IS A RESTRICTION I HAVE ADDED IN ALB_COMP_ADD SCRIPT AS OPPOSED TO ROSTER LIMIT SET HERE.
// HERE I USE THIS FIGURE TO SET PARTY SIZE MORE THAN ACTUAL ROSTER LIMITS AS IT INCLUDES PLAYERS MAIN PCS IN MY CHECKS.
// I DONT KNOW WHAT WOULD HAPPEN IF MORE THAN SIX PLAYERS JOINED IN THE GAME - DONT HAVE ENOUGH COMPUTERS TO CHECK.
Here’s the check I make in that script mentioned above:-
////////////////////////////////////////////////////////////////////////////////
// DETERMINE IF MAXIMUM PARTY LIMIT REACHED (MAXIMUM PARTY SIZE IS SIX)
////////////////////////////////////////////////////////////////////////////////
if(PartyNumber(oPC) >= GetRosterNPCPartyLimit())
{
SetNoticeText(oPC, "<<< PARTY ALREADY AT MAXIMUM SIZE >>>");
SendMessageToPC(oPC, CRED + "<i>Dismiss a current party member before adding new members.</i>");
DeleteLocalInt(OBJECT_SELF, "GIVEGOLD"); // ALLOWS ASKING AGAIN
return;
}
SetRosterNPCPartyLimit is not fixing it (I was calling it already, but with 4 instead of 6, that said I changed it to 6 and it still doesnt fix the problem), and besides, it’s set to 3 by default regardless of its call, so even in that case, I would at least see 3 slots in the party generation, but it’s just not what is being called by the GUI to allow those character slots to be available at all.
I know that the Setroster NPC party limit is triggering, because I can see the number changed from 4 to 6 in the Party Roster submenu.
OK. Looking at the way the GUI is presenting itself, my “guess” would have been that the XML was not quite right in some way. Even a possible supporting XML like fontsize or family types.
That said, if all is good, and the campaign have saved correctly, and you have nothing but this basic script to fire on the placeable, then I would need to check your code more directly by the looks of it -
One other thought … try keeping the campaign name simple … Just try “TEST” as a new campaign. I have a vague recollection I hit a similar problem when I tried renaming my campaign once.
Actually, I notice you DO have some edited XMLs that may be interfering with the party GUI. Remove all other XML supporting files and retry. You may find that one of the other XMLs has altered a default font size and it no longer fits the GUI you are trying to use. I had that happen to me once (but in a different GUI)!
No, the other xml is not interfering, I can tell now because I fixed it.
The problem was that I forgot to click the “Set module to be used by campaign” button in the campaign editor. -__-’
So it was not saved properly at all.
Now it works, and it works even without the SetRosterNPClimit function.
I have a problem with this thing of importing characters.
Once imported they belong to an indefinite neutral faction.
Let me explain: I add a new character through the roster book and this is neutral towards the creatures belonging to the hostile base faction. Despite being part of the main character’s party!
I don’t know how to intervene on the buttons of the party creation gui, I don’t know what are the scripts that manage it.
it might be an issue, rather, in the Module/Campaign you’re playing …
A character in the PC-party goes by the PC faction. It will also have a regular faction stored in case he/she gets dismissed from the party, but that doesn’t (shouldn’t) matter as long as he/she is in the party.
So if the PC is considered hostile, so are party members. and vice versa.
The only thing I’ve seen that causes what you mention is … a module/campaign that has “UsePersonalReputation” set true. In my past experiments, that setting caused party members to stand doing nothing with their AI on while my PC was fighting 10’ away …
[after i controlled them and started their attacks they then fought the enemy]
“The only thing I’ve seen that causes what you mention is … a module/campaign that has “UsePersonalReputation” set true. In my past experiments, that setting caused party members to stand doing nothing with their AI on while my PC was fighting 10’ away …”
I have exactly this.
I’ll try to set UsePersonalReputation to false, to see what happens.
there appear to be 3 places to set UsePersonalRep …
- in the Campaign.cam file (if the module is part of a Campaign)
- on ModuleLoad (script) – there’s a ‘campaign switch’ that can set UsePersonalRep
- in the FactionTable of a module there’s a “Global” flag for each faction; which (perhaps) means the opposite of UsePersonalRep (for that faction)
but i really have no idea what does exactly what … so … yeh …