Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Sep 2017
Location: UK
apprentice
OP Offline
apprentice
Joined: Sep 2017
Location: UK
So here is a rather long 1 hour tutorial (apologies) on how you can give the player the ability to manage a party by talking to NPCs

- The player can recruit companions via dialog with them.
- They can dismiss them and then remove them from the party.
- They can replace with another character again by a simple conversation.
- There are no dependencies on other mods.

There is a also a variable for Maximum party size so you can restrict the number of companions (although the player can swap out whoever they like as long as they don't over do the maximum party number)

Here is the video tutorial which starts from a complete blank level. The code is in the link below (and is commented) if you would rather cut and paste.




https://docs.larian.game/Party_Management_via_Dialog


Last edited by Scottworld; 24/10/17 08:03 PM.
Joined: Sep 2017
M
stranger
Offline
stranger
M
Joined: Sep 2017
Hi,Thanks for the video.
Is there any way to make NPCs become a "follower", instead of a "companion", just like Deluros does on The Nameless Isle?
Some kind of quests like escorting someone might just need a specific NPC joins our charming group and leaves after quest is completed.


Joined: Sep 2017
Location: UK
apprentice
OP Offline
apprentice
Joined: Sep 2017
Location: UK
I believe all you need to do is is change the 2 procedures to make the NPC a "follower" and to "unfollow" when you ask them to leave.

CharacterIsPartyFollower(_Char);
CharacterStopFollow(_Char);



// Procedure to add an NPC you are talking to the party.(as a follower)
PROC
PROC_AddPlayerToParty((CHARACTERGUID)_Char)
AND
CharacterGetDisplayName(_Char, _, _name)
AND
StringConcatenate(_name, " Has joined your party",_MsgDisplay)
THEN
DB_IsPlayer(_Char);
CharacterIsPartyFollower(_Char);
ShowNotification(_MsgDisplay);

// Procedure to remove NPC you are talking from the party as a follower
PROC
PROC_RemovePlayerFromParty((CHARACTERGUID)_Char)
AND
CharacterGetDisplayName(_Char, _, _name)
AND
StringConcatenate(_name, " Has left your party",_MsgDisplay)
THEN
NOT DB_IsPlayer(_Char);
CharacterStopFollow(_Char);
ShowNotification(_MsgDisplay);

Joined: Sep 2017
M
member
Offline
member
M
Joined: Sep 2017
If Scott allows me to add my findings smile :

For me it only worked with:

CharacterAddToPlayerCharacter(_npc,_Player);

With this _npc will follow the _Player and his portrait will be assigned and place on the right site of your _Player portrait.

Last edited by monzua; 27/10/17 05:20 PM.
Joined: Sep 2017
Location: UK
apprentice
OP Offline
apprentice
Joined: Sep 2017
Location: UK
I think he is asking on how to make a follower... not a player.
He wants them to tag along but not JOIN the party.

Last edited by Scottworld; 27/10/17 06:08 PM.
Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium

Last edited by Tinkerer; 27/10/17 08:27 PM.

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5