Aller au contenu

Photo

Sneaky, or just normal, following someone unnoticed.


  • Veuillez vous connecter pour répondre
12 réponses à ce sujet

#1
Jackson Flynn

Jackson Flynn
  • Members
  • 40 messages

OK, simple query, but maybe not so simple solution, and I figure there are probably a few different ways to do this so I thought I'd check and see who has tried this before and what sort of success they had.

I want to run a quest that involves the player following an NPC, unobserved and taking note of the other NPC's the target goes to. If observed, I'm still not sure how to play the response, it won;t be an attack, but it might send the target back home and reset for the following day...

Ideally it would be for a thieves'/scouts' guild initiation, but I'm keen on giving anyone a chance to do almost all the quests, (obviously with varying chances of success...) so clever positioning would be almost as useful as high stats.

 

Any thoughts???



#2
Loki_999

Loki_999
  • Members
  • 430 messages

Well, there is the OnPerception event, so if you add a custom OnPerception event to the NPC with a simple if GetIsPC(oPercieved) check, then you could make things hang off that.

 

However, the whole perception business in NWN2 can be a little tempramental at times.  You would have to carefully set the NPCs spot and listen skills.

 

You may also want to make additional checks like distance to the target, and i think there is a line of sight function somewhere that might help tighten up the conditions.



#3
kamal_

kamal_
  • Members
  • 5 258 messages

iirc OnPerception only fires once for the npc. What you want to do is put something in the heartbeat, even if it's just a call to the perception script. An alternative would be to give the npc an AoE effect (probably with no visible indicator) and check while the player is in the AoE.



#4
Tchos

Tchos
  • Members
  • 5 072 messages

iirc OnPerception only fires once for the npc.

 

Until you leave the NPC's perception range, or turn invisible.  Then it can fire again.  Just for the sake of clarity.



#5
andysks

andysks
  • Members
  • 1 652 messages

Didn't they do almost the same in the OC? Maybe there are some hints there, even though so much time has passed since the release of the game, that scripters are now finding easier and less complicated ways of doing stuff than in the OC.



#6
Jackson Flynn

Jackson Flynn
  • Members
  • 40 messages

What I'm after is something a bit like a sequence in Skyrim, where you have to follow a smuggler type bloke without him noticing.
If you do it at distance you're fine, but risk losing him, and if you get too close and he sees you, he'll want to know what you are doing, and you have to blag your way out of it, but he's then watching for you...

 

It will be fired from a convo where the quest is issued, so I can set up variables and conditions and stuff that way.

What I might do is try and put speak triggers down with a convo on the npc with conditions so that when the quest is active, and the player, the target, and the npc he is visiting are all in the area, it fires the relevant branch of the npc's convo that branches two ways... one if the player remains undetected, and the other if they are spotted...

Is that going to be more complicated than trying to get something to work via Lilac Souls tool, cos facing the facts... I'm not writing any of the scripts that this would require any time soon... not without a cyberpunk low jack...



#7
Loki_999

Loki_999
  • Members
  • 430 messages

Oh, right.  Well, two AoE effects with different radiuses could work then. As long as you remain within the outer radius but not the inner radius you are ok.



#8
Psionic-Entity

Psionic-Entity
  • Members
  • 195 messages

Here's my suggestion.

 

Use the NPC heartbeat to check whether or not the PC is seen (ie. loop over all PCs, for each one with the quest active and at the right state do this). On perception works but the seen script tells you whether the NPC is currently seeing the PC. If the NPC sees the PC and if the PC is within a certain range, I'd augment some kind of counter. When the counter reaches a certain level (maybe 5?) the NPC gets spooked and the PC gets a journal update telling them to try again later.

 

As long as the NPC doesn't get spooked, fire a script at each NPC interaction (from whatever AI or patrol system you're using) that checks whether or not any PC with the quest is nearby. If they are, they get to add that NPC to their list.

 

With this setup the PC doesn't have to have perfect stealth to do the job, but they do have to get close at some point. The NPC behavior is somewhat reasonable, with them only reacting if they notice the same person following them for an extended period of time.


  • Loki_999 aime ceci

#9
Loki_999

Loki_999
  • Members
  • 430 messages

Just to make the idea even more complex :P you could store the min/max distances required on the NPC that gets changed as they pass certain waypoints/triggers.

 

So you could then change the distances through separate sections and send alerts to the PC like "The target is passing through a crowded bazaar, get closer or you will lose him!" or "the streets around here are empty, back off or else you are likely to be spotted."

 

You see, this the reason why every time i start scripting the scope of the project expands like a thousand times from original concept :D



#10
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages

The thing about stealth in NWN2 is that it's difficult to make much of a game out of it's use.  Every round gives creatures another chance to roll a d20 and spot you, so unless you have 20+ levels in hide, it's really just a matter of time before you're spotted.  Here's an alternative idea:

 

Set up a complex path for the NPC to follow using walk-waypoints and a walk-waypoints script.  Whenever the NPC reaches a waypoint, have the script check the distance to the PC and maybe do some skill checks, with the DC adjusted according to distance, and how far along the NPC is in their walk.  For example, if the PC is in stealth mode, do a spot/listen check.  If invisible, just do a listen check.  If neither in stealth nor invisible, do a WIS check opposed to the PC's bluff.

 

The outcome of the skill checks determines what waypoint the NPC moves to next.  If they don't think they're being followed, they continue on normally.  If they succeed in spotting the player, either they move on with increased suspicion (and increased DC), or they double back or take some sort of detour, to try to lose their tail.  If the NPC stops to chat up a street vendor, the PC will have to back off or hide until the NPC feels safe enough to move on.  The player might even try to predict the NPC's path and take a detour to cut ahead.

 

You could script a little look-left look-right animation for the NPC at every waypoint, or even interject a little cutscene to make it obvious to the player what's going on.



#11
andysks

andysks
  • Members
  • 1 652 messages

I was thinking, you can also do it in a form of a mini game in a cutscene mode. For example:

Both the NPC and the party move, the NPC stops and looks around and the DM dialogue says something like "He seems suspicious, what do you want to do?" PC options: Look the merchant's goods. Turn around. Keep walking towards him. etc. You can run checks on the dialogue and see what happens if fail or not, keep walking or do something else. Maybe with each failed check it gets tougher... I don't know. Just an idea. I like the live following though, it has a lot of beauty. And to be honest I would do it live, as you say. But just in case it goes to shreds, I threw another idea :).



#12
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi,

I had considered doing something like the "Thief" game idea for NWN. i.e. Have a GUI (probably a bar) that increased or decreased subject to detection, so the player could actually see if and when they may have a chance of being (or are) detected. From this, one could attach listen/spot roll detections, etc, and tweak it to perform according to a number of variables and switches; including using invisibility potions, areas (triggers) of shadows to decrease chance of being spotted, etal.

Something I considered for the future, but share with you now in case you want to give it a go.

Cheers,
Lance.

#13
Jackson Flynn

Jackson Flynn
  • Members
  • 40 messages

Some really good ideas.

I like anything that emphasises a different element of the game to magic and combat, so a GUI sounds great.
Wouldn't have the first clue how to do it mind...

I've never attached a moving AOE to a creature before, and as Lug says about the stealth thing being a pain, I wonder if the two zones would work...
Maybe attach a skill check vs stealth whenever the player enters a zone, and allow heartbeat checks if the player is in the closest zone, (simulating it being a constant effort to remain undetected while being 6 feet away...).

But I also like running it as a convo minigame, as that allows the player to think and act precisely, and not fall foul of the caprices of glitching/accidentally clicking the wrong place, etc...

Hmm.... this certainly bears more thought.