Post reply

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:
Subject:
Message icon:

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

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Wisp
« on: April 17, 2015, 11:38:40 AM »

Does this mean there's no reason to include iconv in the Linux and OSX versions of a mod?
Correct.
Posted by: Almateria
« on: April 17, 2015, 05:14:52 AM »

OS X and GNU/Linux come with iconv as part of the base system.
Does this mean there's no reason to include iconv in the Linux and OSX versions of a mod?
Posted by: Wisp
« on: January 25, 2015, 03:49:24 PM »

I think I should be able to add a "default_language" variable, which could default to English. The default language would be converted regardless of which language the user chooses, so you would be able to use that for defensive loading of TRA-files. reload_array would also load reload the TRA files of the default language before reloading those of the user's language.
This has now been coded. Those with a different default language than English can provide the default_language variable to HANDLE_CHARSETS. Others do not need to do anything and English TRA files will automatically be converted in addition to the TRA files of whatever language the user selects at the start of the installation (files will never be converted twice).
Posted by: jastey
« on: January 03, 2015, 01:29:36 PM »

This would be great! Thank you in advance!
Posted by: Wisp
« on: January 03, 2015, 10:29:48 AM »

-Would it be possible to have the option to let HANDLE_CHARSETS convert e.g. two language versions (e.g. always English and the chosen one) including the possibility to load the files of two language versions? (Or maybe I am the only one wanting this?) EDIT: It would have to be the setup.tra and game.tra etc. only, anyway.
You are quite right in reporting this. Thank you. I think I should be able to add a "default_language" variable, which could default to English. The default language would be converted regardless of which language the user chooses, so you would be able to use that for defensive loading of TRA-files. reload_array would also load reload the TRA files of the default language before reloading those of the user's language.
Posted by: jastey
« on: January 02, 2015, 03:45:55 PM »

One question to HANDLE_CHARSETS, or maybe it's a request.

As far as I can see, with HANDLE_CHARSETS I can no longer load the setup.tra(s) from two different language versions (as only one language version gets converted). What I like to do in my mods is reload the English setup.tra and the then the language version setup.tra, this way the install won't fail if the language version is not complete (for whatever reason).

-I can live without this feature, but it is something I would like to point out, that with HANDLE_CHARSETS my mod is restricted to the one language version the player chose, and I cannot provide a fail-safe option with the English files loaded first to make sure the language version does not fail due to a missing text line. I am working around this for the normal tra files as I copy them all elswhere first, anyway, as i don't like my original tra files being converted and back (as I usually edit them while my mods are installed, so I need them untouched), but this way I can only copy whole tra-files, not load two tra files of the same name to get the missing strings.

-Would it be possible to have the option to let HANDLE_CHARSETS convert e.g. two language versions (e.g. always English and the chosen one) including the possibility to load the files of two language versions? (Or maybe I am the only one wanting this?) EDIT: It would have to be the setup.tra and game.tra etc. only, anyway.
Posted by: Wisp
« on: December 03, 2014, 05:24:07 PM »

I noticed the version included in WeiDU 237 behaves differently than the version previously available as en external file. In the past, only the language selected was converted to UTF-8. The version included in WeiDU 237 seems to convert the tra files for all languages available.
I noticed this while updating BG1 NPC to use HANDLE_CHARSETS. The conversion took a long time on my PC, more than a minute. That triggered to check what was going on. I checked with another mod, Tiax, and WeiDU also converted files for all three available languages.

The backup of the original files is neatly organised, the language name being inserted in the file name, except for english (maybe because it's the first LANGUAGE statement). That makes me wonder if this behaviour is actually intented. Could you tell us the intended behaviour, please, Wisp ? Thank you.
Thanks for spotting it. The recursive behaviour is over ~%tra_path%~ rather than ~%tra_path%/%LANGUAGE%~. It's harmless, but as you say, quite wasteful. However, I also found a more serious bug. HANDLE_CHARSETS in 237 converts files even if they are present in noconvert_array, which can cause problems (up to and including mods that can't be uninstalled without manual intervention. Fortunately they merely can't be uninstalled; it's not a game-hosing deal where mods would be removed from the log without actually being uninstalled).
Posted by: Isaya
« on: December 03, 2014, 04:17:53 PM »

