Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Page 1 of 2 1 2
Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
I wrote a Henchmen script to hire and remove characters into your party (up to two extra Henchmen with this script - did you know the game supports parties of 5+? It does!)

THIS ASSUMES YOU HAVE GOOD WORKING KNOWLEDGE OF THE DIALOGUE EDITOR

WHAT YOU'LL NEED:
Unpack main and move the following folders to their corresponding spots in your mod:
Public/Main/Stats --> Public/YourMod/Stats (copy entire folder)
Mods/Main/Character Creation --> Mods/YourMod/Character Creation (Copy entire Folder)

STEPS TO USE:

1.)
Set up a global NPC, change his name on the character editor to be something you can remember, and modify the following sidebar fields to your liking. Set the Level Override to what level you want the Henchman to start out at.

1.1)
Equipment (Drop Down): (Try typing in "Hench" and it should auto complete to some possible choices to get you started)

1.2)
Stats: Same as Equipment

1.3)
Skill Set: Use one of the following:
Class_Fighter
Class_Knight
Class_Ranger
Class_Cleric
Class_Witch
Class_Rogue
Class_Wizard
Class_Enchanter
Class_Battlemage
Class_Wayfarer
Class_Shadowblade
Henchman_Jahan
Henchman_Madoc
Henchman_Bairdotr
Henchman_Wolgraff

2.)
Put an EVENT TRIGGER at your characters location, name the trigger CharacterNameLocation and make it global. (example: PhilLocation)


3.)
Remember what you named your character in the CHARACTERS tool? Paste this script in, do a CONTROL-F (Find) and Find & Replace all "Ludo" with your character name.

4.)
Make your characters Dialogue :

4.1)
In the dialogue option where you hire / accept the henchman put the following action:

ACTION SetFlag("CharacterNameHired",1)
ACTION SetFlag("CharacterNameDismissed",0)

//Make CharacterName the name of your character. If you named your Character Phil, it should be PhilHired.

4.2)
In the Dialogue options where you Dismiss the character (if you want that option) put the following actions:

ACTION SetFlag("CharacterNameDismissed",1)
ACTION SetFlag("CharacterNameHired",0)

//Same thing with those character names. Change them to your own.

5.)
Open TranslatedStringKey-

Make a new key that is called NoRoom. Make the content something like "Your Party is full, there's no room for me!" without the quotes.


SCRIPT BELOW:

Quote



//Check party is not full first, then take player into party
IF
GlobalEventSet("LudoHired")
AND NOT
CharacterGetVarInteger(CHARACTER_Player1, "members", 2)
THEN
CharacterMakeCompanion(CHARACTER_Ludo,CHARACTER_Player1);
CharacterSetEvent(CHARACTER_Ludo,"Hired");
CharacterSetCanFight(CHARACTER_Ludo,1);
CharacterSetOnStage(CHARACTER_Ludo,1);


//If party is full, reset hired flag and play a message
IF
GlobalEventSet("LudoHired")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 2)
THEN
CharacterDisplayText(CHARACTER_Ludo,"NoRoom");
GlobalClearEvent("LudoHired");

//If one person is in the party at time of hire, set the variable to 2
IF
GlobalEventSet("LudoHired")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 1)
THEN
CharacterSetVarInteger(CHARACTER_Player1, "members", 2);

//If nobody is in the party at time of hire, set variable to 1
IF
GlobalEventSet("LudoHired")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 0)
THEN
CharacterSetVarInteger(CHARACTER_Player1, "members", 1);


//Dismiss character from party, start teleport timer
IF
GlobalEventSet("LudoDismissed")
THEN
CharacterDetachFromGroup(CHARACTER_Ludo);
CharacterMakeNPC(CHARACTER_Ludo);
CharacterRemoveFromParty(CHARACTER_Ludo);
//CharacterSetVarInteger(CHARACTER_Player1,"dismissal",1);
TimerLaunch("LudoLeave", 10000);

//Teleport player home
IF
TimerFinished("LudoLeave")
THEN
PlayEffectAtCharacter("FX_GP_TeleportSmoke_A",CHARACTER_Ludo);
CharacterTeleportToTrigger(CHARACTER_Ludo,TRIGGER_LudoLocation,"");

//If one person was in party, set to 0
IF
GlobalEventSet("LudoDismissed")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 1)
THEN
CharacterSetVarInteger(CHARACTER_Player1, "members", 0);

//If two people were in party, set to 1
IF
GlobalEventSet("LudoDismissed")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 2)
THEN
CharacterSetVarInteger(CHARACTER_Player1, "members", 1);



If you have issues let me know. This script assumes you named your player characters Player1 and Player2 on the CHARACTER editor.

Last edited by Burgee; 15/11/14 05:21 AM.
Joined: Oct 2014
Location: Hogwarts
member
Offline
member
Joined: Oct 2014
Location: Hogwarts
I recommend adding all your tutorials to the Divinity Wiki page below so they don't get lost in all the forum posts >_<

http://www.divinityengine.net/index.php?title=List_of_tutorials

Joined: Nov 2014
S
stranger
Offline
stranger
S
Joined: Nov 2014
Is there a way to use this so that all 4 companions can join you? (ie party of 6?) so you can have:
Jahan
Madoc
Bairdotr
Wolgraff

all in your party at the same time? That would be cool (like BG I&II lol) If so, would you mind making a mod to do this?

Joined: Oct 2014
Location: Hogwarts
member
Offline
member
Joined: Oct 2014
Location: Hogwarts
"3.Remember what you named your character in the CHARACTERS tool? Paste this script in, do a CONTROL-F (Find) and Find & Replace all "Ludo" with your character name."
Where should I paste the ludo script?

"5.)Open TranslatedStringKey- Make a new key that is called NoRoom." What does the TranslatedStringKey refer to and how do I open it?

Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
Originally Posted by JecklynHyde
"3.Remember what you named your character in the CHARACTERS tool? Paste this script in, do a CONTROL-F (Find) and Find & Replace all "Ludo" with your character name."
Where should I paste the ludo script?

"5.)Open TranslatedStringKey- Make a new key that is called NoRoom." What does the TranslatedStringKey refer to and how do I open it?


1.) You can paste it anywhere, make a new script or put it right below the Global Dialogue script for your character in the same file, doesn't matter.

2.)TranslatedStringKey is right next to the Keyword editor at the top of the screen.


Last edited by Burgee; 20/11/14 01:52 AM.
Joined: Nov 2014
S
stranger
Offline
stranger
S
Joined: Nov 2014
Originally Posted by ShadowTek
Is there a way to use this so that all 4 companions can join you? (ie party of 6?) so you can have:
Jahan
Madoc
Bairdotr
Wolgraff

all in your party at the same time? That would be cool (like BG I&II lol) If so, would you mind making a mod to do this?


So that's a no I take it? As in its not possible?

Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
Originally Posted by ShadowTek
Originally Posted by ShadowTek
Is there a way to use this so that all 4 companions can join you? (ie party of 6?) so you can have:
Jahan
Madoc
Bairdotr
Wolgraff

all in your party at the same time? That would be cool (like BG I&II lol) If so, would you mind making a mod to do this?


So that's a no I take it? As in its not possible?


Script is modifiable to do it in a custom module, but changing the main game would be harder. This isn't the script they use, theirs is different.


Joined: Nov 2014
S
stranger
Offline
stranger
S
Joined: Nov 2014
Ok thanks, can you point me to the site that has such a mod please?

Thanks for your time smile

Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
I don't know of any mods that change the main game's party restrictions. Modding the main game isn't really my thing though so I've never looked.

Joined: Oct 2014
Location: Hogwarts
member
Offline
member
Joined: Oct 2014
Location: Hogwarts
I've been fiddling with the henchman script but can't get it to work. Do I need to change something in the NPC's sidebar "Scripts" section? I tried changing it from DefaultCharacter to Henchman but that didn't help.


Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
What is the issue you're running into?

