NPCs enable animation

Hi. After more than ten years I am back to my guilty pleasure, buildung modules. I just started and I noticed, that all my NPCs are standing around like pillars. I remember them more lively, engaging in banter with each other and so on. I could verify that by checking one of my old modules in 1.69.

There is an AI-Switch AFAIR, a simple thing, to enable that behaviour, but for the life of me I can’t remember it.

Would somebody enlighten me, please? I am using NWN:EE.

Welcome back to the community.

If you search the vault you can find all sorts of stuff on AI. I am not good at scripting, but I have found lots of helpful people here who can help you.

Here is one I found on my first search for AI on the vault:

https://neverwintervault.org/project/nwn1/hakpak/original-hakpak/henchman-inventory-battle-ai-mod

This is absolutely normal.

It is possible that you used NPC Activities 6.0 in past, that with some effort can make NPCs more lively.

You can set the default ambient animations by uncommenting the relevant lines in the default OnSpawn script. Mainly used for background citizens and incidental wandering mobs - you usually want your plot characters and heavy mobs in more predictable positions. Less than perfect - NPCs can end up talking to walls, log jamming etc - but OK if used sparingly.

The other easy option is to have them WalkWayPoints - with the NPC selected, right-click at various locations to create a set of waypoints they will walk (default AI does that automatically).

You might check out NPC Activities on the Vault (2 versions) - gives you much more control, but necessarily more work to implement.

I would avoid “Henchman Inventory & Battle AI Mod” for custom modules. I’ve had bad experiences when players put it in override. It tends to conflict with the module builder’s AI changes, and does wacky things like telling quest givers to move around the area, so they can’t interact with nearby objects as intended.

Thanks for the warm welcome and the help ye all. :slight_smile: I tried different NPC-systems, but I decided to use them sparingly. Proleric actually pointed me in the right direction. I didn’t tamper with the On-Spawn-Script, but in it you’ll find a reference to x2_inc_switches. And I dimly remember I tampered with that. I will look into it tomorrow (way past midnite here).

Again. Thanks. I feel welcomed. And I am happy the community seems rather lively.

I found this mod quite useful to figure out basic animations with NPCs using the original scripts from bioware:
https://neverwintervault.org/project/nwn1/script/x2-ambient-system-tutorial

some scripts have been tweaked slightly; maybe you used these scripts in the past or you could try them now…

I did like Proleric said and commented in the mobile and immobile animations and then compiled and saved each with custom tags/names as separate scripts in my modules. Then when I need a monster or npc wandering around I use the mobile script and for boss fights and other npcs I use the immobile which has them stand in one place but they move their arms and heads around. Put your new script (mobile or immobile) in OnSpawn slot of npcs or monsters and it should work fine.

I have come to the following solution: I add two variables (X2_L_SPAWN_USE_AMBIENT_IMMOBILE and 2_L_SPAWN_USE_AMBIENT) to my blueprints, one set to 1 the other to 0. I can always change it on an instance later. The marketplace now looks much livelier.

I also add X2_L_SPAWN_USE_STEALTH and X2_L_SPAWN_USE_SEARCH both set to 1 to my enemy blueprints.

As Proleric and MysticHermitMonk have pointed out: you can alway set these strings later on in a script.

So thanks for all the help. I consider this solved. (I am not familiar with etiquette in this board: Do I add “solved” to the threadtitle?)

2 Likes

In the … at the end of each post, you’ll see a Solution button.

I see it. Thanks. But I haven’t solved it… yet. It’s weekend and I can tinker a bit. My solution works… sometimes. And sometimes not and they revert to salt pillar state again. That’ll be hard to fix.

(I have other problems of that kind: Some times a trigger plays a sound, and sometimes not. Same trigger, same sound. And while am it: Where are the 2da-files in EE?)

The current retail version 8193.34 stores the 2da files in base_2da.bif which you can open with NWN Explorer (also extracted here).

The development version 8193.35-36 overrides some of those files in the ovr folder of the game installtion. I seem to recall that someone extracted those, foo, but I can’t seem to find that project.

:rage: … especially when you yourself are the problem. Tinkered with onSpawn in the blueprints, erased it unwittingly, and well… :crazy_face: Now it works again.

And thanks for the pointer to the 2da-files.