Skip to content

BG1NPC Bug Report and Discussion Thread

13468935

Comments

  • NotabarbiegirlNotabarbiegirl Member Posts: 141
    edited December 2015
    AstroBryGuy : Ok lets try this from here, Thanks for replying on G3 by the way.
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    @Notabarbiegirl - I see the problem. It's trying to install BG1NPC v20 on BGEE. The first BGEE compatible version was v21. The current version is v22.
    Install Component [The BG1 NPC Project: Required Modifications]?
    [I]nstall, or [N]ot Install or [Q]uit?
    Installing [The BG1 NPC Project: Required Modifications] [v20]
    If you're sure you have the latest release, you might have an old .tp2 file from v20 hanging around. Look in the directory C:\Baldur's Gate Enhanced Edition\Data\00766\. If there is a file bg1npc.tp2 in that directory, it's from v20. Delete it. Newer versions of BG1NPC (v21+) keep the bg1npc.tp2 file in the bg1npc subdirectory (to keep the game directory neater).

    PS - If you don't have the latest release, you can get it from https://github.com/AstroBryGuy/BG1NPC/releases/
  • NotabarbiegirlNotabarbiegirl Member Posts: 141

    @Notabarbiegirl - I see the problem. It's trying to install BG1NPC v20 on BGEE. The first BGEE compatible version was v21. The current version is v22.

    Install Component [The BG1 NPC Project: Required Modifications]?
    [I]nstall, or [N]ot Install or [Q]uit?
    Installing [The BG1 NPC Project: Required Modifications] [v20]
    If you're sure you have the latest release, you might have an old .tp2 file from v20 hanging around. Look in the directory C:\Baldur's Gate Enhanced Edition\Data\00766\. If there is a file bg1npc.tp2 in that directory, it's from v20. Delete it. Newer versions of BG1NPC (v21+) keep the bg1npc.tp2 file in the bg1npc subdirectory (to keep the game directory neater).

    PS - If you don't have the latest release, you can get it from https://github.com/AstroBryGuy/BG1NPC/releases/
    Awesome

    May you be blessed by your deity of choice. I will give this a try this evening, after all my work as a wife and Mom is complete for the day.
  • byrne20byrne20 Member Posts: 503
    edited December 2015
    Hi guys. I would love to try this mod. My problem is i have never used a mod before and i am a little bit clueless when it comes to making them work. I did attempt to install the NPC project for BGEE but every time it got about 3/4 of the way through the installation it would pop up with an error. Something to do with WeiDU. I am running on windows 10. Does anyone have any tips or idiot proof walk through on how to get it working?
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    @byrne20 - Can you zip up and attach a copy of the SETUP-BG1NPC.DEBUG file? That would be very helpful to diagnose the problem.
  • NotabarbiegirlNotabarbiegirl Member Posts: 141
    edited December 2015
    Thank you @AstroBryGuy . Installed like a dream, I could hug you, but instead I will just sing your praises.
  • byrne20byrne20 Member Posts: 503
    Right I have tried to install again to see if I get the problem again and I have. it says...

    [C:\program files (86)\blackisle\bg11 - soa\setup-bg1npc.exe] weiDU version 23800

    Please run this program in your infinity engine game directory.

    FATAL ERROR: Failure ("not a game directory")

    Press enter to exit
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    edited December 2015
    It looks like the CHITIN.KEY file could not be found in the BG2 game directory (I assume you are playing BGT, since you are installing this to a BG2 game directory). Can you look in that directory and see what the contents are?
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    @AstroBryGuy Since byrne20 mentionned BGEE in the first post, I assume the issue is only that he/she didn't change the default location that is proposed when you run executable of BG1NPC on Windows.

    @byrne20, when you run the bg1npc-v22.exe program and you are proposed to choose the Destination folder, click on Browse and pick the folder where BGEE is installed. More specifically, look for the folder where a file called chitin.key can be found, together with folders named lang, movies, music and a few others. Check the properties of the BGEE icon for an idea where to start your search.
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    @Isaya - Thanks! I'd missed that @byrne20 specifically mentioned BGEE.
  • byrne20byrne20 Member Posts: 503
    @AstroBryGuy @Isaya Thanks for the help. You are correct. It was the destination folder. :smiley: I have got it working now. Thanks again. You guys are awesome.
  • byrne20byrne20 Member Posts: 503
    @AstroBryGuy Just gotta say how awesome the NPC Project is. I've been playing it over the last week when i have had the time and I really do agree with many people's point of view. It really adds a new feel to the game. To everyone involved in this work I have to say thanks. You have made a long time Baldur's Gate fan really happy, even if i am a bit late to the party :smile:
  • ItomonItomon Member Posts: 187
    @AstroBryGuy I'm currently working on a localization for BG1NPC for Brazil (Brazilian Portuguese) is there any way I can have some guidance on how better to do this? I'm currently using the .tra files and manually editing them in notepad++, which is all good but I have no idea if that will work later (and/or the best way to make it avaliable during installation). I'm not a modder myself, so I may need some help :)

    Thanks in advance
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    edited December 2015
    @Itomon - One thing to keep in mind is that all the .tra files are encoded for use with the original BG2 engine. So, for western european languages, they use CP-1252 encoding. The only exception is the setup.tra file, which is just plain ASCII (to make sure it works at any DOS-like prompt).

    For BGEE, WeiDU has a HANDLE_CHARSETS function that converts the encoding to UTF-8 at install. If you save your edited files with modern UTF-8 encoding, then the HANDLE_CHARSETS function will try to convert the character sets with bad results. So, be sure to save your files in CP1252 encoding. If your text editor can't save to CP-1252, then you can use iconv to convert the UTF-8 text files to CP-1252 (I'm on OSX, so I don't really have any recommendations as far as Windows text editors go).

    If you want to make a new translation available at install, make a copy the English subfolder under tra called "brasil" or "portuguese" or something like that (how different is brazilian portuguese from european?). THen edit the files in your new folder. To make the translation installable, you need to add a new LANGUAGE to the Language Settings section of the bg1npc.tp2 file:
    LANGUAGE ~Portuguese~ ~portuguese~ ~bg1npc/tra/portuguese/setup.tra~

    Post edited by AstroBryGuy on
  • CahirCahir Member, Moderator, Translator (NDA) Posts: 2,819
    @AstroBryGuy sorry for hijacking the thread a bit, but I'd like to ask one small question. What if mod doesn't use HANDLE_CHARSETS function? Does it mean there should be two sets of .tra files for each language - one encoded in cp1252 and second in UTF-8?

    One more thing, let's say that mod uses HANDLE_CHARSETS and we have one set of .tra's encoded in cp1252. What about different item description templates in vanilla and EE? I'd like to have slightly different description fo vanilla and for EE. How to handle this?

    I'll be grateful for advice.
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    Cahir said:

    @AstroBryGuy sorry for hijacking the thread a bit, but I'd like to ask one small question. What if mod doesn't use HANDLE_CHARSETS function? Does it mean there should be two sets of .tra files for each language - one encoded in cp1252 and second in UTF-8?

    Some mods indeed use two sets of files per language to take into account older games and the EE. Until HANDLE_CHARSETS was added to WeiDU, it was easier to do like this as it avoided having to deal with scripts depending on operating system to make the conversion.
    The amount of work required for the modder to maintain such double organisation increases with the number of languages that are supported, since one must know the proper encoding required when not using UTF-8, as it's different depending on languages (cp1252 is for Western Europe languages only, cp1250 for polish, cp1251 for russian). HANDLE_CHARSETS deals with that for all languages available by BGEE. All the modder has to do is use one of the typical name associated to the language to name the directories (french or francais for French, for instance). Look for HANDLE_CHARSETS in the WeiDU readme to get a list.
    As of now, my opinion is using HANDLE_CHARSETS makes it easier for the modder. In addition to avoiding handling of double sets of files, the amount of addition in the tp2 file is lower. The main drawback is that you need to include a copy of the iconv program for Windows in the mod, which increases the size of the mod (by about 1 MB) if it doesn't have a lot of texts. For BG1 NPC, due the huge amount of texts, that's the opposite: using HANDLE_CHARSETS, it actually reduces the size of the archive.
    Cahir said:

    One more thing, let's say that mod uses HANDLE_CHARSETS and we have one set of .tra's encoded in cp1252. What about different item description templates in vanilla and EE? I'd like to have slightly different description fo vanilla and for EE. How to handle this?

    @Camdawg wrote a guide which suggests a way to handle this case, look for "Item names and descriptions" part. To sum up, you would have a main setup.tra and a reduced setup_EE.tra, which only contains the lines that need adjusting for EE (with the same @nn number as in the main setup.tra). Then in the tp2 file, the mod would load the setup_EE.tra if an EE game is detected (in the components part of the tp2, not in the LANGUAGE part). By design of WeiDU, loading the setup_EE.tra after setup.tra will override the text associated to @nn number with the definition loaded last.
    So basically the modder has to think about this for his mod, you can't decide this as a translator.

    Regarding the encoding question, even if the setup_EE.tra is designed specifically for EE games and the text must be in UTF-8 in the end, I would still suggest to keep the encoding to cp1252 (or whatever is the proper encoding for the target language). It will make it easier if you need to copy texts back and forth between the files. HANDLE_CHARSETS can convert one more file without effort. You don't even need to specify each file to handle, by defaut it will process the whole directory.
  • CahirCahir Member, Moderator, Translator (NDA) Posts: 2,819
    Thanks @Isaya that was helpful indeed.

    So, you're basically saying that it's the mod author himself should set up a base for translations (by using HANDLE_CHARSETS and preparing setup_ee file for item descriptions)? But what if those two steps are not done by mod author, but otherwise mod works with EE just fine and I would like to update translation for EE nevertheless. How should I handle this? Should I ask mod author politely to do the heavy lifting and introduce the function and preping me this setup_ee file? There are mods out there not setting up properly for EE translation which I would like to translate eventually, but I'm not sure how to take care of them. Besides some authors are inactive now and won't conduct necessary changes.
  • ItomonItomon Member Posts: 187

    @Itomon - One thing to keep in mind is that all the .tra files are encoded for use with the original BG2 engine. So, for western european languages, they use CP-1252 encoding. The only exception is the setup.tra file, which is just plain ASCII (to make sure it works at any DOS-like prompt).

    For BGEE, WeiDU has a HANDLE_CHARSETS function that converts the encoding to UTF-8 at install. If you save your edited files with modern UTF-8 encoding, then the HANDLE_CHARSETS function will try to convert the character sets with bad results. So, be sure to save your files in CP1252 encoding. If your text editor can't save to CP-1252, then you can use iconv to convert the UTF-8 text files to CP-1252 (I'm on OSX, so I don't really have any recommendations as far as Windows text editors go).

    If you want to make a new translation available at install, make a copy the English subfolder under tra called "brasil" or "portuguese" or something like that (how different is brazilian portuguese from european?). THen edit the files in your new folder. To make the translation installable, you need to add a new LANGUAGE to the Language Settings section of the bg1npc.tp2 file:

    LANGUAGE ~Portuguese~ ~portuguese~ ~bg1npc/tra/portuguese/setup.tra~
    Guess I'm stuck at this. Sending SETUP-BG1NPC.DEBUG so maybe you can help me figure it out? ^^'

    Also, I tried to allocate the currently translated .tra inside a already working tra (english, then spanish) which allowed me to install the mod but then, the joinable NPCs do not appear in their starting location in the new game :(
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    Itomon said:

    Also, I tried to allocate the currently translated .tra inside a already working tra (english, then spanish) which allowed me to install the mod but then, the joinable NPCs do not appear in their starting location in the new game :(

    Yeah, that last part was a bug.

    http://www.shsforums.net/topic/56670-big-world-setup-an-attempt-to-update-the-program/page-102#entry583654

    Fixed in v22.2

    https://github.com/AstroBryGuy/BG1NPC/releases/tag/v22.2_20151212
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    Cahir said:

    Thanks @Isaya that was helpful indeed.

    So, you're basically saying that it's the mod author himself should set up a base for translations (by using HANDLE_CHARSETS and preparing setup_ee file for item descriptions)? But what if those two steps are not done by mod author, but otherwise mod works with EE just fine and I would like to update translation for EE nevertheless. How should I handle this? Should I ask mod author politely to do the heavy lifting and introduce the function and preping me this setup_ee file? There are mods out there not setting up properly for EE translation which I would like to translate eventually, but I'm not sure how to take care of them. Besides some authors are inactive now and won't conduct necessary changes.

    Well, you could offer to help the mod author with the necessary changes to the code. I wouldn't make the revisions beforehand, just in case you get turned down.
  • CahirCahir Member, Moderator, Translator (NDA) Posts: 2,819

    Cahir said:

    Thanks @Isaya that was helpful indeed.

    So, you're basically saying that it's the mod author himself should set up a base for translations (by using HANDLE_CHARSETS and preparing setup_ee file for item descriptions)? But what if those two steps are not done by mod author, but otherwise mod works with EE just fine and I would like to update translation for EE nevertheless. How should I handle this? Should I ask mod author politely to do the heavy lifting and introduce the function and preping me this setup_ee file? There are mods out there not setting up properly for EE translation which I would like to translate eventually, but I'm not sure how to take care of them. Besides some authors are inactive now and won't conduct necessary changes.

    Well, you could offer to help the mod author with the necessary changes to the code. I wouldn't make the revisions beforehand, just in case you get turned down.
    The thing is, I'm not WeiDU-profficient, I can add a line with additional language to tp2, but that's it :( Anyway appreciate the feedback guys!
  • IsayaIsaya Member, Translator (NDA) Posts: 752
    @Cahir I agree with @AstroBryGuy that it's better to get feedback from the author before "venturing forth". ;-)

    Using the method described by Camdawg is actually rather simple. What you have to add is this
    // load up ee-specific tra files on BG2EE ACTION_IF GAME_IS ~bg2ee~ THEN BEGIN LOAD_TRA ~mod_dir/tra_directory/%LANGUAGE%/setup_ee.tra~ END
    in the tp2 file for each component that adds items. So you can add it after the BEGIN @nn that states the beginning of a component. Skip the lines starting with GROUP, REQUIRE_FILE, REQUIRE_PREDICATE, SUBCOMPONENT that sometimes follow BEGIN.
    Alternatively, if the mod has a block starting with the statement ALWAYS at the beginning of the tp2 file, you could include this block there. Make sure you add it after instructions such as LAF HANDLE_CHARSETS or other LOAD_TRA. There is a risk to insert at the wrong place and generate a structure error. I think the risk of error is lower with the first method (after BEGIN @nn).

    %LANGUAGE% will be replaced by the name of the language selected by the player.
    You have to replace GAME_IS ~bg2ee~ by GAME_IS ~bgee~ or GAME_IS ~bgee bg2ee~ (etc.) depending on the game or games the mod is targetting. The WeiDU readme gives a full list of words associated to each kind of game in the description of GAME_IS.

    Of course, you also need to create a setup_ee.tra file from the setup.tra file (in the same directory) and only keep in the new file the texts that correspond to a description of an item that requires a different description for EE games. The mod author will have to do it for all languages, but you can create the file only in the language you intend to test.

    You could make a quick test with a single item description in the setup_ee.tra file. Then you install the mod, run the game and create the item with the CLUA console to check its description in game.
    Then you have a prototype to provide to the author. It may be a good idea to provide the example in English too (or the author's language), so that the author can figure out the principle.

    Note that this is not specific to EE games. You could use the same principle to create a variation for TotSC descriptions in mods that target both Tutu/BGT and BG/TotSC.
    // load up specific tra files on BG/TotSC ACTION_IF GAME_IS ~bg1 totsc~ THEN BEGIN LOAD_TRA ~mod_dir/tra_directory/%LANGUAGE%/setup_bg1.tra~ END
  • sandrolsandrol Member Posts: 31
    Hi AstroBryGuy
    I have found something weird in the component of stack able wolf pelts when i tried to get the money on them in nashkel i got the next dialog (see screen shot).
    do you need more information about it i will gladly help.
    Best regards.
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    edited January 2016
    sandrol said:

    Hi AstroBryGuy
    I have found something weird in the component of stack able wolf pelts when i tried to get the money on them in nashkel i got the next dialog (see screen shot).
    do you need more information about it i will gladly help.
    Best regards.

    The stackable wolf pelts is not a component of BG1NPC. It's part of SCS. The dialog is supposed to be:
    Shopkeeper: Well, if it isn't another winter wolf pelt! Thing is, I had a buyer lined up for the last one... don't think I can be taking another one off your hands right now. Maybe some trader a bit closer to civilization could help you out. But perhaps I can interest you in something else?

    Reply 1: Perhaps. What do you have for sale?
    Reply 2: Not right now.
    However, the lines displayed are from the Female Thief 1 soundset in IWD. I assume you installed the Awesome Soundsets Vol. 2 (or perhaps some NPC mod borrowed those voiced lines for a character soundset, that's possible too).

    Basically, it appears that SCS's strings are not in the DIALOG.TLK file. The string references for SCS-added content are pointing to incorrect strings. If SCS was the last mod you installed, you could try re-installing it. If there are other mods that have missing strings, you might be better off with a fresh re-install.

    Did any mods tell you to copy or move the DIALOG.TLK file during installation?
    Post edited by AstroBryGuy on
  • sandrolsandrol Member Posts: 31

    sandrol said:


    .

    Sorry for the miss understanding and confusion.
    only the soundest in IWD i believe, i will to a double check
    and the last install was has you said the SCS, i will try to reinstall it or just do a fresh reinstall without that mod.
    Thanks, you and the team behind this mode just make the game from awesome to without any words, i am enjoying a great time with this mod, will continue to play and upload any question's that connects to the mod.
    Best regards.



  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    edited January 2016
    If SCS was the last mod installed, then it looks like you may have had SCS use a different dialog.tlk than your default one. That would explain why SCS is pointing at the wrong strings. It installed to a different language's dialog.tlk, so when it added new strings to the other dialog.tlk, they had the same indexes as other mod-added strings in the default dialog.tlk.

    Did any mods tell you to copy or move the dialog.tlk file during installation? That should not be necessary with a modern WeiDU executable, but it could easily lead mods installing to the "wrong" dialog.tlk and the kind of issue you are seeing.

    Each mod should create a file called SETUP-%MODNAME%.DEBUG, where %MODNAME% is replaced by the name of the mod. These are just text files. The very beginning of these files should look like this:
    WeiDU v 23800 Log

    ./setup-IWDNPC
    [./chitin.key] loaded, 522652 bytes
    [./chitin.key] 165 BIFFs, 36998 resources
    [./weidu.conf] loaded, 17 bytes
    [./lang/en_us/dialog.tlk] loaded, 4434671 bytes
    [./lang/en_us/dialog.tlk] 40892 string entries
    Check which dialog.tlk file each mod used. Make sure that they are all the same one and it is in your /lang/%LANGUAGE%/ folder (where %LANGUAGE% is the appropriate folder for whatever language you use, e.g. /lang/en_us/ for English).
    Post edited by AstroBryGuy on
  • FantasyGeekFantasyGeek Member Posts: 1
    I really want to play this mod. I probably wouldn't have bothered playing without it if I had known it existed and I appreciate whoever created it. However, I don't really know how to install it and the website with the readme and download and all that is flagged as dangerous by my Norton. Is there any other place with the information?

    I don't know if this is the right place for this post. Sorry if it isn't.
  • AstroBryGuyAstroBryGuy Member Posts: 3,437
    You can download the latest version from my GitHub repository:

    https://github.com/AstroBryGuy/BG1NPC/releases

    A copy of the readme is included in the download.
  • sandrolsandrol Member Posts: 31

    You can download the latest version from my GitHub repository:

    https://github.com/AstroBryGuy/BG1NPC/releases

    A copy of the readme is included in the download.

    Hi AstroBryGuy, question.
    there is a update for the nusic pack ?
    Best regards.
Sign In or Register to comment.