Joined: Oct 2014
Location: Hogwarts
member
Offline
member
Joined: Oct 2014
Location: Hogwarts
I followed all your steps and rechecked them. There were only two parts I wasn't sure about:

Step 4.1 I attached the whole [ACTION SetFlag("SusieHired",1)] script to the player response action bar if the player chooses to say "Let's join forces!" Was I supposed to attach the action script to the henchman's response action bar, under "Lead the way", instead?

Step 5. I have no idea what TranslatedStringKey is, but I opened the tab, clicked File, clicked New, entered NoRoom in the space, clicked Ok, added "Your party is full. There's no room for me!" under content, added "NoRoom" under Key, then saved.

The dialogue works fine but when I finish asking the character to join me he continues to stand there doing nothing. ouch

Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
I'll do a video to accompany the script tonight or tomorrow to clear things up.

Joined: Oct 2014
Location: Hogwarts
member
Offline
member
Joined: Oct 2014
Location: Hogwarts
Okay I got the henchman working today, but now he won't leave the party. I recall seeing a resetcompanion script in some document I was reading, but can't find it. Can anyone tell me how to reset the henchman so he goes back where he's supposed to when I restart the module?

Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
Step 4.2 covers that.

The functionality is built into the script already.

Last edited by Burgee; 10/12/14 12:15 AM.
Joined: Oct 2014
Location: Hogwarts
member
Offline
member
Joined: Oct 2014
Location: Hogwarts
Okay, so there's no way to have the henchman automatically reset when the entire module resets? I only ask because I closed the module, not thinking about it, and then reopened it and nearly had a heartattack upon discovering that the henchman was missing, whereas everything else in the game reset as usual. I found him standing with the players though.

Also, do you have any idea why my henchman's armor disappears when he joins the party?
He still has his boots and gauntlets but he's wearing boxers and sometimes his torso disappears.

Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
If you close and re-open the module in the editor the henchman should reset. The editor doesn't save progress like that.

Not sure what would cause his armor to vanish or him to reset his look, that doesn't happen on my end and I'm using this scriptt

Joined: Oct 2014
Location: Hogwarts
member
Offline
member
Joined: Oct 2014
Location: Hogwarts
Hey Burgee, where did you find the "FX_GP_TeleportSmoke_A" file? I searched the Divinity Original Sin folder but couldn't find the folder containing effects. I'd like to add a different effect but I don't know any of the names.

Also, on an unrelated note, is it possible to have 4 followers?

Joined: Oct 2014
B
Burgee Offline OP
enthusiast
OP Offline
enthusiast
B
Joined: Oct 2014
Under the resource manager is where you can find a list of effects.

Yes, you can have 4 followers. I didn't test it for bugs but I have had 6 members in my party before.

Comment out or remove the following sections to test it:

//If party is full, reset hired flag and play a message
IF
GlobalEventSet("LudoHired")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 2)
THEN
CharacterDisplayText(CHARACTER_Ludo,"NoRoom");
GlobalClearEvent("LudoHired");

//If one person is in the party at time of hire, set the variable to 2
IF
GlobalEventSet("LudoHired")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 1)
THEN
CharacterSetVarInteger(CHARACTER_Player1, "members", 2);

//If nobody is in the party at time of hire, set variable to 1
IF
GlobalEventSet("LudoHired")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 0)
THEN
CharacterSetVarInteger(CHARACTER_Player1, "members", 1);



and

//If one person was in party, set to 0
IF
GlobalEventSet("LudoDismissed")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 1)
THEN
CharacterSetVarInteger(CHARACTER_Player1, "members", 0);

//If two people were in party, set to 1
IF
GlobalEventSet("LudoDismissed")
AND
CharacterGetVarInteger(CHARACTER_Player1, "members", 2)
THEN
CharacterSetVarInteger(CHARACTER_Player1, "members", 1);

Last edited by Burgee; 31/12/14 01:26 AM.
Joined: Oct 2014
Location: Hogwarts
member
Offline
member
Joined: Oct 2014
Location: Hogwarts
Where's the resource manager?

Page 1 of 2 1 2

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