Author Topic: A Beginner's Guide to NPC creation with WeiDU  (Read 314343 times)

Offline Retrickster

  • Planewalker
  • *****
  • Posts: 2
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #275 on: May 13, 2008, 09:27:04 PM »
If you have the latest version of Java you'll probably have to use the latest NI beta, as the current non-beta release is incompatible.

And it took me so long to find this, its the closest answer I have found to why I could open the .jar NI application but could not use it to open the .cre or any other type of files except for plain txt files like the .BIO files.

Offline RabbiSatan

  • Planewalker
  • *****
  • Posts: 9
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #276 on: June 15, 2008, 09:39:10 AM »
Heya guys,

I've got a quick question about the hex values, name/number and location.

I've tried what was suggested earlier in the thread, by going to Options and turning on "Show Hex Offsets", but the hex offsets don't correlate with what other people are saying are the hex offsets for certain sections.

For example, the original post said the offset for Death Variable was 0x2e4, but in Near Infinity, it's "280 h" - am I doing something wrong?

It's also different for dialog, mine says 2cc h, but ghrey's original post says it's 0x330.

Am I doing something wrong?

Thanks :)

Offline Taimon

  • Planewalker
  • *****
  • Posts: 328
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #277 on: June 15, 2008, 11:27:03 AM »
I guess, Grey's post refers to a CRE inside a CHR file. (additional 0x64 offset from the CHR header)

Offline RabbiSatan

  • Planewalker
  • *****
  • Posts: 9
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #278 on: June 16, 2008, 08:04:18 AM »
Hm, I've encountered a rather curious problem.

I've mostly finished making my NPC, got the dialogue done (except for leaving the party and talking again), appended the area script, etc etc. But I've encountered a problem with weidu not installing the mod because the mod's title reference for the user is not parsing?

Here's the error:

Quote
WARNING: parsing log [WeiDU.log]: Sys_error("WeiDU.log: No such file or directory")

[SETUP-MEPHAESTUS.TP2] PARSE ERROR at line 3 column 8-17
Near Text: Mephaestus
   syntax error

[SETUP-MEPHAESTUS.TP2]  ERROR at line 3 column 8-17
Near Text: Mephaestus
   Parsing.Parse_error
ERROR: parsing [SETUP-MEPHAESTUS.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [SETUP-MEPHAESTUS.TP2]: Parsing.Parse_error

And here's the tp2 file:

Quote
BACKUP ~Mephaestus\backup~
AUTHOR ~rabbi_satan@hotmail.com
BEGIN ~Mephaestus the NPC for BGII:ToB~

COPY ~Mephaestus\RSJC#MEPH.cre~ ~override\RSJC#MEPH.cre~
SAY NAME1 ~Mephaestus~
SAY NAME2 ~Mephaestus~

Anyone have any clues? Thanks :)

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #279 on: June 16, 2008, 08:08:36 AM »
It should be

AUTHOR ~rabbi_satan@hotmail.com~

Offline RabbiSatan

  • Planewalker
  • *****
  • Posts: 9
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #280 on: June 16, 2008, 08:22:27 AM »
Woo, thanks for the quick response :)

Yeah, I missed the ~ at the end of the email, thanks for pointing that out :)

I'll correct it now, and report back with the results.

Offline RabbiSatan

  • Planewalker
  • *****
  • Posts: 9
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #281 on: June 16, 2008, 08:33:40 AM »
Heya Kulyok, hope you're still here :)

Got rid of that problem, but ran into another -

Quote
WeiDU v 185 Log

 F:\Black Isle\BGII - SoA\setup-mephaestus.exe
[./CHITIN.KEY] loaded, 590551 bytes
[./CHITIN.KEY] 182 BIFFs, 41793 resources
[dialog.tlk] loaded, 8692747 bytes
[dialog.tlk] 74107 string entries
[./Autorun.ini] loaded, 1452 bytes
[./baldur.ini] loaded, 621 bytes
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD1\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD3\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD4\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD2\]
Possible HD/CD Path: [F:\Black Isle\BGII - SoA\CD5\]
[./Keymap.ini] loaded, 5615 bytes
[./Mplaynow.ini] loaded, 230 bytes
[dialog.tlk] claims to be writeable.
[dialog.tlk] claims to be a regular file.
WARNING: parsing log [WeiDU.log]: Sys_error("WeiDU.log: No such file or directory")

[SETUP-MEPHAESTUS.TP2] LEXER ERROR at line 11 column 26-35
Near Text: \
   invalid character [\]

[SETUP-MEPHAESTUS.TP2]  ERROR at line 11 column 26-35
Near Text: \
   Parsing.Parse_error
ERROR: parsing [SETUP-MEPHAESTUS.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [SETUP-MEPHAESTUS.TP2]: Parsing.Parse_error

FATAL ERROR: Parsing.Parse_error

      WeiDU Timings
load TLK                         0.000
parsing .tp2 files               0.010
loading files                    0.064
unmarshal KEY                    0.194
unmarshal TLK                    0.230
TOTAL                            0.498

The line in questions is:

Quote
EXTEND_TOP ~AR1000.bcs~ ~Mephaestus\AR1000.baf~

Any ideas as to why this is a happening?

Many thanks :)

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #282 on: June 16, 2008, 08:41:25 AM »
No. Nobody is going to troubleshoot missing "~"'s and errors in your code - especially if you're not providing the code itself. You will have to troubleshoot yourself - better start now. A tip, though: Weidu never provides the _exact_ line. You'll have to check the previous line, and, perhaps, a few lines above.

If you want to try your luck, start a new topic in Modding Q&A - some mods get built entirely on Q&A support, so.

Offline RabbiSatan

  • Planewalker
  • *****
  • Posts: 9
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #283 on: June 16, 2008, 08:43:26 AM »
Alrighty, I get the message, no need for hostilities :)

Thanks though, I guess I can't rely on everyone else all the time.

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #284 on: June 16, 2008, 09:50:54 AM »
Kulyok's just trying to promote independence and good reporting techniques. But, yes, because parser errors are often the product of a mistake that occurs higher up in the file, you usually don't get much in the way of results by just staring at the actual line in question. Depends on the type of error. (But this one sounds awfully like another missing tilde.)
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline RabbiSatan

  • Planewalker
  • *****
  • Posts: 9
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #285 on: June 16, 2008, 10:36:39 AM »
Kulyok's just trying to promote independence and good reporting techniques. But, yes, because parser errors are often the product of a mistake that occurs higher up in the file, you usually don't get much in the way of results by just staring at the actual line in question. Depends on the type of error. (But this one sounds awfully like another missing tilde.)

Yeah, it actually was another missing tilde.

But anyway, I am now at the point where I can install my mod without a hitch - another landmark achieved. However, my cre isn't popping up in location 2000,3000 of the Government district. But I'll sort that out myself :)

Many thanks for all the help.

Retal

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #286 on: July 18, 2008, 09:45:14 AM »
Ok, so..
I've followed the tutorial, done everything i could, had LOADS of errors with installation, spent LOADS of time finding all those little-but-oh-how-important errors in the actual code and finally installed the 'mod' without any errors. My NPC pops up where she should, but..at first she 'had nothing to say' and now not only does she have nothing to say, but i can also control her, as if she was in my party (but she isnt).

I'm pretty sure i messed up something with NearInifinity .cre setup, but i have no idea what that can be. I think i did not edit/clear some fields that make her PC. The tutorial was clear till that point but then i got lost. I set:
Flags :                No Flag Set
Override Script :  <NPCname>.bcs
Class/Race Scritp: None
General Script:     WTASIGHT.bcs
Default Script:     Initdlg.bcs
Death Variable:    <NPCname>
Diablog:              <exactly the same as is suposed to be created by the .D file's BEGIN line, in my case it is : BEGIN Ave_Noit so I set the dialog as Ave_Noit>

I did not chance anything else in the .cre file, and nothing at all in the .char file.

Did i do something wrong assigning those values? or maybe the problem is elsewhere?
I was so excited to make my own NPC and ...bummer


Workinprogress

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #287 on: August 10, 2008, 07:08:05 PM »
Hi, I was wondering... is it possible to alter a mod on your game, as in alter dialogue wording or whatever?

If so, how?

BTW, I'm not suggesting a form of mod infringement, just if you thought that some wording or whatever was out of place.

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #288 on: August 11, 2008, 12:17:39 AM »
It's possible - as long as you do it on your own computer, and don't upload it in the internet, nobody cares. Here's how: unpack the mod in your BG2 directory. Before installing the mod, go to the mod directory {Baldur's Gate 2}/ModDirectory, and edit whatever you like - dialogue, scripts, portraits. Then install.

Warning: if you don't know how to code, you may screw it up, so that you'll have to delete the result and download the mod again.

Workinprogress

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #289 on: August 11, 2008, 11:20:33 AM »
Thanks for the tip!  :-ban

Revi

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #290 on: October 06, 2008, 05:56:12 PM »

// The following is the copying of Vondo's .cre file, as well as assigning his sound-set.  See the file sndslot.ids for a listing of sounds you can add.

Where should I place my NPC's sounds? I'd like her to use a custom made soundset, and I have all the .WAV files, but when I have WEIDU compile my .tp2 file it crashes on this bit:

Quote
COMPILE ~LokitheAdventurer\V#LOKI.d~
SAY SELECT_COMMON1 ~I'm here.~ [INNOC0]

When I remove the soundset assignments it doesn't crash and compiles just fine.. so I was thinking maybe the soundfiles are in the wrong place? I have them in \sounds at the moment, along with all the other custom soundsets I've used for various PC's.

Revi

PS: I know you can also assign sounds via NI, but I'd prefer it if I could do it this way.


Revi

  • Guest
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #291 on: October 06, 2008, 06:24:49 PM »
Never mind my nubbly question, figured it out myself. Thank you for this great walkthrough, it's really helped me develop a basic understanding of how to write an NPC mod :)

Offline SittingOnTheThroneOfBhaal

  • Planewalker
  • *****
  • Posts: 3
  • Gender: Male
  • Tedious Monkey-work!
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #292 on: March 12, 2009, 01:58:31 PM »
Hey, I'm quite new to modding and I've been trying to create an NPC for my game, and after going through many errors and problems using NI (windows vista...argh), and finally getting it all together, I've tried to install it using the Weidu installer, but I come up with this:


Install Component [Avaria for BG2:SoA]?
nstall, or [N]ot Install or [Q]uit?
Installing [Avaria for BG2:SoA]
Copying and patching 1 file ...
[Avaria/AVARIA.CRE] loaded, 2984 bytes
override/AVARIA.CRE copied to Avaria/backup/0/AVARIA.CRE, 2984 bytes
Copied [Avaria/AVARIA.CRE] to [override/AVARIA.CRE]
Compiling 1 dialogue file ...
ERROR: compiling [Avaria/M#AVARIA.d]!
Stopping installation because of error.

ERROR Installing [Avaria for BG2:SoA], rolling back to previous state
[Avaria/backup/0/UNSETSTR.0] SET_STRING uninstall info not found
Will uninstall   1 files for [AVARIA/SETUP-AVARIA.TP2] component 0.
  Restoring backed-up [Avaria/backup/0/AVARIA.CRE]
Avaria/backup/0/AVARIA.CRE copied to override/AVARIA.CRE, 2984 bytes
Uninstalled      1 files for [AVARIA/SETUP-AVARIA.TP2] component 0.
ERROR: Sys_error("Avaria/M#AVARIA.d: No such file or directory")

As far as I can tell is that there is something occuring during the compiling of the .d file, but after looking though it, all the coding seems fine, which I'll provide for others to see if they spot any problems.

Code: [Select]
BEGIN M#AVARIA

IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~You there! You look like adventuring types, help me! Please!~
IF ~~ THEN REPLY ~Slow down! Who are you and what's the problem?~ GOTO HelpA
IF ~~ THEN REPLY ~Sorry, we don't have the time.~ GOTO RejectA
END

IF ~~ THEN BEGIN HelpA
SAY ~My name is Avaria, and I need your help. I'm running from a group of assassins. Please hurry, we have to hide!~
IF ~~ THEN REPLY ~Okay, but how can we help?~ GOTO JoinPA
IF ~~ THEN REPLY ~No, I don't want to mess around with assassins.~ GOTO RejectA
END

IF ~~ THEN BEGIN JoinPA
SAY ~Oh, I don't know! Hide me! Let me join your group, I've a good hand in combat, just help me!~
IF ~~ THEN REPLY ~Alright then, you can join us.~ DO ~SetGlobal("AvariaJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Sorry, I don't want you to join us, maybe another time?~ GOTO RejectA
END

IF ~~ THEN BEGIN RejectA
SAY ~WHAT? PLEASE! I'm desperate! I'm going to be killed unless you help me!~
IF ~~ THEN REPLY ~Okay then, I'm sorry. You can join us, what help do you need?~ DO ~SetGlobal ("AvariaJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Sorry, it's too risky with the assassins and all that, you're on your own.~ GOTO RejectedA
END

IF ~~ THEN BEGIN RejectedA
SAY ~What?! NO! PLEASE! Damn you! Curse you! May the demon blood I carry consume you and torture you for eternity!~ DO ~EscapeArea()~ EXIT
END

BEGIN M#AVAP
IF ~Global("AvariaJoined","LOCALS",1)~ THEN BEGIN KickAv
SAY ~What? But we're not finished! Don't kick me out yet! You'll not find me again if you do!~
IF ~~ THEN REPLY ~My mistake, stay in the group.~ DO ~JoinParty()~ EXIT
IF ~~ THEN REPLY ~I'm afraid so, don't worry, you'll be fine out there on your own.~ DO ~EscapeArea()~ EXIT
END

I've also got the .cre, .baf, backup, .tp2 and .d in my Avaria file in the BG2 directory.

Also, I have TOB installed if that makes any difference...

All help would be apprieciated!  ;D ;D ;D ;D ;D
Any help would be really appreciated.

Basic overview of my new NPC is a character who is half human half demon, with their own quest and also the ability to transform into a demon due to her dark heritage. This is of course something I'll come to later once I actually get this bit working, just want to make sure the NPC appears in the game (docks) first.  :)
« Last Edit: March 13, 2009, 10:18:29 PM by jcompton »

Offline SittingOnTheThroneOfBhaal

  • Planewalker
  • *****
  • Posts: 3
  • Gender: Male
  • Tedious Monkey-work!
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #293 on: March 12, 2009, 01:59:59 PM »
Sorry about the dialouge bit being in right-alignment, I edited it that way before to make it seperate from what I was saying, but then decided against it and changed it back...but seems like it didnt...lol :)

Offline GeN1e

  • Planewalker
  • *****
  • Posts: 267
  • Gender: Male
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #294 on: March 12, 2009, 03:16:24 PM »
ERROR: Sys_error("Avaria/M#AVARIA.d: No such file or directory")

I believe weidu says it can't find 'avaria/m#avaria.d'. Perhaps it's 'avaria/avaria.d' currently? Nothing better comes to mind.

Offline SittingOnTheThroneOfBhaal

  • Planewalker
  • *****
  • Posts: 3
  • Gender: Male
  • Tedious Monkey-work!
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #295 on: March 13, 2009, 04:50:18 PM »
it definitely isn't that, my .d file is named M#AVARIA.d and is located in the BGII SoA directory in Avaria file (i.e BGII SoA - Avaria - M#AVARIA.d)

Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7246
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #296 on: March 13, 2009, 10:19:56 PM »
I fixed the right-align tags and replaced them with code tags, which are much more appropriate to the situation.

Anyway, Genie's right and it certainly seems to be saying that the file isn't there. Are you sure it's not misspelled? It happens from time to time to those of us making up fantasy names...
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!" http://www.pocketplane.net

Offline DavidW

  • Planewalker
  • *****
  • Posts: 316
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #297 on: March 14, 2009, 04:20:36 AM »
It's possible to run into trouble with Vista's user account control - the dialogue file may be in a fake folder that pretends to be, but isn't, in the protected C:\program files folder. If that is the problem, simple solutions are (a) install your games somewhere other than the C:\Program Files folder; (b) disable UAC (which Microsoft doesn't recommend; doubtless this thread will now be hijacked by dozens of people who disagree!). A more complex solution is to turn off file and registry virtualization - a couple of minutes on Google will tell you how.

Offline FarisCultist

  • #1 Pirate Lover!
  • Planewalker
  • *****
  • Posts: 20
  • Gender: Male
  • "I want to see buttons of me around town."
    • Counter-Strike Clan: Heaven or Hell Forums
NEED HELP!
« Reply #298 on: May 23, 2009, 10:39:34 PM »
IN section 2 right at the beginning where it tells you to convert .chr to .cre. The "File Menu" thing is greyed out and won't let me change it. I've tried opening in new window, also didn't work. Whats going on?

Offline jastey

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 1524
  • Gender: Female
Re: A Beginner's Guide to NPC creation with WeiDU
« Reply #299 on: May 24, 2009, 04:53:10 AM »
Do you also have this problem if opening one of the game's character files?

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: