Skip to content

Getting Shadowkeeper to work with BGEE

123578

Comments

  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @ermo, I might, but since I have a full version of VS2012 (which is actually for work but, shhhh, don't tell anyone :D) it's probably going to be more for my convenience. I'll look into possible conversions, though, absolutely.
  • swnmcmlxiswnmcmlxi Member Posts: 297
    Thanks for your work, Troodon80, it's very much appreciated!
  • FolFol Member Posts: 3
    edited February 2013
    Great job!
    @Troodon80 Hey, what about creating a SourceForge or GitHub project for this tool, it would be much more easier than keeping posting links whenever you make an update. Moreover, other may join and help.
    Post edited by Fol on
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @Fol, I could certainly use a hand getting it converted to Unicode, mostly due to my time being restricted with work related projects. If/when I do make such a project, I'll make a new thread with the URL to the SourceForge project. I can also link to that thread for discussion/bug reports/etc. in the project settings. Include a few screenshots, type up a new instructions document (which can be included within the project and launched from the View Readme button), and some of the information about changes and plans. If anyone wants to join in on the project, they can let me know in that thread.

    Does that sound like a good idea?
  • AHFAHF Member Posts: 1,376
    edited February 2013
    Troodon80 said:



    Update.

    The Change Portrait lists now populates and allows the user to change the portrait for any character. When extracting a portrait, the program now checks to see if there is a portraits folder in the users' Documents directory - if there is a portraits folder it goes ahead and saves, if there is no folder found it creates one and then saves the image.

    Thanks so much for all this work. I did want to note that in my portraits folder I have three versions L, M and S. The L versions (CharnmL) are not used in BG:EE (they are for BG2:EE end game) but they are the ones that show up in the folder. My M size portaits don't show up in the folder unless I rename them from CharnmM to CharnmL.

    I'm not sure that is what you intended but that would be what the SK program looked for since BG2 only had L and S sizes. Can this be done to pull the M files?

    The EEKeeper pulls the M versions for the default portaits but not the ones I created.
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @AHF, strange. I tried it out on several portraits and it extracted them as they appear in the screenshot.

    I'll take another look :).

    Can you post a screenshot of the portrait page similar to the way I have? And can you give me details regarding the size of the image?
  • PatkoPatko Member Posts: 2
    Hey all. I was thinking of creating a new editor in .NET and WPF. Is there any demand for it, seeing that ShadowKeeper is now being brought up to date? Well I may try and do it in any case, but still :)
    Maybe someone interested to help?
  • AntonAnton Member, Moderator, Mobile Tester Posts: 513
    @Patko is it possible to create some new crossplatfom soft to edit savegames which can be used on Android and iPads as well? It would be greate.
  • PatkoPatko Member Posts: 2
    @Anton if we are talking about .NET platform it would most likely be possible with MonoTouch, but I am not familiar with it neither do I have the license. Other than that, I don't know. To be honest, I haven't developed much for mobile yet, so maybe others will have another alternative.
  • AHFAHF Member Posts: 1,376
    edited February 2013
    Troodon80 said:

    @AHF, strange. I tried it out on several portraits and it extracted them as they appear in the screenshot.

    I'll take another look :).

    Can you post a screenshot of the portrait page similar to the way I have? And can you give me details regarding the size of the image?

    image

    In the portraits file are the following:

    Large portraits - 210 x 330
    Medium portaits - 169 x 266
    Small portaits - 54 x 84

    Medium portraits are what the game uses on the character screen. You can see on the image that I posted that I accidently cropped this picture with text on the bottom of the large version and no text on the medium version. The large version is the one showing on the EEKeeper except for characters like EDWINM, etc. which (obviously) show up with the medium version.

    Thanks!
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @AHF, that's quite strange. It's not supposed to export the large portraits.

    Where are you putting the portraits? I put three test portraits in the override folder in the main game directory first, which populated the lists with small and medium. Copying them over to a portraits folder in the main game directory populates the lists with the small and large sizes, but won't allow it to be extracted. Putting them into the Documents/portraits folder works fine with this update.

    You'll have to let me know if that works :).
  • ermoermo Member Posts: 81
    Yeah, porting this thing to a cross-platform, non-compiled language (like Python for instance -- it could even become part of GemRB in that case, as that already depends on Python) would probably be more ideal, since performance isn't really a consideration in this kind of tool, other than making sure that you don't use algorithms with poorer than (O) = k * n^2 worst case performance.

    The fact that you need a paid version of Visual Studio to even begin hacking on Shadow Keeper is a bit of a sticking point too in my book. I don't know how far Troodon80 is with porting EE Keeper to something else than the legacy MFC C++ library.

    Nevertheless, mad props to Troodon80 for picking up the development on this.

    @Troodon80: Did you know that native support for Git is coming to Visual Studio? If you do create a project, do yourself a favour and use Git instead of SVN. You won't regret it -- or, well, you may initially be annoyed that it doesn't work exactly like SVN, but you'll likely be much happier down the road, since patches will be easier to integrate. =)
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    I don't know how far Troodon80 is with porting EE Keeper to something else than the legacy MFC C++ library.
    @ermo, still working on getting the code somewhat upgraded to a newer standard of MFC. I'm thinking I'll eventually go with straightforward Win32, but I honestly haven't decided yet. Whatever the case, it will be a challenge trying to rewrite everything (it might actually be easier to start over, using bits and pieces of Shadow Keeper as a foundation). I'm in the process of rewriting some of the functions to be more compatible with Win32, since there is quite a bit that relies on strcpy and other such outdated methods and macros.

    Even upgrading the current project to Unicode looks daunting from here (example, replacing strcpy with wcscpy isn't going to cut it, you would also need to change the other types used with that to wchar_t or TCHAR, which throws the file reading into disarray).

    Updates are slow due to only being able to do this during my spare time, so much as that is.

    As for the GitHub support, that sounds good. Will a paid subscription be required (I don't know much about GitHub, if I'm honest)?
  • AHFAHF Member Posts: 1,376
    Troodon80 said:

    @AHF, that's quite strange. It's not supposed to export the large portraits.

    Where are you putting the portraits? I put three test portraits in the override folder in the main game directory first, which populated the lists with small and medium. Copying them over to a portraits folder in the main game directory populates the lists with the small and large sizes, but won't allow it to be extracted. Putting them into the Documents/portraits folder works fine with this update.

    You'll have to let me know if that works :).

    @Troodon80 - You rock! I had the portaits in the portraits folder in my documents/bgee/etc. and using your latest update pulled them up perfectly.

    This deserves more than a "like"!
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @AHF, I'll settle for a like :D.

    If you find any other issues, let me know.
  • ermoermo Member Posts: 81
    edited February 2013
    @Troodon80:

    Git support is becoming pretty ubiquitous these days. Both SourceForge, Bitbucket and (obviously) GitHub support it. In that vein, it is important to distinguish between the core tool (Git) and the online services that are providing added value around Git, such as e.g. Github.

    Speaking of Github, open source projects will cost you nothing as far as I can tell. There's also a link to paid plans on the github.com front page, right below the large green 'Sign up for free' button. Bitbucket I think has cheaper plans, though, and it is being run by a very reputable company (Atlassian).

    But given that you are capable enough to update the SK source, odds are you'll be savvy enough to search for hosting plans on your own and decide which plan fits your temperament and usage scenario the best... '^^
  • AntonAnton Member, Moderator, Mobile Tester Posts: 513
    @Troodon80 how do I set some custom portrait for NPC? Portraits from my folder do not show up in EEKeeper :(
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @Anton, just a couple quick questions:

    Are you using the latest version (as listed above)?

    Are the portraits in the Documents\portraits directory?

    Are the portraits the correct size? (Large: 210 x 330, medium: 169 x 266, small: 54 x 84)
  • AntonAnton Member, Moderator, Mobile Tester Posts: 513
    Yep! Yes to all the questions!
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    edited February 2013
    @Anton, do they use the conventional naming system 'S' and 'M' on the end of the file names?

    Can you archive and upload a sample of both the small and medium images that are not showing up?
  • AntonAnton Member, Moderator, Mobile Tester Posts: 513
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    edited February 2013
    @Anton, the medium one seems to show up fine for me, but the small one is actually the wrong size.

    Here is the medium one in the list:



    And the small one here is out by one pixel (it's very precise).



    I actually tried them in-game and got this:



    On closer inspection of the images, they appears to have been saved as 32bit Bitmap images instead of 24bit (where the medium portrait should be about ~133KB and the small one should be ~13.5KB). After I re-saved them, they appeared in-game.

    Can you confirm that the game recognises them on your end?

    Since the game can take portraits that are actually smaller or larger than the given sizes, I may make a check to ensure that images of varying sizes are detected. That should help out. I can probably do that tomorrow :).
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @Anton, this minor update should help with getting the portraits to show up in the list.

    What I've done is allowed any size within 5 pixels larger or smaller (49x79 to 59x89 for small portraits and 164x261 to 174x271 for medium) than what should be allowed. I could actually remove the check completely, but we don't want to allow any old portrait. Remember, though, that just because it now shows up in EE Keeper doesn't mean that it will show up in-game. The save format seems to be important (although I can't actually confirm that).

    You can try that out and tell me how it goes :).
  • AntonAnton Member, Moderator, Mobile Tester Posts: 513
    Thanks! will let you know as soon as I`ll get home
  • SgthawkerSgthawker Member Posts: 31
    edited February 2013
    Troodon80 said:



    What I've done is allowed any size within 5 pixels larger or smaller (49x79 to 59x89 for small portraits and 164x261 to 174x271 for medium) than what should be allowed. I could actually remove the check completely, but we don't want to allow any old portrait. Remember, though, that just because it now shows up in EE Keeper doesn't mean that it will show up in-game. The save format seems to be important (although I can't actually confirm that).

    You can try that out and tell me how it goes :).

    I would not recommend this. In game the pictures won't work unless they are the right size, causing the keeper to allow wrong size pictures to show up that won't work in game is likely to cause frustration. There is another thread discussing picture size format and bit depth requirements. http://forum.baldursgate.com/discussion/7461/heres-how-to-use-custom-portraits/p1

    Otherwise, this is great work you are doing! Thank you for your efforts!
  • ErgErg Member Posts: 1,756
    Sgthawker said:

    I would not recommend this. In game the pictures won't work unless they are the right size, causing the keeper to allow wrong size pictures to show up that won't work in game is likely to cause frustration.

    I must agree. I would rather have EEKeeper using the same criteria of BGEE.
  • Troodon80Troodon80 Member, Developer Posts: 4,110
    @Sgthawker and @Erg, actually, the criteria for BG:EE seems to be similar.

    For example:



    In this case, the medium portrait is 168 x 264, where it should be 169 x 266. It seems that if it is not the absolute correct size, it tries to use the large portrait (which is why I added a semicolon the the large portrait file name). For the profile page, it just seems to move the image align the image to the top-left, so you get a black border around right side and bottom of the portrait. The small portrait is aligned to the centre, so you get this:



    However, if it is preferred that only the actual sizes be accepted I'll reset the criteria.
Sign In or Register to comment.