Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Sep 2017
M
Makt Offline OP
stranger
OP Offline
stranger
M
Joined: Sep 2017
Hey, I have been playing around with the stats in Character.txt and found that I would like to increase the "vitalityboost" of HardcoreNPC, so that tactician would be a little more challenging. Unfortunately if I do this the NPC only get the maximum HP increased, while their current HP stays at the value it was. What I end up with is basically having all NPCs on the map appear to have taken damage.

I am new to the editor and to scripting in divinity engine and I was wondering if there is a way to make a script that would heal all NPCs when I load the game. I would then save the game and remove the script.

Joined: Oct 2017
A
stranger
Offline
stranger
A
Joined: Oct 2017
Yes, if you look at the files section for this mod:

https://www.nexusmods.com/divinityoriginalsin2/mods/58/

2nd from last there is a download called vitality scaling fix that heals enemies at the start of combat.

Code:

-------------

INIT

CHARACTER:__Me

EVENTS

EVENT HealCombat
ON
OnEnteredCombat(__Me,_)
ACTIONS
IF "!c1&!c2"
CharacterIsPlayer(__Me)
CharacterIsSummon(__Me)
THEN
SetHealth(__Me,1)
ENDIF

-------------

The way it's done though is that it overrides DefaultCharacter.charScript, so the compatibility is flaky and easily broken if you have another mod which overrides that script. Although it's pretty simple to merge the code with another mod manually. I've had to do this myself because I've found 3 mods which override that file.


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