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

Something_Wicked

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #25 on: July 04, 2005, 10:26:36 PM »
Thanks for the help!

Offline Snake

  • Planewalker
  • *****
  • Posts: 1
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #26 on: July 17, 2005, 01:19:56 PM »
This thing has been great so far. but im stuck now for a couple of hours and i cant find out what to do.

I made my dialogue files ( btw all the dialogue, the first time meeting, return meeting, join party, kick from party ) can all be put together in 1 .dlg file right? Anywya, i did all that... but my problem lies with something else.

I booted up near infinity and i found my character in the characters section. And when i click on the character i go to File > Convert CHR to CRE.  I did that, and that it tells me where iwant to save the file. so i made one in the Characters folder. When i refreshed the tree you could see all the CHR in the Character subfolder. and also the .CRE file i just made. So i tried opening it or whatever but it doesnt work. only the tree is visible, the right hand side is completely white. Im a total n00b at any of this and i started my project out of the lack of a good mage in BG 2. From one thing came another and now im trying to create my own Raistlin Majere NPC. So far so good anyway... but im stuck at this point. I cant edit the character values... HELP!

Offline Bjoern

  • Planewalker
  • *****
  • Posts: 7
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #27 on: July 18, 2005, 10:19:31 AM »
Hello, im very new to this forum and also to any kind of programming, but i hope i will catch up soon. I am interested in making my own NPC and to begin with, which programs do i need? the only one i currently have is SK, any links would be welcome. :)

Also high-lighting everything special would be nice :) ie. "BEGIN J#Vondo;) but its not that important..

Offline Bjoern

  • Planewalker
  • *****
  • Posts: 7
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #28 on: July 18, 2005, 02:39:45 PM »
Should all the text within the first part be in a file called for ex. J#Adelstein.d??

this is what ive done..

The file - J#Adelstein.d =

BEGIN J#Adelstein

IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Hello young fellow! My name is Adelstein.~
+ ~GlobalLT("Chapter","GLOBAL",3)~ + ~Hey Adelstein, you havent seen a fellow named Irenicus around here, have you?~ + InquireIrenicus
++ ~Heya.~ + Greet
IF ~Class(Player1,WIZARDSLAYER)~ THEN REPLY ~Ohh! I can tell that you are a Wizard Slayer, just like me, we arent common in these lands.. I would be honored to fight by your side!~ GOTO BothWIZARDSLAYER
IF ~~ THEN REPLY ~Bug off! Or ill cut yer throat!~ GOTO GoAway
END


or should all that text be put in another file??

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 #29 on: July 18, 2005, 03:08:31 PM »
Yes, they should all be in the same file however J# is the prefix that Ghreyfain uses so you should probably use something different.  Also, your BEGIN file name is too long, those can only be 8 characters max.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline Bjoern

  • Planewalker
  • *****
  • Posts: 7
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #30 on: July 18, 2005, 03:17:33 PM »
aha, ok thanks, ill come up with something different then :P

and should Wizard Slayer be one word?

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 #31 on: July 18, 2005, 03:23:02 PM »
http://iesdp.gibberlings3.net/main.htm -- A really necessary resource to have.  Checking kit.ids will show that it is one word.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline Bjoern

  • Planewalker
  • *****
  • Posts: 7
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #32 on: July 24, 2005, 04:28:03 AM »
Code:
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("VondoJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Yeah, but I still don't want you in the party.~ GOTO RefusedAgain
END

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


where should i put this? i the J#Vondo.d file? (or in my case i changed the name to Adel.) because when i look a the summary of all that should be in the J#Vondo.d file, you havent put it there, and i cant seem to find any other place where its supposed to be put..? im putting it there anyway but please tell me if you did just miss it or if its supposed to be somewhere else.

TIA

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 #33 on: July 24, 2005, 05:18:38 AM »
Yes, J#Vondo.d is for all dialog from before the NPC is ever in the party.
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline Bjoern

  • Planewalker
  • *****
  • Posts: 7
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #34 on: July 24, 2005, 10:59:32 AM »
6) Copy/paste WeiDU.exe there and re-name it VondoTheNPC-setup.exe

can you explain this step better? how do i get the "VondoTheNPC-setup.exe" to work with the "VondoTheNPC-setup.tp2"?
where do i get the file weidu.exe? im gonna check the webpage now..

