Page 1 of 1

How does bOwned work? Trying to make NPCs react to stealing

Posted: Sat Jun 22, 2013 8:21 pm
by Neveos
Wondering if anyone knows how to get NPCs to react to stolen things like in Sol's Bar. Is it tied to the conversations logistics? If so, can someone describe how I do it? Can't seem to find it in the help files. Thank you.

-edit- I don't see "bOwned" anywhere in the advanced section of the WeaponLAW

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Sat Jun 22, 2013 10:31 pm
by Neveos
The tutorial says this:

PaulDenton_BarkFutz (player messes with something in the world which has an Advanced --> bOwned property = true)

So, I make the bark, but I can't figure out how to associate the futz of taking the item. What needs to be done to the item to make this the case?

I turned bOwned to true on the Pawn, and the Pawn only played the speech (and got triggered for anger) when I threw a plant at him (which is what I thought futzing was). So how do I get him to react to the stealing of things like Sol in Sol's bar? I can't recall who in Deus Ex did that for me to reference...

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Sat Jun 22, 2013 11:38 pm
by G-Flex
Man, just search the scripts for "bOwned". Doing this myself, it seems that if an actor has bOwned set to True, then frobbing it or hitting it with a weapon sends out a Futz event from the player, and trying to open it with a lockpick/multitools sends out a Hacking event, although it seems that happens regardless in other parts of the code even if bOwned is False.

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Sun Jun 23, 2013 12:55 am
by Neveos
Yeah but bOwned only seems to be a property of pawns.

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Sun Jun 23, 2013 3:47 pm
by G-Flex
Neveos wrote:Yeah but bOwned only seems to be a property of pawns.
No? It's a property of all actors. It wouldn't make much sense to use it for pawns.

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Sun Jun 23, 2013 4:31 pm
by Neveos
G-Flex wrote:
Neveos wrote:Yeah but bOwned only seems to be a property of pawns.
No? It's a property of all actors. It wouldn't make much sense to use it for pawns.
Oh, strange, the field is not present in the Ued2 hack. I wonder what else might be missing from the hack...

Regardless. So how would it work? I suppose I set bOwned false on the NPC, bOwned true on the LAW, and create a futz_bark for the NPC which turns him violent? - He would then become violent once I pick up the LAW?

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Sun Jun 23, 2013 8:41 pm
by Neveos
Oh this sucks. It appears that the field not being present in Ued2 actually deletes the bOwned property from those items when you load it up in the editor despite changing it in Ued1. You don't even have to bring up the properties window. I'll email Veronika

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Mon Jun 24, 2013 1:29 pm
by G-Flex
Neveos wrote:
G-Flex wrote:
Neveos wrote:Yeah but bOwned only seems to be a property of pawns.
No? It's a property of all actors. It wouldn't make much sense to use it for pawns.
Oh, strange, the field is not present in the Ued2 hack. I wonder what else might be missing from the hack...

Regardless. So how would it work? I suppose I set bOwned false on the NPC, bOwned true on the LAW, and create a futz_bark for the NPC which turns him violent? - He would then become violent once I pick up the LAW?
I'm really not sure where you're getting these ideas.

It doesn't matter if bOwned is set to True for the pawn. At least, it probably shouldn't be set to True, just to make sure nothing weird happens like people reacting weirdly to you frobbing a pawn to start a conversation.

I'm not sure what you mean by "create a futz_bark for the NPC which turns him violent". Conversations don't do that.

At any rate, there's no implementation in ScriptedPawn of any code to make people mad at you as a futz response. There's a commented-out "bHateFutz" variable in their script, but it doesn't really matter. You'd have to implement the functionality yourself. It would be pretty easy if you follow the examples set by the other AI reaction callbacks.

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Mon Jun 24, 2013 11:01 pm
by Neveos
I already got it working. It's the ued2 that's the problem, atm. So the explanation was pretty simple. Futzing bOwned actors causes NPCs with their reactions to futz's on to converse. Apparently, one can't distinguish between the NPCs except by causing all other NPCs to not react to Futz. Also, I'm not sure whether the NPC will react to being futz'd by a pot being thrown at him vs grabbing the item yet

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Tue Jun 25, 2013 12:13 am
by G-Flex
Neveos wrote:Also, I'm not sure whether the NPC will react to being futz'd by a pot being thrown at him vs grabbing the item yet
Yep. If an enemy is in a state where he'll react to a futz event, and has bReactFutz set to True, then they'll respond to something being tossed at them the same way as to a futz event. The same is true of some other events, like if they're set to react to shots fired or a weapon being drawn but aren't afraid or hateful of it, or if you shoot an object with bOwned.

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Tue Jun 25, 2013 2:38 am
by Neveos
G-Flex wrote:
Neveos wrote:Also, I'm not sure whether the NPC will react to being futz'd by a pot being thrown at him vs grabbing the item yet
Yep. If an enemy is in a state where he'll react to a futz event, and has bReactFutz set to True, then they'll respond to something being tossed at them the same way as to a futz event. The same is true of some other events, like if they're set to react to shots fired or a weapon being drawn but aren't afraid or hateful of it, or if you shoot an object with bOwned.
oh very interesting. Very useful. So it will futz them to make them "react" to stuff like weapons and bodies?

So it would appear I could just have the NPC react with a normal "stunned" conversation, while checking for the object in the conversation. If the object is found in the inventory, then the NPC can react to it's being stolen. I wonder if this is how it is normally done...

Re: How does bOwned work? Trying to make NPCs react to stea

Posted: Tue Jun 25, 2013 5:43 am
by G-Flex
I'm pretty sure they won't react in that way to carcasses, actually.