Aller au contenu

Photo

Party bar reorganization trick/script


  • Veuillez vous connecter pour répondre
Aucune réponse à ce sujet

#1
manageri

manageri
  • Members
  • 394 messages
The NWN2 party bar has the very annoying habit of randomly reorganizing itself when you load the game or transit between areas. I got sick of it so I made a little script to help, and figured I'd share it in case anyone else is as annoyed by this and hasn't come up with a better solution. It simply removes the targeted NPC from your party and instantly re-adds them, meaning that character jumps to the bottom of the bar. This lets you re-arrange them any way you like. It works easiest when used from a custom feat or a client extender macro, as typing rs commands into the console is kinda tedious every time you load the game. I've tested this with the OC companions, and I have no idea whether it works with PC made ones (like a SoZ party). Here's the code, run it with the main PC possessed and target the companion you wanna move:

void main()
{
object oTarget = GetPlayerCurrentTarget(OBJECT_SELF);
string sChosenPartyMember = GetRosterNameFromObject(oTarget);

RemoveRosterMemberFromParty(sChosenPartyMember, OBJECT_SELF, FALSE);
AddRosterMemberToParty(sChosenPartyMember, OBJECT_SELF);
}