Offline Bjoern

  • Planewalker
  • *****
  • Posts: 7
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #35 on: July 24, 2005, 12:06:24 PM »
I fixed that, but currently im getting this problem :(



Install Component [Adelstein the NPC for BG2:ToB]

[Y]es or [N]o or [Q]uit?
Installing [Adelstein the NPC for BG2:ToB]
Copying and patching 1 file ...
ERROR: error loading [Adel\Adel.cre]
Stopping installation because of error.

ERROR Installing [Adelstein the NPC for BG2:ToB], rolling back to previous state
[Adel\backup/0/UNSETSTR.0] SET_STRING uninstall info not found
WARNING: [Adel\backup/0/UNINSTALL.0] is a 0 byte file
[Adel\backup/0/UNINSTALL.0] loaded, 0 bytes
Will uninstall   0 files for [SETUP-ADEL.TP2] component 0.
Uninstalled      0 files for [SETUP-ADEL.TP2] component 0.

Felix

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #36 on: July 30, 2005, 05:14:07 AM »
Ugh. I think I finally got all of this done as I should, but I have one major problem. No matter what I do, my text files on notepad always end up ".txt". So what's supposed to be the .baf file is "filename.baf.txt" and my tp2 file is "file-setup.tp2.txt". and I can't do anything about it. I did change the dropdown box to "All files" when I saved them, an deverything, but I just can't figure it out.

Offline Bjoern

  • Planewalker
  • *****
  • Posts: 7
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #37 on: July 30, 2005, 07:58:03 AM »
i dont get at all whats supposed to be in the .dlg file, everything seems to be put into the .d file.. whats the use of this .dlg file?
why do i need to create a .dlg file when its all empty?

there should be a summry like, J#Vondo.d is supposed to contain all of this info, J#VondoP.dlg is supposed to contain all of this.. becasue ive read it thru lots of times and i only get more and more confused everytime i read it.. a summary is much needed..

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 #38 on: July 30, 2005, 10:14:05 AM »
i dont get at all whats supposed to be in the .dlg file, everything seems to be put into the .d file.. whats the use of this .dlg file?
why do i need to create a .dlg file when its all empty?

there should be a summry like, J#Vondo.d is supposed to contain all of this info, J#VondoP.dlg is supposed to contain all of this.. becasue ive read it thru lots of times and i only get more and more confused everytime i read it.. a summary is much needed..

A .dlg file is a .d file that's been compiled so that the game engine can read it.  That's why you have the COMPILE ~j#vondo.d~ command in your .tp2 file.  Read here for the explanations of what the various .d files do: http://forums.pocketplane.net/index.php/topic,53.0.html
Cailean - An archer NPC for the insatiably nosy!  Guaranteed more fun than shampooing cats!

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #39 on: July 30, 2005, 12:05:18 PM »
Ugh. I think I finally got all of this done as I should, but I have one major problem. No matter what I do, my text files on notepad always end up ".txt". So what's supposed to be the .baf file is "filename.baf.txt" and my tp2 file is "file-setup.tp2.txt". and I can't do anything about it. I did change the dropdown box to "All files" when I saved them, an deverything, but I just can't figure it out.

Have you turned off visible file extensions in Windows?  If so, just go to your BG2 folder, click the Tools menu, then Folder Options, then click the View tab, and find the checkbox for "Hide extensions for known file types".  Make sure it's unchecked.
Earn Money Sleeping.

Offline dunk

  • Planewalker
  • *****
  • Posts: 15
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #40 on: August 01, 2005, 12:01:41 AM »
Scripts at the moment are unimportant, but for now you should set the override script slot to "J#Vondo".  This means that when we create a J#Vondo.bcs file, it will be assigned to our .cre file.  You should also blank out the leftovers from your .chr file (which should be dplayer3.bcs), and set that to none.  If you want your PC to initiate dialogue as soon as they see the PC, use shoutdl2.bcs.  If you want them to walk up to the PC to start a conversation, use initdlg.bcs.  A basic combat script for them to use would be WTASIGHT.bcs, or WTARSGT.bcs for ranged weapons.  So now we should have J#Vondo assigned to override, initidlg.bcs assigned to a slot further down, and wtasight or wtarsgt.bcs below that.

The dialogue assignment is at 0x330, or in the same area as the Script Name/Death Variable, just a bit further down.  Right-click the field, choose "Edit as String", and type in J#Vondo.  This means when our finished product is installed, and our dialogue compiled, J#Vondo.cre will use J#Vondo.dlg initially.

Where is this dplayer3.bcs?  I don't see anything with that value.

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #41 on: August 01, 2005, 02:25:56 AM »
It should be in the section where five scripts are labelled override, default, class, race, and default.  Not necessarily in that order.
Earn Money Sleeping.

Offline They Sang the Solo

  • Planewalker
  • *****
  • Posts: 2
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #42 on: August 01, 2005, 10:59:22 AM »
I finally have the basics of my NPC complete, with one minor problem. In your tutorial, it suggests making the following to be what activates when you talk to the NPC subsequent times after rejecting them entrance into the 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("VondoJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Yeah, but I still don't want you in the party.~ GOTO RefusedAgain
END

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

---
However, it doesn't show in your "finished product" box at the end of step one, and I'm unsure as to where it belongs in the D file. I have one written myself for my characters diologue after being declined during the first talking, but when I talk to him a second time it acts as though we had never spoken for, which I'm guessing is because of missplacing that block. Where does it belong? and what does the "GT" mean in the ~NumTimesTalkedToGT(0)~? My guess is "greater than", but I could very well be wrong. Here's mine, specifically, so if there are any noticeable errors, let me know, but I basically just need to know where to put it.:

IF ~NumTimesTalkedToGT(0)~ THEN BEGIN ReturnDialogue
SAY ~You've returned! Have you reconsidered?~
IF ~~ THEN REPLY ~I have, and your skills are missed in your absence. Please join me!~ DO ~SetGlobal("ArdanisJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~I have, actually. But I still have no use for you.~ GOTO RefusedAgain
END

IF ~~ THEN BEGIN RefusedAgain
SAY ~Ah, how high you've brought my hopes. Oh well.~
IF ~~ THEN EXIT
END

Offline dunk

  • Planewalker
  • *****
  • Posts: 15
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #43 on: August 01, 2005, 12:12:37 PM »
It should be in the section where five scripts are labelled override, default, class, race, and default.  Not necessarily in that order.

Thanks.  Those were set to "None" before I even started editting the CRE file.

Offline Ghreyfain

  • Moderator
  • Planewalker
  • *****
  • Posts: 4705
  • Gender: Male
    • Pocket Plane Group
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #44 on: August 02, 2005, 12:45:00 PM »
I finally have the basics of my NPC complete, with one minor problem. In your tutorial, it suggests making the following to be what activates when you talk to the NPC subsequent times after rejecting them entrance into the party:

What's the code for you initial meeting?  It should have NumTimesTalkedTo(0) as its condition.  And yes, GT is Greater Than.
Earn Money Sleeping.

Offline They Sang the Solo

  • Planewalker
  • *****
  • Posts: 2
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #45 on: August 02, 2005, 12:47:28 PM »
My first block on my .D is this:

IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Greetings, friend. You'll have to excuse me for smiling like a buffoon. Ha! To meet the Bhaalspawn! If I ever thought I'd meet you, I never thought it would be here at the Crooked Crane.~
IF ~~ THEN REPLY ~I find it strange that everyone seems to know who I am better than I do. How do you know of me? Who are you, exactly? From the color of your skin, I can know vaguely of your origins...~ GOTO ArdanisFriendly
IF ~~ THEN REPLY ~Yeah, yeah. Bhaalspawn. What's it to you?~ GOTO ArdanisFriendly
END

Offline dunk

  • Planewalker
  • *****
  • Posts: 15
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #46 on: August 04, 2005, 07:33:51 PM »
Ok.

I've added Vondo to my game and allowed him to join the party.  The problem is he seems to be constantly trying to initiate dialogue.  A conversation never begins, but he'll stop moving a second or so after I give him the order to move.  And if I try to save the game, it says it's in dialogue mode.

Exxon

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #47 on: August 04, 2005, 09:10:06 PM »
I havent even been able to open anything, I can't even get it on the right path . when I open up command It says that the system file is not sutable for runing MS-DOS and Microsoft Word applications.can somebody help me!! I a complet noobe and only just downloaded WeiDU.

Offline Miss Sakaki

  • Planewalker
  • *****
  • Posts: 62
  • Gender: Female
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #48 on: August 05, 2005, 10:32:14 AM »
This may be a bit of a tall order, but I was wondering if a simple tutorial could be made to instruct how to make a ToB NPC appear and function. This is of course partly self-interested - I've been having major problems with ToB dialogue. My NPC can be summoned by the fate spirit, but then the parting dialogue doesn't function properly! Grrr. Anyway, a set of instructions would be really useful.
Would you give a guy a foot massage? If so, maybe you'd like Nathaniel.

What's a little falsehood between friends? The mysteries of The Luxley Family are soon to be unravelled.

Offline Grim Squeaker

  • Fallen
  • Planewalker
  • *****
  • Posts: 1019
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #49 on: August 05, 2005, 10:36:39 AM »
Most of it can be done by reading the Bioware dialogue/scripting for ToB and adapting this tutorial.
"You alone can make my song take flight..."

 

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)?: