Jump to content

This WeiDU guide still valid?


Recommended Posts

Hey, I want to create a shits-and-giggles-periodically-fourth-wall-breaking mod in which Kangaxx can join the party (I call it a romance but it's at best platonic). This would be my first mod for any IE game. I am somewhat familiar with programming, but not at all with... whatever this language is even called 😃

I've been trying to follow this guide. It was last edited 16 years ago and the forum last saw activity 7 years ago, whereas the latest WeiDU update seems to be but 1 year old... so I am not sure if I messed up my code or the syntax in that post has become outdated. The amount of dead/ancient links involved in this learning process has been scary so far.

Anyway, instead of J#Vondo I have my GX#kngx. GX was just an effort to have "my own prefix", as seems to be a desirable custom, but I can't figure out if that one is available. Oh, and I tried to keep it to 8 characters - is that necessary? Anyway, other than swapping Vondo with Kangy, I believe I have written this code perfectly, but WeiDU doesn't like it.

BEGIN GX#kngx

// + + + = IF, THEN, GOTO
// ++ = an IF that is always true (IF ~~ THEN)

IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Greetings good <SIRMAAM>! My name is Kangy the Just.~
+ ~GlobalLT("Chapter","GLOBAL",3)~ + ~Hey Kangy, you seen Irenicus around here?~ + InquireIrenicus
++ ~Heya.~ + Greet
+ ~Class(Player1,PALADIN)~ + ~I know a paladin when I see one!~ + BothPaladins
++ ~Go away.~ + GoAway
END

// First meeting
IF ~~ THEN BEGIN Greet
SAY ~So, you need a paladin in your group?~
IF ~~ THEN REPLY ~Yes, as a matter of fact we do.~ DO ~SetGlobal("KangyJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Nah, go away.~ GOTO GoAway
END

IF ~~ THEN BEGIN BothPaladins
SAY ~Another paladin! Hail and well met brother. Let us journey together and smite evil.~
IF ~~ THEN REPLY ~Sounds like a plan.~ DO ~SetGlobal("KangyJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Nah, go away.~ GOTO GoAway
END

IF ~~ THEN BEGIN GoAway
SAY ~Very well my <LADYLORD>, I will await the day when you return, so that we might smite evil!~

// For talking to him after refusing him the first time 
IF ~NumTimesTalkedToGT(0)~ THEN BEGIN ReturnDialogue
SAY ~I see you have returned, my friend.~
IF ~~ THEN REPLY ~Yep, come and join the party.~ DO ~SetGlobal("KangyJoined","LOCALS",1)
JoinParty()~ EXIT
IF ~~ THEN REPLY ~Yeah, but I still don't want you in the party.~ GOTO RefusedAgain
END

IF ~~ THEN BEGIN RefusedAgain
SAY ~Ah, once again you refuse my offer. No matter, I will amuse myself with this magical device I have purchased. It was given to be by a gnome named John Johnson, or something similar.~
IF ~~ THEN EXIT
END

BEGIN GX#kngxP

// For kicking/rejoining
IF ~Global("KangyJoined","LOCALS",1)~ THEN BEGIN KickOut
SAY ~You are now kicking me out.~
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("KangyJoined","LOCALS",0)~ EXIT
END

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

The error:

WeiDU v 24700 Log

 D:\BeamDog\00783\kangaxx_romance-setup.exe
[.\chitin.key] loaded, 877618 bytes
[.\chitin.key] 189 BIFFs, 62285 resources
[.\engine.lua] loaded, 104 bytes
[.\weidu.conf] loaded, 17 bytes
[.\lang\en_us\dialog.tlk] loaded, 11630973 bytes
[.\lang\en_us\dialog.tlk] 103257 string entries

Using .\lang\en_us\dialog.tlk

Install Component [Kangaxx romance]?
[I]nstall, or [N]ot Install or [Q]uit? 
Installing [Kangaxx romance]
Copying and patching 1 file ...
[kangaxx_romance\GX#kngx.cre] loaded, 7276 bytes
Copied [kangaxx_romance\GX#kngx.cre] to [override\GX#kngx.cre]
Compiling 1 dialogue file ...
BIFF may be in hard-drive CD-path [.\lang\en_us\DATA\DEFAULT.BIF]
BIFF may be in hard-drive CD-path [.\cache\DATA\DEFAULT.BIF]
[.\DATA\DEFAULT.BIF] 2845480 bytes, 507 files, 0 tilesets

[kangaxx_romance\GX#kngx.d] PARSE ERROR at line 33 column 1-37
Near Text: BEGIN
	syntax error

[kangaxx_romance\GX#kngx.d]  ERROR at line 33 column 1-37
Near Text: BEGIN
	Parsing.Parse_error
ERROR: parsing [kangaxx_romance\GX#kngx.d]: Parsing.Parse_error
ERROR: compiling [kangaxx_romance\GX#kngx.d]!
Stopping installation because of error.

ERROR Installing [Kangaxx romance], rolling back to previous state
Unable to Unlink [kangaxx_romance\backup/0/OTHER.0]: Unix.Unix_error(1, "unlink", "kangaxx_romance\\backup/0/OTHER.0")
[kangaxx_romance\backup/0/UNSETSTR.0] SET_STRING uninstall info not found
Will uninstall   1 files for [KANGAXX_ROMANCE-SETUP.TP2] component 0.
Uninstalled      1 files for [KANGAXX_ROMANCE-SETUP.TP2] component 0.
Unable to Unlink [kangaxx_romance\backup/0/READLN.0]: Unix.Unix_error(20, "unlink", "kangaxx_romance\\backup/0/READLN.0")
Unable to Unlink [kangaxx_romance\backup/0/READLN.0.TEXT]: Unix.Unix_error(20, "unlink", "kangaxx_romance\\backup/0/READLN.0.TEXT")
ERROR: Parsing.Parse_error
Please make a backup of the file: KANGAXX_ROMANCE-SETUP.DEBUG and look for support at: GX

Install Component [Kangaxx romance]?
[I]nstall, or [N]ot Install or [Q]uit? Saving This Log:

NOT INSTALLED DUE TO ERRORS Kangaxx romance

		WeiDU Timings
OUTER_INNER_PATCH_SAVE           0.000
<<<<<<<<                         0.000
parsing .ids files               0.000
load TLK                         0.000
tp2 uninstall                    0.000
DEFINE_PATCH_FUNCTION            0.000
COMPILE                          0.000
DEFINE_ACTION_FUNCTION           0.000
OUTER_SET                        0.000
INCLUDE                          0.000
BUT_ONLY                         0.000
find local string                0.000
parsing .log files               0.000
Parsing TP2 files                0.000
process_patch2                   0.000
eval_pe                          0.000
DEFINE_ACTION_MACRO              0.000
OUTER_INNER_PATCH                0.000
READ_*                           0.000
saving files                     0.000
DEFINE_PATCH_MACRO               0.000
COPY                             0.000
parsing .d files                 0.000
unmarshal KEY                    0.016
unmarshal BIFF                   0.016
loading files                    0.016
stuff not covered elsewhere      0.031
Parsing TPA files                0.047
unmarshal TLK                    0.063
TOTAL                            0.188

As I understand, it counts the lines ignoring comments or pure whitespace, so I was thinking the problem was with

BEGIN GX#kngxP

but I can delete that and everything after it and it will still complain. Here's the .tp2 setup file, if it will help:

BACKUP ~kangaxx_romance\backup~
AUTHOR ~GX~
BEGIN ~Kangaxx romance~

COPY ~kangaxx_romance\GX#kngx.cre~ ~override\GX#kngx.cre~
SAY NAME1 ~Kangaxx~
SAY NAME2 ~Kangaxx~
SAY SELECT_COMMON4 ~Blah blah blah.~
SAY SELECT_COMMON5 ~Give the word.~
SAY SELECT_COMMON6 ~Point the way.~
SAY SELECT_ACTION1 ~I'm on the job.~
SAY SELECT_ACTION2 ~As you wish.~

COMPILE ~kangaxx_romance\GX#kngx.d~
COMPILE ~kangaxx_romance\GX#kngx.baf~
EXTEND_TOP ~Ar1000.bcs~ ~kangaxx_romance\ar1000.baf~

APPEND ~pdialog.2da~
~GX#kngx GX#kngxP GX#kngxJ GX#kngxD~ //unceremoniously deleted shit here
UNLESS ~GX#Kangaxx~

 

Edited by avoidCM
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...