Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
1. I'm trying to create a Source puddle, but nearby NPCs keep absorbing it. I cannot move them farther away. I either need them to stop absorbing the Source (preferred) or set it up so that a new puddle spawns when they absorb the first one (acceptable, even if it's a loop).

2. I cannot get a status to apply to an NPC. I need her to be tied up and unable to move until she is freed. This doesn't happen until a particular point in the story though, so it can't be part of her default scripting. (Unless I don't understand how scripts work. Which I probably don't.)

Thanks in advance. smile

Joined: Dec 2013
old hand
Offline
old hand
Joined: Dec 2013
For point #1, what if you could block the location of the source puddle until you want the players to access it (presuming this is the point since the details are a little sketchy here)? Not sure I have any other ideas than stopping the NPCs from wandering.

For point #2, how are you trying to apply the status? Sounds like you want to add some story scripting to make this work. Would need a lot more details to give you specific pointers.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
So they're related. The two NPCs that keep absorbing the Source puddle are basically torturing the one I'm trying to set a status on and she's bleeding Source. So they're not wandering; they're standing right next to her. It's possible I'm going about this entirely the wrong way. Right now I have it set up so that when the player leaves a trigger the 2 torturer NPCs teleport to their new torturing locations, the NPC getting tortured moves to where she'll be tied up, and from there I'm trying to create the puddle and set her tied up status.

I don't mind if the torturing NPCs absorb the Source, as long as more puddles up afterwards. It's mostly for decoration, so I'm open to creating a puddle that looks like Source but doesn't act like it in-game. But a constant stream of puddle-absorb-puddle-absorb will also fit the scene.

I've been using ApplyStatus() to try and apply the status because I can't find any other APIs listed in the editor that look like they would apply a status. (I was using an animation override, but then the "tied up" NPC ran away and hid when battle started.) The Wiki says something like CharacterApplyStatus(), and I've seen that in other places too, but when I try to use that the engine says it's not a real call, so I've been sticking to ApplyStatus(). I've been using the statuses listed in the wiki here.

I'm starting to wonder if maybe I don't want two instances of the tied up NPC and I should swap out which one is on stage at trigger time? Then maybe I could change the scripting on the particular character instance. I'll try that and let you know how it goes.

Still lost on the Source puddle though. Thank you for replying.

Joined: Dec 2013
old hand
Offline
old hand
Joined: Dec 2013
Ah okay. I took a look at the options and all I can think of is to either try and create a visual effect with the spark editor to manufacture a placeable object that looks like a source puddle, or to create a timer in Osiris that checks for the kind of surface present in the location where the source is supposed to be, and if there isn't one, to re-create a surface there.

So for the tied up issue, you're looking for some animations that would help create the look of someone being tied up? Is there a specific case in Origins you can use as a reference? What status were you trying to apply? Maybe post the code here that wasn't working or give the community discord a visit in the scripting section.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
ApplyStatus is the Osiris/story call, CharacterApplyStatus is the behaviour script call.

I have added the documentation for ApplyStatus. My guess is that you are calling ApplyStatus without _Force = 1, in which case the armour of the NPC may block the status. It doesn't help that the autocompletion/parameter help of the story editor only shows the definition of one of the overloads, and there is an overload for the Osiris call without the _Force parameter.

There are two main ways you can make the character stay put:
* there is already a status you can use to block a character from moving/acting: QUEST_TIEDUP.
* alternatively, if you make the character e.g. sit on a chair by making it use it, you can add "Constrain" to the "Use Actions" of that chair. If you do that, then once an NPC sits on (= CharacterUseItem) that chair, they will be stuck there until story explicitly moves them away from it, or someone teleports them away.

To prevent the NPC from absorbing the source puddles, you can use CharacterOverrideMaxSourcePoints to set that NPC's maximum source points to 0.

This answer came to you with several contributions by my very esteemed colleague Ilya.

Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
Thank you for your help and especially for adding documentation to the wiki.

CharacterOverrideMaxSourcePoints doesn't seem to work. That was one of the first things I tried before I posted on here. (But as it has been a little while, I tried again just now and it still didn't work.) I've been able to get the scene to work ~50% of the time by setting up multiple triggers to create puddles when I pass through them. Sometimes they're all absorbed when I get there, sometimes the NPCs are standing about in puddles of Source with no issues whatsoever. I might just add more triggers.

I think you're right that I want the status "QUEST_TIEDUP." I created another instance of the tied up NPC and used a script to set the "CONSTRAINED" status on her then set a tied up animation. I'm guessing the tied up status will have the animation attached? If so, this will make "untying" her less complicated.

Also, my NPC doesn't have any armor, so I'm less sure than you that the lack of a _Force parameter was the issue there, but I really don't feel like messing with my code that much to test it out right now.

Thanks again!

Joined: Nov 2017
I
apprentice
OP Offline
apprentice
I
Joined: Nov 2017
FYI, the "QUEST_TIEDUP" status does not seem to have the tied up animation linked to it and that still needs to be activated separately.

Joined: Nov 2017
L
member
Offline
member
L
Joined: Nov 2017
Hi!

You're right, QUEST_TIEDUP doesn't have an animation attached to it.

Now, for the absorption of your Source puddles, perhaps it will help to examine your Osiris log (if you don't know what that is, it's in your steamapps\common\The Divinity Engine 2 folder). It strikes me as odd that they'd absorb the Source puddles if you've overridden their Source Point maximum to be zero.

There should be an event
>>> event CharacterStatusApplied((CHARACTERGUID)<Character who absorbed the Surface>, "SOURCE_SURFACE", NULL_00000000-0000-0000-0000-000000000000)
in there.
Can you verify that this happens after, and not before, the moment when you override that character's Source Points? It may be a matter of simply having to do the Source Point max change earlier.


If the status you were originally trying to set was CONSTRAINED, the reason that doesn't work was because that status requires an item to which you are constrained, the same as SITTING or LYING.

Last edited by LarIlya; 29/11/17 11:23 AM.

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