Jump to content

Photo

Discussion: How to make an NPC if you are a NOOB.


59 replies to this topic

#46 Rurokenrox91

Rurokenrox91
  • Members
  • 2 posts

Posted 27 February 2007 - 04:00 PM

Ok, thanks for the help with the .bcs. I'll haveta figure out the .tlk file.

#47 Jenova

Jenova

    Fallen from Heaven

  • Members
  • 89 posts
  • Location:Warsaw, Poland

Posted 01 March 2007 - 11:28 PM

Ok, so I have a very noobish question.

I already have the *.d file ready and begin making the *.cre file. Now this is where I get stuck. ;)

I open up NearInfinity and follow the tutorial.
"10) Scroll down until you get to Override Script: type in K#John (or whatever your npc's filename is)"
Huh? :D
I can type my file name but I can't make NearInfinity find it, I got a list of in-game (I guess) *.bcs files to choose from and can't do anything do make it I#Saman (the name of the file I made).

The same is with the Death Variable and Dialog.

Some help, for a poor noob, please? ;)

#48 Miloch

Miloch

    Barbarian

  • Modders
  • 4803 posts
  • Gender:Male
  • Location:At Large

Posted 02 March 2007 - 03:18 AM

It won't be able to find the files until you install them into your override. You would need code in your TP2 similar to the following:
COPY ~YourMod/scripts/i#saman.baf~ ~YourMod/scripts/i#saman.baf~

COMPILE ~YourMod/scripts/i#saman.baf~ //automatically compiles .bcs to override
If you don't actually have a script yet, just leave it blank until you do. Dialog compilation should be similar, though I don't know the exact syntax offhand. As for death variable, that is not an actual file. You should be able to just set that to whatever you want to refer to (usually same as your CRE file name).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"The trouble with having an open mind, of course, is that people will insist on coming along and trying to put things in it." -Terry Pratchett


#49 pro5

pro5
  • Modders
  • 304 posts
  • Gender:Male

Posted 02 March 2007 - 03:27 AM

Right-click the field you want to edit and choose "Edit as String". Don't forget that all resrefs cannot be longer than 8 characters.

#50 Jenova

Jenova

    Fallen from Heaven

  • Members
  • 89 posts
  • Location:Warsaw, Poland

Posted 02 March 2007 - 06:18 AM

Can't believe it, it actually worked! Thank's guys! ;)

#51 Ebola Bear

Ebola Bear
  • Members
  • 6 posts

Posted 14 December 2007 - 09:16 PM

So... I've been following along with this tutorial (and a couple of others like it elsewhere) and have hit a snag. I've got the NPC in the game. She spawns right, she does her intro dialogue right. Then I kick her out, and she doesn't use the parting dialogue that I so lovingly coded for her. I invite her back into the party, and she persists in not using it. She uses instead some generic dialogue that I don't recognize. I wonder if anyone might have any bright ideas about what could be going wrong? Here's the contents of my .d file, if it helps:

BEGIN EBJes

IF ~NumTimesTalkedTo(0)~ THEN BEGIN Talk1
SAY ~Hi ho, travelers! Jessica's the name, adventuring's the game! You look like an interesting sort... Might I ask your name?~
IF ~~ THEN REPLY ~I am <CHARNAME>, strange one.~ GOTO HiThere
IF ~~ THEN REPLY ~I'm sorry, I don't have time to talk to you right now.~ GOTO NiceEnd
IF ~~ THEN REPLY ~I'm afraid I don't have the time to chat with crazies today, toots.~ GOTO RudeEnd
END

IF ~~ THEN BEGIN HiThere
SAY ~You look like you're headed someplace exciting. Mind if I tag along?~
IF ~~ THEN REPLY ~Certainly.~ DO ~SetGlobal("JessJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Not now, I'm afraid. Perhaps another day.~ EXIT
IF ~~ THEN REPLY ~I most certainly DO mind, nutjob. Bugger off.~ EXIT
END

IF ~~ THEN BEGIN RudeEnd
SAY ~Hmmf! Have it your way, then!~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN NiceEnd
SAY ~Very well then. I'll just, eh, keep hanging around right here, I guess.~
IF ~~ THEN EXIT
END

IF ~NumTimesTalkedToGT(0)~ THEN BEGIN Talk2
SAY ~Well hello again, Big Important Adventurers! Feel like bringing me along this time? You won't regret it! (She brandishes her swords wildly, grinning and winking at you between the bright, flashing blades)~
IF ~~ THEN REPLY ~Why, of course! How can I turn you down after such an impressive display?~ DO ~SetGlobal("JessJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Hmmm... Nope. Still not interested.~ EXIT
END

BEGIN EBJesP

IF ~Global("JessJoined","LOCALS",1)~ THEN BEGIN LeaveGroup
SAY ~What's going on? I thought we were having fun?~
IF ~~ THEN REPLY ~We sure were. Let's keep going.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~Maybe you were... But the fun faded for me some time ago. Run along, now.~ DO ~SetGlobal("JessJoined","LOCALS",0)~ EXIT
END

IF ~Global("JessJoined","LOCALS",0)~ THEN BEGIN ComeBack
SAY ~So... Shall we re-start the party? (hot dance move)~
IF ~~ THEN REPLY ~Hell yeah. Welcome back, baby.~ DO ~SetGlobal("JessJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~I hate your little dance with every fiber of my being, Jessica. Stay away from me.~ EXIT
END


It's the "EBJesP" that I think isn't working, I guess, although... If the global "JessJoined" isn't getting set properly, that might produce my problem, right? I'm very much in the dark here, and any suggestions would be appreciated.

#52 Mike1072

Mike1072
  • Gibberling Poobah
  • 2469 posts
  • Gender:Male
  • Location:Canada

Posted 14 December 2007 - 09:38 PM

Is the 'Export Allowed' flag set in your NPC's .cre file? Using Near Infinity, under the 'Flags' entry, be sure that 'Export Allowed (11)' is unchecked.

#53 Ebola Bear

Ebola Bear
  • Members
  • 6 posts

Posted 14 December 2007 - 09:42 PM

It's unchecked.

#54 Kulyok

Kulyok
  • Modders
  • 5771 posts
  • Gender:Female
  • Location:Moscow, Russia

Posted 15 December 2007 - 12:54 AM

Check your .tp2 file and make sure her dialogue files get appended to pdialog.2da properly. I'd also recommend to check for KickOutVar=0 in her parting dialogue(the way NPC mods usually do it), instead of checking for JoinedVar=1.

#55 Ebola Bear

Ebola Bear
  • Members
  • 6 posts

Posted 15 December 2007 - 09:49 AM

Hey, appreciate the suggestions!

Sadly, the variable switching didn't work for me. I changed instances of "JessJoined" to "JessKickedOut" in the parting dialogue portion, and switched the ones to zeros and vice-versa. Still not working, in-game I get the same generic dialogue from the npc on kicking-out/re-joining. I think the pdialogue.2da is getting appended properly... After install I checked with NI and found all my variables slapped on the bottom of the file there. If it helps, here is the appending portion of the .tp2:

APPEND ~pdialog.2da~
~EBJes EBJesP EBJesJ EBJesD EBJes25P EBJes25J EBJes25D EBJes25~
UNLESS ~EBJes~


APPEND ~interdia.2da~
~EBJes EBJesB EBJesB25~
UNLESS ~EBJes~


Does this look right? I feel like there must be something simple that I'm screwing up, like a typo or something, but I can't for the life of me find it.

#56 berelinde

berelinde

    The Typo Queen

  • Gibberlings
  • 8594 posts
  • Gender:Male
  • Location:New Jersey, USA

Posted 15 December 2007 - 10:12 AM

What DV are you assigning to the CRE? How are you doing so?
Must. Write. Faster.

cmorgan: "None of us get old around here, just more proficient at doing more stuff with less braincells!"

berelinde's mods
TolkienAcrossTheWater website
TolkienAcrossTheWater Forum

#57 Ebola Bear

Ebola Bear
  • Members
  • 6 posts

Posted 15 December 2007 - 10:20 AM

The DV is set to "EBJes". I used NI.

#58 Kulyok

Kulyok
  • Modders
  • 5771 posts
  • Gender:Female
  • Location:Moscow, Russia

Posted 15 December 2007 - 10:40 AM

Do you have other mods installed? Particularly Virtue - it shouldn't be installed _before_ any mods. But anyway, have you tried it on a clean install?

#59 Ebola Bear

Ebola Bear
  • Members
  • 6 posts

Posted 15 December 2007 - 10:42 AM

Perhaps I should have... I haven't got Virtue, but I do have the G3Fixpack, Tweaks, DungeonBeGone, Level1NPCs, and Fade.

#60 Ebola Bear

Ebola Bear
  • Members
  • 6 posts

Posted 15 December 2007 - 10:45 AM

AHA!!! I just uninstalled Level1NPCs and re-installed my NPC and the parting dialogue worked! Damn... Well, let that be a lesson to me. Thanks, Kulyok.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users