Jump to content


Photo

Feature requests and changes


  • Please log in to reply
5 replies to this topic

#1 Loriel

Loriel
  • Member
  • 57 posts

Posted 21 January 2004 - 09:48 PM

I requested these a long time ago, but it's been a while, and I thought I would bring them up again in one post instead of several:

1) It would be nice to have a .key cleanup similar to NI's. The reasoning for this is to have an automated command-line version, so the end-user doesn't have to download another app. For example, if I want to uninstall a mod that adds/modifies several bif files, having the ability to run a --key-cleanup from a shell script on uninstalling the mod would be really nice.

2) Having a way to specify where the output goes would be nice when using --biff-get (or any command that gives some sort of file output, for that matter).

3) In the Mac v144, --make-biff works fine, except for two things. One is problematic, the other is cosmetic. First, the biff that is created has no permissions at all. Check this thread for an explanation of what I mean. The fix I've been using is to chmod 755 mybiff.bif in the shell script, otherwise anything that is called by the game from that biff will crash the game. Second, there is extra stuff printed when making the biff. Obviously, .DS_STORE, ., and .. are all going to be in every new directory, so they can be ignored, but there is also the 'wes 1' stuff, which I thought was worth mentioning. Here's an example:
[./weidu-mac] WeiDU version 144
[./chitin.key] 145 BIFFs, 36494 resources
[./dialog.tlk] 63645 string entries
ERROR: unknown resource extension [DS_STORE]
WARNING: Not including [JMTobsoa/.DS_Store]: unknown resource type
ERROR: unknown resource extension []
WARNING: Not including [JMTobsoa/..]: unknown resource type
ERROR: unknown resource extension []
WARNING: Not including [JMTobsoa/.]: unknown resource type
[data/JMTobsoa.bif] will contain 28 resources totalling 42036 bytes
[data/JMTobsoa.bif] incorporating [JMTobsoa/tobsoa.wav]

<snip>...

wes 1
wes 2
wes 3
KEY saved (146 biffs, 36518 resources)
4) Regular expressions currently don't work with Weidu v144 for Mac, so patching on a large scale is extremely tedious. Using regexp with --biff-get produces a 'weidu-mac: No Match.' error, and trying to use C_E_R produces this:
[./setup-regexp.exe] WeiDU version 144

[SETUP-REGEXP.TP2] PARSE ERROR at line 6 column 6-25
Near Text: ~sw1h..[^abc].*itm~
        syntax error

[SETUP-REGEXP.TP2]  ERROR at line 6 column 6-25
Near Text: ~sw1h..[^abc].*itm~
        Parsing.Parse_error
ERROR: parsing [SETUP-REGEXP.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [SETUP-REGEXP.TP2]: Parsing.Parse_error

ERROR: Parsing.Parse_error

Press ENTER to exit.

logout


#2 weimer

weimer
  • Member
  • 1569 posts

Posted 22 January 2004 - 10:46 AM

(1) Perhaps if you describe exactly what "key cleanup" means (algorithmically) either I or someone else hanging around will code it up. Since I don't know what it means and I don't use it myself, the incentive is currently low. :-)

(2) This already exists: "--out destination".

Here we see Wes putting "imoen.dlg" into the directory "zlib":

tani-no-yuri:/cygdrive/c/src/weidu$ weidu --biff-get imoen.dlg --out zlib
[c:\src\weidu\weidu.asm.exe] WeiDU version 147
[C:\Program Files\Black Isle\Baldur's Gate/Chitin.key] 159 BIFFs, 16694 resources
[C:\Program Files\Black Isle\Baldur's Gate/dialog.tlk] 24236 string entries
[C:\Program Files\Black Isle\Baldur's Gate\/data/Dialog.bif] 933941 bytes, 1113 files, 0 tilesets
[zlib/IMOEN.DLG] created from [C:\Program Files\Black Isle\Baldur's Gate/data/Dialog.bif]
tani-no-yuri:/cygdrive/c/src/weidu$ ls -la zlib/imoen.dlg
-rwx------+  1 weimer  None        1126 Jan 22 10:49 zlib/imoen.dlg


Another example of this can be found in the "example uses" and "command line arguments" sections of the manual.

(3) Permissions: fixed locally. "wes 1": whoops, fixed locally. Verbose debugging output: changed to log_only, fixed locally.

(4) I can't reproduce this locally -- can you provide a cut-and-paste of you running a --biff-get on BG2 and the result? Verbatim including your shell prompt, please.

Thanks for taking the time to bring these to my attention.

#3 -Devon-

-Devon-
  • Guest

Posted 22 January 2004 - 12:44 PM

4) Regular expressions currently don't work with Weidu v144 for Mac, so patching on a large scale is extremely tedious. Using regexp with --biff-get produces a 'weidu-mac: No Match.' error,

Ahhh, you did put the regular expression with biff-get inside double quotes as I recommended. Otherwise the shell tries to do filename substitution(or globbing) before actually calling the program.

#4 Loriel

Loriel
  • Member
  • 57 posts

Posted 22 January 2004 - 04:12 PM

1) I'm afraid I can't be of much help with describing it algorithmically, as I don't know squat about algorithyms (sp?) in the first place. However, perhaps I can give a better example of what I was talking about. I have a mod that has several modules (for lack of a better term) that all add to the same biffs. For instance:

Module 1 adds to:
JMSpells.bif
JMCreatures.bif
JMDialog.bif

Module 2 adds to:
JMDialog.bif
JMScripts.bif
JMSounds.bif
etc...

When uninstalling, I can't simply delete a biff for each module, as the biffs are shared between modules. I run a shell script that simply unpacks all the biffs into their respective folders, deletes the old biffs, then delete the files as necessary. After that, I repack whatever is left in the biff folders. The problem is that the chitin.key still has a reference to the old biffs, even if they no longer exist. The problem is compounded when the biff is repacked, as there are now two entries for every item in the new biff, since the old entry in the chitin.key is still in there. The Key Cleanup in NI simply looks at what is in the data folder and remaps the chitin.key to what is ACTUALLY there (at least I think that's how it works). It might also look in the baldur.ini to determine if there are other biff locations, but I don't know enough about it to be sure.

2) Ah, my bad - I'm going to read the readme now for the 12,964th time and make sure I don't miss anything this time. I swear, EVERYTHING is answered in there!

3) Thank you, thank you, and thank you. :D

4)
@Devon
I have no idea what you just said, but does that mean you know the problem and can fix it?

@Wes
Don't make fun of the comp name - heh. Here you go:
[MacDaddy:/BGII - SoA] jmartin% weidu-mac --biff-get sw1h..[^abc].*itm
weidu-mac: No match.
[MacDaddy:/BGII - SoA] jmartin%

EDIT:
@Devon
It occurs to me that my single quotes in the previous post might have caused some confusion. I only put them as a quote of the error, not that they were part of the error message, if that makes any sense.

#5 -Devon-

-Devon-
  • Guest

Posted 23 January 2004 - 03:34 PM

@Wes
Don't make fun of the comp name - heh. Here you go:

[MacDaddy:/BGII - SoA] jmartin% weidu-mac --biff-get sw1h..[^abc].*itm
weidu-mac: No match.
[MacDaddy:/BGII - SoA] jmartin%

Try:

[Devon-Smiths-Computer:/BGII - SoA] devons% weidu-mac --biff-get "sw1h..[^abc].*itm"

I tested it and it works and notice the double quotes surrounding the regular expression.

Cheers,
Devon Smith

#6 Loriel

Loriel
  • Member
  • 57 posts

Posted 23 January 2004 - 05:23 PM

@Devon & Wes
I haven't tested with C_E_R, yet, but --biff-get works with the double-quotes. Thanks - 3 of 4 down.

@Wes (or other possible coders?)
Did the explanation of Key Cleanup help at all?