Jump to content

A Cry for Help From a Desperate Man


Unithralith

Recommended Posts

Alright guys... I've been at this for about two full days straight , and for the life of me, I can't figure out what I'm doing wrong. I'm trying to make my own NPC mod for Baldur's Gate II. I've seen mods around the community, some of which are great and some of which are terrible, and I kept wishing I had the knowhow to make one myself. I've been a DM for years, I'm a trained actor and have significant experience with creative writing. The only thing I am lacking is the programming knowledge.

 

With your help, I KNOW that I can make a fantastic mod that I would be more than happy to share with the community, but first I need to get over this hurdle. Ok... intro over: time to grind the axe.

 

Many of you are likely familiar with Ace's Complete Guide to NPC Creation. When I found a link to it, I was quite excited; it looked like it had everything I needed to make the the starting mod I was looking to create. So anyways, I started writing elaborate dialogue (code included) for my NPC, created a full custom voice set voiced by yours truly, created custom portraits, converted the character file into a CRE file, got my setup files together and so on, but when I tried to install it with WEIDU, I got a perplexing error message. It said "ERROR: error loading [illiathNPC\ILLIATH.CRE]" (My NPC's name is Illiath). I checked to make sure I had the directory written out properly, that the files were named correctly and what have you, and came up empty. I even tried manually copying the CRE file into the override directory in an attempt to subvert the message, to no avail.

 

Naturally being a wise sort of n00b I figured it was something I had screwed up in the code somewhere. After quadruple checking everything in my setup file, I decided to copy and paste EVERYTHING Ace wrote for her example NPC "John" and once I got that working (she said she tested it herself repeatedly, and I saw much praise of it on the forums) I figured I would just modify everything a little bit at a time and make sure it all still works as I go. I even went so far as using the exact same default FIGHTER character template Ace said she used.

 

So like I said, I copy and paste it word for word, and get the following message from WEIDU; "ERROR: error loading [John/JOHN.cre]". My mind just about exploded all over my silly-clown wallpaper.

 

I am just about out of ideas as to what is wrong. My only theory is that WEIDU is upset with me for not having custom Override scripts for my NPCs. (BCS files I believe they are). Either way, it doesn't seem to like something about the CHAR files I convert into CRE files. I'll paste my DEBUG log from the REAL mod I started at the bottom of the post.

 

Please, for the sake of your children, and your children's children, help me make some good BG2 mods!!

 

Wes (aka. Unithralith, Callian, or Sexasaurus Rex)

 

WeiDU v 21100 Log

 

C:\Program Files\Black Isle\BGII - SoA\IlliathNPC\Setup-Illiath.exe

[../CHITIN.KEY] loaded, 655782 bytes

[../CHITIN.KEY] 196 BIFFs, 46423 resources

[dialog.tlk] loaded, 11144186 bytes

[dialog.tlk] 92775 string entries

[../Autorun.ini] loaded, 1452 bytes

[../baldur.ini] loaded, 3315 bytes

Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\]

Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD1\]

Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD2\]

Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD2\]

Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD3\]

Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD4\]

Possible HD/CD Path: [C:\Program Files\Black Isle\BGII - SoA\CD5\]

[../Keymap.ini] loaded, 5423 bytes

[../Mplaynow.ini] loaded, 230 bytes

[C:\Program Files\Black Isle\BGII - SoA\IlliathNPC\Setup-Illiath.exe] Using scripting style "BG2"

[dialog.tlk] claims to be writeable.

[dialog.tlk] claims to be a regular file.

 

Install Component [illiath for BG2:SoA]?

nstall, or [N]ot Install or [Q]uit?

Installing [illiath for BG2:SoA]

Copying and patching 1 file ...

ERROR: error loading [illiathNPC\ILLIATH.CRE]

Stopping installation because of error.

 

ERROR Installing [illiath for BG2:SoA], rolling back to previous state

[illiathNPC\backup/0/UNSETSTR.0] SET_STRING uninstall info not found

Will uninstall 0 files for [sETUP-ILLIATH.TP2] component 0.

Uninstalled 0 files for [sETUP-ILLIATH.TP2] component 0.

ERROR: Unix.Unix_error(20, "stat", "IlliathNPC\\ILLIATH.CRE")

PLEASE email the file SETUP-ILLIATH.DEBUG to Unithralith (Unithralith@hotmail.com)

 

Install Component [illiath for BG2:SoA]?

nstall, or [N]ot Install or [Q]uit? Saving This Log:

 

NOT INSTALLED DUE TO ERRORS Illiath for BG2:SoA

 

WeiDU Timings

OUTER_INNER_PATCH 0.000

READ_* 0.000

COPY 0.000

load TLK 0.000

Parsing TP2 files 0.000

DEFINE_PATCH_MACRO 0.000

DEFINE_ACTION_MACRO 0.000

parsing .log files 0.000

tp2 uninstall 0.000

INCLUDE 0.000

process_patch2 0.000

DEFINE_PATCH_FUNCTION 0.000

eval_pe 0.000

Parsing TPA files 0.015

loading files 0.031

unmarshal KEY 0.063

unmarshal TLK 0.219

stuff not covered elsewhere 4.359

TOTAL 4.687

Link to comment
I'm not sure how you've managed it, but it looks like you've got your Setup-Illiath.exe file in your mod subfolder, instead of in the BG2 directory where it should be.

 

Aha, see, I never thought to do that, silly me. Thanks for the advice, Mike. Progress made; I've gone past that and am on to my next set of errors. I think I should be able to puzzle through some of the rest of these problems myself for now.

 

Don't be surprised if I come back begging for help again though, friends.

 

Thanks again!

Link to comment

Damn, and here I thought I could figure out parse errors...

 

Anybody see any problems here? It all looks right to my inexperienced eye. Please do keep in mind that my dialogue is still beta for now, and some are just placeholders for now. WEIDU is telling me that I have a parse error at line 9 column 1-16.

 

Thanks in advance, friends.

 

BEGIN WR#ILLI

IF ~NumTimesTalkedTo(0)~ THEN BEGIN Talk1

SAY ~Those Shadow Thieves may be fooled, but I've followed you long enough to know that you aren't involved in this little coup. How is it that you came to be here?~

IF ~~ THEN REPLY ~I wish I knew. Who are you?~ GOTO Intr1

IF ~~ THEN REPLY ~I could ask you the same question.~ GOTO Intr1

IF ~~ THEN REPLY ~That's none of your concern.~ GOTO Intr23

IF ~~ THEN REPLY ~You'll have to excuse me, I really must be going...~ GOTO EndTalk

 

IF ~~ THEN BEGIN Intr1

SAY ~I'm Illiath. I'm looking for a mage; male, well muscled, twisted face... Have you seen anyone matching that description?~

IF ~~ THEN REPLY ~Irenicus...~ GOTO Intr11

IF ~~ THEN REPLY ~As if I could forget.~ GOTO Intr11

IF ~~ THEN REPLY ~If I have my way, he'll be dead at my feet soon enough.~ GOTO Intr12

IF ~~ THEN REPLY ~Yes, apparently that mage knows how to unlock great power within me, and I will have that knowedge if I must tear it from his skull.~ GOTO Intr12

IF ~~ THEN REPLY ~No, I haven't seen anybody matching that description.~ GOTO Intr13

 

IF ~~ THEN BEGIN Intr11

SAY ~Made his aquaintance already, I see... much to your misfortune, no doubt. It just so happens that I'm here to end his wicked life.~

IF ~~ THEN REPLY ~So you're an assassin then?~ GOTO Intr21

IF ~~ THEN REPLY ~If you're here to kill him, you've already missed your chance; he fled just before we escaped our cells.~ GOTO Intr13

IF ~~ THEN REPLY ~You'll have to excuse me, I really must be going...~ GOTO EndTalk

 

IF ~~ THEN BEGIN Intr12

SAY ~Then our goals are not dissimilar; I plan to drive a blade through his cold heart. My sources indicated that there was a hidden arcane sanctum beneath Athkatla, riddled with traps. I did a little investigating on my own, and found that this sanctum did indeed belong to one "Jon Irenicus". Have you seen any sign of him thus far? By all accounts he is a powerful mage and we may have a better chance of taking him down if we attack him together.~

IF ~~ THEN REPLY ~So you're an assassin then?~ GOTO Intr21

IF ~~ THEN REPLY ~I'm afraid you've already missed your chance; he fled just before we escaped our cells.~ GOTO Intr13

 

IF ~~ THEN BEGIN Intr21

SAY ~You could say that. However, now is not the time for such a discussion; do you know where Irenicus is now?~

IF ~~ THEN REPLY ~No, he fled just before we escaped.~ GOTO Intr13

 

IF ~~ THEN BEGIN Intr13

SAY ~Damn, I was hoping I could intercept him before the Shadow Thieves drove him off. For Amn's most successful thieves' guild, they're certainly lacking in subtlety. Are you searching for the exit? With Irenicus gone, I have no further need to be here, so I could lead you out if you wish.~

IF ~~ THEN REPLY ~How do I know I can trust you?~ GOTO Intr22

IF ~~ THEN REPLY ~Perhaps, though I have some questions before I decide.~ GOTO Intr23

IF ~~ THEN REPLY ~Hmm... alright, come with us then.~ GOTO Intr14

IF ~~ THEN REPLY ~There is no room by my side, I'm afraid.~ GOTO EndTalk

 

IF ~~ THEN BEGIN Intr22

SAY ~You don't.~

IF ~~ THEN REPLY ~What's that supposed to mean?~ GOTO Intr23

IF ~~ THEN REPLY ~Ha! Fair enough; lets be on our way then, friend.~ GOTO Intr14

IF ~~ THEN REPLY ~Sorry, that's not good enough.~ GOTO EndTalk

 

IF ~~ THEN BEGIN Intr23

SAY ~Trust is something that should be earned, not freely given. I don't ask you to trust me, I only ask for the opportunity to earn your trust. Besides, better to have an assassin in front of you then behind you, wouldn't you agree?~

IF ~~ THEN REPLY ~True enough. Alright, come with us then.~ GOTO Intr14

IF ~~ THEN REPLY ~Perhaps, but I have a few questions first.~ GOTO Intr23

IF ~~ THEN REPLY ~I could always just kill you.~ GOTO Threat1

IF ~~ THEN REPLY ~I'm sorry, I don't travel with people I can't trust.~ GOTO EndTalk

 

IF ~~ THEN BEGIN Threat1

SAY ~You could try.~

IF ~~ THEN REPLY ~I was only jesting, my friend. Come, let's be off.~ GOTO Intr14

IF ~~ THEN REPLY ~I was only jesting my friend, but I do have some questions of you before I decide.~ GOTO Intr23

IF ~~ THEN REPLY ~I'm sorry, I don't travel with people I can't trust.~ GOTO EndTalk

IF ~~ THEN REPLY ~Forget it, you aren't worth my time.~ GOTO EndTalk

 

IF ~~ THEN BEGIN Intr14

SAY ~As you wish. I warn you though, I hear the sounds of combat up ahead; no doubt Irenicus' forces are cutting off the attacking Shadow Thieves at the entrance.~

IF ~~ THEN REPLY ~We'll handle them.~ GOTO JOINUP

IF ~~ THEN REPLY ~We'll have to risk it; this is the only way out.~ GOTO JOINUP

IF ~~ THEN REPLY ~Good, I hope they're in a fighting mood; I have some rage to work out.~ GOTO JOINUP

IF ~~ THEN REPLY ~Whatever's out there couldn't be as bad as what's in here.~ GOTO JOINUP

IF ~~ THEN REPLY ~I don't care anymore, I'm getting the hell out of here!~ GOTO JOINUP

 

IF ~~ THEN BEGIN JOINUP

SAY ~Very well, let's be rid of this vile place then.~ DO ~SetGlobal ("IlliathJoined","LOCALS",1) JoinParty()~ EXIT

 

IF ~~ THEN BEGIN EndTalk

SAY ~As you wish. Good luck, stranger.~ EXIT

END

 

 

//End of opening dialogue

 

 

//Illiath kicked/rejoined

 

 

BEGIN WR#IllP

IF ~Global("IlliathJoined","LOCALS",1)~ THEN BEGIN LeaveGroup

SAY ~There is still much to be done; are you sure you want to part ways?~

IF ~~ THEN REPLY ~No, let's continue on.~ DO ~JoinParty()~ EXIT

IF ~~ THEN REPLY ~Yes, we should part ways for now. We'll meet you here if we need anything else.~ EXIT

END

 

IF ~Global("IlliathJoined","LOCALS",0)~ THEN BEGIN ComeBack

SAY ~You have need of me?~

IF ~~ THEN REPLY ~Yes. Please, lend us your blade.~ DO ~SetGlobal

("IlliathJoined","LOCALS",1)

JoinParty()~ EXIT

IF ~~ THEN REPLY ~Perhaps later.~ EXIT

END

Link to comment

I think you need ENDs at the end of each of your state blocks:

 

IF ~[condition]~ THEN BEGIN state

SAY ~blah~

IF ~~ THEN REPLY ~blah blah~ GOTO state

IF ~~ THEN REPLY ~blah blah blah~ GOTO state

END

 

Also, you'll probably need to change:

 

IF ~~ THEN BEGIN JOINUP

SAY ~Very well, let's be rid of this vile place then.~ DO ~SetGlobal ("IlliathJoined","LOCALS",1) JoinParty()~ EXIT

 

To:

 

IF ~~ THEN BEGIN JOINUP

SAY ~Very well, let's be rid of this vile place then.~

IF ~~ THEN DO ~SetGlobal ("IlliathJoined","LOCALS",1) JoinParty()~ EXIT

END

Link to comment

Sigh, another night, another problem. Things are looking much improved, and I have a few of the things working that I need. I'm getting better too, so I should need help less frequently.

 

Ok, so my mod is installing fine now, but the installer is now skipping over the program I wrote to install my sound. It still installs fine, but it gives me this message:

 

Copying one file...

'IlliathNPC\illiathaudio.bat' is not recognized as an internal or external command, operable program or batch file.

 

Here is what I have written in "illiathaudio.bat":

 

@echo off

@echo Installing audio...

 

cd override

oggdec WR#Illiath*.ogg

del WR#Illiath*.ogg

del oggdec.exe

@echo Finished installing audio.

 

 

All of my audio files are named "WR#Illiath**". I labeled them sequentially, from 0-34. If you need any further information to figure this out, let me know; it would be a shame for the hours of sound I've recorded to go to waste now. :party:

 

Thanks in advance.

Link to comment

What commands are you using to trigger you batch file?

 

Are you firing it from inside the tp2 and if so what does that command line state?

 

Are you moving illiathaudio.bat from your mod folder into the game folder prior to using? If not, the pathways don't line up (inside the bat versus where its at). Try just having the bat file hang out with the setup-yourmod.exe file so that when properly extracted it is already in the correct location....

Link to comment
What commands are you using to trigger you batch file?

 

Are you firing it from inside the tp2 and if so what does that command line state?

 

Are you moving illiathaudio.bat from your mod folder into the game folder prior to using? If not, the pathways don't line up (inside the bat versus where its at). Try just having the bat file hang out with the setup-yourmod.exe file so that when properly extracted it is already in the correct location....

 

The t2p command line is as follows:

 

COPY ~IlliathNPC/audio/WR#blank.mus~ ~music~

COPY_EXISTING ~songlist.2da~ ~override~

SET_2DA_ENTRY 0 2 3 ~WR#BLANK.MUS~

ACTION_IF ("%WEIDU_OS%" STRING_COMPARE_CASE ~WIN32~ = 0) THEN

BEGIN // if Windows

COPY ~IlliathNPC/audio~ ~override~

AT_NOW ~IlliathNPC/illiathaudio.bat~

AT_INTERACTIVE_UNINSTALL ~IlliathNPC/illiathaudiouninstall.bat~

END ELSE BEGIN // if OS X or Linux

AT_NOW ~sh IlliathNPC/illiathaudio.sh~

AT_UNINSTALL ~sh IlliathNPC/illiathaudiouninstall.sh~

END

 

Ok, hold on now... thanks for the good advice, friend. I figured out what I was dong wrong; like you said, my pathways weren't lining up. Unfortunately the sound still isn't working, but I'll play around with it for a bit before I trouble you all for further help.

Link to comment

Alright... again I am stumped as to what my problem is. The sounds files I've recorded for the character refuse to play in game; it just uses the default male voice set. I am think my .t2p file is set up properly, but I may be wrong. When I run my installer, it goes through ALMOST everything fine now, though it does give me one error message:

 

"ERROR: No translation provided for @20000

continuing despite error."

 

That comes up RIGHT at the end of the installation process, even after it has apparently installed my sound files (not that they'll play). Oh and by the way, I just checked, and it DOES send the files to the override directory, it just isn't playing them. So... my only theories are that I'm missing a line of code that actually TELLS the game where the sound files are or something, that I have to do something in the .CRE file to overwrite/remove the old sounds, or I'm writing my SAY entries wrong in my .t2p file. I'll show what I have right now below. I tried it with and without .wav at the end of each file and with a space between the ~ and the [, neither of which worked.

 

I'm sorry to be a bother, but I truly do appreciate the help, everyone.

 

SAY MORALE ~This isn't over...~[WR#Ill00.wav]

SAY HAPPY ~You know, to these people you've really made a difference; you should be proud of yourself.~[WR#Ill01.wav]

SAY UNHAPPY_ANNOYED ~These people have done nothing to deserve the harm you've brought upon them!~[WR#Ill02.wav]

SAY UNHAPPY_SERIOUS ~I'm not travelling with you to prey upon the weak!~[WR#Ill03.wav]

SAY UNHAPPY_BREAKING ~Enough, I'll have no more part in this slaughter! ...Pray we never meet again, Bhaalspawn.~[WR#Ill04.wav]

SAY LEADER ~What's the matter, expecting an ambush?~[WR#Ill05.wav]

SAY TIRED ~I'm going to need some sleep if you wan't me to fight at my best.~[WR#Ill06.wav]

SAY BORED ~We should get moving soon; there's still much to be done.~[WR#Ill07.wav]

SAY BATTLE_CRY1 ~And we were just getting to know each other...~[WR#Ill08.wav]

SAY BATTLE_CRY2 ~This shouldn't take long.~[WR#Ill09.wav]

SAY BATTLE_CRY3 ~I am your death!~[WR#Ill10.wav]

SAY BATTLE_CRY4 ~Some can't wait to die.~[WR#Ill11.wav]

SAY DAMAGE ~Ugh!~[WR#Ill12.wav]

SAY DYING ~Augh... uh...~[WR#Ill13.wav]

SAY HURT ~Ugh! This really isn't going well...~[WR#Ill14.wav]

SAY AREA_FOREST ~I actually quite like it out here... at least there's lots of cover.~[WR#Ill15.wav]

SAY AREA_CITY ~Let's try to be subtle, shall we? I think you have enough enemies.~[WR#Ill16.wav]

SAY AREA_DUNGEON ~Be wary; I doubt I'm the only thing lurking in the shadows here.~[WR#Ill17.wav]

SAY AREA_DAY ~I could probably stand to get some sun.~[WR#Ill18.wav]

SAY AREA_NIGHT ~Let's use the cover of night to our advantage.~[WR#Ill19.wav]

SAY SELECT_COMMON1 ~Give the word.~[WR#Ill20.wav]

SAY SELECT_COMMON2 ~At your service.~[WR#Ill21.wav]

SAY SELECT_COMMON3 ~I'm all ears.~[WR#Ill22.wav]

SAY SELECT_COMMON4 ~Ready and waiting.~[WR#Ill23.wav]

SAY SELECT_COMMON5 ~Mmhmm?~[WR#Ill24.wav]

SAY SELECT_COMMON6 ~What do you need?~[WR#Ill25.wav]

SAY SELECT_ACTION1 ~Certainly.~[WR#Ill26.wav]

SAY SELECT_ACTION2 ~On my way.~[WR#Ill27.wav]

SAY SELECT_ACTION3 ~And here I was hoping for a challenge.~[WR#Ill28.wav]

SAY SELECT_ACTION4 ~I'll see it done.~[WR#Ill29.wav]

SAY SELECT_ACTION5 ~Is that all?~[WR#Ill30.wav]

SAY SELECT_ACTION6 ~You just leave that to me.~[WR#Ill31.wav]

SAY SELECT_ACTION7 ~Understood.~[WR#Ill32.wav]

SAY SELECT_RARE1 ~My blade is ready.~[WR#Ill33.wav]

SAY SELECT_RARE2 ~What's on your mind?~[WR#Ill34.wav]

SAY CRITICAL_HIT ~I'm sorry, did that hurt?~[WR#Ill35.wav]

SAY CRITICAL_MISS ~Hmph!~[WR#Ill36.wav]

SAY TARGET_IMMUNE ~Well that's a problem...~[WR#Ill37.wav]

SAY INVENTORY_FULL ~Do I look like a pack-mule to you? ...Wait, don't answer that.~[WR#Ill38.wav]

SAY SPELL_DISRUPTED ~Ugh! They interrupted my action!~[WR#Ill39.wav]

Link to comment
"ERROR: No translation provided for @20000

continuing despite error."

Some how Weidu believes that there is a tra file reference @20000 and can't find such a number in any loaded tra file.

 

Do you have any tra files and are all references to it correct?

 

Your SAY entries appear correct. You are modifying the correct creature file? Do you have multiple versions of your NPC (so his/her level is closest to the players) depending upon when you pick them up? If so, you need to modify ALL of them. Perhaps you forgot one and that is the one that you picked up when you tested.

 

OR

 

Have you ensured that your audio files are in the correct format? I'm not too sure what that is exactly, but I know that the engine may not play properly or at all if the audio files are not exact. I'm not talking what type of extension, but rather the internal settings of the audio (mono vs stereo and other stuff).

Link to comment
"ERROR: No translation provided for @20000

continuing despite error."

Some how Weidu believes that there is a tra file reference @20000 and can't find such a number in any loaded tra file.

 

Do you have any tra files and are all references to it correct?

 

Your SAY entries appear correct. You are modifying the correct creature file? Do you have multiple versions of your NPC (so his/her level is closest to the players) depending upon when you pick them up? If so, you need to modify ALL of them. Perhaps you forgot one and that is the one that you picked up when you tested.

 

OR

 

Have you ensured that your audio files are in the correct format? I'm not too sure what that is exactly, but I know that the engine may not play properly or at all if the audio files are not exact. I'm not talking what type of extension, but rather the internal settings of the audio (mono vs stereo and other stuff).

 

First of all, thank you for your input; whether or not it solves my immediate problems, I learn a little more with every response I get.

 

You'll have to forgive my ignorance, as I am new to coding, but I'm not familiar with .tra files, so I honestly have no idea what I would do.

 

I only have one .CRE file for this character thus far, so it couldn't be assigned to the wrong one.

 

I'm using .WAV files that are being converted from .ogg files, so they should be fully compatible with the game.

 

Any other ideas? Or perhaps a further explanation of what I would be looking for in a .tra file and what to do with it when I find it?

Link to comment

Is there '@20000' present in either your .tp2 or .d files? If yes, then weidu thinks you're trying to provide text strings (like ~You know, to these people you've really made a difference; you should be proud of yourself.~[WR#Ill01.wav]) in a separate file (.tra).

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...