Wolfe-tk / blood-hunter

Repository for Blood Hunter Class mod for BG3
3 stars 2 forks source link

DataTemplates.xaml conflicts and ImprovedUI Assets typo related to Blood Maledict #2

Open Zecro-0 opened 1 year ago

Zecro-0 commented 1 year ago

Saw that the icons for the Blood Maledict class resource were included, but did not show up in game. Decided to dig in a bit and discovered a couple of issues on the way. All of this was tested on a fresh save with only Mod Fixer, Improved UI, Improved UI Assets and this mod.

DataTemplates.xaml conflicts

Since the mod modifies the DataTemplates.xaml file, which ImprovedUI Assets also does there is a conflict of how the icons are bound and loaded. This can be confirmed simply by taking out the following chunk from ImprovedUI Assets and putting it into your DataTemplates.xml file.

<!-- MOD START - Custom modded icon files to load -->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="../Library/IUI_ClassIcons.xaml"/>
        <ResourceDictionary Source="../Library/IUI_RaceIcons.xaml"/>
        <ResourceDictionary Source="../Library/IUI_ActionResourceIcons.xaml"/>
        <ResourceDictionary Source="../Library/IUI_BackgroundIcons.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    <!-- MOD END -->

Since the only place the actual icon source files are actually referenced is in the IUI_ActionResourceIcons.xaml file, the reference is lost when the DataTemplates.xaml gets overwritten by this mod.

ImprovedUI Assets wrong ActionGroup

While I was digging around in the IUI_ActionResourceIcons.xaml file to try and resolve the missing icons I discovered that the DataTrigger for the Blood Maledict ActionGroup was wrongly linked. In ImprovedUI Assets the ControlTemplate reads:

<ControlTemplate x:Key="ActionResources.ActionGroup.BloodMaledict" ...

However the DataTrigger reads:

</MultiDataTrigger>
            <DataTrigger Binding="{Binding TypeId}" Value="BloodMaledict">
                <Setter Property="ActionPointTemplate" Value="{DynamicResource ActionResources.ActionGroup.BloodMaledictGroup}"/>
                <Setter Property="ActionPointSize" Value="{DynamicResource ActionResources.ActionPointSize}" />
            </DataTrigger>

As such the ControlTemplate should probably be modified to say x:Key="ActionResources.ActionGroup.BloodMaledictGroup".

Wrong image format

The final issue is that the images in the .../Game/GUI/Assets/BloodHunter/Shared/Resources folder are of the png format. But they should be of the .DDS file format. Furthermore they should be scaled down, 48x48 seemed a good size when I tested.

Screenshot for proof: https://imgur.com/6VaoeB6

Hope this helps!

Wolfe-tk commented 8 months ago

hey thank you @Zecro-0 I really appreciate the thorough input