Jump to content


Photo

Thalantyr Item Upgrade updated (again)

Thalantyr item upgrade bgee V4.0

  • Please log in to reply
64 replies to this topic

#21 Crevs Daak

Crevs Daak

    me orc duh duh

  • Member
  • 88 posts

Posted 25 March 2015 - 12:53 PM

You may have a compatibility issue with BGT according to the D file I was provided in the thread for the Vault in this same subforum. 
 
In fact state2 is only run once the first time you encounter him then the global ThalantyrRumours us set to 1 preventing that state to trigger again. You need to extend state 35 with your new reply for BGT.
Thanks. Added (to my yet-to-do list...).

BG1 UB provides BG II encoding texts, as is stated with the "BG2engine" marker in each tra file. The function included is based on game detection to determine the conversion. If the tra file includes the marker matching the required encoding at the beginning, no conversion is done.
For Thalanty upgrade, you would have to add the "BG2engine" marker in game.tra and thalan.tra, and you could get rid of the thalanPL-BG1.tra file and the code in the tp2 when compiling the dialog.

No, please don't touch anything related to thalanPL-BG1 as it uses yet another encoding only for Polish version of BG:
BG1 PL: very unusual and strange coding ISO-85364564-something !
BG2 PL: CP1250
 
thalanPL-BG1.tra is exactly to allow installation on Polish BG 1 only and without it, we would see some strange characters. You cannot use CP1250 with Polish BG1.
 
Similar case is for BGT: kpzbg1.exe converts this strange BG1 Polish-only encoding inside dialog.tlk and dialogF.tlk to the BG2engine counterparts.
 
Yes it's stupid and noone have a clue why CD Project developers use it.
 


OK... Should I revert my commits and use the weird-encoded BG1 specific .tra or does that work? I would love if you can actually test what happens right now :) so I can be totally sure about this.

#22 Isaya

Isaya
  • Modder
  • 294 posts

Posted 25 March 2015 - 01:16 PM

I have been using a Hex editor and iconv for that, but I was asking about the encoding used on the BG1 polish version, or is it the same with some changed characters? I'll try making a diff on BG1UB's files.
I have no idea which encoding is used for BG1. It seems to be proprietary. Starting from the character equivalence found in the BG1 UB code, I compared them to alternative encoding to CP1250 but didn't find any similarity.
BG1 UB polish files are using CP1250.
I believe adding "BG2engine" in the tra file that need conversion (i.e. all but setup.tra I think) should solve the problem you were having with the conversion code in BG1 UB.
Number 1) is as per request of the BWS guys
I'm surprised by that request and I don't like it very much. After all, other mods don't follow that organisation and I assume BWS can handle those other mods. I think a computer tool should adjust to the typical conditions, certainly not have requirements that make things more complex for players not using the tool.
In all mods maybe, the readme says "extract the archive to the game directory and run the setup" or so. Mods not following that way are bringing questions from users on the forum because the installation fails.
 
No, please don't touch anything related to thalanPL-BG1 as it uses yet another encoding only for Polish version of BG:
BG1 PL: very unusual and strange coding ISO-85364564-something !
BG2 PL: CP1250
 
thalanPL-BG1.tra is exactly to allow installation on Polish BG 1 only and without it, we would see some strange characters. You cannot use CP1250 with Polish BG1.
I not mean to make the mod no operate on BG1. What I'm saying is that game.tra has not equivalent PL-BG1 alternative, so item descriptions will have bad characters in BG1 in the current state of the mod.
I was suggesting to use the code from BG1 UB that can convert all polish tra files to the BG1 encoding during installation. Hence the presence of the BG1-PL alternative for thalan.tra would not be needed.

#23 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 25 March 2015 - 03:06 PM

Number 1) is as per request of the BWS guys

I'm surprised by that request and I don't like it very much.
 


I think you took the wrong translation from these words.. what Crevs mean is that it was already requested by someone and it was already pursued, so it will be in the next upload when ever that's to come. The BWS team wouldn't ever request mods to be released without their setup-*.exe's .

Edited by The Imp, 25 March 2015 - 03:11 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#24 Isaya

Isaya
  • Modder
  • 294 posts

Posted 26 March 2015 - 02:35 PM


