Jump to content

[OS X] WeiDU 204 mod installer problems


ericp07

Recommended Posts

Hello,

 

This issue is probably best handled in a new thread, rather than being contained in my more specific thread about a creature mod, so here it is...

 

I've read that, to install mods since upgrading to WeiDU 204 on my Mac, I need to issue the following command in the Terminal:

 

Run weidu-mac Setup-Foo.tp2 --tlkout dialog.tlk

 

Where "Foo" is replaced by the mod's name, of course. This worked to install the latest version of Solaufien, but I get the following error when trying to install my very simple creature mod:

 

Silverbird:/BGII - SoA ericp$ ./weidu-mac Setup-MAB.tp2 --tlkout dialog.tlk

[./weidu-mac] WeiDU version 20400

[./Chitin.key] 182 BIFFs, 41794 resources

[./dialog.tlk] 138929 string entries

[./weidu-mac] Using scripting style "BG"

[dialog.tlk] claims to be writeable.

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

In state 80, I expected one of these tokens:

[33] BLSR_EQUALS

[72] EQUALS

[120] PLUS_EQUALS

[129] OR_EQUALS

[137] AND_EQUALS

[140] DIVIDE_EQUALS

[175] BLSL_EQUALS

[181] TIMES_EQUALS

[219] BXOR_EQUALS

[260] MINUS_EQUALS

Parse error (state 80) at END

 

[setup-MAB.tp2] PARSE ERROR at line 20 column 1-3

Near Text: END

GLR parse error

 

[setup-MAB.tp2] ERROR at line 20 column 1-3

Near Text: END

Parsing.Parse_error

ERROR: parsing [setup-MAB.tp2]: Parsing.Parse_error

ERROR: problem parsing TP file [setup-MAB.tp2]: Parsing.Parse_error

 

FATAL ERROR: Parsing.Parse_error

 

Press ENTER to exit.

 

The contents of this mod's .tp2 are:

 

BACKUP ~MAB/backup~

AUTHOR ~Eric P. (thustar@yahoo.com)~

 

BEGIN ~Beast of Malar~

 

COPY ~MAB/EP#MABP.cre~ ~override~

 

SAY NAME1 ~Beast of Malar, hunter~

SAY NAME2 ~Beast of Malar, hunter~

 

COPY ~MAB/EP#MABC.cre~ ~override~

 

SAY NAME1 ~Beast of Malar, claw slayer~

SAY NAME2 ~Beast of Malar, claw slayer~

 

ACTION_IF FILE_EXISTS_IN_GAME ~EP#MABC.cre~ THEN BEGIN

 

COPY_EXISTING ~EP#MABC~ ~override~

ADD_CRE_ITEM ~ring31.itm~ #0 #0 #0 ~unstealable~ ~RRING LRING~

END

END

 

I get the same results if I remove one of the END lines, and if I remove the A_I, C_E, and A_C_I lines (and one of the END lines).

 

The good news is that weidu-mac is no longer blind to my Chitin.key file, where before it wasn't finding that file. Still, these mods I'm developing won't install, and I don't know why.

 

The other install failure I get (with the other mod I'm making) is:

 

Install Component [shae`lina Hawkwind]?

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

 

Installing [shae`lina Hawkwind]

Copying and patching 1 file ...

Compiling 1 dialogue file ...

[./DATA/DEFAULT.BIF] 5847739 bytes, 444 files, 0 tilesets

Processing 1 dialogues/scripts ...

Adding EP#SHAE to internal list of available DLGs

Adding EP#SHAEP to internal list of available DLGs

[EP#SHAEP.DLG] saved 2 states, 4 trans, 2 strig, 0 ttrig, 3 actions

[EP#SHAE.DLG] saved 5 states, 11 trans, 1 strig, 2 ttrig, 3 actions

Compiling 1 dialogue file ...

 

[shaelina/dialogues/EP#shaeB.d] PARSE ERROR at line 13 column 7-11

Near Text: Minsc

syntax error

 

[shaelina/dialogues/EP#shaeB.d] ERROR at line 13 column 7-11

Near Text: Minsc

Parsing.Parse_error

ERROR: parsing [shaelina/dialogues/EP#shaeB.d]: Parsing.Parse_error

ERROR: compiling [shaelina/dialogues/EP#shaeB.d]!

Stopping installation because of error.

 

ERROR Installing [shae`lina Hawkwind], rolling back to previous state

Will uninstall 3 files for [setup-shaelina.tp2] component 0.

 

How can I solve this issue? I'll gladly supply any additional information that may be needed for this.

 

Thanks,

Eric

Link to comment

Parse errors are always Your Own Fault™. :)

 

ACTION_IF FILE_EXISTS_IN_GAME ~EP#MABC.cre~ THEN BEGIN

COPY_EXISTING ~EP#MABC~ ~override~
ADD_CRE_ITEM ~ring31.itm~ #0 #0 #0 ~unstealable~ ~RRING LRING~
END
END

Only one END; ADD_CRE_ITEM ~ring31~ #0 #0 #0 ~unstealable~ ~rring lring~; COPY_EXISTING ~EP#MABC.cre~

 ACTION_IF FILE_EXISTS_IN_GAME ~EP#MABC.cre~ THEN BEGIN
 COPY_EXISTING ~EP#MABC.cre~ ~override~
ADD_CRE_ITEM ~ring31~ #0 #0 #0 ~unstealable~ ~RRING LRING~
END

Note that you can (and probably should) do this all in your initial copy:

COPY ~MAB/EP#MABC.cre~ ~override~
 SAY NAME1 ~Beast of Malar, claw slayer~
 SAY NAME2 ~Beast of Malar, claw slayer~
 ADD_CRE_ITEM ~ring31~ #0 #0 #0 ~unstealable~ ~rring lring~

You'll have to post the contents of EP#shaeB.d for anyone to help.

Link to comment

I've cleaned up the Beast of Malar .tp2 per devSin's advice (much thanks!).

 

Here's the content of EP#shaeB.d, in case anyone can advise me on how to fix it as well (it's hideous, I know):

 

CHAIN

 

IF ~InParty(“EP#shaeâ€Â)

 

InParty(“Minscâ€Â)

 

!ActuallyInCombat //This way they are not in combat

 

Global(“EP#shaeMinscâ€Â,â€ÂGLOBALâ€Â,0) // We haven’t had this banter before

 

THEN EP#shaeB shaeMinsc1

 

~Minsc, how are you?~

 

DO ~SetGlobal(EP#shaeMinscâ€Â,â€ÂGLOBALâ€Â,1) // This makes sure that the banter can’t happen again

 

== BMINSC ~Oh! Boo is a hamster!~

 

== EP#shaeB ~Is he now?~

 

= ~That’s cool~ // only 1 “=†is used when the same character is talking more than once.

 

== BMINSC ~Yes, and butt-kicking!~

 

EXIT

 

CHAIN

 

IF ~InParty(“EP#shaeâ€Â)

 

InParty(Player1)

 

!ActuallyInCombat()

 

Global(“shaePCTalkâ€Â,â€ÂGLOBALâ€Â,0)~

 

THEN EP#shaeB shaePC1

 

~Heya, <CHARNAME>, how goes it?~

 

DO ~(“shaePCTalkâ€Â,â€ÂGLOBALâ€Â,1)~

 

END

 

IF ~~ THEN REPLY ~I’m good, shae`lina, thanks for asking.~ GOTO shaePC1-1

 

IF ~~ THEN REPLY ~Leave me alone.~ GOTO shaePC1-2

 

 

 

// Now, we write the blocks of dialogue that these states lead to.

 

 

 

CHAIN

 

IF ~~ THEN EP#shaeB shaePC1-1

 

~No problem!~

 

EXIT

 

 

 

CHAIN

 

IF ~~ THEN EP#shaeB shaePC1-2

 

~Oh…OK.~

 

EXIT

 

CHAIN

 

IF ~InParty(“EP#shaeâ€Â)

 

InParty(Player1)

 

!ActuallyInCombat()

 

Global(“shaePCTalkâ€Â,â€ÂGLOBALâ€Â,2)~

 

THEN EP#shaeB shaePC1

 

~Heya, <CHARNAME>, how goes it?~

 

DO ~(“shaePCTalkâ€Â,â€ÂGLOBALâ€Â,3) SetGlobalTimer(“EP#shaeTimerâ€Â,â€ÂGLOBALâ€Â,TWO_DAYS)~

 

END

 

IF ~~ THEN REPLY ~I’m good, shae`lina, thanks for asking.~ GOTO shaePC1-1

 

IF ~~ THEN REPLY ~Leave me alone.~ GOTO shaePC1-2

 

 

 

 

 

CHAIN

 

IF ~~ THEN EP#shaeB shaePC1-1

 

~No problem!~

 

EXIT

 

 

 

CHAIN

 

IF ~~ THEN EP#shaeB shaePC1-2

 

~Oh…OK.~

 

EXIT

 

CHAIN

 

IF ~IsGabber(Player1)~

 

THEN EP#shaeJ sFlirt1

 

~(shae`lina notices you looking at her)~

 

= ~What’s up, <CHARNAME> ?~

 

END

 

+~ RandomNum(2,1)~ + ~It is wonderful having you in the group, shae`lina.~ GOTO sFlirt1.1

 

+~ RandomNum(2,2)~ + ~It is wonderful having you in the group, shae`lina.~ GOTO sFlirt1.2

 

CHAIN

 

IF ~~ THEN EP#shaeJ sFlirt1.1

 

~Why, thank you, <CHARNAME>. It is nice traveling with you as well.~

 

EXIT

 

 

 

CHAIN

 

IF ~~ THEN EP#shaeJ sFlirt1.2

 

~Heh, thanks.~

 

EXIT

 

Note that I'll be making the spoken lines more interesting later. For now, I just want to get it to work in-game :)

 

Thanks!

Eric

Link to comment
Also, the curly quotes are probably not parsing. Use " instead of “ or â€Â.
Definitely.

 

Also, the first ActuallyInCombat is missing its '()', and the first action is missing the initial quote and the terminating tilde.

IF ~InParty(“EP#shaeâ€Â)
InParty(“Minscâ€Â)
!ActuallyInCombat // SHOULD !ActuallyInCombat()
Global(“EP#shaeMinscâ€Â,â€ÂGLOBALâ€Â,0) // SHOULD ...,0)~
THEN EP#shaeB shaeMinsc1
~Minsc, how are you?~
DO ~SetGlobal(EP#shaeMinscâ€Â,â€ÂGLOBALâ€Â,1) // SHOULD ("EP#shaeMinsc","GLOBAL",1)~

Link to comment

DO ~(â€ÂshaePCTalkâ€Â,â€ÂGLOBALâ€Â,3) SetGlobalTimer(“EP#shaeTimerâ€Â,â€ÂGLOBALâ€Â,TWO_DAYS)~

 

should be

 

DO ~SetGlobal("shaePCTalk","GLOBAL",3) SetGlobalTimer("EP#shaeTimer","GLOBAL",TWO_DAYS)~

 

Berelinde has some really cool tutorial stuff scattered around both G3 and SHS that may help you, including some dialogue templates that you can grab. CHAIN stuff looks easy, but it can really trip you up - you might find it easier to grab a template and modify it at first, and then branch off later.

 

(Don't worry. You are in good company. devSin and CamDawg both had to help me through having troubles, and that was just last week... :) )

Link to comment

Much thanks for the .d file corrections! I'll have to use the corrected document as a basis for comparison with others, while growing familiar with all these details.

 

Seems BBEdit likes curly quotes. I didn't realize that would be an issue, but now I'll make sure all similar files have straight quotes as well.

 

I took the format of this .d file from a tutorial I found on the 'net, but I've indeed noticed that Berelinde has posted a wealth of useful information, so I'll be taking a look at what's there, especially templates :)

 

After fixing things up, I'll attempt another install, and see if I continue to get the "permission denied" failure that I'm currently getting with my .tp2 files...

 

Happy modding,

Eric

Link to comment
Assuming a recent version:

 

BBEdit -> Preferences -> Editor Defaults

Make sure "Smart quotes" is not checked

 

For already fudged documents:

 

Text -> Straighten Quotes

 

I have BBEdit Lite 6.1.2. Smart quotes is unchecked. There is no menu item under Text called Straighten Quotes, but I can do it by finding and replacing, which is what I did for shae`lina's .d file.

 

Also, I checked her other two .d files, and the quotes in those are already straight, so these files are now ready...I think :)

 

Thanks,

Eric

Link to comment

If you're running this antique under Mac OS X, run, don't walk, to download TextWrangler (also free).

Seconded. TextWrangler was my text editor of choice when I used OS X.

 

Not always easy to keep up with the times :) I'd thought I had the latest versions of everything on my Macs. Grabbing TextWrangler now.

 

I did learn that TextEdit (Apple's own text editor) sucks for this kind of work...and I wouldn't dream of using M$ Word for it!

 

Thanks again,

Eric

Link to comment

It kinda-sorta sucks. It's bad for editing the .ini file since Chris made the Mac version use Mac (CR) line breaks and it's next to impossible to get TextEdit to respect that, but for just general TP2 editing, it shouldn't really make any difference (scripts, dialogues, and TP2/TRA files are just fine with Unix line breaks). I don't like it, simply because I can't stand the default Cocoa text layout and editing behaviors (having used BBEdit for years, I prefer my text system to not suck, thanks).

 

If you want, you can check out my language module (for syntax highlighting) after downloading TextWrangler. It needs to be placed in ~/Library/Application Support/TextWrangler/Language Modules; there's a version of it in the WeiDU Installer.command script (distributed with WeiDU), and I also have a separate archive available.

 

The two are slightly different because I don't know how much TextWrangler supports (compared to BBEdit 8.5 and later); I updated some of the module in the WeiDU-Mac-204 install script, but I'm unaware if it actually works. If you do try them and either doesn't work (or neither work or both work), please let me know so I can update the copy included with WeiDU to work correctly for people with TextWrangler or older versions of BBEdit.

Link to comment
It kinda-sorta sucks. It's bad for editing the .ini file since Chris made the Mac version use Mac (CR) line breaks and it's next to impossible to get TextEdit to respect that, but for just general TP2 editing, it shouldn't really make any difference (scripts, dialogues, and TP2/TRA files are just fine with Unix line breaks). I don't like it, simply because I can't stand the default Cocoa text layout and editing behaviors (having used BBEdit for years, I prefer my text system to not suck, thanks).

 

If you want, you can check out my language module (for syntax highlighting) after downloading TextWrangler. It needs to be placed in ~/Library/Application Support/TextWrangler/Language Modules; there's a version of it in the WeiDU Installer.command script (distributed with WeiDU), and I also have a separate archive available.

 

The two are slightly different because I don't know how much TextWrangler supports (compared to BBEdit 8.5 and later); I updated some of the module in the WeiDU-Mac-204 install script, but I'm unaware if it actually works. If you do try them and either doesn't work (or neither work or both work), please let me know so I can update the copy included with WeiDU to work correctly for people with TextWrangler or older versions of BBEdit.

 

Hmmm...comes through as a WeiDU.plist file. Is that what I'm supposed to have downloaded?

 

The thing with TextEdit is that I can create a document (such as a .d file), but if I open it in BBEdit, I see all sorts of garbage characters at the beginning and throughout the file. If I create the document using BBEdit, though, I get no such nonsense. I'm looking forward to checking out TextWrangler.

 

Thanks,

Eric

Link to comment

Yep. The codeless language modules are XML property lists. The version I linked to supports BBEdit 8.5+ (and hopefully the latest version of TextWrangler); the version in the installer script should (hopefully) support older versions of BBEdit (back to 7.0, I think) and TextWrangler.

 

Garbage characters could be anything. Likely, the encoding is off, or your BBEdit settings are whack (if you somehow have "Show invisibles" enabled or it's turning on for these documents). I can't remember how well BBEdit 6.x supported Unicode (or whether BBEdit Lite supported it at all). (Unless, of course, you're saving the files as RTF, which won't work at all; make sure to select Format -> Make Plain Text if you want to create plain text files.)

Link to comment

Archived

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

×
×
  • Create New...