PDA

View Full Version : custom party members


Doc Valentine
08-15-2005, 10:45 PM
How do I get rid of custom party members?

stoffe
08-15-2005, 10:50 PM
How do I get rid of custom party members?

Do you mean remove them from the party entirely? First remove them from the active party if they are there, then delete them from the party table.

This example would remove the creature occupying Atton's slot (party table slot 0) from the party:


void main() {
RemoveNPCFromPartyToBase(NPC_ATTON);
RemoveAvailableNPC(NPC_ATTON);
}

Darkkender
08-16-2005, 01:10 AM
You may also want to include a "DestroyObjectByTag" if you are removing your own custom recruit from the game entirely. That way it free's up resources for the game.

stoffe
08-16-2005, 05:45 AM
You may also want to include a "DestroyObjectByTag" if you are removing your own custom recruit from the game entirely. That way it free's up resources for the game.

Not really necessary if you use RemoveNPCFromPartyToBase() since that will remove the creature from both the active party and the area.

Ancharos
08-18-2005, 10:33 AM
Couldn't you just use This script to replace it to the original Npc?

void main()
{
AddAvailableNPCByTemplate(#, "INSERTNPCTEMPLATEHERE");
DelayCommand(1.5,ShowPartySelectionGUI());
}

Darkkender
08-20-2005, 02:38 AM
Couldn't you just use This script to replace it to the original Npc?

void main()
{
AddAvailableNPCByTemplate(#, "INSERTNPCTEMPLATEHERE");
DelayCommand(1.5,ShowPartySelectionGUI());
}

The script you mentioned does not remove a party member it simply replaces them with somebody new. If the goal is to make it appear that somebody has left your party such as what happens with Bastilla in K1 and Kreia in K2 you would use the script Stoffe posted above. I mentioned adding a DestroyObject function to the script if you plan on having that partymember dead and gone. Only because I don't believe the RemoveNPCFromPartyToBase() command does this. The reason I recommend this is more directed towards freeing up a memory pointer that will remain behind in the game save. This free's up resources within the game even though it could be considered miniscule.