Finally, two last comments:

  • unfortunately, the archive include an additional level preventing extraction straight into the game directory, as for other mods
  • there is no setup-thalan.exe, contrary to the history mentioning updating the WeiDU executable
 
 


Number 1) is as per request of the BWS guys, and about 2) I'll get it done, since I've already been asked about that before (by the BWS guys).
 
 


Please forgive if I misunderstood. To me, 1) referred to my first comment and implied that additional thalan-master directory was actually intended and requested by the BWS guys.
It's not proprietary but it's very unusual ISO-78543853-something.
If you were able to find out which official encoding it is, it would be great to be able of using iconv with the right output charset.
BG1 UB polish files are using CP1250 because there is:
for BG1Polish version > BG1&BG2UniversalPolishFont converter and code for it
for BG1EE > iconv converter and code for it
I know that well, believe me. I spent quite some time to figure out what had changed in BGEE to identify the new encoding and devise a way to convert to it when the game was released.
I was mentionning that BG1 UB was using CP1250 because Crevs Daak said he wasn't sure which encoding was used.
Let me explain because I think that you got it wrong. First of all, the reason why there is additional 'thalan-master' directory is because how github/other git hosting sites works. The only thing I've request is to move files to "thalan" dir and add setup-thalan.exe, nothing more.
Thanks for clarifying. I agree about moving everything but setup-thalan.exe into the thalan directory.
What link did you use to download whole mod? This: github.com/CrevsDaak/thalan/archive/master.zip ?
I used the link Crevs Daak provided V4.1, which links to the archive you mentionned.
Well, this link is for BWS and it will always point to the newest version/last commit. The advantages of such solution are outstanding from the point of Modder/BWS. There is an separate tab "Releases" where you can put any file, including manually generated zip where won't be additional directory level. It's for major releases and can be used as download link for "players".

I hope that this is clear now.
Thank for these explanations, this is clear indeed.
Unfortunately, the archives posted on the release page also include an additional directory level. I wonder how Argent77 manages to release Near Infinity without additional directory level in the archive.

#25 Crevs Daak

Crevs Daak

    me orc duh duh

  • Member
  • 88 posts

Posted 26 March 2015 - 03:43 PM

Crevs Daak, you can also take look at the BGQ&E 9.1 code from bgqe\tra\polski\BG1&BG2UniversalPolishFont.tpa


...

OK... Should I revert my commits and use the weird-encoded BG1 specific .tra or does that work? I would love if you can actually test what happens right now :) so I can be totally sure about this.


When I try to install it on BG1PL, using polish I have this error (debug: http://pastebin.com/uB7Cqf6g)
 
ERROR: No translation provided for @101
ERROR: [thalan/Itm_bg1/thsw2h01.itm] -> [override/thsw2h01.itm] Patching Failed (COPY) (Not_found)
But @101 exist inside thalan\tra\polish\game.tra - so it isn't loaded?
 
Using BGEE have similar error:
ERROR: No translation provided for @1
ERROR: [thalan/Itm/thsw2h01.itm] -> [override/thsw2h01.itm] Patching Failed (COPY) (Not_found)
Let's sort one thing before I will investigate further.


Yup, your right—they aren't being actually loaded. Will fix.
Well, this link is for BWS and it will always point to the newest version/last commit. The advantages of such solution are outstanding from the point of Modder/BWS. There is an separate tab "Releases" where you can put any file, including manually generated zip where won't be additional directory level. It's for major releases and can be used as download link for "players".
 
I hope that this is clear now.
 
Oh god, I had never thought of doing that... This despicts how dumb I am, LOL. Will do.


Finally, two last comments:

  • unfortunately, the archive include an additional level preventing extraction straight into the game directory, as for other mods
  • there is no setup-thalan.exe, contrary to the history mentioning updating the WeiDU executable
 
 
 


Number 1) is as per request of the BWS guys, and about 2) I'll get it done, since I've already been asked about that before (by the BWS guys).
 
 
 


Please forgive if I misunderstood. To me, 1) referred to my first comment and implied that additional thalan-master directory was actually intended and requested by the BWS guys.

It's not proprietary but it's very unusual ISO-78543853-something.

