building an NPC that wont show up when I place him in mod

If you have any technical question about how to run NWN2, this is the forum you need.
Post Reply
User avatar
Lokan
Dungeon Master
Posts: 821
Joined: Sun Aug 23, 2009 8:28 am

building an NPC that wont show up when I place him in mod

Post by Lokan »

I have carefully built an NPC in the build mod, trying to follow whatever advice I can find on the forums and guides, but he wont show up in the buildmod once I activate it to test the NPC after I have placed him. I did place the scpits in the correct places, and even added the combat variable. Even as a DM I can find him on the chooser, but he wont spawn. I did erase all the modules properties scripts so that I can log into the module to test things out, but I dont know if that would be the issue. Any advice?
Current PC: IS NOT Dent Jars
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Re: building an NPC that wont show up when I place him in mo

Post by Ronan »

When a created creature doesn't display but does show in the Chooser, it usually means you've given it a bad appearance type. What appearance are you using? There are some which sometimes look fine from within the toolset but have issues in-game (many NPC_* appearances for example).

Edit: When you run into this in a live mod you should right-click on the creature and select Destroy Object. Otherwise you'll have an invisible creature in the area which no one can click on (and yes it can still attack).
User avatar
Lokan
Dungeon Master
Posts: 821
Joined: Sun Aug 23, 2009 8:28 am

Re: building an NPC that wont show up when I place him in mo

Post by Lokan »

ok, that worked! i was using an NPC appearance. Thanks! Now I cant get the guy to attack anyone. I put in the scripts below, but he just stands there and take a beating.

acf_cre_onblocked
acf_cre_onconversation
acf_cre_ondamaged
acf_cre_ondeath
acf_cre_onendcombatround
acf_cre_onheartbeat
acf_cre_oninventorydisturbed
acf_cre_onperception
acf_cre_onphysicallyattacked
acf_cre_onrested
acf_cre_onspawnin
acf_cre_onspellcastat
acf_cre_onuserdefined
X2_SPECIAL_COMBAT_AI_SCRIPT ((I set this to 1))
X2_L_SPAWN_USE_AMBIENT_IMMOBILE ((I set this to 1))
Current PC: IS NOT Dent Jars
User avatar
CloudDancing
Ancient Red Dragon
Posts: 2847
Joined: Sun Jan 03, 2010 6:31 am
Location: Oklahoma
Contact:

Re: building an NPC that wont show up when I place him in mo

Post by CloudDancing »

Is his faction set as as hostile or defender?

Is his movement set at rate normal or slow?
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

Re: building an NPC that wont show up when I place him in mo

Post by Zelknolf »

Lokan wrote:X2_SPECIAL_COMBAT_AI_SCRIPT ((I set this to 1))
Wait, wut?

Why? Does BG have special handling for this variable that makes it respond to integers?
Ronan
Dungeon Master
Posts: 4611
Joined: Sun Feb 20, 2005 9:48 am

Re: building an NPC that wont show up when I place him in mo

Post by Ronan »

Zelknolf wrote:
Lokan wrote:X2_SPECIAL_COMBAT_AI_SCRIPT ((I set this to 1))
Wait, wut?

Why? Does BG have special handling for this variable that makes it respond to integers?
I've no way to check at the moment, but I really doubt it.

Whatever the case Lokan, I can fix the NPC when I put it in the mod.
User avatar
Lokan
Dungeon Master
Posts: 821
Joined: Sun Aug 23, 2009 8:28 am

Re: building an NPC that wont show up when I place him in mo

Post by Lokan »

I set him to defender and had to change his movement rate to normal from default. that script above I got from the NPC building guide on our page. I dont know how to set the integers, or whatever they are. I was just trying to follow what it said.
Current PC: IS NOT Dent Jars
User avatar
Lokan
Dungeon Master
Posts: 821
Joined: Sun Aug 23, 2009 8:28 am

Re: building an NPC that wont show up when I place him in mo

Post by Lokan »

it says that variable is a string, but I set the box to 1. I dont know what that means.
Current PC: IS NOT Dent Jars
Zelknolf
Chosen of Forumamus, God of Forums
Posts: 6139
Joined: Tue Jul 05, 2005 7:04 pm

Re: building an NPC that wont show up when I place him in mo

Post by Zelknolf »

Lokan wrote:it says that variable is a string, but I set the box to 1. I dont know what that means.
It means that you've told it that this creature has a custom AI script that should be run instead of the usual AI script, and that script is named "1" -- being that it's very unlikely such a script exists, it's probably just not running anything.
User avatar
Lokan
Dungeon Master
Posts: 821
Joined: Sun Aug 23, 2009 8:28 am

Re: building an NPC that wont show up when I place him in mo

Post by Lokan »

ok, thank you! :D
Current PC: IS NOT Dent Jars
Post Reply