Jump to content


Photo

NPC going out of their way for me


  • Please log in to reply
4 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 26 April 2017 - 02:08 PM

I'd like to know how far can NPC venture from their areas - and, to begin with, SEE out of their areas - if they are scripted to do something on a character outside?

 

The circumstances of my question are nothing short of dramatic. You know that inn in Baldur's Gate Ramazith's slimes attack? After you deal with them, it becomes a regular, working inn (with rooms up to Royal, too amazing for that shabby place), with a regular, working innkeeper. A bartender guy who probably doesn't have "Move between areas" ticked, though I don't know if that's a must for walking out of his inn into the street. It happened when I needed to give a custom script to an NPC of mine. Late versions of Near Infinity were changed unfortunately and now one has to refresh the Tree before newly created files show up - a serious hassle. I didn't care to lose all my current work and close windows just so I could write a new script, instead I added my own bit to the top of SHOUT.BCS, which was my NPC's Override script, temporarily.

 

Then I went to test it in the game, outside of that inn, against my NPC. The script action targeted Player1, and he was alone outside with Frankenstein, everyone else getting cozy indoors and the innkeeper in yellow pants at his mugs. You can imagine my surprise when at the trigger the fat man appeared in the doorway, sailed over the cobblestones to the main character like a gilded Spanish galleon and performed the action! Apparently he had SHOUT.BCS as his file as well. Now that I think of it, it surprises me less than the innkeeper came out than that he KNEW in there his time had come.



#2 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 29 April 2017 - 03:48 AM

Late versions of Near Infinity were changed unfortunately and now one has to refresh the Tree before newly created files show up - a serious hassle.
Only if you are arsenine enough to not have the override files among the regular files. This is easy to change. Just Option -> Show Override Files -> In ....choice. Yes, you need to re-click it if you upgrade the NI version as it only keep defaults for the same .jar file. So you can have multiple NI's with different configs etc.
I'd like to know how far can NPC venture from their areas - and, to begin with, SEE out of their areas - if they are scripted to do something on a character outside?
See outside their areas ? Meaning ? You can have a scripted creature follow the Player Character everywhere, you just need to script it ... they can for example:
IF 
  !InMyArea(Player1)
THEN
    RESPONSE #100
      MoveToObject(Player1)
  END
But that's got nothing to do with See... -the script trigger.

Edited by The Imp, 29 April 2017 - 04:05 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#3 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 30 April 2017 - 02:17 PM

How does a CRE's script even run if the [PC]s aren't in its ARE?  (besides that one specific opcode that keeps their AI running off-screen)



#4 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 30 April 2017 - 03:03 PM

How does a CRE's script even run if the [PC]s aren't in its ARE?  (besides that one specific opcode that keeps their AI running off-screen)
 I would suppose that an active creature wouldn't stop being active until a few rounds are over... and for that to happen, you have had to been in the area they are currently in.

Edited by The Imp, 30 April 2017 - 03:05 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#5 temnix

temnix
  • Member
  • 983 posts

Posted 16 May 2017 - 01:22 AM

That's got nothing to do with it... Active... It's the simplest script. The bartender was told to go to Player1, accidentally, and he did, out of his ARE to the other. If anything had made him respond to this in his area and "see" into the street, it was probably the presence of the rest of the party inside the inn, next to him. While Player1 was experimenting outside, they were inside, so the two areas were "on" at the same time, so to speak. At least, that's my guess.

 

I did a little test. An NPC scripted like Imp wrote. He doesn't wake to the trigger until Player1 walks into the area, e.g. the house. Then he can follow him outside. He can follow him to new areas too, but someone from the party first has to come back to the area with the NPC and leave. In other words, they need to be shown the way, unless a party member is next to them.