If you were able to find out which official encoding it is, it would be great to be able of using iconv with the right output charset.
BG1 UB polish files are using CP1250 because there is:
for BG1Polish version > BG1&BG2UniversalPolishFont converter and code for it
for BG1EE > iconv converter and code for it
I know that well, believe me. I spent quite some time to figure out what had changed in BGEE to identify the new encoding and devise a way to convert to it when the game was released.
I was mentionning that BG1 UB was using CP1250 because Crevs Daak said he wasn't sure which encoding was used.
Let me explain because I think that you got it wrong. First of all, the reason why there is additional 'thalan-master' directory is because how github/other git hosting sites works. The only thing I've request is to move files to "thalan" dir and add setup-thalan.exe, nothing more.
Thanks for clarifying. I agree about moving everything but setup-thalan.exe into the thalan directory.
What link did you use to download whole mod? This: github.com/CrevsDaak/thalan/archive/master.zip ?
I used the link Crevs Daak provided V4.1, which links to the archive you mentionned.
Well, this link is for BWS and it will always point to the newest version/last commit. The advantages of such solution are outstanding from the point of Modder/BWS. There is an separate tab "Releases" where you can put any file, including manually generated zip where won't be additional directory level. It's for major releases and can be used as download link for "players".

I hope that this is clear now.
Thank for these explanations, this is clear indeed.
Unfortunately, the archives posted on the release page also include an additional directory level. I wonder how Argent77 manages to release Near Infinity without additional directory level in the archive.
 


