Author Topic: The Complete and Total NOOB's Guide to Creating an NPC  (Read 51721 times)

0 Members and 1 Guest are viewing this topic.

Offline kuemper

  • Level 1
  • *
  • Posts: 122
  • Karma: +0/-0
  • Gender: Female
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #30 on: March 11, 2006, 07:22:58 AM »
Ace, very good guide; very easy to understand as you explained what things meant and/or were for in the coding.  :cool:  The links are muchly appreciated.

Questions to start:
1. You need a clean install of BG2. If I uninstall my current mods and leave in the ToB patch + Baldurdash, will that be clean enough to use?

2. The filename (K#John) must be 8 characters or less, including the K#?
When a man speaks and there is no woman to hear him, is he still wrong?

For the faithful romantic, no explanation is necessary. For the unbeliever, no explanation is possible.

I use a flamethrower on my stains.

Offline Celissa

  • Newbie
  • *
  • Posts: 23
  • Karma: +0/-0
    • Yahoo Instant Messenger - Lady.Celissa
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #31 on: March 11, 2006, 02:28:33 PM »
1.)  No, I prefer keeping a seperate install for all mod work.  Keeps your dialog.tlk and chitin.key nice and clean.  Uninstalling everything does sometimes leave little bits and pieces that might interfere in odd ways.

2.)  Every single file associated with your NPC must be eight characters or less.  CRE file names, scripts, .D files, everything.  The only thing to my knowledge that could be longer than eight characters is the death variable, or script name, which isn't a file of its own anyway, but rather the name that scripts look for in regards to your NPC.
I had a dream my life would be
So different from this hell I'm living.
So different now from what it seemed.
Now life has killed the dream I dreamed...

Offline kuemper

  • Level 1
  • *
  • Posts: 122
  • Karma: +0/-0
  • Gender: Female
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #32 on: March 11, 2006, 07:42:40 PM »
I did another install, so I should be okay. One more thing - do the files K#John.d, etc. go into the BG2: SoA folder? I ask because Near Infinity doesn't recognize my NPC's dialog.
When a man speaks and there is no woman to hear him, is he still wrong?

For the faithful romantic, no explanation is necessary. For the unbeliever, no explanation is possible.

I use a flamethrower on my stains.

Offline theacefes

  • Global Moderator
  • Level 3
  • *****
  • Posts: 1250
  • Karma: +3/-0
  • Gender: Female
  • XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD
    • MSN Messenger - bohdi2185@msn.com
    • AOL Instant Messenger - bohdi2185
    • Yahoo Instant Messenger - theacefes@yahoo.com
    • View Profile
    • My Personal Website
    • Email
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #33 on: March 11, 2006, 10:35:12 PM »
Quote from: "kuemper"
I did another install, so I should be okay. One more thing - do the files K#John.d, etc. go into the BG2: SoA folder? I ask because Near Infinity doesn't recognize my NPC's dialog.


Hi!  Yeah the game install plus any patches or fixes is fine ( I would recommend you have ToB as well)

The entire file name must be no longer than 8 letters including the prefix ie: my NPC, Auren, uses K#Auren which is 7 letters but I could add another if I wanted...say if I wanted Auren's banter file, then I'd use K#AurenB.

Yes, all your mod files go into the SoA folder.
-Ace
NPC Creation Guide - Latest Version
My Music Reels (mod-related and others)


Magical Unicorns - Because ponies are so last year.

theacefes: People probably look at our pictures and think "hmm one admin looks psychotic and the other looks like Captain Picard..."
grimsqueaker: TOGETHER THEY FIGHT CRIME

Offline Grim Squeaker

  • Newbie
  • *
  • Posts: 63
  • Karma: +0/-0
    • ICQ Messenger - 55616863
    • MSN Messenger - grimsqueaker@hotmail.co.uk
    • AOL Instant Messenger - grimsqueaky
    • Yahoo Instant Messenger - grimsqueaky
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #34 on: March 12, 2006, 02:37:05 AM »
Quote from: "theacefes"
Quote from: "kuemper"
I did another install, so I should be okay. One more thing - do the files K#John.d, etc. go into the BG2: SoA folder? I ask because Near Infinity doesn't recognize my NPC's dialog.

