Aller au contenu

Photo

HB execution rate with no PCs in area


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

#1
henesua

henesua
  • Members
  • 3 882 messages
 I was playing with my recently debugged Clairaudience spell to see what players could do with it, and ran into a limitation that I do not believe I can get around.

My alternate Clairaudience spell creates a "scry sensor", an invisible creature and AOE. The two of these together send information back to the PC about what the sensor "hears". This is information coming in through various events - listening for speech, creatures moving in and out of "heard" and "inaudible" states, etc.... - and going back to the PC as messages. The nice thing about this spell in Arnheim is that I have also enabled PCs to cast spells at known locations, not just seen locations. So a PC could cast clairaudience and create a scry sensor in another area.

This has a problem. If no other PCs are in the area it appears that NPCs don't do very much. While this is great for efficiency, it doesn't do much for a PC trying to ascertain whether a dragon is guarding a cave in the next area.

So I first thought "no problem" at the top of standard heartbeat and perception scripts is a check for AI level and if it is very low the script exits. I tweaked those to override the exit if at least one scry sensor was in the area. Then I added a SendMessage at the top of the heartbeat to let me know which object was executing a heartbeat.

I entered the game. Creatures spawned in teh area. Every creature in that area was executing a HB regularly. I went to another area, and suddenly these heartbeats became much less frequent. I renentered the area, and they became regular again. My scry sensor was still working as well as it was still albeit rarely) picking up on creature movements.

Has anyone else looked into this? Do you know how often these scripts run when no players are in an area?

Modifié par henesua, 15 octobre 2012 - 12:36 .


#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Did you SetAILevel to High or Very high on your creature?

#3
Rolo Kipp

Rolo Kipp
  • Members
  • 2 791 messages
 <loafing...>

Does this help? Er, explain it, I mean :-P
Image IPB

<...when no one is looking>

#4
henesua

henesua
  • Members
  • 3 882 messages
Lightfoot8, I did not. I suppose I could do so for creatures inside the AOE of the Scry Sensor, and then restore it upon exiting.

Rolo - that helps a great deal, thanks.

#5
Pattycake1

Pattycake1
  • Members
  • 49 messages
Why dont you just tie it into the mods HB event? I know that can be dangerous if your not careful but it would be a constant HB.

#6
henesua

henesua
  • Members
  • 3 882 messages
Setting the AI level of creatures within the radius of the AOE is a much easier approach. More efficient too.

#7
Pattycake1

Pattycake1
  • Members
  • 49 messages
I just made my suggestion because some where in the old forums I remember reading that you want to avoid setting NPC or creature AI to very high because it may cause lag on your server. Especially if you have a lot of active creatures.

LOL its been so long since I've delt with that issue, I've probably got it wrong too.

#8
henesua

henesua
  • Members
  • 3 882 messages
No, you are correct setting the AI on all creatures to Very High would cause much lag. I'm setting AI to normal when a creature enters the AOE, and to default when they leave it.

#9
Pattycake1

Pattycake1
  • Members
  • 49 messages
Just out of curiosity, why don't you have the player that cast the spell just possess the invisible creature or would that just give way too much info away to the player?

#10
henesua

henesua
  • Members
  • 3 882 messages
That is how I handle scry. This is clairvoyance so all I need is a listener.

#11
Baaleos

Baaleos
  • Members
  • 1 330 messages

Just out of curiosity, why don't you have the player that cast the spell just possess the invisible creature or would that just give way too much info away to the player?

Because its not achievable with vanilla nwn, and when done through nwnx - it is unstable.
Possessing npc's other than familiars etc through measures such as nwnx, results in character corruption if they player logs out while possessing, and even then, the character still gets corrupted if ExportCharacter is called. As the npc essentially becomes the new Player Characters Character, overwriting any record of his old character.

At least -I am speaking for win32 players.
If there is a stable possession method out there, by all means - let me/us know.

#12
henesua

henesua
  • Members
  • 3 882 messages
I didn't take PattyCake's mention of possession literally. I figured it was in reference to how Mannast's scry system works: The caster is transformed and relocated to act as the scry point.