@subtledoctor - yeah, but in a way that is entirely wrong. :-)
Basically, WeiDU assumes there is exactly ONE language per game, since that's how it used to be, and asks the player to tell the program which one-and-only language to install.
BG:EE has many languages per game, so WeiDU really ought to install into all of them, in case you get a foreign girlfriend and she wants to start a new game on your iPad while you're rock climbing.
- - -
But that's an aside. The thing I'm talking about is picking the right language path for the dialog.tlk, which can't happen inside WeiDU, since WeiDU thinks there's only one dialog.tlk. Basically, right now there MUST be agreement about language choice between the wrapper and WeiDU, but there's no way to check that from inside WeiDU.
It may be possible to check that from the wrapper script, though, and to pass both the path to the dialog.tlk (which includes language) and the "interior" language choice to WeiDU as a command line option.
@subtledoctor - WeiDU has a "--language XXXX" option, and better yet, it has a "--list-languages" option so you don't have to parse the .tp2 files yourself.
So what you could do is something like: - Build a list of "*/*.tp2" files, allow the user to pick one. - Build a list of available game languages ("lang/*"). - Run "weidu --list-languages" on the chosen .tp2 to get available mod languages. - Join up available game languages and available mod languages, and allow the user to pick one of those.
@Nifft I confess I'm a bit confused as to how that works, since I haven't seen it run. By this,
- Build a list of "*/*.tp2" files, allow the user to pick one.
...are you envisioning running a single Applescript launcher app, and choosing which mod you want to install each time you run it? Because it occurs to me that that would be possible. But, separate from the language issue. Yeah, that would also solve the issue of Win32 developers not being able to modify the Applescript app.
- Join up available game languages and available mod languages, and allow the user to pick one of those.
...mean we are going to only have WeiDU install one language choice? Or are we trying to have it install multiple languages simultaneously?
Because, (again, to be clear) IF we just need to have WeiDU focus on a single .tp2 file, and IF in that circumstance you can just append "--list-languages" to the command, well then that can be done easily, with the AppleScript the way it already is. It's only in the event that we need to specify, i.e. if we need to append "--language XXXX", that things get complicated. (Complicated, but still possible. Just more work.) Hmm, then maybe one Applescript app per language, if it's difficult to parse the output of a shell program.
The thing you have to code for is: - paths for dialog.tlk involves language - language selection
The --language option takes an integer argument, and which integer corresponds to what language varies from mod to mod. The string is completely arbitrary and also varies from mod to mod.
If you care to wait a bit longer, there is something in the works that should address your concerns in a broader scope. Or get involved, that would be even better. If only you knew what it was. Doh! (It's a cross-platform GUI frontend and distribution format.)
Ah! Okay. I tried a few variations on that, but not with the subfolder as part of the argument. That could be a problem, if modders don't follow a uniform practice in naming mod data folders.... we shall see tomorrow how it pans out.
If you're getting the .tp2 names from a file glob, you'll have the full path.
If you're NOT using a file glob and instead relying on the modder using the standard WeiDU behavior, you can just assume that the .tp2 will be in the appropriate folder. The problem is when a modder uses a .BAT file...
@subtledoctor You may also want to account for how WeiDU will work as of next version. Edit: specifically, if a mod is installed with the --tlkin and --tlkout options, it must also be uninstalled with the same TLKs, or the user's game will be partially hosed.
@subtledoctor There are more official translations being done right now, like Italian and Russian, for instance, so that directory structure is likely to change in the future.
Meanwhile I think it would be safe to defaul to English.
@mlnevese That's a bit simplistic. For instance, both aTweaks and Item Randomiser are best installed after SCS (and failing to do so may even cause bugs). As more and more mods become available for BGEE, the full range of inter-dependencies will come into play.
@Wisp Yeah I know. I was considering just the mods in this forum list. Soon things will get really complicated with portions of SCS being installed, then other mods, then returning to SCS, as you have to do when installing The Big World Project default mods, for instance.
Comments
Basically, WeiDU assumes there is exactly ONE language per game, since that's how it used to be, and asks the player to tell the program which one-and-only language to install.
BG:EE has many languages per game, so WeiDU really ought to install into all of them, in case you get a foreign girlfriend and she wants to start a new game on your iPad while you're rock climbing.
- - -
But that's an aside. The thing I'm talking about is picking the right language path for the dialog.tlk, which can't happen inside WeiDU, since WeiDU thinks there's only one dialog.tlk. Basically, right now there MUST be agreement about language choice between the wrapper and WeiDU, but there's no way to check that from inside WeiDU.
It may be possible to check that from the wrapper script, though, and to pass both the path to the dialog.tlk (which includes language) and the "interior" language choice to WeiDU as a command line option.
So what you could do is something like:
- Build a list of "*/*.tp2" files, allow the user to pick one.
- Build a list of available game languages ("lang/*").
- Run "weidu --list-languages" on the chosen .tp2 to get available mod languages.
- Join up available game languages and available mod languages, and allow the user to pick one of those.
Because, (again, to be clear) IF we just need to have WeiDU focus on a single .tp2 file, and IF in that circumstance you can just append "--list-languages" to the command, well then that can be done easily, with the AppleScript the way it already is. It's only in the event that we need to specify, i.e. if we need to append "--language XXXX", that things get complicated. (Complicated, but still possible. Just more work.)
Hmm, then maybe one Applescript app per language, if it's difficult to parse the output of a shell program.
The thing you have to code for is:
- paths for dialog.tlk involves language
- language selection
I envisioned something like:
If you care to wait a bit longer, there is something in the works that should address your concerns in a broader scope. Or get involved, that would be even better. If only you knew what it was. Doh! (It's a cross-platform GUI frontend and distribution format.)
What is it called?
Even if the name of the script is implicit in argv[0], you need to tell weidu what script you were talking about again.
In this case, I guess it'd be:
If you're NOT using a file glob and instead relying on the modder using the standard WeiDU behavior, you can just assume that the .tp2 will be in the appropriate folder. The problem is when a modder uses a .BAT file...
cs_CZ
de_DE - German
en_US - English
es_ES - Spanish
fr_FR - French
pl_PL - Polish
pt_BR - Portuguese
tr_TR - Turkish
I really don't know what the first language is.
@mlnevese
It's Czech.
You may also want to account for how WeiDU will work as of next version. Edit: specifically, if a mod is installed with the --tlkin and --tlkout options, it must also be uninstalled with the same TLKs, or the user's game will be partially hosed.
Meanwhile I think it would be safe to defaul to English.
That's a bit simplistic. For instance, both aTweaks and Item Randomiser are best installed after SCS (and failing to do so may even cause bugs). As more and more mods become available for BGEE, the full range of inter-dependencies will come into play.