Author Topic: Beta 231.11  (Read 8226 times)

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Beta 231.11
« on: August 19, 2013, 08:15:38 AM »
This version features compatibility with BGEE's tlks and localised biffs. To achieve this, one of the corner stones of WeiDU has been turned inside out and upside down, broken down and built back up. Hopefully nothing was lost in the process. Beta location.

How it works:
Firstly, --tlkin, --tlkout and their f-versions are kind of, sort of deprecated. I can't think of a legitimate use-case and it's easy to shoot yourself in the foot with them. They (mostly) remain functional, however.

WeiDU has the notion of standard tlks. On the old editions, these are ./dialog.tlk and optionally ./dialogf.tlk. On the EEs, these are every lang/X/dialog.tlk and lang/X/dialogf.tlk for which lang/X/dialog.tlk exists. If --tlkin is not given, WeiDU only considers the standard tlks. If --tlkin is given, that tlk is considered, as well. The considered tlks are all checked for regularness and writeability.

WeiDU has the notion of active tlks. On the old editions, these are ./dialog.tlk and optionally ./dialogf.tlk, or the tlks from --tlkin. On the EEs, if --use-lang was given, WeiDU uses the tlks in that directory as the active tlks. Otherwise, WeiDU checks the EE's user directory [1] for the file weidu.conf. If this file exists, WeiDU attempts to read the path to the active tlk from it. If --tlkin or --ftlkin was given, these are instead used as the active tlk. Otherwise, or if no path was obtained from weidu.conf, if WeiDU is not running interactively, WeiDU fails with an error. If WeiDU is running interactively, the user is prompted to select the active TLKs as one of the first steps of the installation (after choosing mod language, before being prompted about the readme). If --use-lang was given or the user was prompted for which tlks to use, the file weidu.conf is saved with the result.

During mod installation, strings are read from the active tlks and the uninstallation information for each component includes the path to the active tlk, even if --tlkout refers to another tlk. This means that you can redirect the output to another location with --tlkout, but there are --tlkouts for which WeiDU can't uninstall the changes. Using --tlkout will not screw up your input tlk on uninstallation.

When components are uninstalled, strings are uninstalled to the path in the uninstallation information, even if these paths refer to a tlk other than the currently active one. If tlk path uninstallation information is missing and its the old editions, WeiDU will uninstall strings from the active tlks (./dialog.tlk and ./dialogf.tlk). If its the EEs, the user will be asked which X in lang/X/ for which tlks should be loaded and strings uninstalled from.

If any of non-active tlks were changed, these tlks are written to disk. If the active tlk was changed and --tlkout was not given, the contents of the active tlk is written to its regular path. If --tlkout was given, the contents of the active tlk is written to that path instead.

This beta should be backwards compatible with both hardlinks to dialog.tlk (though the link is no longer necessary and will not be used) and batch files that give --tlkin and --tlkout (though both --tlkin and --tlkout are now unnecessary).

I'm also looking for feedback for the following two prompts:

WeiDU asks which language the user wants to install to:
Quote
"This game is available in multiple languages. WeiDU will install mods to a single of those languages. Mods will be available for that language and that language alone. If you switch to another language, you need to reinstall your mods.

Choose which language you wish to install this mod to. Your choice will be saved and reused in the future. This choice is saved to the file weidu.conf, located among your other user files."

WeiDU asks which language the mod should be uninstalled from:
Quote
"This game is available in multiple languages, but WeiDU does not know which language to uninstall this mod from.

Choose which language this mod should be uninstalled from. This should be the same as the language you installed the mod to. Your choice will be used until WeiDU exits but will not be remembered."

Do they make sense and are they understandable? Can they be improved upon? If you show them to your computer-illiterate friend, does he or she stand an outside chance of divining the meaning of these arcane symbols?



On the EEs, WeiDU will additionally load biffs from the selected lang/X/data folder, or from lang/en_us/data if there are no biffs in lang/X/data.

This beta does not fix the lexer warnings from using regexps in BAF and possibly D files, but the plan is to fix that before the stable version.

I haven't heard from Nifft lately, so I don't have an OS X build.



1. On Windows and OS X, this is the directory where the EE's save directory is located. On Linux, this is the EE's root game directory (because I don't have Wine installed, or the inclination to get BGEE working under Wine).

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Beta 231.11
« Reply #1 on: August 19, 2013, 08:23:36 AM »
I notice I am confused by "a single of those languages". "In one language?" "In one language only?"

// warning: silly stuff below

The second might break my brain, too, but not because it's not understandable, the message seems clear. But what if I don't remember? Can't Weidu read these things from some debug file hidden somewhere quietly instead of asking me such difficult questions?

Say, I have Baldur's Gate in Russian, mod Xan in Russian, mod Dace in English. I want to play with Russian Xan and English Dace in the same game. Now it seems I can't do that, because Dace can only be installed to English dialog.tlk and not to Russian dialog.tlk? Okay, what if I install her to Russian dialog.tlk(somehow) to play her in my Russian game, play, and then want to uninstall her and Xan? I uninstall Xan in Russian, then I uninstall Dace, and because I remember she's written in English, I press "English" - but I installed her in Russian! Brain breaking ensues.

Offline Lollorian

  • Planewalker
  • *****
  • Posts: 96
Re: Beta 231.11
« Reply #2 on: August 19, 2013, 08:47:33 AM »
Does this one fix the default backup directory issue Mad Mate reported with 231.10 here?

Thanks for working on this btw :)

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Beta 231.11
« Reply #3 on: August 19, 2013, 09:23:27 AM »
I notice I am confused by "a single of those languages". "In one language?" "In one language only?"
(I don't know if you know but) BGEE games come with tlks for 9 languages and the user is able to freely switch between them through the in-game options. WeiDU will install mods to a single of those sets of tlks.

The second might break my brain, too, but not because it's not understandable, the message seems clear. But what if I don't remember? Can't Weidu read these things from some debug file hidden somewhere quietly instead of asking me such difficult questions?
I'm afraid the debug files are not sufficiently reliable. The easiest way to avoid this problem is to uninstall your mods the same way you installed them. Then you switch to using new WeiDU in the old manner (setup-mymod.exe or whatever) with no batch files or tlk links. Then you reinstall your mods, new WeiDU creates the necessary uninstallation info and you're never bothered. I should probably have mentioned this in the initial post (but I forgot). When you ship a new version that includes old WeiDU, recommend that users uninstall their old mods before upgrading.

Say, I have Baldur's Gate in Russian, mod Xan in Russian, mod Dace in English. I want to play with Russian Xan and English Dace in the same game. Now it seems I can't do that, because Dace can only be installed to English dialog.tlk and not to Russian dialog.tlk? Okay, what if I install her to Russian dialog.tlk(somehow) to play her in my Russian game, play, and then want to uninstall her and Xan? I uninstall Xan in Russian, then I uninstall Dace, and because I remember she's written in English, I press "English" - but I installed her in Russian! Brain breaking ensues.
Which language the mod is in doesn't matter. If you install Russian-Xan and English-Dace, they are installed to the same tlk(s). So you will have Russian text and English text in the same game. The constraint is that you can't install Russian-Xan and English-Dace to the Russian tlk(s) and then switch to using the English tlk without reinstalling Xan and Dace.

Does it make more sense now? (And feel free to suggest improved phrasings.)

Edit: message received. WeiDU needs to be clearer on the point that tlk-language choice is unrelated to mod-language choice.

Does this one fix the default backup directory issue Mad Mate reported with 231.10 here?
Yes. It also fixes the PRETTY_PRINT_2DA bug reported by Cam and adds the HANDLE_TILESETS function.
« Last Edit: August 19, 2013, 09:55:28 AM by Wisp »

Offline Lollorian

  • Planewalker
  • *****
  • Posts: 96
Re: Beta 231.11
« Reply #4 on: August 19, 2013, 09:37:54 AM »
Nnnnnice :D

PS: Beta page still links to 23110.zip for windows.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Beta 231.11
« Reply #5 on: August 19, 2013, 09:47:45 AM »
PS: Beta page still links to 23110.zip for windows.
You need to clear your cache/refresh the page.

Offline CamDawg

  • Infidel
  • Planewalker
  • *****
  • Posts: 859
  • Dreaming of a red Xmas
    • The Gibberlings Three
Re: Beta 231.11
« Reply #6 on: August 19, 2013, 01:08:25 PM »
Nice work, Wisp, and thanks.
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Beta 231.11
« Reply #7 on: August 19, 2013, 09:48:48 PM »
Sweet stuff. The prompts look fine, except:
Code: [Select]
WeiDU will install mods to a single of those languages.
should be
Code: [Select]
WeiDU will install mods to a single [b]one[/b] of those languages.And as for those sentences that end with prepositions, I say in the alleged words of Churchill: that is the sort of arrant pedantry up with which I will not put.

Offline Lollorian

  • Planewalker
  • *****
  • Posts: 96
Re: Beta 231.11
« Reply #8 on: August 20, 2013, 12:48:29 AM »
You need to clear your cache/refresh the page.
And he fixes browser problems too! What can you not do Wisp? :D

Thanks!

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Beta 231.11
« Reply #9 on: August 21, 2013, 06:55:51 AM »
WeiDU asks for tlk to install to:
Quote
This game is available in multiple languages. WeiDU will install mods to a single one of those game languages. Mods will be available for that language and that language alone. This choice is different from the choice of which language you wish to install the mod in and you can install multiple mod languages to the same game language. If you switch to another language, you need to reinstall your mods.

Choose which language you wish to install this mod to. Your choice will be saved and reused in the future. This choice is saved to the file weidu.conf, located among your other user files.
Better or worse?

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Beta 231.11
« Reply #10 on: August 21, 2013, 07:44:25 AM »
Sounds better to me!

That's probably a huge job - I'm sorry I can't exactly grasp its scope. By the way, where will be this weidu.conf? User files? All my Baldur's Gate files are in C:\Games\BGII\ directory, is that somewhere else?

"Choose which language you wish to install this mod to." - "Please, choose the game language for the mod"? (In Russian the first one doesn't exactly sound rude, but... And, yeah, preposition at the end).

Offline Lollorian

  • Planewalker
  • *****
  • Posts: 96
Re: Beta 231.11
« Reply #11 on: August 21, 2013, 08:18:49 AM »
Looks like 23111 hung up with cre_check.tp2 again :P

Code: [Select]
[WeiDU.exe] WeiDU version 23111
This is a non-stable version. Unless you're sure about what you're doing, consider downgrading.

FATAL ERROR: Unix.Unix_error(20, "stat", " -- NO DIALOG.TLK -- ")

I have the GOG version with the path: D:\Games\Baldurs Gate II

EDIT: I gave proper valid backup paths and the same error repeated so it's aparently something different :P

The CMD line used to execute cre_check.tp2 expands to:
Code: [Select]
"WeiDU.exe" --noautoupdate --force-install 0 --nogame --log nul "BiG World Fixpack\_utils\cre_check.tp2" --args "BiG World Fixpack\_utils" | "BiG World Fixpack\_utils\tee" -a "BiG World Debug.txt"Something to change here?
« Last Edit: August 21, 2013, 09:43:26 AM by Lollorian »

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Beta 231.11
« Reply #12 on: August 21, 2013, 09:49:52 AM »
That's probably a huge job - I'm sorry I can't exactly grasp its scope. By the way, where will be this weidu.conf? User files? All my Baldur's Gate files are in C:\Games\BGII\ directory, is that somewhere else?
weidu.conf is only created for BGEE games. BGEE stores your user files outside the game directory. For example, on Windows, they're in "My Documents/Baldur's Gate - Enhanced Edition". I think I should be able to print the path in the message, to make it more clear.

Quote
"Choose which language you wish to install this mod to." - "Please, choose the game language for the mod"? (In Russian the first one doesn't exactly sound rude, but...
Okay, moar polite :)

Quote
And, yeah, preposition at the end).
Is perfectly fine. That you can't end sentences with prepositions is a myth. But I'll see if I can rewrite them, if only to spare myself from incorrect accusations of using bad grammar.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Beta 231.11
« Reply #13 on: August 21, 2013, 09:53:21 AM »
Looks like 23111 hung up with cre_check.tp2 again :P

Code: [Select]
[WeiDU.exe] WeiDU version 23111
This is a non-stable version. Unless you're sure about what you're doing, consider downgrading.

FATAL ERROR: Unix.Unix_error(20, "stat", " -- NO DIALOG.TLK -- ")

I have the GOG version with the path: D:\Games\Baldurs Gate II

EDIT: I gave proper valid backup paths and the same error repeated so it's aparently something different :P

The CMD line used to execute cre_check.tp2 expands to:
Code: [Select]
"WeiDU.exe" --noautoupdate --force-install 0 --nogame --log nul "BiG World Fixpack\_utils\cre_check.tp2" --args "BiG World Fixpack\_utils" | "BiG World Fixpack\_utils\tee" -a "BiG World Debug.txt"Something to change here?
I didn't test with the --nogame arg, and this beta is more free with testing tlk paths, so it explodes on the fake path. I might have fixed it already, but I'll look into it.

Roboghost

  • Guest
Re: Beta 231.11
« Reply #14 on: August 21, 2013, 10:56:13 PM »
Yes...there is something wrong concerning dialog.tlk.  When running without a dialog.tlk, weidu usally quits install, but it doesn't with beta 2.31.11 [this is very bad].  I also just got the same error as Lollorian on a fresh install [BGII only, not BGT]:

Leonardo's BiG World Fixpack v11
                    --------------------------------
processing fixes for "ascension"
patching file `Setup-Ascension.tp2'
copying files ...
BiG World Fixpack\ascension\_copy\bcs\copy\finyaga.bcs
BiG World Fixpack\ascension\_copy\tougher\yagashura\YAGA05.CRE
2 File(s) copied
processing fixes for "Bdash"
patching file `Bdash\Language\deutsch\korrektur.tra'
patching file `Bdash\BAF_r\rTR1008.BAF'
patching file `Setup-BDToBv168.tp2'
patching file `Bdash\Language\english\setup.tra'
patching file `Bdash\BAF_x\xTR1008.BAF'
processing fixes for "oversight"
patching file `Setup-Oversight.tp2'
processing fixes for "TobEx"
copying files ...
BiG World Fixpack\TobEx\_copy\TobEx_redist\default_core.ini
1 File(s) copied
[WeiDU.exe] WeiDU version 23111
This is a non-stable version. Unless you're sure about what you're doing, consider downgrading.

FATAL ERROR: Unix.Unix_error(20, "stat", " -- NO DIALOG.TLK -- ")

Thanks for hard work despite this little glitch!

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Beta 231.11
« Reply #15 on: August 22, 2013, 04:12:00 AM »
Yes...there is something wrong concerning dialog.tlk.  When running without a dialog.tlk, weidu usally quits install, but it doesn't with beta 2.31.11 [this is very bad]. 
Can you give an example of when this happens?

Offline Lollorian

  • Planewalker
  • *****
  • Posts: 96
Re: Beta 231.11
« Reply #16 on: August 22, 2013, 04:37:15 AM »
I think what Roboghost means is that if you extracted a mod to some non-BG location and ran the EXE (23111) then it acts like it's placed inside the BG folder. (I think this is intended though I may be wrong :P)

I was surprised myself the first time - usually keep all mods extracted and prepped in a temp folder before an install - when I ran one of the EXEs to autoupdate and it started asking me for a language instead of the ERROR thing.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Beta 231.11
« Reply #17 on: August 22, 2013, 09:57:43 AM »
I think what Roboghost means is that if you extracted a mod to some non-BG location and ran the EXE (23111) then it acts like it's placed inside the BG folder. (I think this is intended though I may be wrong :P)

I was surprised myself the first time - usually keep all mods extracted and prepped in a temp folder before an install - when I ran one of the EXEs to autoupdate and it started asking me for a language instead of the ERROR thing.
Okay, can reproduce. It's not intended.


In other news, new prompts:
WeiDU asks for which tlks to install to:
Quote
This game is available in multiple languages. WeiDU will install mods to a single one of those game languages. Mods will be available for that language and that language alone. This choice is different from the choice of which language you wish to install the mod in and you can install multiple mod languages to the same game language. If you switch to another language, you need to reinstall your mods.

Please choose the game language to which you wish to install this mod. Your choice will be saved and reused in the future. This choice is saved to the file weidu.conf, located in the directory:
//insert dir here

WeiDU asks for which tlks to install from:
Quote
This game is available in multiple languages, but WeiDU does not know which game language was used when this mod was installed.

Please indicate which game language was used when you installed this mod. Your choice will be used until WeiDU exits but will not be remembered.
Better?

Offline Kulyok

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 6253
  • Gender: Female
  • The perfect moment is now.
Re: Beta 231.11
« Reply #18 on: August 22, 2013, 10:05:59 AM »
Looks great to me! (And I now know the difference between mod language and game language, which is a huge plus. :) )

Offline Lollorian

  • Planewalker
  • *****
  • Posts: 96
Re: Beta 231.11
« Reply #19 on: August 22, 2013, 09:05:37 PM »
Something that's been bugging me for a while now...

A COPY inside an INNER_ACTION overwrites the SOURCE_FILE variable for the outer block as well :P
Code: [Select]
COPY_EXISTING ~abc.itm~ ~override~
  INNER_ACTION BEGIN
    COPY_EXISTING ~pqr.itm~ ~override~
  END
  PATCH_PRINT "%SOURCE_FILE%"
BUT_ONLY
Will output "pqr.itm"

Is there a way to 'preserve' what file is actually being patched for messages?
« Last Edit: August 22, 2013, 09:07:51 PM by Lollorian »

Offline Mike1072

  • Planewalker
  • *****
  • Posts: 298
  • Gender: Male
Re: Beta 231.11
« Reply #20 on: August 22, 2013, 09:31:49 PM »
Something that's been bugging me for a while now...

A COPY inside an INNER_ACTION overwrites the SOURCE_FILE variable for the outer block as well :P
Code: [Select]
COPY_EXISTING ~abc.itm~ ~override~
  INNER_ACTION BEGIN
    COPY_EXISTING ~pqr.itm~ ~override~
  END
  PATCH_PRINT "%SOURCE_FILE%"
BUT_ONLY
Will output "pqr.itm"

Is there a way to 'preserve' what file is actually being patched for messages?

Code: [Select]
COPY_EXISTING ~abc.itm~ ~override~
  TEXT_SPRINT original_source_file ~%SOURCE_FILE%~
  INNER_ACTION BEGIN
    COPY_EXISTING ~pqr.itm~ ~override~
  END
  TEXT_SPRINT SOURCE_FILE ~%original_source_file%~
  PATCH_PRINT "%SOURCE_FILE%"
BUT_ONLY

Offline Lollorian

  • Planewalker
  • *****
  • Posts: 96
Re: Beta 231.11
« Reply #21 on: August 23, 2013, 01:52:13 AM »
Thanks :D

Offline GeN1e

  • Planewalker
  • *****
  • Posts: 267
  • Gender: Male
Re: Beta 231.11
« Reply #22 on: August 23, 2013, 03:04:56 PM »
You can read baldur.ini for Language option. If the value is not present, i.e. it hasn't been changed yet, then by default it is English.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Beta 231.11
« Reply #23 on: August 24, 2013, 06:36:00 AM »
You can read baldur.ini for Language option. If the value is not present, i.e. it hasn't been changed yet, then by default it is English.
But what does it add?

Offline Argent77

  • Planewalker
  • *****
  • Posts: 187
Re: Beta 231.11
« Reply #24 on: August 25, 2013, 10:40:00 AM »
But what does it add?

The line looks something like this:
Code: [Select]
'Language', 'Text', 'en_EN'

 

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)?: