Jump to content


Photo

Creating NPC


  • Please log in to reply
82 replies to this topic

#61 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 11 December 2004 - 07:25 AM

You can continue writing in the same .d, you only need to make a new dlg, with the BEGIN-action.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#62 kingkiller

kingkiller
  • Member
  • 47 posts

Posted 01 February 2005 - 08:24 PM

I've pretty much followed these instructions, but my person doesn't appear in the area I want him to. It installs fine and I've checked with CLUAConsole to make sure that NPC works and he pops up fine. I've checked the area code several times changing the area and x,y.

This is what I have:

IF
Global("J#FlickExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("J#FlickExists","AR1000",1)
CreateCreature("J#Flick",[807.1222],1)
END
-----------------------------------------------

BACKUP ~FlickNPC\backup~

AUTHOR ~jon@gryphonquest.comt~
BEGIN ~Flick the NPC for BG2:ToB~

COPY ~FlickNPC\FlickS.bmp~ ~override\FlickS.bmp~

COMPILE ~FlickNPC\J#Flick.d~
USING ~~

COMPILE ~FlickNPC\J#Flick.baf~
USING ~~

COMPILE ~FlickNPC\j#ar1000.baf~
USING ~~

COPY ~FlickNPC\J#Flick.cre~ ~override\J#Flick.cre~
SAY NAME1 ~Flick~
SAY NAME2 ~Flick~
WRITE_ASCII 0x34 ~FlickS~ //small portrait
WRITE_ASCII 0x250 ~J#Flick~ // class script
WRITE_ASCII 0x2CC ~J#Flick~ //Dialog
WRITE_ASCII 0x280 ~Flick~ // death variable

EXTEND_BOTTOM ~Ar1000.bcs~ ~Override/j#ar1000.bcs~

APPEND ~pdialog.2da~
~Flick J#FlickP J#FlickJ J#FlickD J#Von25P J#Von25J J#Von25D J#Vond25~
UNLESS ~Flick~
IF ~25POST~
-------------------------------------------------
The current way I've used to check is to start a tutorial and use CLUAConsole to go to the area, but I don't think that would be the problem, would it?

#63 Meira

Meira

    I'm the snow on your lips

  • Member
  • 411 posts

Posted 01 February 2005 - 10:00 PM

Have you checked what else is in the AR1000 .bcs? If there is something that is always true *before* you script block your stuff never gets done.
Ihmeellinen meri

Kummalliset kalat liukuvat syvyydessä,
tuntemattomat kukat loistavat rannalla;
olen nähnyt punaista ja keltaista ja kaikki toiset värit -
mutta ihana meri on vaarallista nähdä,
se herättää tulevien seikkailujen janon:
mitä on tapahtunut sadussa, on tapahtuva minullekin.

- Edith Södergran


Amber - The BG2 NPC Mod Project Now released!
Amber's discussion forum at Gibberlings 3

#64 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 02 February 2005 - 07:50 AM

As a general rule, try to use EXTEND_TOP, rather than EXTEND_BOTTOM.

And, you don't have to compile it before extending. EXTEND_BOTTOM ~Ar1000.bcs~ ~FlickNPC\J#Flick.baf~ works wonders. :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#65 kingkiller

kingkiller
  • Member
  • 47 posts

Posted 02 February 2005 - 06:16 PM

Thanks, now he shows up in the area!

But, his leaving party text doesn't seem to work.

What I have:

BEGIN J#FlickP

IF ~Global("FlickJoined","LOCALS",1)~ THEN BEGIN KickOut
SAY ~Though I think it not the best decision, I will abide by it if it is your will to kick me out of the party.~
IF ~~ THEN REPLY ~Oops, I meant to boot that twit Anomen, not you. Sorry~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~That's right, I don't want you in the party.~ DO ~SetGlobal("FlickJoined","LOCALS",0)~ EXIT
END

IF ~Global("FlickJoined","LOCALS",0)~ THEN BEGIN Rejoin
SAY ~You want me to rejoin?~
IF ~~ THEN REPLY ~That's right Flick, get back in formation.~ DO ~SetGlobal("FlickJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~That's right, I don't want you in the party.~ EXIT
END

----------------------------------------------

Instead of coming up with that it just comes up with the the default multiplayer dialogue.

#66 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 02 February 2005 - 06:49 PM

You'll have to open your .cre-file and uncheck the Export Allowed-flag. :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#67 kingkiller

kingkiller
  • Member
  • 47 posts

Posted 02 February 2005 - 09:58 PM

It worked, thanks.

#68 kingkiller

kingkiller
  • Member
  • 47 posts

Posted 13 February 2005 - 09:25 PM

Does anybody know of a detailed explanation on (.d) files or a NPC's (.d) file that could further my understanding.

Also, because of my frustrations with making my first NPC, I made a NPC Tutorial, which I hope is easier to understand and I wondered if I could get any feedback (whether I made a mistake or not, etc.) on it. It's located here.

#69 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 14 February 2005 - 07:43 AM

@ .d-files: How do you mean?

@ Tutorial: You're not really explaining exactly what you are doing, which makes it hard for newbies to follow. Throw in some more details on all the stuff, and it'll be quite good.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#70 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 14 February 2005 - 08:04 AM

Does anybody know of a detailed explanation on (.d) files or a NPC's (.d) file that could further my understanding.

The WeiDU readme is a good place to start, not to mention the weidu/examples folder.  IESDP would be a big help as well.

Also, because of my frustrations with making my first NPC, I made a NPC Tutorial, which I hope is easier to understand and I wondered if I could get any feedback (whether I made a mistake or not, etc.) on it.  It's located here.

View Post


Were you using Ghrey's original tutorial or his updated one here?  I don't see how your tutorial explains more than Ghrey's does.

#71 -Guest-

-Guest-
  • Guest

Posted 14 February 2005 - 02:14 PM

I didn't mean that it necesarily explains more, but more trying to simplify making it a tutorial of only the bare minimum of a NPC (mostly cutting the dialogue a whole lot, so your left with the basic dialogue) and make it easier to understand (I had a really hard time going through his tutorial and ended up using the beginning of this topic as a sort of tutorial for the tutorial.)

#72 kingkiller

kingkiller
  • Member
  • 47 posts

Posted 14 February 2005 - 02:17 PM

I didn't mean that it necesarily explains more, but more trying to simplify making it a tutorial of only the bare minimum of a NPC (mostly cutting the dialogue a whole lot, so your left with the basic dialogue) and make it easier to understand (I had a really hard time going through his tutorial and ended up using the beginning of this topic as a sort of tutorial for the tutorial.)

View Post


That was me, but I forgot to log on.

#73 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 14 February 2005 - 03:17 PM

Well, if you just say "this is what you should type" and not explain exactly what you're doing, new weidu-users won't understand what the different things are.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#74 kingkiller

kingkiller
  • Member
  • 47 posts

Posted 15 February 2005 - 03:55 PM

True, which is the goal I will be trying to reach as I continue to edit and add onto it, but mostly I'll be able to see how effective it is when I get somebody who has never made an NPC before use my tutorial (perferably in a situation like mine without having any Weidu experience, because that is why I began writing this tutorial.) So I probably won't leave the tutorial in a frozen state, but continually try to update it and improve it (at least at first.)

#75 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 15 February 2005 - 04:00 PM

I'd say that's a good idea. It's best to explain everything as carefully as possible.

I can provide some other feedback on the already existing contents in the mod, if you wish. :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#76 Shed

Shed

    -Shed-

  • Modder
  • 2636 posts

Posted 16 February 2005 - 04:57 AM

Begin YCN

IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Hello, do you wish for me to join your party?~
IF ~~ THEN REPLY ~Yes, join the party.~ DO ~SetGlobal("YCNJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~No.~ EXIT


You missed an END there ;). But as SConrad says, explaining exactly what you are doing at every stage is good for a tutorial.

#77 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 16 February 2005 - 05:38 AM

I spotted a few other pure coding-mistakes in the tutorial, as well, which I can point out if you wish.

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#78 kingkiller

kingkiller
  • Member
  • 47 posts

Posted 17 February 2005 - 07:42 PM

But as SConrad says, explaining exactly what you are doing at every stage is good for a tutorial.

View Post


The only thing about this is that if it is not done in a good format it can result in an overflow of words and the tutorial becomes a mess. A major aspect is that it is broken into different sections on different pages, but I still need to figure out a better way of writing it so that the code (that's probably not the best word, but I can't come up with anything better) and comments aren't getting mixed up.

However, thanks for the correction! I would (*wince* even though it's hard) be glad to hear anymore corrections or aspects that I could improve (I hope they don't punch too hard.)

#79 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 18 February 2005 - 08:20 AM

Use boxes.

Now, did you want me to point out more mistakes or not? :)

Posted Image Khadion NPC mod - Team leader, head designer
Posted Image Hubelpot NPC mod - Team leader, coder
Posted Image NPC Damage - Coder
Posted Image PC Soundsets - Coder, voice actor
Posted Image Brythe NPC mod - Designer
Posted Image DragonLance TC - Glory of Istar - Designer
Posted Image The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
Posted Image The Jerry Zinger Show - Producer

Iron Modder 5 - Winner


#80 kingkiller

kingkiller
  • Member
  • 47 posts

Posted 19 February 2005 - 08:17 PM

That's a good idea, I'll have to see when I'll be able to implement it (It might be a little while, because I've been pretty busy) and you're welcome to point out mistakes so I can fix them.