Yes, all your mod files go into the SoA folder.


Well, they want to be in a folder (generally the same as your mod name) in the SoA folder.  NearInfinity won't recognise the names and therefore won't list them because the files aren't in the override yet.  You can get around this by right-clicking on that field and choosing 'Edit as string'.  You'll then just be able to type the name in the box rather than having to select from the list.  NB: You don't type the file extension e.g. you'd type 'G#JELINA' not 'G#JELINA.bcs'
"You alone can make my song take flight..."

Offline kuemper

  • Level 1
  • *
  • Posts: 122
  • Karma: +0/-0
  • Gender: Female
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #35 on: March 12, 2006, 07:35:52 PM »
Quote
10) Scroll down until you get to Override Script: type in K#John (or whatever your npc's filename is)


You might want to mention that you need to click on the Edit tab to find all these options. Took me half an hour to find where the Flag thingy is. :o

I tried, but I am unable to get my script in correctly. I click on Override Script and get a browser window for scripts. My script is not listed. When I type K#John in manually and click Update Value, the script next to Override Script changes to Naddie.bcs. Am I missing something? Clicking on the wrong buttons? :confused:

I created a separate folder in BG2 SoA named after my NPC and this is where I have the K#John.d located. Was this wrong? Should all this be left in the SoA folder? Apologies for these stupid questions, but, well, I am stupid with these programs.
When a man speaks and there is no woman to hear him, is he still wrong?

For the faithful romantic, no explanation is necessary. For the unbeliever, no explanation is possible.

I use a flamethrower on my stains.

Offline Grim Squeaker

  • Newbie
  • *
  • Posts: 63
  • Karma: +0/-0
    • ICQ Messenger - 55616863
    • MSN Messenger - grimsqueaker@hotmail.co.uk
    • AOL Instant Messenger - grimsqueaky
    • Yahoo Instant Messenger - grimsqueaky
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #36 on: March 13, 2006, 12:15:37 AM »
Quote from: "kuemper"
10) Scroll down until you get to Override Script:
I tried, but I am unable to get my script in correctly. I click on Override Script and get a browser window for scripts. My script is not listed. When I type K#John in manually and click Update Value, the script next to Override Script changes to Naddie.bcs. Am I missing something? Clicking on the wrong buttons? :confused:


Well what is the name of your override script?  Seriously, all you have to do is exactly what I sent in post a few posts up.  Right click on the entry, edit as string, type in the box, press enter (oh and then you have to hit save).  Done.

PS: At this stage it doesn't matter where your files are as NI isn't gonna find them unless they're in the override (which they should NOT be at this stage).  This is why we have to manually type it in instead of choosing from the list.  The list only displays stuff in the override.
"You alone can make my song take flight..."

Offline kuemper

  • Level 1
  • *
  • Posts: 122
  • Karma: +0/-0
  • Gender: Female
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #37 on: March 13, 2006, 08:02:06 AM »
Quote from: "Grim Squeaker"

Well what is the name of your override script?  Seriously, all you have to do is exactly what I sent in post a few posts up.  Right click on the entry, edit as string, type in the box, press enter (oh and then you have to hit save).  Done.


Because I'm stupid. It was the only way I could get it to work. Thanks.

What do these mean:
Quote

~K#John K#JohnP K#JohnJ K#JohnD K#Joh25P K#Joh25J K#Joh25D K#John25~
.
.
.
~K#John K#JohnB K#JohB25~


My file name is N#Gargh, so with these K#Joh25P K#Joh25J K#Joh25D I should shorten mine to look like these N#Gar25P N#Gar25J N#Gar25D , yes? They need to follow the old DOS file naming system of 8 letters or less, right?

EDIT: What about using ToB? How will ToB affect my NPC mod? Off for testing now. :)
When a man speaks and there is no woman to hear him, is he still wrong?

For the faithful romantic, no explanation is necessary. For the unbeliever, no explanation is possible.

I use a flamethrower on my stains.

Offline kuemper

  • Level 1
  • *
  • Posts: 122
  • Karma: +0/-0
  • Gender: Female
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #38 on: March 13, 2006, 08:27:30 AM »
I effed something up big time. Would any programmers take a look and please tell me wtf I did. This is from my Gargh-setup.exe.debug:

Quote
WeiDU v 190 Log

 C:\Program Files\Black Isle\BGII - SoA\Gargh-setup.exe.exe
[./CHITIN.KEY] loaded, 590551 bytes
[./CHITIN.KEY] 182 BIFFs, 41793 resources
[dialog.tlk] loaded, 8692747 bytes
[dialog.tlk] 74107 string entries
[./Autorun.ini] loaded, 1452 bytes
[./baldur.ini] loaded, 3155 bytes
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD1\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD2\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD2\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD3\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD4\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD5\]
[./Keymap.ini] loaded, 5615 bytes
[./Mplaynow.ini] loaded, 230 bytes
[C:\Program Files\Black Isle\BGII - SoA\Gargh-setup.exe.exe] Using scripting style "BG"
[dialog.tlk] claims to be writeable.
[dialog.tlk] claims to be a regular file.
WARNING: parsing log [WeiDU.log]: Sys_error("WeiDU.log: No such file or directory")
[GARGH-SETUP.EXE.TP2] parsed

Install Component [Gargh for BG2:SoA]?
nstall, or [N]ot Install or [Q]uit?
Installing [Gargh for BG2:SoA]
Copying and patching 1 file ...
ERROR: error loading [Gargh\GARGH.cre]
Stopping installation because of error.

ERROR Installing [Gargh for BG2:SoA], rolling back to previous state
[Gargh\backup/0/UNSETSTR.0] SET_STRING uninstall info not found
Will uninstall   0 files for [GARGH-SETUP.EXE.TP2] component 0.
Uninstalled      0 files for [GARGH-SETUP.EXE.TP2] component 0.
ERROR: Unix.Unix_error(20, "stat", "Gargh\\GARGH.cre")
PLEASE email the file GARGH-SETUP.EXE.DEBUG to kuemper (kuemper@gmail.com)


Install Component [Gargh for BG2:SoA]?
nstall, or [N]ot Install or [Q]uit?
When a man speaks and there is no woman to hear him, is he still wrong?

For the faithful romantic, no explanation is necessary. For the unbeliever, no explanation is possible.

I use a flamethrower on my stains.

Offline kuemper

  • Level 1
  • *
  • Posts: 122
  • Karma: +0/-0
  • Gender: Female
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #39 on: March 13, 2006, 03:09:21 PM »
I tiddled around a bit, thought I fixed the error of my previous post (the Gargh.cre was Gargh1.cre, so I removed the 1). Now, my debug file has this:
Quote
C:\Program Files\Black Isle\BGII - SoA\Gargh-setup.exe.exe
[./CHITIN.KEY] loaded, 590551 bytes
[./CHITIN.KEY] 182 BIFFs, 41793 resources
[dialog.tlk] loaded, 8692747 bytes
[dialog.tlk] 74107 string entries
[./Autorun.ini] loaded, 1452 bytes
[./baldur.ini] loaded, 3155 bytes
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD1\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD2\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD2\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD3\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD4\]
Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD5\]
[./CharView.ini] loaded, 262 bytes
[./Keymap.ini] loaded, 5615 bytes
[./Mplaynow.ini] loaded, 230 bytes
[C:\Program Files\Black Isle\BGII - SoA\Gargh-setup.exe.exe] Using scripting style "BG"
[dialog.tlk] claims to be writeable.
[dialog.tlk] claims to be a regular file.
[WeiDU.log] parsed
[GARGH-SETUP.EXE.TP2] parsed

Install Component [Gargh for BG2:SoA]?
nstall, or [N]ot Install or [Q]uit?
Installing [Gargh for BG2:SoA]
Copying and patching 1 file ...
[Gargh\GARGH.cre] loaded, 2428 bytes
Copied [Gargh\GARGH.cre] to [override\GARGH.cre]
Compiling 1 dialogue file ...
[./override/TRIGGER.IDS] loaded, 7725 bytes
[TRIGGER.IDS] parsed
[./override/ACTION.IDS] loaded, 13073 bytes
[ACTION.IDS] parsed

[trigger list near line 25, column 25 of Gargh\N#Gargh.d] PARSE WARNING at line 25 column 21-21
Near Text: )
   [NumTimesTalkedGT] not found in TRIGGER.IDS
WARNING: cannot verify trigger ~NumTimesTalkedGT(0)~: Parsing.Parse_error
[Gargh\N#Gargh.d] parsed
Processing 1 dialogues/scripts ...
Adding N#GARGH to internal list of available DLGs
Adding N#GARGHP to internal list of available DLGs
[N#GARGH.DLG] saved   4 states, 7 trans, 2 strig, 0 ttrig, 2 actions
[N#GARGHP.DLG] saved   2 states, 4 trans, 2 strig, 0 ttrig, 2 actions
Extending game scripts ...
[Gargh\ar0406.baf] loaded, 139 bytes
[Gargh\ar0406.baf] parsed
BIFF may be in hard-drive CD-path [C:\Program Files\Black Isle\BGII - SoA\CD5\/data/Scripts.bif]
BIFF may be in hard-drive CD-path [C:\Program Files\Black Isle\BGII - SoA\CD4\/data/Scripts.bif]
BIFF may be in hard-drive CD-path [C:\Program Files\Black Isle\BGII - SoA\CD3\/data/Scripts.bif]
BIFF may be in hard-drive CD-path [C:\Program Files\Black Isle\BGII - SoA\CD2\/data/Scripts.bif]
BIFF may be in hard-drive CD-path [C:\Program Files\Black Isle\BGII - SoA\CD2\/data/Scripts.bif]
BIFF may be in hard-drive CD-path [C:\Program Files\Black Isle\BGII - SoA\CD1\/data/Scripts.bif]
BIFF may be in hard-drive CD-path [C:\Program Files\Black Isle\BGII - SoA\/data/Scripts.bif]
[C:\Program Files\Black Isle\BGII - SoA\/data/Scripts.bif] 6510477 bytes, 2825 files, 0 tilesets
[Ar0406.bcs] parsed
Extended script [Ar0406.bcs] with [Gargh\ar0406.baf]
Appending to files ...
[./override/PDIALOG.2DA] loaded, 3514 bytes
Appending [N#Gargh N#GarghP N#GarghJ N#GarghD N#Gargh25P N#Gargh25J N#Gargh25D N#Gargh25...] to [pdialog.2da] because it does NOT contain [N#Gargh]
override/pdialog.2da copied to Gargh\backup/0/pdialog.2da, 3514 bytes
Appended text to [pdialog.2da]
Appending to files ...
[./override/INTERDIA.2DA] loaded, 564 bytes
Appending [N#Gargh N#GarghB N#GarghB25...] to [interdia.2da] because it does NOT contain [N#Gargh]
override/interdia.2da copied to Gargh\backup/0/interdia.2da, 564 bytes
Appended text to [interdia.2da]


Saving This Log:
GARGH-SETUP.EXE.TP2  0  0 Installed ~Gargh for BG2:SoA~
[GARGH-SETUP.EXE.TP2] parsed
1212 characters, 50 entries added to DIALOG.TLK
[dialog.tlk] created, 74157 string entries

SUCCESSFULLY INSTALLED [Gargh for BG2:SoA]

What did I screw up this time? And is it really installed?  :retard:
When a man speaks and there is no woman to hear him, is he still wrong?

For the faithful romantic, no explanation is necessary. For the unbeliever, no explanation is possible.

I use a flamethrower on my stains.

Offline Shed

  • Newbie
  • *
  • Posts: 96
  • Karma: +0/-0
    • MSN Messenger - shed_plant@hotmail.com
    • Yahoo Instant Messenger - shed_plant
    • View Profile
    • http://www.shedplant.net
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #40 on: March 13, 2006, 04:22:27 PM »
It does say it "SUCCESSFULLY INSTALLED" so it probably worked ;).
Not a carebear.

Spellhold Studios

Offline Grim Squeaker

  • Newbie
  • *
  • Posts: 63
  • Karma: +0/-0
    • ICQ Messenger - 55616863
    • MSN Messenger - grimsqueaker@hotmail.co.uk
    • AOL Instant Messenger - grimsqueaky
    • Yahoo Instant Messenger - grimsqueaky
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #41 on: March 14, 2006, 12:35:11 AM »
Quote from: "Shed"
It does say it "SUCCESSFULLY INSTALLED" so it probably worked ;).


Exactly.  Just because it through a lot of information into the log doesn't necesserily mean something went wrong.  It does have to put information in there for every high-level command it executes as well as WeiDU's backup procedures etc.  So don't worry, it did successfully install.
"You alone can make my song take flight..."

Offline theacefes

  • Global Moderator
  • Level 3
  • *****
  • Posts: 1250
  • Karma: +3/-0
  • Gender: Female
  • XTREME METAL ROCKER PUNK CHICK WITH ULTRA SURFBOARD
    • MSN Messenger - bohdi2185@msn.com
    • AOL Instant Messenger - bohdi2185
    • Yahoo Instant Messenger - theacefes@yahoo.com
    • View Profile
    • My Personal Website
    • Email
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #42 on: March 14, 2006, 11:54:10 AM »
Your computer would have blown up otherwise ;)
-Ace
NPC Creation Guide - Latest Version
My Music Reels (mod-related and others)


Magical Unicorns - Because ponies are so last year.

theacefes: People probably look at our pictures and think "hmm one admin looks psychotic and the other looks like Captain Picard..."
grimsqueaker: TOGETHER THEY FIGHT CRIME

Offline kuemper

  • Level 1
  • *
  • Posts: 122
  • Karma: +0/-0
  • Gender: Female
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #43 on: March 14, 2006, 07:01:38 PM »
Gargh was at the CC as scripted. More bugs though - he walks as though heavily encumbered, his joining message is "Goodnight and good evening, ladies" instead of what I wrote and a couple of his items are wonky.

Well, he's there and fine which matters. This piddly stuff is icing to me.  :lilly Works with Dungeon-Be-Gone thank the lord. My original test run with no mods had me falling asleep, so DBG was installed out of necessity.  :lol:
When a man speaks and there is no woman to hear him, is he still wrong?

For the faithful romantic, no explanation is necessary. For the unbeliever, no explanation is possible.

I use a flamethrower on my stains.

Offline Grim Squeaker

  • Newbie
  • *
  • Posts: 63
  • Karma: +0/-0
    • ICQ Messenger - 55616863
    • MSN Messenger - grimsqueaker@hotmail.co.uk
    • AOL Instant Messenger - grimsqueaky
    • Yahoo Instant Messenger - grimsqueaky
    • View Profile
The Complete and Total NOOB's Guide to Creating an NPC
« Reply #44 on: March 15, 2006, 02:15:17 AM »
Quote from: "kuemper"
Gargh was at the CC as scripted. More bugs though - he walks as though heavily encumbered, his joining message is "Goodnight and good evening, ladies" instead of what I wrote and a couple of his items are wonky.


Well first of all, is he heavilty encumbered?  I mean, thats the only explanation I can think of off the top of my head...

As for 'Goodnight etc' thats because its defaulting to the standard NPC dialogue because it can't find yours.  

1) Check you actually set their dialogue file in the CRE
2) Check export allowed is not set
3) Have you been using a saved game for this testing?  One where the CRE in question had already spawned?  Because once they've spawned in a saved game they are saved locally meaning any changes to the copy in the override won't appear
"You alone can make my song take flight..."