Yes—it's the same link, I've changed it so no one downloads an older version (and I didn't push a release because I was too lazy probably). I'll put everything into a new release with a download link and a weidu.exe setup file, but I'll leave the down-a-directory-level thing.

#26 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 26 March 2015 - 03:58 PM

Yes—it's the same link, I've changed it so no one downloads an older version ...
This was in a pass tense man... so:
Yes—it was the same link, I had changed it so no one downloads an older version(v4.1)
... and we are all fractiously waiting for your v4.2 ... but you are probably busy a bit, so we'll wait until the v4.2 of the archive comes out. And you can then post at this thread again, as a sign, K ! Have fine days.

Edited by The Imp, 26 March 2015 - 04:00 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#27 Isaya

Isaya
  • Modder
  • 294 posts

Posted 28 March 2015 - 09:00 AM

I noticed something looked strange in the latest version regarding the code for the polish conversion for BG1, so I tried to install it. As ALIEN reported, it failed because it couldn't find text @101 (ERROR: No translation provided for @101).
During installation, game.tra was updated but thalan.tra was not (the date changed only for the first one). When I looked at the files while WeiDU was still waiting for my answer about another try (hence backup directory was not empty), I noticed the two files were actually using UTF8 characters, even though there was no sign that HANDLE_CHARSETS had been run (no utf8 something files).
I restarted from the original archive downloaded from the Release list on GitHub (4.1a). The two polish tra files are indeed using UTF8 charset in the archive. This is a big issue for everyone, including BGEE players.

I converted them back to Windows1250 using iconv, then compared them to the previous archive of the Release list (4.1). They were now the same, save for the additional /* BG2engine */ at the beginning.

I tried installing again. I had the same error, and again only game.tra had changed date. But it remained identical. Since the tp2 file and tpa file don't use BUT_ONLY_IF_IT_CHANGES, both files should have changed. That shows that the code in the tp2 is not working.

While studying the conversion script, I found a reason for the failure to convert characters in game.tra, despite it being modified, is that the BG1polish_fonts.tpa file is written in UTF8 encoding. Hence all special characters appearing in the file are actually two bytes characters that don't appear in the Windows1250 encoded files and the REPLACE_TEXTUALLY can only fail.

I rebuilt the BG1polish_fonts.tpa in ANSI encoding, starting from the BG1&BG2UniversalPolishFont.tpa from BG1UB, in order to ensure I copied exactly the character codes.

Still installation wouldn't work properly with the modified tpa file.

Finally, I found the reason why only game.tra was modified. The cause is where I spotted a potential issue at first. The code in the tp2 file was

  ACTION_IF "%LANGUAGE%" STR_EQ "polish" && GAME_IS totsc BEGIN
    COPY "thalan/tra/polish/thalan.tra"
         "thalan/tra/polish/game.tra"
      PATCH_INCLUDE "thalan/lib/BG1polish_fonts.tpa"
  END

This copies thalan.tra into game.tra, while converting the characters!!! Since thalan.tra doesn't contain @101, the overwritten game.tra didn't either and the installation failed. The game.tra file was then copied from the backup when WeiDU rolled back, this explains the time change and the identical content.

I fixed it like this, adding BUT_ONLY_IF_IT_CHANGES as well in order to easily notice if the files were really changed.

  ACTION_IF "%LANGUAGE%" STR_EQ "polish" && GAME_IS totsc BEGIN
    COPY "thalan/tra/polish/thalan.tra" "thalan/tra/polish/thalan.tra"
         "thalan/tra/polish/game.tra" "thalan/tra/polish/game.tra"
      PATCH_INCLUDE "thalan/lib/BG1polish_fonts.tpa"
      BUT_ONLY_IF_IT_CHANGES
  END

And there weren't!!!

Finally, I found a mistake in BG1polish_fonts.tpa that was another cause of the failure to convert the files.

PATCH_IF FILE_CONTAINS_EVALUATED(~%SOURCE_FILE%~ ~BG2engine~) BEGIN //TRA are BG2 coded

According to the WeiDU readme, SOURCE_FILE is only the file name without the path. Since the files are not in the game directory, that fails. You need to use SOURCE_FILESPEC instead.

After that the installation proceeded properly and the tra files were changed, including BG2engine becoming BG1engine. Since I don't have a polish version of BG1, I can't check the characters. However, comparing the original and the converted tra files bring a lot of differences, and the converted thalan.tra has the same content as thalanBG1_PL.tra, except for one word (Grozy instead of Horroru for text @34).

To sum up, here is an archive containing the files that I had to change:

  • game.tra and thalan.tra : Windows1250 encoding
  • BG1polish_fonts.tpa : non UTF-8 encoding and SOURCE_FILESPEC change
  • thalan.tp2 : proper COPY statement for thalan.tra and game.tra


I also installed in polish on BGEE, these changes included. I invoked an item with the console and its description looked right (I checked the proficiency text, with its dashed l).
However I don't understand how my changes would solve the problem that ALIEN reported. Even if having the tra files already in UTF8 will cause the presence of wrong characters after conversion to UTF8 by HANDLE_CHARSETS, text @1 should be found. Nevertheless, it worked with the changes.
 

 

 

Attached Files



#28 Crevs Daak

Crevs Daak

    me orc duh duh

  • Member
  • 88 posts

Posted 28 March 2015 - 07:22 PM

@Isaya: :Bow: :Bow: :Bow: Thanks!
Right now I am not able to access github (first I thought it was just an error no my side (I use git through the command line) but I can neither access it through my browser) but when I can I'll upload all the modified files.

You've fixed the bug AL|EN reported by not copying the .tra files one over the other :)

#29 Isaya

Isaya
  • Modder
  • 294 posts

Posted 29 March 2015 - 07:49 AM

You're welcome. I hope AL|EN will confirm that it's working properly with the polish game.



#30 Isaya

Isaya
  • Modder
  • 294 posts

Posted 30 March 2015 - 11:58 AM

Thank you for the confirmation.

 

The two tra files are indeed overwritten during installation. However this is not irreversible. WeiDU will restore the initial files when you uninstall.

Installation of any mod using HANDLE_CHARSETS for BGEE/BG2EE also overwrites the initial tra files in the same manner. Otherwise it wouldn't work.

 

I would never use a copy of an installed mod to install it on another game. The content of the backup directory is not empty then and this could cause problems when WeiDU tries to install the mod in another place. I'm not sure if this still applies that but I remember I had problems because of that long ago. I also remember problem reports when a modder accidently released a mod with a non empty backup directory (I mean empty from files created by installation).



#31 Vaerk

Vaerk
  • Member
  • 17 posts

Posted 02 April 2015 - 06:39 AM

The bags and containers this mod gives for Thalantyr don't have their correct names. Instead they are all called Invalid: followed by a bunch of numbers. I am using EE so I have no idea about other versions.



#32 Vaerk

Vaerk
  • Member
  • 17 posts

Posted 02 April 2015 - 08:13 AM

The bags and containers this mod gives for Thalantyr don't have their correct names. Instead they are all called Invalid: followed by a bunch of numbers. I am using EE so I have no idea about other versions.

You installed this mod to another language which you currently use.

 

I have the steam version of EE and my game is in English. I also used BWS to install this mod. Doesn't really leave much room for user error when everything else is working. Perhaps BWS is the reason for this?



#33 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 02 April 2015 - 10:58 AM

Yeah... well this won't be working then:
ACTION_IF !GAME_IS totsc BEGIN
  COPY ~thalan/Itm/thbag01.itm~ ~override/thbag01.itm~
    PATCH_IF GAME_IS bgee BEGIN SAY 0x8 #25503 SAY 0xC #25503 SAY 0x50 #25504 SAY 0x54 #25504 END
... wait for an official update.

Edited by The Imp, 02 April 2015 - 11:12 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#34 Crevs Daak

Crevs Daak

    me orc duh duh

  • Member
  • 88 posts

Posted 02 April 2015 - 01:07 PM



The bags and containers this mod gives for Thalantyr don't have their correct names. Instead they are all called Invalid: followed by a bunch of numbers. I am using EE so I have no idea about other versions.

You installed this mod to another language which you currently use.


 
I have the steam version of EE and my game is in English. I also used BWS to install this mod. Doesn't really leave much room for user error when everything else is working. Perhaps BWS is the reason for this?
 


I give you the same accusation as AL|EN. It works well for me. Dunno why it wouldn't work? What's you game's version? (also when did you install the mod? I think this is the most relevant point.

I also remember problem reports when a modder accidently released a mod with a non empty backup directory (I mean empty from files created by installation).

There should be no more "backup" directory inside mod archive because weidu will create it automatically. 


)Nowadays... :)

Version 4.2 was released!

Download v4.2
ReadMe (english)
ReadMe (spanish)
ReadMe (french)
ReadMe (german)
ReadMe (polish)
ReadMe (russian)

Mac OSX and GNU/Linux players should get the mod from here.

#35 Vaerk

Vaerk
  • Member
  • 17 posts

Posted 03 April 2015 - 04:11 AM

I reinstalled the game, verified game cache just in case, then installed version 4.2 (so this is the only mod I have installed) and the container names are still missing. Like I said before my game is in English and I installed the English version of this mod.


Edited by Vaerk, 03 April 2015 - 04:18 AM.


#36 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 03 April 2015 - 04:44 AM

I reinstalled the game, verified game cache just in case, then installed version 4.2 (so this is the only mod I have installed) and the container names are still missing. Like I said before my game is in English and I installed the English version of this mod.

So after validating the game cache, when you started the game, you see the "v1.x.y" on the very first screen, what were the x and y ?

You then go to the options screen "select the language". It should be defaulted to English.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#37 Vaerk

Vaerk
  • Member
  • 17 posts

Posted 03 April 2015 - 05:19 AM

I reinstalled the game, verified game cache just in case, then installed version 4.2 (so this is the only mod I have installed) and the container names are still missing. Like I said before my game is in English and I installed the English version of this mod.

So after validating the game cache, when you started the game, you see the "v1.x.y" on the very first screen, what were the x and y ?

You then go to the options screen "select the language". It should be defaulted to English.

 

Version is 1.3.2053 and language is English.



#38 Vaerk

Vaerk
  • Member
  • 17 posts

Posted 03 April 2015 - 05:46 AM

Well, then maybe weidu is blocked by AV or windows UAC ?

 

I doubt that because other mods seem to be working just fine.


Edited by Vaerk, 03 April 2015 - 05:49 AM.


#39 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 03 April 2015 - 06:43 AM

Well, then maybe weidu is blocked by AV or windows UAC ?

 

I doubt that because other mods seem to be working just fine.

If it sets the dialog.tlk to read_only -state, then it can very much do so.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#40 Vaerk

Vaerk
  • Member
  • 17 posts

Posted 03 April 2015 - 06:49 AM

Well, then maybe weidu is blocked by AV or windows UAC ?

 

I doubt that because other mods seem to be working just fine.

If it sets the dialog.tlk to read_only -state, then it can very much do so.

 

But it should cause problems with other mods as well. And every other mod except this works.







Also tagged with one or more of these keywords: Thalantyr, item upgrade, bgee, V4.0