Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#946635 07/08/24 07:45 PM
Joined: Aug 2024
A
stranger
OP Offline
stranger
A
Joined: Aug 2024
Hello!

I see I’m quite late to the DOS2 modding party, as the last post is from 2021, but I am trying to make a combat overhaul mod for the DE and I am very new with scripting. I have been trying to figure out myself how to do what I need, reading the larian official guides, etc., but no luck. I get syntax errors on the story editor and I don’t understand why. The fact that I need to make use of Norbyte Osiris Extensions is probably not helping either, as it just adds complexity to the problem.

I don’t even know if my parent goal should be __Start, Start or a Manually Completed Parent Goal because I don’t know if anything of what I will do needs dependency of origins or shared. I opted for the Manually Completed Parent Goal, but I don’t even know if I did that one right (at least it gives no issues when building) because I do not fully understand Larian’s example.

Anyway, the first script I need to make (and I am failing miserably in making) should check the current armor of characters after respec, when they use skills or potions and when they are resurrected. Then, they should get tags added or cleared depending on their armor quantity. This is the fragment I was trying to make work, which I put in the KB section.

Code
IF
CharacterUsedSkill(_Character,_Skill,_,_)
CharacterUsedItem(_Character,_Potion)
CharacterResurrected(_Character)
CharacterCreationFinished(_Character)
AND
NRD_CharacterGetStatInt(_Char,"CurrentArmor",_Cur)
AND
_Cur < 1
THEN
SetTag(_Character,"PARMOR_0");

The errors I get say, “Syntax error: “CharacterUsedSkill” unexpected”, “Syntax error: “CharacterUsedItem” unexpected”, “Syntax error: “CharacterResurrected” unexpected”, “Syntax error: “CharacterCreationFinished” unexpected” and rule condition syntax. When I click on the last one it marks the THEN. So, in short, everything is wrong.

Since I was not sure if I could give several conditions at once, I have also tried:

Code
IF
CharacterUsedSkill(_Character,_Skill,_,_)
AND
NRD_CharacterGetStatInt(_Char,"CurrentArmor",_Cur)
AND
_Cur < 1
THEN
SetTag(_Character,"PARMOR_0");

Then, I alternatively get this error “Syntax error: “CharacterUsedSkill” unexpected” or an error related to using NRD_CharacterGetStatInt(_Char,"CurrentArmor",_Cur)

I would appreciate any help anyone could provide. Not necessarily in correcting my code, but also in telling me of useful guides or things like that since I will need to make five more story scripts or so.

Thanks!

Joined: Aug 2024
A
stranger
OP Offline
stranger
A
Joined: Aug 2024
I solved my own issues! In case anyone with a similar problem sees this, I ended up not using a parent goal (it is recommended but not needed) and I confirm that several conditions that would require the OR operator cannot be used at once. However, what was causing most of my problems was that the editor did not recognise the calls and queries from the script extender. This gave me a massive headache, but it was really simple to solve once I figured out what was causing it: I did not have a copy of the script extender in the editor folder (steamapps\common\The Divinity Engine 2\DefEd).


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