Hi all. I am certain this is easier than it looks for me. Meeting a companion, have no space in the party. Is there a stock script that I just cannot find? I tried my own... but they don't work. Also, something relevant even though it is irelevant to the scripting forums
. Changing the party creation size to the campaign options... if I save my campaign, and then click it again it's back to 4. Is this normal? And does the PC count for a party member? Thanks a lot.
Full Party
#1
Posté 16 mars 2014 - 08:26
#2
Posté 16 mars 2014 - 09:30
Hi,
You can change the party size at anytime using the function SetRosterNPCPartyLimit in a script. The PC is not accounted. The default is 3, PC + 3 companions.
#3
Posté 16 mars 2014 - 10:19
Ah thanks. So when in the campaign options i write 4, it means PC+4.
#4
Posté 16 mars 2014 - 10:43
I think that they are two different things.
PartyCreationSize in campaign options is relevant only if PartyCreation is set to true, e.g SoZ type party creation. In that case 4 means PC + 3.
SetRosterNPCPartyLimit fixes the current party size limit. If the player can create his own PC + 3 additional characters as in SoZ and you want to allow him to add in the party another pre-set companion recruited during the curse of the game, you have to issue a SetRosterNPCPartyLimit(4)
Note : the limit is just checked by the select party composition UI. If you add companions to party by script you have to check the limit manually using GetRosterNPCPartyLimit.
#5
Posté 16 mars 2014 - 11:13
Yes exactly. I add them via script. But if the party is PC+4 as I want it, I also need to check the campaign setting for 4. otherwise it's like the OC. But in any case. All I ask is that, if I have a full party, and I meet a new companion, which method do I use to, when I say "come with me", he says, "there is no space for me." ![]()
#6
Posté 16 mars 2014 - 12:22
Do you mean that he should answer 'there is no room' if you are already full?
Make a conditional script which call GetRosterNPCPartyLimit. Below a sample from 16 Cygni, of course it must be adapted to your needs.
#7
Posté 16 mars 2014 - 03:11
In addition the script send FALSE if the move is not allowed (a companion can't enter the party or leave it), TRUE if the move is ok.
#8
Posté 16 mars 2014 - 05:36
Said a slightly different way, you need to have a ga_ script in your companion's conversation that checks the number of current party members. One node ("There's no room") will show if the number is already at maximum, and another ("Okay, let's go!") will have the joining scripts, if the number is not yet at maximum.
#9
Posté 17 mars 2014 - 10:44
I use this script. This and others like it are in my Kings Festival campaign.
// gc_bb_party_count (string sCheck, int bPCOnly = FALSE)
// by Brendan Bellina/Kaldor Silverwand
// Feb 2010
/*
Checks the number in the party
Parameters:
string sCheck = Value to check, for example:
"<5" Less than 5
">1" Greater than 1
"=9" Equal to 9
"!0" Not equal to 0
Default value is "!0"
integer bPCOnly = Set to TRUE to count PCs only
Default value is FALSE
*/
#include "ginc_var_ops"
int StartingConditional(string sCheck, int bPCOnly = FALSE)
{
object oPC = (GetPCSpeaker()==OBJECT_INVALID?OBJECT_SELF:GetPCSpeaker());
if (sCheck == "")
sCheck = "!0";
int nPartyCount = 0;
object oPartyMember = GetFirstFactionMember(oPC, bPCOnly);
while(GetIsObjectValid(oPartyMember))
{
nPartyCount++;
oPartyMember = GetNextFactionMember(oPC, bPCOnly);
}
return (CompareInts(nPartyCount, sCheck));
}
Regards
#10
Posté 18 mars 2014 - 03:23
Kaldor, this looks good. If there is PC+4 in my campaign, and I meet someone and I actually have PC+4, he can say "You have no space for me", if I put this script with params =4, 0. Or does the PC count, in that case =5. Will test later today. Thanks.
#11
Posté 18 mars 2014 - 10:30
The PC counts because the PC is in the faction and it is looping through the faction. So if you want to know if you can have a 6th party member then you would check for <6.
Note that this includes companions and player-created party members as well, since they are all in the faction.
Regards
#12
Posté 19 mars 2014 - 02:43
It works fine. I just need to place it on both nodes.
One with <5, which tells me that there is room.
One with =5 which tells the party is full.
I don't know why this happens, but no matter what I change on the campaign editor about the party creation size has no effect in game. Is this thing only for the SoZ style parties? And if so, how does one control the party size without having to place your script on both nodes? Because as it is now, it seems like every time I add a companion he will join no matter what. That is without conditional scripted nod.
But anyway. This is another topic. The check party room worked, and it's resolved. Thank you all for the help.
#13
Posté 19 mars 2014 - 04:34
The campaign party size number in the campaign settings only affects the SoZ party creation screen, and I think also the companion management screen, but not conversations, which is why you need to use party size conditional checks. The way SoZ controlled the party size was that if you wanted to add or remove any player-created party members, you first had to dismiss all of your NPC companions, which you could then re-add after you've added as many player-created party members as you wanted, if you still had enough room in your party. That way, the combination of the two systems work together and keep your party size to the limit. I use the same method in mine.
#14
Posté 19 mars 2014 - 05:32
Also a note that the Campaign plug-in has a bug that it always reverts the party creation size to 4. So if you need to edit a campaign property and your party size is not 4 you always have to correct that.
Regards
#15
Posté 20 mars 2014 - 02:09
I have noticed that as well Kaldor.
Tchos, is all clear now. Thanks so much for the info.





Retour en haut







