(SOLVED) Trouble with making the SoZ Party Editor work

#1

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.

Screenshots:

0 Likes

#2

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. :wink:

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;
	}
0 Likes

#3

The problem may be in the campaign editor itself, so you have to use the script workaround suggested above.

0 Likes

#4

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.

0 Likes

#5

OK - Is the XML you are using the default one or was that also modified in some way?

If it is a modified version, try calling the OC version as a test.

0 Likes

#6

It’s the default one.

0 Likes

#7

Is there any way you can send a basic mod/xml code for me to test/look at my end?

i.e. Single room area with basic campaign/mod setup and bare files to start.

If it’s any help, here is my own basic call for the XML:-

DisplayGuiScreen(oMainPC, "SCREEN_PARTY_GEN", FALSE, "partygen.xml");

0 Likes

#8

Can you provide more details on how exactly you open the party creation GUI or what scripts you are using for this?

0 Likes

#9

The GUI is called from using a placeable, the script is very straightforward:

void main()
{
	object oPC = GetLastUsedBy();
	SetRosterNPCPartyLimit(6);
	DelayCommand(0.0f, DisplayGuiScreen(oPC, "SCREEN_PARTY_GEN", FALSE, "partygen.xml"));
}
0 Likes

#10

That SetRosterNPCPartyLimit(6) MUST go in the Module OnLoad. (iirc)

Also, remove the delay.

void main()
{
	object oPC = GetLastUsedBy();
	// SetRosterNPCPartyLimit(6); // PLACE IN MODULE ON LOAD
	DisplayGuiScreen(oPC, "SCREEN_PARTY_GEN", FALSE, "partygen.xml");
}

If you have everything else setup with the campaign and the XML is good then this should work fine.

0 Likes

#11

It still doesn’t work.

0 Likes

#12

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 - :slight_smile:

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)!

Found my original post from years ago: https://worldofalthea.blogspot.com/2015/09/the-scroll-beta-testing.html

image

0 Likes

#13

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.

2 Likes

#14

Hoorah! :slight_smile:

We should have gone back to basics eh. :wink:

Glad it’s sorted for you though!

1 Like

#15

You could have saved yourself some time by just downloading my Deck of Trumps item. Google is your friend.

1 Like