Skip to content

[MOD] Dragonspear UI++ (v2.42)

1343537394049

Comments

  • AndreaColomboAndreaColombo Member Posts: 5,525
    So I need to add that one line to UI.MENU? Or is it a different file?

    As for the decorated capital letters, Lefreut's UI mod restores them. You can see them, for example, in his "Item description tweaks" and "journal tweaks" screenshots. Narrations also typically had them as their first capital letter in classic BG1.
  • meowdogmeowdog Member Posts: 71
    Yes, UI.menu, should've mentioned.
    @p6kocka same file for the journal fix.

    I looked at the code for the decorated letters, it's kinda too involved, I don't think I'm gonna do it, sorry.
  • p6kockap6kocka Member Posts: 65
    The small Journal mode- the default journal is always set as ALL quests. I would rather have it as ACTIVE. Changing it to ACTIVE doesn´t save. I have to do it everytime I look at the journal
    Do you want to also save the choice across game restarts?
    Yes, it´s exactly what I want to achieve
  • p6kockap6kocka Member Posts: 65
    2. The large Journal mode- when I press R the Journal shows up but for some reason when I press R again to close it the Character screen appears.
    Look for these lines:
    name "journalLeftButton5"
    on 'r' -- delete this

    I did this but now I have to press R twice to have the journal appear and when I want to close it I can´t. Only with ESC which sucks. Isn´t it possible to open the large Journal with R and to close it with R? Without weirdly landing in the character screen?
  • skushaskusha Member Posts: 136
    edited July 2021
    @meowdog, do you have any idea how to change the color of the acid green character frame? I know it's hardcoded. :)
  • meowdogmeowdog Member Posts: 71
    p6kocka wrote: »
    I did this but now I have to press R twice to have the journal appear and when I want to close it I can´t.
    This should help:
                    enabled "JournalSize == UIStrings.UI_Large"
                    name "journalLeftButton3"
                    on 'J' -- replace with 'r'
                    area 0 0 48 47
    

    I pushed journal filter and single click travel changes to github, the later needs to be enabled by adding this line in Baldur.lua:
    SetPrivateProfileString('Game Options','Single Click Travel','1')
    
    skusha wrote: »
    do you have any idea how to change the color of the acid green character frame? I know it's hardcoded.
    No, I don't. I don't think it's possible to do from Lua.
  • p6kockap6kocka Member Posts: 65
    As always, thank you
  • tl1942tl1942 Member Posts: 178
    edited July 2021
    (nevermind)
    Post edited by tl1942 on
  • p6kockap6kocka Member Posts: 65
    meowdog wrote: »
    To those who experience crashes, could you try the following:
    In “override/ui.menu” file find LEFT_SIDEBAR_BOTTOM section and right after the “ignoreEsc” line add this code
        label
        {
            name 'leftSidebarBackground'
            area 0 0 0 0
            enabled "false"
            mosaic GUIWLSP
        }
    
        label
        {
            name 'rightSidebarBackground'
            area 0 0 0 0
            enabled "false"
            mosaic GUIWLSP
        }
    
    It’s just a guess based on a crash report I got, but getting another crash takes a lot of time, so I haven’t tested the fix yet.
    If I’m right the game tries to call Infinity_GetArea function for these labels, but they don’t exist in DUI, they are for the panels on the sides, one with buttons and the other one with the portraits. Most of the time it’s harmless, but sometimes you get unlucky and the get area function tries to access invalid memory address and it causes the crash.

    @meowdog
    Have you integrated this fix into your latest version on Github? Because I´ve had a crash after loooooong time and I can´t find the fix in the UI.MENU.
  • meowdogmeowdog Member Posts: 71
    edited July 2021
    p6kocka wrote: »
    Have you integrated this fix into your latest version on Github? Because I´ve had a crash after loooooong time and I can´t find the fix in the UI.MENU.
    It's there, I just moved it to a different place.
    Just in case you can add this code to any "override/M_xxxx.lua" file:
    -- Temp hack to prevent segfaults when the game tries to get an unknown area.
    ;(function ()
    	local get_area = Infinity_GetArea
    	local unknown_areas = {}
    
    	function Infinity_GetArea(name, ...)
    		if name == nil then
    			Infinity_DisplayString('^RInfinity_GetArea: name is nil^-')
    			return 0, 0, 0, 0
    		end
    
    		if nameToItem[name] ~= nil then
    			-- The checks above should be enough, but just in case I misunderstand
    			-- how Infinity_GetArea works or if its implementation changes, put
    			-- something on the stack, it'll be used as the return value.
    			local bad_code, dead_boo = 0xBADC0DE, 0xDEADB00
    			local x, y, w, h = get_area(name, ...)
    
    			if x ~= bad_code and y ~= dead_boo then
    				return x, y, w, h
    			end
    		end
    
    		if unknown_areas[name] == nil then
    			Infinity_DisplayString(('^RUnknown area "%s"^-'):format(name))
    			unknown_areas[name] = true
    		end
    
    		return 0, 0, 0, 0
    	end
    end)()
    
    The crash might be for a different reason though.
    Do you get any error messages or crash dumps?
    For example on macos I got something like this and it was very helpful:
    Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes:       EXC_I386_GPFLT
    Exception Note:        EXC_CORPSE_NOTIFY
    
    Termination Signal:    Segmentation fault: 11
    Termination Reason:    Namespace SIGNAL, Code 0xb
    Terminating Process:   exc handler [59524]
    
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   com.beamdog.baldursgateenhancededition	0x000000010c22ba01 0x10bb5d000 + 7137793
    1   com.beamdog.baldursgateenhancededition	0x000000010c20cf2f 0x10bb5d000 + 7012143
    2   com.beamdog.baldursgateenhancededition	0x000000010bd9b5a5 0x10bb5d000 + 2352549
    3   com.beamdog.baldursgateenhancededition	0x000000010bd979ef 0x10bb5d000 + 2337263
    4   com.beamdog.baldursgateenhancededition	0x000000010be062ac 0x10bb5d000 + 2790060
    5   com.beamdog.baldursgateenhancededition	0x000000010bf699b6 0x10bb5d000 + 4245942
    6   com.beamdog.baldursgateenhancededition	0x000000010bbe1619 0x10bb5d000 + 542233
    7   com.beamdog.baldursgateenhancededition	0x000000010bf6d0cd 0x10bb5d000 + 4260045
    8   com.beamdog.baldursgateenhancededition	0x000000010bf6d2f0 0x10bb5d000 + 4260592
    9   com.beamdog.baldursgateenhancededition	0x000000010bbdfb2b 0x10bb5d000 + 535339
    10  libdyld.dylib                 	0x00007fff6b9e8cc9 start + 1
    
    Post edited by meowdog on
  • p6kockap6kocka Member Posts: 65
    The crash happened right after ending dialog and after a new quest appeared in the journal.
  • meowdogmeowdog Member Posts: 71
    p6kocka wrote: »
    The crash happened right after ending dialog and after a new quest appeared in the journal.
    If you reload and get this quest again, does it crash?
  • p6kockap6kocka Member Posts: 65
    After reloading the last autosave the game crashes after couple of seconds. Always. But after reloading a save before I started to play today no crash at all.
  • meowdogmeowdog Member Posts: 71
    @p6kocka
    Send me your autosave.
  • p6kockap6kocka Member Posts: 65
    It already has been overwritten. After loading an older save the game works now. I will post you the save when there will be a crash again. I hope not. :D
  • p6kockap6kocka Member Posts: 65
    By M_xxxx.lua" file you mean the M_dui.lua file?
    Should I put it at the end of the text in this file pls?
  • meowdogmeowdog Member Posts: 71
    Sure, you can put it in M_dui.lua, anywhere, at the end is fine.
  • p6kockap6kocka Member Posts: 65
    edited July 2021
    And what is this for actually? Is it a fix attempt to prevent crashing?
  • meowdogmeowdog Member Posts: 71
    Yes, but it can only prevent crashing in the Infinity_GetArea function.
    It's unlikely it would've helped with your crash in that autosave.
  • p6kockap6kocka Member Posts: 65
    edited July 2021
    When I put it at the end of the file M_dui.lua I get an error when starting the game.
    string"M_dui.lua"236 attempt to a nil value
    Edit: After I put it at the beginning of the file I have got no more errors
    Post edited by p6kocka on
  • meowdogmeowdog Member Posts: 71
    Right, it was parsing as "updateTable(...)(function() .. end)()", since updateTable returns nil it was basically trying to call nil as a function, which is it not.
  • tl1942tl1942 Member Posts: 178
    edited August 2021
    Fresh install using the latest version on github, and I'm running into the same problem I encountered a year ago: I'd like to customize sprite colors for my companions, but the "colors" option is grayed out for all but CHARNAME.

    I'd previously used the following fix: https://forums.beamdog.com/discussion/comment/1144370/#Comment_1144370

    Deleting all lines of
    enabled "characters[id].PC == 1"
    in ui.menu did the trick. Now this line is absent in ui.menu...

    Any ideas?

    EDIT: Ah @meowdog it looks like you decided to go with the inventory mouse hover tweak (where the selected character switches when you hover over different inventories). I remember a year ago, the mouse hover prevented companion customization from working right (because it would switch characters as you moved the mouse from hair color to skin color). I'm not sure if that would happen now...

    Is there a quick way to edit ui.menu so I can get the option to edit my companion colors like before?
    Post edited by tl1942 on
  • meowdogmeowdog Member Posts: 71
    @tl1942
    You should be able to customize colors from the new inventory, mouse hover is temporarily disabled when you do it.
    Is there a quick way to edit ui.menu so I can get old clickable inventory functionality and the option to edit my companion colors like before?
    No, but I made a branch with the old inventory.
  • skushaskusha Member Posts: 136
    Thanks @meowdog for realizing the idea of the character portrait panel on the left side of the screen!
    26bf46b77b5e.png
    Download it here: https://github.com/anongit/DragonspearUI/tree/left-portraits

    It remains to implement that you can choose the appearance of this panel on the left or right side directly in the game through the settings menu.
  • raizoraizo Member Posts: 31
    edited August 2021
    I'd like to return to BG2 after some time. It looks like there are two places now, which the mod can be downloaded from. From @Pecca or @meowdog github.

    1) If I'd like to play the 2.5 version of the game, which repository should I use?
    2) Does any of the repositories contain all the tweaks and fixes, that are scattered across this thread? For instance, the fix for having magical items show up in the quick loot-bar as blue?
  • tl1942tl1942 Member Posts: 178
    edited August 2021
    Thanks as always @meowdog!

    FWIW, this UI is one of the big reasons I keep coming back to Baldur's Gate now. I've been singing its virtues on twitch and other forums. I sincerely believe it's the single best UI of any RPG I've ever played.

    Thanks again!

    EDIT:

    It would also be great to have the equipment comparison code working with the old inventory version... I've been trying on my own, but no luck so far...
    Post edited by tl1942 on
  • meowdogmeowdog Member Posts: 71
    @tl1942
    I updated the branch to include equipment comparison.

    @raizo
    My repo is for the 2.6 version, it might work with 2.5 however. I think the only major change in 2.6 UI.menu was in the voice selection screen.
    It has some of the fixes from this thread. You can look at the commit history to see which ones.
  • affablePeafowlaffablePeafowl Member Posts: 10
    Hello everyone, noob here, just playing BG1:EE (PC, Windows 10) for the first time and I'm having a blast. This mod looks so amazing that I just had to make an account to ask this, apologies if it's a stupid question or I've overlooked something.

    I bought BG1:EE and BG2:EE from GOG. (BG1 is installed, BG2 isn't, if that makes a difference.) I have not bought SoD, so all I have is a plain BG1:EE install. Is the latest version (meowdog's fork I assume) compatible with BG1:EE, without the SoD expansion? I've seen conflicting info about it on Reddit, and the OP says it's compatible with SoD and BG2:EE.

    But on the other hand the recent fork seems to include EET support, so my intuition is if mods of that level are supported, the standard vanilla version probably is too, and since BG1:EE uses the same engine as BG2:EE (afaik) then I'm thinking it's probably compatible with BG1:EE. If I'm understanding everything correctly, the version of meowdog's fork linked on 25 July added support for ver. 2.6.6 which is the most recent version of BG1:EE (and also SoD and BG2 from the looks of things, which is also promising if they're all lumped together under one changelog).

    Normally I'd be happy to try for myself without needing to trouble anyone for the answer, but given my ignorance of BG:EE modding, I'm hesitant to apply the mod and potentially mess up my BG1:EE installation, if it's not compatible after all. It's a shame that, although GOG is selling BG1:EE at 85% off, they're still charging the full $20 for SoD, or else I'd just pay a couple of bucks and not worry at all :tongue: Thanks in advance to anyone who can clarify! Great work on this project, it looks tremendous and I'm excited to try it.
  • meowdogmeowdog Member Posts: 71
    edited August 2021
    @affablePeafowl
    It's not compatible with BG1:EE, it's missing some assets, the start screen has the extra SoD campaign button and the world map requires some changes.
    There might be other issues, I only tested for a few minutes.

    The missing assets can be found in "dragonspear_ui++/content-common/eet-bg2".
    Post edited by meowdog on
  • affablePeafowlaffablePeafowl Member Posts: 10
    edited August 2021
    meowdog wrote: »
    @affablePeafowl
    It's not compatible with BG1:EE, it's missing some assets, the start screen has the extra SoD campaign button and the world map requires some changes.
    There might be other issues, I only tested for a few minutes.

    The missing assets can be found in "dragonspear_ui++/content-common/eet-bg2".

    Ah, that's too bad, but thanks for clarifying, it's much appreciated!

    This is a dumb question, but that directory with the missing assets, it's included in the zip, no? Or does the setup pull other assets from BG2 in addition to the ones in that directory? I ask because I do have a BG2:EE license, so I could install the game if that would mitigate some of the incompatibilities. At the risk of sounding even dumber, I take it the missing campaign button has a particular use that can't be fulfilled with the Black Pits button? I wouldn't miss BP if it's just an issue of needing a button to point to something :p

    I probably should've asked if DUI is backwards-compatible with BG1:EE if BG2:EE is also installed. Or, failing that, if there's anything that can be done manually on the user end, to pull any required assets from BG2:EE into BG1:EE/DUI directories.

    I hope I'm not taking too many liberties with your time by asking. If there's nothing I can do short of forking over 20 bucks for SoD, them's the breaks I guess! The reviews aren't exactly glowing lol. But I can either wait for a sale or just finish BG1 and enjoy DUI when I get to BG2 :smiley:
Sign In or Register to comment.