GetIsRosterMember - When Should It Return FALSE?

Hi All,

Just a quick question regarding the GetIsRosterMember function call.

I thought that this returned TRUE when within a player party and FALSE if not. However, I have noticed that even if a companion is dismissed, the “GetIsRosterMember” remains TRUE.

How would the variable ever return to FALSE after first being added to the party?

Note, in my own scripts, the function RemoveRosterMember does not appear to change it to FALSE, as in …

	RemoveRosterMemberFromParty(sRosterName, oMainPC, FALSE); 	

Any ideas anyone?

I don’t think it causes any issues, but just wondered why this was the case.

Thanks in advance, Lance.

hey Lance,

in my experience, GetIsRosterMember() is bugged. It should return TRUE if an object is listed on the roster. But it returns TRUE for an object that had been on the roster but was removed.

The only accurate way, i know of, to check if a creature is on the roster is to (basically) keep its tag <25 chars and use it as the roster-label; then loop through the roster-list w/ GetFirst/NextRosterMember() …

ie. GetIsRosterMember() probably returns FALSE only if a creature has never been on the roster,

Neither does it determine if a creature is in the party, btw. here are two simple, perhaps naive ways to get if party-faction:

if (GetFactionEqual(GetFirstPC(), oCreature))
if (GetIsObjectValid(GetFactionLeader(oCreature)))
1 Like

Hi KevL,

It looks like you come to the same conclusion I did. So, thanks for confirming that.

I did have one other thought about what may be affecting the result and that is to whether the campaign setting for “only one party” is set to true, meaning the result would not be required anyway.

Too late for me to test today, but I may test later, unless you beat me to it. :grinning:

Cheers, Lance

i din’t have MP setup …

so no comfy twiddling with MP thingies

but one thing I’ve long wondered about: in Nwn1 each player-party is its own faction (iirc). But I’ve heard that in Nwn2 all players belong to one faction (the Player faction) regardless of whether they are in the same party or not … do you know if this is true?

Hi KevL,

So, I just finished testing if “one party” setting made any difference due to being MP and it made no difference to the function. i.e. It still returns TRUE when we believe it should not.

As for the Player faction, that is what all players start on, I believe. And it may be that the PvP setting has something to alter that in some way … or flag each slightly differently. However, like you, I am a bit wobbly with the campaign/mp settings. And as long as the MP works for a LAN with a single party (which mine does), then I’m happy. :slight_smile:

Thanks for confirming your understanding too.


1 Like

+1 that seems to be the ticket for nwn2

1 Like