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.
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:
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!