Skip to content

Some widget icons are not loaded immediately #2

@jwty

Description

@jwty

First of all, thank you for this amazing library. I am really enjoying the compatibility aspect of it and I hope modders more experienced than me will adapt it soon. However, I came upon an issue, which, while not game breaking, is quite annoying and I'm having trouble solving it, namely some of the icons I tried using in <Widget> section of inserted XMLs (in attached example it's Crafting\craft_icon) do not appear in modified GUI until they are loaded by their respective GUIs first (in attached example it's done by opening smithy GUI). I suppose it might be related to this part of the wiki:

Currently I haven't found a way to alter the very initial parsing of the prefabs, since it happens even before any user modules are loaded into the memory. I'm discouraged to modify game files, therefore the only way is to ask WidgetFactory to reload affected movies after hooks has been set up.

If that's the case and it's expected behaviour then please close this issue, if it's not then, well, maybe there's a way to load specific icons/sprites to memory when a module is loaded? I tried looking through various mods and Bannerlord libraries but since I am an utter noob when it comes to C# and Bannerlord modding I couldn't find anything helpful myself.

For what it's worth, you can reproduce this issue with HorseAmountIndicatorMod by changing Sprite attribute of Widget from HorseAmountIndicator.xml to other icon, like one of the Crafting\* icons.

Example video

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions