Author Topic: A Beginner's Guide to NPC creation with WeiDU  (Read 314201 times)

Offline taplonaplo

  • Planewalker
  • *****
  • Posts: 14
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #125 on: March 15, 2006, 04:14:51 AM »
srry,  so then the name that is shown is the "Short Name" (in dltcep)?
« Last Edit: March 15, 2006, 04:19:58 AM by taplonaplo »

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #126 on: March 15, 2006, 04:25:28 AM »
srry,  so then the name that is shown is the "Short Name" (in dltcep)?

I really don't know which name out of NAME1 and NAME2 is displayed in game as all modders tend to have them as the same thing.  But its definitely one of them and nothing to do with the death variable.
"You alone can make my song take flight..."

Offline taplonaplo

  • Planewalker
  • *****
  • Posts: 14
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #127 on: March 15, 2006, 07:00:12 AM »
sorry again,the thing that confused me was that i thought short name does not appear in game so i set it to the same as dv :(

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #128 on: March 15, 2006, 07:56:02 AM »
I got the name issue worked out.  The problem (for me, at least) is that when you write the tp2 you have to have all of the SAY lines directly after the COPY line for the CRE file in question.  You can't have an extra line in between, even if it is a blank one.  I've got the name now.

Unfortunately I still have the other problem I mentioned--when I click on my NPC, it still says he has nothing to say to me (only now it uses his name instead of mine).  I don't get it.  Here is the relevant part of the tp2 file copied.  I have changed the name of the NPC so as to preserve the surprise (if I ever get it to work)

COMPILE ~Frank\KM#Fran.d~

EXTEND_TOP ~Ar0700.bcs~ ~Frank\AR0700.baf~

APPEND ~interdia.2da~ ~KM#FRAN     BKM#FRAN~
UNLESS ~KM#FRAN~

APPEND ~pdialog.2da~ ~KM#FRAN      KM#FRANP           KM#FRANJ          KM#FRAND~
UNLESS ~KM#FRAN~

This differs only slightly from the tutorial example--I found that other custom NPCs, including one which I believe is by the tutorial author himself, had more than one space between fields for the 2da files.  I used the proper amount of spaces to make it appear even with the columns.  This, however, did not fix the problem.

KM#Frank.cre has KM#Fran in the Dialog field (using NI), and KM#FRAN.dlg is in the override directory.  I checked the dlg itself in NI and it looks fine--all the appropriate topics and responses are there.  KM#FRAN is also listed as the Death Variable. This is driving me nuts--as far as I can tell it should work, does anyone have any idea at all what I may be doing wrong?
« Last Edit: March 15, 2006, 07:57:58 AM by KingMick »

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #129 on: March 15, 2006, 08:01:48 AM »
Are all the conditions met for the first dialog? 

IF ~SomeConditionsHere~ THEN BEGIN firstdialog
SAY ~blah~
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline taplonaplo

  • Planewalker
  • *****
  • Posts: 14
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #130 on: March 15, 2006, 10:21:52 AM »
does pc refer to the main character or any party member? (in scripts) btw, if u click on the npc and it uses initdlg.bcs, will it say  ...- has nothingto say to you (but the dialogue will start when it comes near enought)?
« Last Edit: March 15, 2006, 10:29:40 AM by taplonaplo »

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #131 on: March 15, 2006, 10:34:47 AM »
PC refers to any party member.  If you want the main character then use player1.  I don't know about initdlg.bcs, what does the script say?
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #132 on: March 15, 2006, 04:32:24 PM »
I'm not using initdlg at all, I'm using shoutdl2, the tutorial said that was the one to use if you want the player to have to initiate the dialog.

Yes the conditions are met--in fact there are none at all.  Does that make a difference?  In the interest of keeping things simple, I decided to have the exact same dialog play through every time you talk to the NPC (before joining, anyway), so I didn't bother with NumTimesTalkedTo or NumTimesTalkedToGT.  The beginning of the .d file simply says:

BEGIN KM#FRAN

IF ~~ THEN BEGIN MeetingFrank
SAY ~blah~
« Last Edit: March 15, 2006, 04:36:53 PM by KingMick »

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #133 on: March 15, 2006, 04:51:28 PM »
That's your problem then, you need to have a condition in the first state everytime you want to start a dialog.  If the dialog stays the same before joining then just try using IF ~True()~ THEN BEGIN etc.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #134 on: March 15, 2006, 07:45:29 PM »
<Does a dance> Success!  Woo-hoo!  It worked it worked it worked it worked!  Thanks Kismet!

Ok, so now he is in the party and everything is working great.  There are a couple small things I would like to change if possible, and I'm not sure quite how.  If anyone knows how, awesome.  If not, well hey, at least the NPC is functioning correctly now :)

(1) He calls out to me as soon as he sees me.  I'd rather make it so that the player must initiate the dialog himself.  Neither shoutdl2 nor initdlg accomplishes this--which script should I use?

(2) Ummm, the Monster Summoning I spell has no graphic in his spellbook.  It's there, it can be memorized, works great, but the graphic itself is not there, just an empty area.  Anyone know how to fix that?

(3) I want him to be a mage, not a thief/mage, but it would be nice to give him the Pick Pockets ability.  I tried assigning this in Shadow Keeper and it appears to have carried over into the CRE, but in the game itself he does not have the thieving icon, nor does Pick Pockets appear in his record screen.  If this is impossible (or really hard) then I will abandon the idea.  If there is a very easy way to do it, though, then I'd like to.

(4) Is there any way to give him an abnormal skin color?  By this I mean, a skin color not normally available at all, like silver or gold or green.  I tried this from Shadowkeeper but it caused a game crash.

(5) MOST IMPORTANTLY: How do I make a new paperdoll (inventory screen avatar) for the character?  I want him to look like the human mage paperdoll, but with no beard, and if possible longer hair.  Even if this takes some work, I'm willing to put in the effort.  This NPC is human but should definitely not have a beard.

Thanks again for everyone's help!  The most important change I want to make is #5, the paperdoll.  The others would be nice but are not essential.  Most importantly, thanks guys for helping me get this NPC to function properly.

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #135 on: March 15, 2006, 08:41:39 PM »
1. Don't use any script.
5. I believe Moinesse did this for Kelsey so you might want to check his page for links/downloads.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #136 on: March 16, 2006, 07:45:24 AM »
1. Like Kismet said
2. Is this the original spell or some tinkered version of yours?
3. Impossible.  The only way to have a pick pockets icon on their bar is to have them be part Thief or part Bard
4. Some of these are possible, but as you already discovered once you go poast a certain number then it causes the game to crash
5. Like Kismet said, however I believe its impossible to do for just one NPC.  You'd end up replacing an entire paperdoll.  Someone correct me if I'm wrong.
"You alone can make my song take flight..."

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #137 on: March 16, 2006, 08:03:42 AM »
Hmmm, ok.  No, the spell is the original spell.  Specifically I want the NPC's skin to be gold-colored, or as close to gold as possible.  Is there a good color index for that?  As for picking pockets, no problem, that was just a fun little bonus I wanted to throw in, not necessary for this NPC.

Re: the paperdoll--there is one paperdoll already in the game that would be PERFECT.  If I could change the NPC's paperdoll and avatar to one of the elven mage ones, it would be ideal--specifically, the one with the hood covering the top half of the head.  This one is absolutely perfect--it looks exactly like I have always envisioned this NPC.  Problem is, he has to be a human mage, not an elven one.  Is there anyway at all I can have his avatar and paperdoll changed (but not change the avatar/paperdoll for human mages in general?)  I suppose if I had to change the generic human-mage avatar/paperdoll that wouldn't be so bad; the only other NPC it would affect would be Edwin.  I want this avatar/paperdoll to be used all the time, though, not just when he has a specific type of robe on.

Any thoughts?  Perhaps if I create a special kit for him?  Would that change anything?  If absolutely necessary, just knowing how to make a patch that changes the human-male-mage avatar/paperdoll to that of an  elven-male-mage would be sufficient, provided I can make it universal regardless of the NPC's robe.

Offline taplonaplo

  • Planewalker
  • *****
  • Posts: 14
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #138 on: March 16, 2006, 08:27:09 AM »
correct me if i'm wrong but if you change the animation in shadowkeeper your paperdoll will be affected too . I remember reading something about "avatar morphing script" that was meant to do something familiar but i couldn't get it work (in tutu)
« Last Edit: March 16, 2006, 08:29:39 AM by taplonaplo »

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #139 on: March 16, 2006, 08:58:14 AM »
I'll definitely have to take a look at that.  There are some things I need to fix about the original CRE before I can release this anyway.

And speaking of releasing this...um, how can I do that? Is there a way to release it here on Pocket Plane, or if not, does anyone have any other recommendations.  Of course here would be my first choice since this is where people have been helping me out, but I get the impression that all the mods here on this site are by a specific group of people.  Is there, perhaps, someone I can email here at PP about perhaps putting this mod up for download?  Granted it is fairly small (I'm adding banters now, and there are still no interjects) but it will grow and in the meantime, the sheer fame of this particular NPC should draw at least a FEW downloads :D.

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #140 on: March 17, 2006, 12:04:34 AM »
Whew, thanks for everyone's help!  The "alpha" version of this mod is now available--the joinable NPC, custom portrait and soundset, dialogs and several banters.  More will be coming soon.  You guys really helped me a lot so please have a look at the mod and tell me what you think!

The character is none other than Raistlin Majere of the Dragonlance novels :). The file is at: http://creek-stone.tripod.com

Biubid_boy

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #141 on: March 17, 2006, 06:39:47 AM »
I'm back! And still making an NPC. Everythings ready, but theres a problem with my tp2 file. If I put the sound setup code first in my file, only the sound, not the portrait works. If I put the potrtait code first only the portrait works. How do you get both to work?

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #142 on: March 17, 2006, 07:13:15 AM »
I'm back! And still making an NPC. Everythings ready, but theres a problem with my tp2 file. If I put the sound setup code first in my file, only the sound, not the portrait works. If I put the potrtait code first only the portrait works. How do you get both to work?

This kind of code will work:

Code: [Select]
COPY ~Jelina/Creatures/G#JLNA7.cre~ ~override/G#JLNA7.cre~
     ~Jelina/Creatures/G#JLNA8.cre~ ~override/G#JLNA8.cre~
     ~Jelina/Creatures/G#JLNA9.cre~ ~override/G#JLNA9.cre~
     ~Jelina/Creatures/G#JLNA10.cre~ ~override/G#JLNA10.cre~
SAY NAME1 ~Jelina~
        SAY NAME2 ~Jelina~
        SAY SELECT_ACTION1 ~Stuff~ [FILENAME]
        // SAY the various other lines
        WRITE_ASCII PORTRAIT_SMALL ~G#JLINAS~
        WRITE_ASCII PORTRAIT_LARGE ~G#JLINAM~

Just don't have any blank lines inbetween stuff.  Or is that not what you meant by sound and portrait code?
"You alone can make my song take flight..."

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #143 on: March 17, 2006, 09:17:10 AM »
Oooh, ooh, ooh, I can answer this one too!

The way I did it was to change the portrait in the CRE file itself. My method was to create a character, then use Shadowkeeper to edit it and (among other things) change the portraits, both large and small.  That way in the tp2 file I didn't have to mention the portrait at all, just the sounds.

That might work for you too :D

Offline taplonaplo

  • Planewalker
  • *****
  • Posts: 14
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #144 on: March 17, 2006, 01:21:58 PM »
oks, i test it in a minute.
You should create a backup folder in the RaistlinMajere folder, for safety reasons. that's the most important imo
btw, my name is taplonaplo :)
ok a few things: the portrait is stored in the override or portraits folder so you HAVE to copy it too
it uses the "well then" sound too instead of the "You can rest assured that *I* am still loyal."
it would be nice if he had some spells memorized
« Last Edit: March 17, 2006, 01:47:42 PM by taplonaplo »

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #145 on: March 17, 2006, 03:34:41 PM »
Thanks tap! Did I spell your name wrong?  I didn't realize I forgot to copy the portrait, I will do that right away, and fix the soundset as well.  He has no spells memorized because he just got here from the spirit world :).  I suppose I need to explain that in the dialog though, so I will edit that as well.

EDIT: The portraits are now included and the sound bug is fixed :). Thanks taponapla!

As soon as I can figure out how to do interjects I'll be adding some of those.  I just found out there are already some people from Dragonlance in the game (Knights of Solamnia in the Sphere) so I am dying to add a Raistlin conversation there, plus I can't wait to add the banters with the PC.

Speaking of banters, I have more questions.  I recently downloaded Xan for BG2 (and I love it, it's a great mod), but I notice that in testing the two NPCs, Xan has already done 3 banters, while Raist has not done a single one. I am a little worried that his banters may not be working.  Any advice?

The other question has to do with the PC banters I am trying to add. I want Raist to talk to the PC, just like the other NPCs do, but I can't get it to work. I've been using <IF ~Global("WeAlreadyTalkedAboutThis","LOCALS",1)~ THEN BEGIN RaistTalks1> type statements like the ones in this tutorial, only placed in the banter file instead of the initial dialogue file.  The PC banters are located after all the CHAINs for the NPC banters.  But WeiDU encounters a problem right at the first IF. Any ideas?
« Last Edit: March 17, 2006, 08:09:24 PM by KingMick »

flameswing

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #146 on: March 18, 2006, 08:25:29 AM »
hokay. sorry to bother yet again. i need something explained please. Now, to whoever answers this, thanks heaps. Please explain it in really simple terms, as though to a REALLY slow child. (Witness Flames -16 y/o australian.... believe me, it NEEDS to be simple)
1. interdia.2da and pdialogue.2da.....do i actually need files named those things in order for the banter to work? If so, exactly what should i put in it? if not.....what is their purpose??
2. Name still not working, so i'm probably going to start the NPC from scratch *sigh*
3. anyone know how to use THEN EXTERN.....couldn't quite figure it out.....because should the PC decide to be an ass i was thinking of having Aerie have a whinge....in the initial dialogie before my NPC joins the party.(refer to stupid child thing again)
4. Last one. Moving my entire party. I know i asked this before, but i didn't realy get an answer. i can get my NPC to move, but not the party.....any ideas?

Alright. Cheers everyone.

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #147 on: March 18, 2006, 09:56:40 AM »
The other question has to do with the PC banters I am trying to add. I want Raist to talk to the PC, just like the other NPCs do, but I can't get it to work. I've been using <IF ~Global("WeAlreadyTalkedAboutThis","LOCALS",1)~ THEN BEGIN RaistTalks1> type statements like the ones in this tutorial, only placed in the banter file instead of the initial dialogue file.  The PC banters are located after all the CHAINs for the NPC banters.  But WeiDU encounters a problem right at the first IF. Any ideas?

You want the check to be for 0 and then set it to 1 after it starts.  So...

IF ~Global("WeAlreadyTalkedAboutThis","LOCALS",0)~ THEN BEGIN RaistTalks1
 ~Blah~ DO SetGlobal("WeAlreadyTalkedAboutThis","LOCALS",1)~

CHAINs effectively END your banter file so you'll either have to put your CHAINs all at the end of the file or you'll have to APPEND.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline Kismet

  • Devil's Minion #5
  • Global Moderator
  • Planewalker
  • *****
  • Posts: 653
  • Gender: Female
  • Veni; Vidi; Velcro.
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #148 on: March 18, 2006, 10:03:12 AM »
hokay. sorry to bother yet again. i need something explained please. Now, to whoever answers this, thanks heaps. Please explain it in really simple terms, as though to a REALLY slow child. (Witness Flames -16 y/o australian.... believe me, it NEEDS to be simple)
1. interdia.2da and pdialogue.2da.....do i actually need files named those things in order for the banter to work? If so, exactly what should i put in it? if not.....what is their purpose??
2. Name still not working, so i'm probably going to start the NPC from scratch *sigh*
3. anyone know how to use THEN EXTERN.....couldn't quite figure it out.....because should the PC decide to be an ass i was thinking of having Aerie have a whinge....in the initial dialogie before my NPC joins the party.(refer to stupid child thing again)
4. Last one. Moving my entire party. I know i asked this before, but i didn't realy get an answer. i can get my NPC to move, but not the party.....any ideas?

Alright. Cheers everyone.

1. Those files are already in the game.  You just need to append them in your .tp2 file to add in your NPCs dialog files.
2. Make sure you're not using a saved game in which your NPC has already appeared because the .cre file would have been stored locally and won't reflect any changes you've made to it.
3. You wouldn't need to EXTERN in that case, just use INTERJECT.
4. ActionOverride(Player2,LeaveAreaLUA("NewArea","",[626.277],6))
         ActionOverride(Player3,LeaveAreaLUA("NewArea","",[583.375],6))
         ActionOverride(Player4,LeaveAreaLUA("NewArea","",[676.312],6))
         ActionOverride(Player5,LeaveAreaLUA("NewArea","",[632.415],6))
         ActionOverride(Player6,LeaveAreaLUA("NewArea","",[717.357],9))
Where "NewArea" is the name of the area file where you want them to go, [###.###] are the coordinates in that area and # is the direction you want them to face.       
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline KingMick

  • Planewalker
  • *****
  • Posts: 32
  • is woefully new to modding
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #149 on: March 18, 2006, 05:07:36 PM »
Ahhhhhh!  Thanks Kismet.  I knew about the 0 1 thing, I just posted it wrong here.  But the thing about putting the chains at the end--I didn't know that part.  Thanks!

Now, does anyone know why my banters never seem to play?
« Last Edit: March 18, 2006, 06:03:59 PM by KingMick »

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: