Author Topic: Proposal for BGEE TLK compatibility  (Read 9561 times)

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Proposal for BGEE TLK compatibility
« Reply #25 on: July 26, 2013, 03:04:24 PM »
Edit: Also, we were wondering whether the functionality to recognize saved games in "My Documents" is in - do SAVE_DIRECTORY and MPSAVE_DIRECTORY require explicit arguments or can those paths be determined from the OS registry or .ini files somehow?
Yes, it's in. SAVE_DIRECTORY and MPSAVE_DIRECTORY are regular variables that evaluate to the save directory.
Usage:
Code: [Select]
GET_FILE_ARRAY saves "%SAVE_DIRECTORY%" "[0-9]+.+"
ACTION_PHP_EACH saves AS i => dir BEGIN
  ACTION_IF FILE_EXISTS "%dir%/baldur.gam" BEGIN
    // do things here
  END
END
Should be valid everywhere except BGEE on Linux, and maybe not on all configurations of BGEE on OS X, if there are more than the one I have been told of.
For not-BGEE, that's just ./save and ./mpsave, otherwise:
The location of "My Documents" is read from the registry on Windows. On OS X, the location of $HOME is read from the user database (to the effect of getpwuid(getuid())->pw_dir). In all cases, a compile-time constant is appended to arrive at the directory where BGEE stores its user files (and then /save/ on top of that to arrive at the save dir). I am not absolutely super sure about OS X. I have had it told it works, but it seems the location of the BGEE dir also varies with version of OS X and whether you bought the game from Beamdog or through the MAS, or something.
(On Linux and BGEE, it's ./save and ./mpsave, just as with not-BGEE, because it makes it easier for me. When/if BGEE is officially available, it'll use the same system as OS X).
« Last Edit: July 26, 2013, 08:30:08 PM by Wisp »

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Proposal for BGEE TLK compatibility
« Reply #26 on: July 26, 2013, 03:36:16 PM »
We've been discussing it elsewhere and I think the best solution is the simplest one for now. If we need complexities (e.g. mass STRING_SET padding) down the road, maybe those can be implemented later but aren't strictly needed at present IMO.
As Miloch says, all things considered, the third solution is probably the best. I would just change the prompt to something more exhaustive.

Yeah, there have been some developments on the subject that I have not made public. BGEE support is pretty far along towards being implemented as per the proposal where the user is asked for which TLK to install to. Some surrounding concerns remain to be taken care of. I think I'm abandoning padding, because it turns out it's not really necessary, or something (all mod-added strings would need to be reinstalled when language is changed, so where you start adding strings doesn't much matter. You would be more likely to lose saved-game compatibility on switching language, but I don't think I could guarantee that anyway, due to deduplication). The ask-for-lang-dir text is rather basic at this point, but I can certainly pile it on. It is translatable, btw, and displayed after you select mod language.

Maybe I have forgotten something, but I think that's it.
« Last Edit: July 26, 2013, 03:47:28 PM by Wisp »

Offline CamDawg

  • Infidel
  • Planewalker
  • *****
  • Posts: 859
  • Dreaming of a red Xmas
    • The Gibberlings Three
Re: Proposal for BGEE TLK compatibility
« Reply #27 on: July 26, 2013, 05:42:02 PM »
Alright, let's talk idiot-proofing. Will the user be prompted at every mod install for tlk selection, or just the first? If it's just the first and the user selects the wrong option, how do they go back and change it?

I'd suggest just prompting once (for convenience) and storing the selection in the commented-out top of weidu.log. Users who need to change this in the future can force a new choice by deleting the relevant line out of weidu.log.
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 Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Proposal for BGEE TLK compatibility
« Reply #28 on: July 26, 2013, 07:54:52 PM »
Alright, let's talk idiot-proofing. Will the user be prompted at every mod install for tlk selection, or just the first? If it's just the first and the user selects the wrong option, how do they go back and change it?

I'd suggest just prompting once (for convenience) and storing the selection in the commented-out top of weidu.log. Users who need to change this in the future can force a new choice by deleting the relevant line out of weidu.log.
Currently it asks once per BGEE/BG2EE/OTHEREE, provided WeiDU was not told which lang to use on the command line. The result is stored in the same dir that BGEE stores baldur.ini in, as weidu.conf. Output language can be changed on the command line (which everyone loves) or by deleting weidu.conf or editing its contents.

If it's thought to be better, I might be able to swing the tlk selection being an uncommented part of weidu.log. Storing it commented is no good, because the parser disregards comments and I would have to do truly, horrendously bad things to it to have it otherwise.

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Proposal for BGEE TLK compatibility
« Reply #29 on: August 02, 2013, 04:15:28 PM »
Should be valid everywhere except BGEE on Linux, and maybe not on all configurations of BGEE on OS X, if there are more than the one I have been told of.
For not-BGEE, that's just ./save and ./mpsave, otherwise:
The location of "My Documents" is read from the registry on Windows. On OS X, the location of $HOME is read from the user database (to the effect of getpwuid(getuid())->pw_dir). In all cases, a compile-time constant is appended to arrive at the directory where BGEE stores its user files (and then /save/ on top of that to arrive at the save dir). I am not absolutely super sure about OS X. I have had it told it works, but it seems the location of the BGEE dir also varies with version of OS X and whether you bought the game from Beamdog or through the MAS, or something.
(On Linux and BGEE, it's ./save and ./mpsave, just as with not-BGEE, because it makes it easier for me. When/if BGEE is officially available, it'll use the same system as OS X).
Why did you strike out the 2nd part of your response? Because that would be exactly what's needed - is it in progress still?

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1176
Re: Proposal for BGEE TLK compatibility
« Reply #30 on: August 02, 2013, 05:50:06 PM »
Why did you strike out the 2nd part of your response? Because that would be exactly what's needed - is it in progress still?
Because I decided a usage example was more relevant. SAVE_DIRECTORY has been implemented since January, well, March.
« Last Edit: August 02, 2013, 05:53:02 PM by Wisp »

 

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