Jump to content

Embarassing Question


lac

Recommended Posts

I've been reading modding tutorials, but so far haven't found one aimed at my particular level of ignorance. If anybody knows of a tutorial for unix programmers who so far have avoided writing a single line of code for windows, I'd be very interested in that one. :)

 

At any rate, here is the deal. I've written a trivial script that ought to install my favourite portraits for

my Tutu game. Lines and lines of stuff that all look like this:

 

copy ~LacsBGPortraits/AJANTL.BMP~ ~override/_JANTISL.BMP~

copy ~LacsBGPortraits/AJANTS.BMP~ ~override/_JANTISS.BMP~

copy ~LacsBGPortraits/ALORAL.BMP~ ~override/_LORAL.BMP~

copy ~LacsBGPortraits/ALORAS.BMP~ ~override/_LORAS.BMP~

copy ~LacsBGPortraits/BRANL.BMP~ ~override/_RANWEL.BMP~

copy ~LacsBGPortraits/BRANS.BMP~ ~override/_RANWES.BMP~

 

This lives in a file called myBGpicts.txt

 

Now I would like to run it.

 

For the life of me, I cannot figure out how, and I clearly don't know how to ask the question, either, because Google isn't helping. Could some kind soul clue the idiot in?

 

Thanks very much,

Laura

Link to comment

Thank you. I tried that, and got:

 

[C:\Program Files\Black Isle\BaldursGateTutu\setup-mybgpicts.exe] Using scripting style "BG2"

[dialog.tlk] claims to be writeable.

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

 

[sETUP-MYBGPICTS.TP2] PARSE ERROR at line 1 column 0-3

Near Text: COPY

GLR parse error

 

[sETUP-MYBGPICTS.TP2] ERROR at line 1 column 0-3

Near Text: COPY

Parsing.Parse_error

ERROR: parsing [sETUP-MYBGPICTS.TP2]: Parsing.Parse_error

ERROR: problem parsing TP file [sETUP-MYBGPICTS.TP2]: Parsing.Parse_error

 

FATAL ERROR: Parsing.Parse_error

 

.............

 

So presumably there is a formatting issue with the tp2 file. What should I be reading now?

Link to comment

COPY ~LacsBGPortraits/AJANTL.BMP~ ~override/_JANTISL.BMP~

copy ~LacsBGPortraits/AJANTS.BMP~ ~override/_JANTISS.BMP~

copy ~LacsBGPortraits/ALORAL.BMP~ ~override/_LORAL.BMP~

copy ~LacsBGPortraits/ALORAS.BMP~ ~override/_LORAS.BMP~

copy ~LacsBGPortraits/BRANL.BMP~ ~override/_RANWEL.BMP~

copy ~LacsBGPortraits/BRANS.BMP~ ~override/_RANWES.BMP~

copy ~LacsBGPortraits/CORANL.BMP~ ~override/_ORANL.BMP~

copy ~LacsBGPortraits/CORANS.BMP~ ~override/_ORANS.BMP~

copy ~LacsBGPortraits/DYNAH1L.BMP~ ~override/_YNAHEIL.BMP~

copy ~LacsBGPortraits/DYNAH1S.BMP~ ~override/_YNAHEIS.BMP~

copy ~LacsBGPortraits/EDWINL.BMP~ ~override/_DWINL.BMP~

copy ~LacsBGPortraits/EDWINS.BMP~ ~override/_DWINS.BMP~

copy ~LacsBGPortraits/ELDOTL.BMP~ ~override/_LDOTHL.BMP~

copy ~LacsBGPortraits/ELDOTS.BMP~ ~override/_LDOTHS.BMP~

copy ~LacsBGPortraits/FALDOL.BMP~ ~override/_ALDORNL.BMP~

copy ~LacsBGPortraits/FALDOS.BMP~ ~override/_ALDORNS.BMP~

copy ~LacsBGPortraits/GARRIL.BMP~ ~override/_ARRICKL.BMP~

copy ~LacsBGPortraits/GARRIS.BMP~ ~override/_ARRICKS.BMP~

copy ~LacsBGPortraits/IMOENL.BMP~ ~override/_MOENL.BMP~

copy ~LacsBGPortraits/IMOENS.BMP~ ~override/_MOENS.BMP~

copy ~LacsBGPortraits/JAHEIL.BMP~ ~override/_AHEIRAL.BMP~

copy ~LacsBGPortraits/JAHEIS.BMP~ ~override/_AHEIRAS.BMP~

copy ~LacsBGPortraits/KAGAIL.BMP~ ~override/_AGAINL.BMP~

copy ~LacsBGPortraits/KAGAIS.BMP~ ~override/_AGAINS.BMP~

copy ~LacsBGPortraits/KHALIL.BMP~ ~override/_HALIDL.BMP~

copy ~LacsBGPortraits/KHALIS.BMP~ ~override/_HALIDS.BMP~

copy ~LacsBGPortraits/KIVANL.BMP~ ~override/_IVANL.BMP~

copy ~LacsBGPortraits/KIVANS.BMP~ ~override/_IVANS.BMP~

copy ~LacsBGPortraits/MINSCL.BMP~ ~override/_INSCL.BMP~

copy ~LacsBGPortraits/MINSCS.BMP~ ~override/_INSCS.BMP~

copy ~LacsBGPortraits/MONTL.BMP~ ~override/_ONTARL.BMP~

copy ~LacsBGPortraits/MONTS.BMP~ ~override/_ONTARS.BMP~

copy ~LacsBGPortraits/QUAYL.BMP~ ~override/_UAYLEL.BMP~

copy ~LacsBGPortraits/QUAYS.BMP~ ~override/_UAYLES.BMP~

copy ~LacsBGPortraits/SAFANL.BMP~ ~override/_AFANAL.BMP~

copy ~LacsBGPortraits/SAFANS.BMP~ ~override/_AFANAS.BMP~

copy ~LacsBGPortraits/SHARTL.BMP~ ~override/_HARTELL.BMP~

copy ~LacsBGPortraits/SHARTS.BMP~ ~override/_HARTELS.BMP~

copy ~LacsBGPortraits/SKIEL.BMP~ ~override/_KIEL.BMP~

copy ~LacsBGPortraits/SKIES.BMP~ ~override/_KIES.BMP~

copy ~LacsBGPortraits/TIAXL.BMP~ ~override/_IAXL.BMP~

copy ~LacsBGPortraits/TIAXS.BMP~ ~override/_IAXS.BMP~

copy ~LacsBGPortraits/VICONL.BMP~ ~override/_ICONIAL.BMP~

copy ~LacsBGPortraits/VICONS.BMP~ ~override/_ICONIAS.BMP~

copy ~LacsBGPortraits/XANL.BMP~ ~override/_ANL.BMP~

copy ~LacsBGPortraits/XANS.BMP~ ~override/_ANS.BMP~

copy ~LacsBGPortraits/XZARL.BMP~ ~override/_ZARL.BMP~

copy ~LacsBGPortraits/XZARS.BMP~ ~override/_ZARS.BMP~

copy ~LacsBGPortraits/YESLIL.BMP~ ~override/_ESLICKL.BMP~

copy ~LacsBGPortraits/YESLIS.BMP~ ~override/_ESLICKS.BMP~

 

No blank line at the end, and every line begins at the margin. I replaced 'copy' with 'COPY' in the first line to see if it would make any difference. It didn't.

Link to comment

I think it misses some kind of a BEGIN ~name of mod~. Try looking at any other mod to see the possibilities of the header (I don't know it by heart). You'd need something like a direction to backup modfolder which WeiDU needs for uninstalling, BEGIN as mentioned and also AUTHOR ~emailaddress~ which will be printed in case of an install error.

Link to comment

We make progress slowly.

 

I have a new much smaller tp2 file: It is here:

 

BACKUP ~LacsBGPortraits/Backup~

AUTHOR ~lac~

 

BEGIN

COPY ~LacsBGPortraits/JAHEIL.BMP~ ~override/_AHEIRAL.BMP~

COPY ~LacsBGPortraits/JAHEIS.BMP~ ~override/_AHEIRAS.BMP~

COPY ~LacsBGPortraits/XZARL.BMP~ ~override/_ZARL.BMP~

COPY ~LacsBGPortraits/XZARS.BMP~ ~override/_ZARS.BMP~

 

That was the last line, the last COPY. No trailing blank lines in the file.

I try this an I get the following error.

[dialog.tlk] claims to be writeable.

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

 

[sETUP-MYBGPICTS.TP2] PARSE ERROR at line 5 column 1-7

Near Text: COPY

GLR parse error

 

[sETUP-MYBGPICTS.TP2] ERROR at line 5 column 1-7

Near Text: COPY

Parsing.Parse_error

ERROR: parsing [sETUP-MYBGPICTS.TP2]: Parsing.Parse_error

ERROR: problem parsing TP file [sETUP-MYBGPICTS.TP2]: Parsing.Parse_error

 

FATAL ERROR: Parsing.Parse_error

------------

Now the annoying thing is that the MS Dos window contains useful information

that never made it into the DEBUG file. Transcribing this by hand, it says

Link to comment

I have made progress

 

For testing purposes have a new much smaller tp2 file: It is here:

 

BACKUP ~LacsBGPortraits/Backup~

AUTHOR ~lac~

 

BEGIN

COPY ~LacsBGPortraits/JAHEIL.BMP~ ~override/_AHEIRAL.BMP~

COPY ~LacsBGPortraits/JAHEIS.BMP~ ~override/_AHEIRAS.BMP~

COPY ~LacsBGPortraits/XZARL.BMP~ ~override/_ZARL.BMP~

COPY ~LacsBGPortraits/XZARS.BMP~ ~override/_ZARS.BMP~

 

That was the last line, the last COPY. No trailing blank lines in the file.

I try this an I get the following error.

 

[sETUP-MYBGPICTS.TP2] PARSE ERROR at line 5 column 1-7

Near Text: COPY

GLR parse error

 

[sETUP-MYBGPICTS.TP2] ERROR at line 5 column 1-7

Near Text: COPY

Parsing.Parse_error

ERROR: parsing [sETUP-MYBGPICTS.TP2]: Parsing.Parse_error

ERROR: problem parsing TP file [sETUP-MYBGPICTS.TP2]: Parsing.Parse_error

 

FATAL ERROR: Parsing.Parse_error

------------

Now the annoying thing is that the MS Dos window contains useful information

that never made it into the DEBUG file. Transcribing this by hand, it says

 

In state 283 I expected one of these tokens:

[2] ~~

[4] @

[5] #

[6] !

 

parse error state 283 at copy

 

.....

so I poked around a bit, and people seemed to be doing

 

BEGIN @0 instead of just BEGIN. I had no idea what that meant, but, heck, I can code by cut-and-paste things in with the worst of them :-)

 

So changing my tp2 file to be:

BACKUP ~LacsBGPortraits/Backup~

AUTHOR ~lac~

 

BEGIN @0

COPY ~LacsBGPortraits/JAHEIL.BMP~ ~override/_AHEIRAL.BMP~

COPY ~LacsBGPortraits/JAHEIS.BMP~ ~override/_AHEIRAS.BMP~

COPY ~LacsBGPortraits/XZARL.BMP~ ~override/_ZARL.BMP~

COPY ~LacsBGPortraits/XZARS.BMP~ ~override/_ZARS.BMP~

 

I get something that apparantly parses and produces a runtime warning:

 

ERROR: No translation provided for @0

Continuing despite error.

Warning at src/dc.ml.262

 

Install Component [uNDEFINED STRING: @0]?

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

Installing [uNDEFINED STRING: @0]

Copying 1 file ...

[LacsBGPortraits/JAHEIL.BMP] loaded, 208616 bytes

override/_AHEIRAL.BMP copied to LacsBGPortraits/Backup/0/_AHEIRAL.BMP, 56496 bytes

Copied [LacsBGPortraits/JAHEIL.BMP] to [override/_AHEIRAL.BMP]

Copying 1 file ...

[LacsBGPortraits/JAHEIS.BMP] loaded, 7016 bytes

override/_AHEIRAS.BMP copied to LacsBGPortraits/Backup/0/_AHEIRAS.BMP, 7016 bytes

Copied [LacsBGPortraits/JAHEIS.BMP] to [override/_AHEIRAS.BMP]

Copying 1 file ...

[LacsBGPortraits/XZARL.BMP] loaded, 56496 bytes

override/_ZARL.BMP copied to LacsBGPortraits/Backup/0/_ZARL.BMP, 56496 bytes

Copied [LacsBGPortraits/XZARL.BMP] to [override/_ZARL.BMP]

Copying 1 file ...

[LacsBGPortraits/XZARS.BMP] loaded, 3480 bytes

override/_ZARS.BMP copied to LacsBGPortraits/Backup/0/_ZARS.BMP, 7016 bytes

Copied [LacsBGPortraits/XZARS.BMP] to [override/_ZARS.BMP]

 

----

 

which means it did what I asked it to. And I checked, the files were indeed

rewritten. But now -- how do I define @0 so the warning goes away? I have

looked at many existing tp files and none of them seem to be doing any

defining as far as I can see.

 

Sorry to be a pest,

Laura

Link to comment

Are you copying everything in a folder?

 

If yes, just copy the entire folder, like COPY ~LacsBGPortraits/~ ~override~

 

And that will preserve current filenames.

 

You want to use these as custom portraits for your PC, if so, you want the portraits folder instead. :)

 

@0 needs a setup-mymod.tra somewhere. For the purposes of this, I would simply use BEGIN ~String~ instead of using the TRA options.

 

Icen

Link to comment

yep, you are darned close... good research!

 

in file setup-lacsbgportraits.tp2

BACKUP ~LacsBGPortraits/Backup~
AUTHOR ~lac~

VERSION ~v1~ //just because you might change contents later, plus it is good form

BEGIN ~Lac's Customized Portraits for NPCs~
 /* this replaces the portaits for Jaheira and Xzar in-game */
 COPY ~LacsBGPortraits/JAHEIL.BMP~ ~override/_AHEIRAL.BMP~
 COPY ~LacsBGPortraits/JAHEIS.BMP~ ~override/_AHEIRAS.BMP~
 COPY ~LacsBGPortraits/XZARL.BMP~ ~override/_ZARL.BMP~
 COPY ~LacsBGPortraits/XZARS.BMP~ ~override/_ZARS.BMP~


BEGIN ~Lac's Customized Portraits for PCs~
 /* this allows the portaits for Jaheira and Xzar to be selected as custom options for the PC in-game */
 COPY ~LacsBGPortraits/JAHEIL.BMP~ ~portraits/_AHEIRAL.BMP~
 COPY ~LacsBGPortraits/JAHEIS.BMP~ ~portraits/_AHEIRAS.BMP~
 COPY ~LacsBGPortraits/XZARL.BMP~ ~portraits/_ZARL.BMP~
 COPY ~LacsBGPortraits/XZARS.BMP~ ~portraits/_ZARS.BMP~

 

the bigg reminds us (somewhere some forum post, no idea when/where) that indentation and leaving a carriage return at the end of a file are good things to do, too, and something some folks (including myself, but I am trying to fix that/remember that) skip doing.

 

copy a setup-mymod.exe and rename it setup-lacsbgportraits.exe ,

create the folder lacsbgportraits and a subfolder lacsbgportraits/backup

throw the portraits in the folder lacsbgportraits (you could also throw the .tp2 in there if you want, leaving only the setup-mymod.exe and the folder at the same level) and copy everything into your game directory.

 

Voila, your very own minimod.

 

Cool (and quick) intro to modding and customizing. Congratulations!

Link to comment

I thought I did what you said, and I am still getting errors.

 

Here is my new setup-lacsbgportraits.tp2

 

BACKUP ~LacsBGPortraits/Backup~

AUTHOR ~lac~

VERSION ~v1~

 

BEGIN ~Lac's Customized Portraits for NPCs~

/* this replaces the portaits for joinable NPCs in-game */

copy ~LacsBGPortraits/AJANTL.BMP~ ~override/_JANTISL.BMP~

copy ~LacsBGPortraits/AJANTS.BMP~ ~override/_JANTISS.BMP~

copy ~LacsBGPortraits/ALORAL.BMP~ ~override/_LORAL.BMP~

copy ~LacsBGPortraits/ALORAS.BMP~ ~override/_LORAS.BMP~

 

(file ends with a newline)

 

Here's the part of the debug file that mentions the error.

[C:\Program Files\Black Isle\BaldursGateTutu\setup-lacsbgportraits.exe] Using scripting style "BG2"

[dialog.tlk] claims to be writeable.

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

 

[sETUP-LACSBGPORTRAITS.TP2] PARSE ERROR at line 7 column 1-37

Near Text: ~LacsBGPortraits/AJANTL.BMP~

GLR parse error

 

[sETUP-LACSBGPORTRAITS.TP2] ERROR at line 7 column 1-37

Near Text: ~LacsBGPortraits/AJANTL.BMP~

Parsing.Parse_error

ERROR: parsing [sETUP-LACSBGPORTRAITS.TP2]: Parsing.Parse_error

ERROR: problem parsing TP file [sETUP-LACSBGPORTRAITS.TP2]: Parsing.Parse_error

 

FATAL ERROR: Parsing.Parse_error

 

-------------

 

And what the debug file doesn't list is that it is a parse error in state 622.

There is a long list of things that it was expecting, COPY is one of the things.

 

line 7 in mile file reads

(4 spaces) copy ~LacsBGPortraits/AJANTL.BMP~ ~override/_JANTISL.BMP~

Link to comment

try

COPY

instead of

copy...

 

some of WeiDU is case sensitive, and some is not. In general, all the stuff in the WeiDU docs, like

 

COPY

COPY_EXISTING

PATCH_IF

ACTION_IF FILE_EXISTS_IN_GAME

 

etc. expects uppercase. The stuff inside of tildes, like ~override/myfile.cre~ could be written

 

~OvErRiDe/mYfIlE.cRe~ and work, but I think most of the standard commands are specifically set up to expect uppercase.

Link to comment

Archived

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

×
×
  • Create New...