So I'm trying to make a basic NPC, kind of way to get my feet wet in regard to NPC modding and eventually trying to make a Mindflayer or other non-human NPC.
Anyway I'm trying to create a Neutral Evil Monk with a few special abilities like an extra attack per round and once per day innate ability to caste Improved Haste. I've written up the ".d", ".baf", and ".cre" files, along with the ".tp2" for Weidu installation. My only problem is that the NPC doesn't actually spawn in Copper Coronet. At first I had a CTD when entering the Coronet but I fixed that but now he just won't spawn. I figure the problem is probably in my ".baf" file but I'm not entirely sure since I haven't worked the Infinity Engine before, any suggestions?
*I've been using theacefes and Ghreyfain's guides.
Mod Files Names for reference:
Jiang (Folder)
-> AR0406.baf
-> PJ#Jiang.d
-> PJ#Jiang.cre
-> JIANG_L.bmp
-> JIANG_M.bmp
-> JIANG_S.bmp
Setup-Jiang.exe
Setup-Jiang.tp2
AR0406.bafIF
Global("PJ#JiangExists","AR0406",0)
THEN
RESPONSE #100
SetGlobal("PJ#JiangExists","AR0406",1)
CreateCreature("PJ#Jiang",[1483.1934],3)
END
PJ#Jiang.dBEGIN PJ#Jiang
// First time Jiang meets you
IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Greetings good <SIRMAAM>! My name is Jiang, the Wrathful Jiang.~
// Possible responses
IF ~~ THEN REPLY ~Nice to make your acquaintance Wrathful Jiang.~ GOTO Greet
IF ~Class(Player1,MONK)~ THEN REPLY ~You have a most disciplined look about you.~ GOTO BothMonks
IF ~~ THEN REPLY ~I have no time to banty words with foreigners, go away.~ GOTO GoAway
END
// From FirstMeeting
IF ~~ THEN BEGIN Greet
SAY ~Are you in need of a skilled monk?~
IF ~~ THEN REPLY ~Yes, as a matter of fact, I could use a skilled monk.~ DO ~SetGlobal("JiangJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Unfortunately I do not need another companion.~ GOTO GoAway
END
// From FirstMeeting
IF ~~ THEN BEGIN BothMonks
SAY ~A Monk from the western coasts! Shall we travel together?~
IF ~~ THEN REPLY ~A most excellent suggestion!~ DO ~SetGlobal("JiangJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Unfortunately I do not need another companion.~ GOTO GoAway
END
// From FirstMeeting OR Greet OR BothMonks
IF ~~ THEN BEGIN GoAway
SAY ~Very well my <LADYLORD>, I will await the day when you return, so that we might smite foes together!~
IF ~~ THEN EXIT
END
// Talked to before but never added Jiang to party
IF ~NumTimesTalkedToGT(0)~ THEN BEGIN ReturnDialogue
SAY ~I see you have returned, my friend.~
IF ~~ THEN REPLY ~Yep, come and join the party.~ DO ~SetGlobal("JiangJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Yeah, but I still don't want you in the party.~ GOTO RefusedAgain
END
// From ReturnDialogue
IF ~~ THEN BEGIN RefusedAgain
SAY ~Ah, once again you refuse my offer. No matter, I will amuse myself with this magical device I have purchased. It was given to be by a gnome named John Johnson, or something similar.~
IF ~~ THEN EXIT
END
BEGIN PJ#JiangP
// Removing Jiang from Party
IF ~Global("JiangJoined","LOCALS",1)~ THEN BEGIN KickOut
SAY ~You do not wish my assistance any longer?~
IF ~~ THEN REPLY ~My mistake, you are welcome to stay.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~I no longer need you in the party.~ DO ~SetGlobal("JiangJoined","LOCALS",0)~ EXIT
END
// Adding Jiang to Party
IF ~Global("JiangJoined","LOCALS",0)~ THEN BEGIN Rejoin
SAY ~You want me to rejoin?~
IF ~~ THEN REPLY ~That's right Jiang. We shall travel together again!~ DO ~SetGlobal("JiangJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Not at this time, maybe later.~ EXIT
END
Setup-Jiang.tp2BACKUP ~Jiang/backup~
AUTHOR ~Rodman49 (excellenceincarnate@triad.rr.com)~
BEGIN ~Wrathful Jiang for BG2:SoA~
// Adding CRE File
COPY ~Jiang/PJ#Jiang.cre~ ~override/PJ#JIANG.cre~
// This allows for your NPC's name to be shown in the game during conversations and also on the character sheet
SAY NAME1 ~Jiang~
SAY NAME2 ~Jiang~
// Character Biography
SAY BIO ~When you ask him about his past, JIANG says to shut up.~
// These are the different things that your NPC will say when they respond to your commands.
SAY MORALE ~Sticking around is only going to get us killed.~
SAY HAPPY ~This group is great~
SAY UNHAPPY_ANNOYED ~You're starting to take the wrong path in morals.~
SAY UNHAPPY_SERIOUS ~I'll leave if you don’t stop!~
SAY UNHAPPY_BREAKING ~You suck, I'm outta here.~
SAY LEADER ~Yay I'm the leader!~
SAY TIRED ~I'm tired.~
SAY BORED ~I'm bored.~
SAY BATTLE_CRY1 ~TO BATTLE!~
SAY BATTLE_CRY2 ~Time to die!~
SAY BATTLE_CRY3 ~DIE NOW!~
SAY BATTLE_CRY4 ~DIE!~
SAY DAMAGE ~Ow!~
SAY DYING ~AH!~
SAY HURT ~Help me!~
SAY AREA_FOREST ~We're in a forest.~
SAY AREA_CITY ~We're in a city~
SAY AREA_DUNGEON ~We're in a dungeon.~
SAY AREA_DAY ~It's day.~
SAY AREA_NIGHT ~It's dark.~
SAY SELECT_COMMON1 ~Yeah?~
SAY SELECT_COMMON2 ~What do you need?~
SAY SELECT_COMMON3 ~Grunt.~
SAY SELECT_COMMON4 ~What?~
SAY SELECT_COMMON5 ~Yes?~
SAY SELECT_COMMON6 ~I'm listening.~
SAY SELECT_ACTION1 ~Uh huh.~
SAY SELECT_ACTION2 ~Sure.~
SAY SELECT_ACTION3 ~I'm on it.~
SAY SELECT_ACTION4 ~YAY!~
SAY SELECT_ACTION5 ~Not hard at all~
SAY SELECT_ACTION6 ~Yep~
SAY SELECT_ACTION7 ~Okay~
SAY SELECT_RARE1 ~I'm ready.~
SAY SELECT_RARE2 ~I got it.~
SAY CRITICAL_HIT ~Yeah!~
SAY CRITICAL_MISS ~Damn!~
SAY TARGET_IMMUNE ~No effect?~
SAY INVENTORY_FULL ~It's too heavy!~
// This is compiling John's dialogue
COMPILE ~Jiang/PJ#Jiang.d~
// This is adding our area file to the game
EXTEND_TOP ~AR0406.bcs~ ~Jiang/AR0406.baf~
// Add this to the end - Appends .2DA files in the game so that it recognizes your NPC’s files
APPEND ~pdialog.2da~
~PJ#Jiang PJ#JiangP PJ#JiangJ PJ#JiangD PJ#Ji25P PJ#Ji25J PJ#Ji25D PJ#Ji25~
UNLESS ~PJ#Jiang~
APPEND ~interdia.2da~
~PJ#Jiang PJ#JiangB PJ#JiB25~
UNLESS ~PJ#Jiang~