I noticed the version included in WeiDU 237 behaves differently than the version previously available as en external file. In the past, only the language selected was converted to UTF-8. The version included in WeiDU 237 seems to convert the tra files for all languages available.
I noticed this while updating BG1 NPC to use HANDLE_CHARSETS. The conversion took a long time on my PC, more than a minute. That triggered to check what was going on. I checked with another mod, Tiax, and WeiDU also converted files for all three available languages.

The backup of the original files is neatly organised, the language name being inserted in the file name, except for english (maybe because it's the first LANGUAGE statement). That makes me wonder if this behaviour is actually intented. Could you tell us the intended behaviour, please, Wisp ? Thank you.
Posted by: Kulyok
« on: November 17, 2014, 01:00:21 AM »

I will try this on my own game(copy the directory and try to find the fonts, that is), and check if it works - if it does, I'll be recommending this on the forums to Russian users, I guess. Thank you!

(my files seem to be in CR-1251, and the new tras read normally via notepad, btw)
Posted by: Isaya
« on: November 16, 2014, 02:48:08 PM »

There may be another reason. For languages not based on latin alphabet, BGEE uses a special font in the lang/<language>/fonts. It may be that you need to create a russian directory in your BG2EE game by copying the english directory (to get at least dialog.tlk) then copy into it the fonts directory from BGEE (restart from a base installation of BG2EE to get the base dialog.tlk).
Then set the game in russian, tell WeiDU to use russian for the choice of game language (erase weidu.conf if it already exists) and install the mod in russian.

I'm not sure you really need to create the russian language directory. However, in the BGEE forum, someone reported he had to set the game to korean and copy the dialog.tlk from english in order to be able to use a custom font file. So it appears the game engine only looks for a fonts directory for specific languages and doesn't do it for english. At least it did before V1.3 (I think the report I'm refering to is a bit old).
Posted by: Wisp
« on: November 11, 2014, 02:41:37 PM »

Make sure the character set of your input text is correct. The default character set used by HANDLE_CHARSETS is CP1251 (Windows might unhelpfully call it "ANSI"). If there is a mismatch between the character sets used by HANDLE_CHARSETS and the actual charset being used, you might get something like your problem. You might also want to inspect the converted files (your tra files while the mod installed) to see if they are in valid UTF-8 encoded Russian.
Posted by: Kulyok
« on: November 11, 2014, 12:21:10 AM »

(raises hand) I'm very impressed with HANDLE_CHARSETS, but I had to start a new topic in Modding Q&A http://forums.pocketplane.net/index.php/topic,29289 , because(with me understanding very little about it, I just copied Isaea's code from Edwin Romance and Tiax, basically) I'm having troubles figuring how to deal with Russian language on my own - it doesn't show in the game(only punctuation signs do). Everything's very good with French(for example), but not my native language. Sigh. :(
Posted by: Wisp
« on: August 14, 2014, 10:39:34 AM »

Mike1072 suggested a way to reduce the size of the iconv contribution to the archive in this topic.
Ok.

I forgot to do the recursive thing. I'll have it in before release.
Posted by: Isaya
« on: August 13, 2014, 04:04:38 AM »

I used HANDLE_CHARSETS to update the mod Sarah in order to add French language and make it compatible with BG2EE, taking Edwin Romance as reference. Mike1072 suggested a way to reduce the size of the iconv contribution to the archive in this topic.

Thank you for the explanations. I'll see if I can adjust BG2 tweaks files to move texts into a tra file. It would be easier not to complicate HANDLE_CHARSET with another parameter just for the sake of handling one specific case.
Posted by: Wisp
« on: July 31, 2014, 03:57:31 PM »

I'm wondering if REPLACE_TEXTUALLY will work with a variable in the "to" text though.
It will. You just SPRINT the traref into a variable as an intermediate step (because REPLACE_TEXTUALLY does not take trarefs as either oldtext or newtext).

Quote
As an alternative to using regexp, is it possible to use two HANDLE_CHARSETS calls with a different extension each time ?
Easy for me and extra work for others. I like it.