Jump to content


Photo

Ghrey-tutorial based NPC troubleshooting


  • Please log in to reply
15 replies to this topic

#1 Jerdol

Jerdol
  • Member
  • 26 posts

Posted 28 July 2004 - 10:25 PM

After lots of trial, error, and fixing dozens of mistakes in my '.d', I finally completed my first mod: an extremely simple NPC.  I then loaded up the game, loaded a save that could actually reach the government district (where I decided to place him, my real one is in the underdark), and went to his location.

Unfortunately, I had accidentally given him a enemy/ally status of PC, and as soon as I spoke to him he said some default "you kicked me out" line, and walked away.

I then changed his enemy/ally status to "neutral", and did the same thing.  This time that didn't happen.  Instead, as soon as I entered the government district, the game froze.

I changed it back to PC, and the game froze again when I entered the government district.

What'd I do wrong?

Here's a copy of the area appending file:

IF
Global("BarghterExists","AR1000",0)
THEN
RESPONSE #100
SetGlobal("BarghterExists","AR1000",1)
CreateCreature("Barghter",[2902.1195],3)
END

#2 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 28 July 2004 - 11:35 PM

It should be flagged neutral.

A couple of questions: Is your location in the save inside the Government District, or outside it?

Did you change the script, or anything else besides the .cre when it didn't work the first time?

Did you uninstall the mod before editing the .cre and then reinstalled the mod?

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


#3 Jerdol

Jerdol
  • Member
  • 26 posts

Posted 29 July 2004 - 12:20 AM

Is your location in the save inside the Government District, or outside it?

No, autosave from the slums.

Did you change the script, or anything else besides the .cre when it didn't work the first time?

I don't think so.

Did you uninstall the mod before editing the .cre and then reinstalled the mod?

Yes.


Btw, I just think my I have spotted an error. The annotation of Ghry's tutorial has the following line:

EXTEND_BOTTOM ~AR1000.bcs~ ~VondoTheNPC\J#AR1000.bcs~

When I did that the first time (with changed file-names) it sayed "error loading VondoTheNPC\J#AR1000.bcs", and my NPC never appeared in the gov district.

I tried changing the end of the tp2 line to J#AR1000.baf, and the crash occured.

I just now realized that the compiling sent the .bcs file to the override! Was the line supposed to be perhaps:
EXTEND_BOTTOM ~AR1000.bcs~ ~override\J#AR1000.bcs~ ?

#4 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 29 July 2004 - 12:30 AM

Yes. If you've compiled a .baf to a .bcs it's in the override.

However, you don't need to do that. It's enough to EXTEND_BOTTOM ~Ar0100.bcs~ ~Folder\script.baf~. You can see a previous post from me about that problem here.

You shouldn't use J#, however. That's Ghrey's prefix.

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


#5 Jerdol

Jerdol
  • Member
  • 26 posts

Posted 29 July 2004 - 01:10 AM

EXTEND_BOTTOM ~AR1000.bcs~ ~VondoTheNPC\J#AR1000.bcs~

I don't, nor do I use Vondo. I was just retaining the old names for the example.


I tried both corrected tp2 options, and the game still crashes. Here'a a copy of the updated tp2 file.

BACKUP ~BarTheNPC~
AUTHOR ~iscbrooks@yahoo.com~
BEGIN ~Barghter the Kensai.~

COMPILE ~BarTheNPC\JOBarghter.d~
USING ~~

COMPILE ~BarTheNPC\JOBarghter.baf~
USING~~

COPY ~BarTheNPC\Barghter.cre~ ~override\Barghter.cre~
SAY NAME1 ~Barghter~
SAY NAME2 ~Barghter~
WRITE_ASCII 0x34 ~MONTARS~
WRITE_ASCII 0x250 ~JOBarghter~
WRITE_ASCII 0x2CC ~JOBarghter~
WRITE_ASCII 0x280 ~Barghter~

EXTEND_BOTTOM ~AR1000.bcs~ ~BarTheNPC\BARAR.baf~

APPEND ~pdialog.2da~
~Barghter JOBarghterP JOBarghterJ JOBarghterD~
UNLESS ~Barghter~


#6 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 29 July 2004 - 03:34 AM

APPEND ~pdialog.2da~
~Barghter JOBarghterP JOBarghterJ JOBarghterD~
UNLESS ~Barghter~


Your dialog/script file names are too long. They can only be 8 characters, so you should shorten those. I don't think that having dialog names that are too long would crash the game though.

I'd advise against using WRITE_ASCII for assigning dialog/script files. When you're editing your .cre file, just change them then.

#7 Jerdol

Jerdol
  • Member
  • 26 posts

Posted 29 July 2004 - 04:33 AM

I'd advise against using WRITE_ASCII for assigning dialog/script files. When you're editing your .cre file, just change them then.

Truth be told, I didn't really understand those two and basically just copied them off the tutorial (changing the names to fit my prefixes and Char name).

I changed the dialogs to JOBarghJ and JOBarghP. No difference.

#8 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 29 July 2004 - 10:09 AM

Would you mind sending the whole mod to me? If I can see the whole mod, I might see the problem easier.

sebastian8987@edu.upplands-bro.se

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


#9 Jerdol

Jerdol
  • Member
  • 26 posts

Posted 31 July 2004 - 10:01 AM

Firstly, as mentioned, you shouldn't assign dialogue, deathvariable and scripts through WRITE_ASCII in the tp2. Your .cre file's already bad as it is:

DPLAYER3 - the script should go away.
Please unflag the (Export allowed).


I don't really know how to change the .cre file much, the changes I made being with shadowkeeper. I don't know how to unflag the export allowed, or provide alternatives for whatever it is WRITE_ASCII does.

#10 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 31 July 2004 - 10:32 AM

Firstly, as mentioned, you shouldn't assign dialogue, deathvariable and scripts through WRITE_ASCII in the tp2. Your .cre file's already bad as it is:

DPLAYER3 - the script should go away.
Please unflag the (Export allowed).


I don't really know how to change the .cre file much, the changes I made being with shadowkeeper. I don't know how to unflag the export allowed, or provide alternatives for whatever it is WRITE_ASCII does.

Use Near Inifinity to open your .cre-file. This should always be the way to edit your creatures. Using WRITE_ASCII is not recommended.

Making changes with Shadowkeeper to something else but your savegames (i.e. modding with SK), is not recommended either.

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


#11 Andyr

Andyr

    HERR RASENKOPF

  • Member
  • 2318 posts

Posted 31 July 2004 - 03:10 PM

What's wrong with WRITE_ASCII? It's how I do several things...
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

< jcompton > Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

#12 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 01 August 2004 - 01:30 AM

What's wrong with WRITE_ASCII? It's how I do several things...

It's nothing wrong, it's just that I personally don't recommend newbie modders to use a method much more complicated and difficult when there are other, easier means, to do the exact same thing.

No offence, Jerdol.

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


#13 Jerdol

Jerdol
  • Member
  • 26 posts

Posted 01 August 2004 - 02:20 AM

Okay, I got rid of the DPlayer3 script and the export allowed flag, and now the game no longer crashes when I enter the government district. However, Barghter doesn't approach me and when I talk to him manually it says he has nothing to say to me.

Here's the new tp2 file, and the new .cre file:

BACKUP ~BarTheNPC~
AUTHOR ~iscbrooks@yahoo.com~
BEGIN ~Barghter the Kensai.~



COMPILE ~BarTheNPC\JOBarghter.d~
USING ~~

COMPILE ~BarTheNPC\JOBarghter.baf~
USING~~

COPY ~BarTheNPC\Barghter.cre~ ~override\Barghter.cre~
SAY NAME1 ~Barghter~
SAY NAME2 ~Barghter~


EXTEND_BOTTOM ~AR1000.bcs~ ~BarTheNPC\BARAR.baf~

APPEND ~pdialog.2da~
~Barghter JOBargh JOBarghP JOBarghD~
UNLESS ~Barghter~
UNLESS ~25POST~


APPEND ~pdialog.2da~
~Barghter JOBargh JOBarghP JOBarghD JOBar25P JOBar25J JOBar25D JOBar25~
UNLESS ~Barghter~
IF ~25POST~  

Note that I didn't actually make the 25 files. I'd like to focus on just making it work for now, and making it TOB compatible later.

Attached Files


Edited by Jerdol, 01 August 2004 - 02:22 AM.


#14 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 01 August 2004 - 02:29 AM

The problem now is that you don't have any dialogues or scripts assigned to him (that's what you did with WRITE_ASCII before). Now you need to do it with NI. It's no difficult thing at all.

Have you changed the .d-file, btw?

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


#15 Jerdol

Jerdol
  • Member
  • 26 posts

Posted 01 August 2004 - 06:42 AM

Okay, I made the changes and now the mod works fine. Thanks to you, I am now on the road to becoming a hopeless mod addict. :D :D

#16 SConrad

SConrad

    I swear to drunk I'm not God

  • Administrator
  • 11148 posts

Posted 01 August 2004 - 09:40 AM

Happens to us all. Until we find IRC.

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