Jump to content


Photo

NPC Creation


  • Please log in to reply
13 replies to this topic

#1 The Masked Marionette

The Masked Marionette
  • Member
  • 33 posts

Posted 26 January 2004 - 07:01 AM

Okay, having had to reinstall BG2 thanks to meddling adults, I decided to do a full install this time, so I can start playing with my modding tools.

I figured that making a simple NPC would be a good place to start.

...I'm confuzzled. I've written his dialog (in Notepad) and created a .CRE from a .CHR using NearInfinity. I renamed the dialog, adding ".d" to the end. Windows hasn't registered this as an extension, merely as an additional two characters to the name. I have no idea if this matters or not...

Anyway, I've read a couple of tutorials, and I'm now well and truly confused. Each seems to tell me to do something different, so I now haven't a clue what I should be doing. There's all this stuff about compiling, but I'm not sure what I'm supposed to compile and how.

So... yeah. As I said, all I currently have is the dialog (in the form of a .txt but named as a .d) and my .cre. If anyone could explain to me what on Earth I'm supposed to do next and, preferably, *why* I'm doing it, I'd be more than grateful. I'd experiment a little further, but I'm a little hesitant 'cause I'm not sure if the whole adding a .d extension thing is effecting what else I've been doing...
The final curtain will fall...

#2 -Guest-

-Guest-
  • Guest

Posted 26 January 2004 - 09:49 AM

You are doing fine.

Use 2 tutorials: Greyfain's and WeiDU, they are the most thorough.

There are a couple of underwater stones in Grey's:

-if created CRE from CHR, do not forget to change the alignment to Neutral, otherwise NPC will be green from the beginning
-Do NOT try to change char's name in the CRE file - use TP2 SAY for it
-you do not need to compile Ds and BAFs before hand - use TP2 to compile
-delete all flags, otherwise your P file will be substituted by multyplayer options (I heard it said that it helps, did not try myself yet)

You are missing an area script (a txt file with an extension .baf) - see Greyfain's tutorial.

Your next step is to put it in the game.

To put it in the game, you need to do the following:

1) create an installer (a copy of weiDU) named like your mod (see section in WeiDU tutorial on putting it in your game)
2) Create a folder with subfolders for raw data files (D, CRE, BAF, ITM) and put it into BGII directory
3) Create TP2 which will "tell" weidu a) were to extract the files B) assign names, portraits, scripts, dlgs etc c) command weiDU to compile D'd and BAF's to DLGs and BSCs
4) in TP2 do 2DA addition of your character specific dialogue files for interactions with other NPC and other texts

Then run your installer and test.

When testing the beginner's problems are (or at least mine were):

-always enter the area where NPC should spawn for the first time at each testing - otherwise saved game will have your previous stuff used
-when replacing the dialog.tlk with your back uped version delete weidu.log

#3 The Masked Marionette

The Masked Marionette
  • Member
  • 33 posts

Posted 26 January 2004 - 01:20 PM

Thanks. I'll give that a bash.
The final curtain will fall...

#4 kirkjobsluder

kirkjobsluder
  • Member
  • 222 posts

Posted 27 January 2004 - 08:14 AM

Ok. Some questions on this subject. I have an NPC created (after a heck of a lot of work.) What is the easiest way to test modifications to the NPC. Is it possible to load in new dialogs without starting the NPC from the beginning?

#5 -Ashara-

-Ashara-
  • Guest

Posted 27 January 2004 - 09:29 AM

In my experience (small one) all changes to dialogues showed up fine even if I used the save on the same screen right before talking to the NPC, but name, portrait, equipment and cre in general would not. One shortcut which I know of is Ctrl+Y your NPC if you re-loaded the saved game on the screen with the NPC (ie not re-entered) re-summon him/her via CLUA.

#6 kirkjobsluder

kirkjobsluder
  • Member
  • 222 posts

Posted 27 January 2004 - 10:22 AM

Ok, found the solution to that problem.

While I'm working on the join/kickout scripts, can someone explain how you get the NPC to go to a specific place when kicked out?

#7 -icelus-

-icelus-
  • Guest

Posted 27 January 2004 - 10:42 AM

I don't know if it's in the NPC Creation tutorial or not, but I'd suggest using Kelsey or Valen or another recent NPC mod as a guide. They should all contain the script that you're looking for, as well as the dialog. All the necessary commands shouldn't be too hard, I wouldn't think (this coming from someone who's never coded an NPC mod in his life. ;) )

#8 kirkjobsluder

kirkjobsluder
  • Member
  • 222 posts

Posted 27 January 2004 - 11:16 AM

I've looked at both of them but come on here. If you want people to learn from your scripts, you have to put in proper comments. (And there are a couple of undocumented things that didn't get into either the Weidu readme or the NPC Creation tutorial that are unecessarily frustrating.)

Is there a function reference for the Infinity Engine? I've been looking but not finding much.

#9 hlidskialf

hlidskialf

    Incarnation of the Eternal Ale Warrior

  • Modder
  • 2510 posts

Posted 27 January 2004 - 12:04 PM

Is there a function reference for the Infinity Engine?  I've been looking but not finding much.

IESDP

The great wolf Fenrir gapes ever at the dwelling of the gods.


#10 kirkjobsluder

kirkjobsluder
  • Member
  • 222 posts

Posted 27 January 2004 - 12:51 PM

Thanks, that hit the spot.

#11 kirkjobsluder

kirkjobsluder
  • Member
  • 222 posts

Posted 25 February 2004 - 07:00 PM

Thanks, that hit the spot.

Ok, back for yet another stupid noob question.

Starting equipment, specifically armor. I tried FillSlot(SLOT_CLOAK) and FillSlot(SLOT_WEAPON) but that deleted the two items I wanted to add. The basic result is that I can get the custom items into the NPC's inventory, but not into the right slots.

I tried iesdp but could not find a solution off hand.

Not a big deal but onward to lovetalk and banter!

#12 cirerrek

cirerrek
  • Member
  • 193 posts

Posted 26 February 2004 - 08:15 PM

Is there a reason that you are trying to equip the items via a script rather than just editing the .CRE's inventory slots?

#13 kirkjobsluder

kirkjobsluder
  • Member
  • 222 posts

Posted 26 February 2004 - 08:42 PM

Is there a reason that you are trying to equip the items via a script rather than just editing the .CRE's inventory slots?

Oh, hadn't thought of that.

#14 cirerrek

cirerrek
  • Member
  • 193 posts

Posted 27 February 2004 - 08:38 AM

It's often a good thing that we aren't modding alone! :D