Browse games

Browse games

My library

My library

My content

My content
My account
mod.io

Implementing Custom Action Resources with ImpUI

Report guide
Share

Guide

This is a quick guide going through how to implement custom action resources with ImpUI.

Requirements

  • Your mod open in the BG3 toolkit
  • ImpUI added as an active mod and enabled in BG3
  • An image editor that exports DDS files
  • Read the “creating class icon” part of the official creating custom class guide

Defining Action Resources

In toolkit, open UUID Object Editor -> your mod in the left hand side -> ActionResourceDefinitions:

Make a note of the unique name you use in column B as it will be referenced later on as ACTIONRESOURCENAME.

Adding action resources in-game

Action resources are typically given in character creation/Level up screens by amending progressions:

Alternatively, add the action resource as a passive or temporary status boost:

Creating Action Resource Icons

It is recommended to use the base action resource icons as a starting point located in the base Game.pak file or the copies located in ImpUI. Here's the Github location

When exporting your icons, ensure the file type is .DDS in capitals and uses the following setting:

There are 4 different types of action resource icon:

  • 1st type - Keyboard icon. Appears on top of hotbar, spellbook, reactions and in tooltips. Has 3 alternative versions for missing (it's been taken away), used (it's been expended) and unavailable. Size 48x48.
  • 2nd type - Keyboard CC/level up icon. Appears in character creation or level up when a progression/passive grants an action resource. A progression description is also required. Size 128x128.
  • 3rd type - Controller front icon. Appears on the left hand side of the action resource listing in both action radial "Cost" and "Action Resources" section. Size 80x80.
  • 4th type - Controller resource icon. Appears on the right hand side of the action resource listing in both action radial "Cost" and "Action Resources" section. Has 3 OPTIONAL alternative versions for missing (it's been taken away), used (it's been expended) and unavailable. If you don't add a version for these, it'll look the same done for most of the base icons except action point, bonus action and movement. Size 44x64.

Placing Action Resource Icons for ImpUI

This is where the class icon guide helps - custom icons are manually added into your mods via the following file paths

1st type - Keyboard icon:

Mods\MODNAME\GUI\Assets\Shared\Resources\ACTIONRESOURCENAME.DDS
Mods\MODNAME\GUI\Assets\Shared\Resources\Highlight\ACTIONRESOURCENAME.DDS
Mods\MODNAME\GUI\Assets\Shared\Resources\Missing\ACTIONRESOURCENAME.DDS
Mods\MODNAME\GUI\Assets\Shared\Resources\Used\ACTIONRESOURCENAME.DDS

2nd type - Keyboard CC/level up icon:

Mods\MODNAME\GUI\Assets\CC\icons_resources\ACTIONRESOURCENAME.DDS

3rd type - Controller front icon:

Mods\MODNAME\GUI\Assets\ActionResources_c\Icons\ACTIONRESOURCENAME.DDS

4th type - Controller resource icon:

Mods\MODNAME\GUI\Assets\ActionResources_c\Icons\Resources\ACTIONRESOURCENAME.DDS

OPTIONAL

Mods\MODNAME\GUI\Assets\ActionResources_c\Icons\Resources\Highlight\ACTIONRESOURCENAME.DDS
Mods\MODNAME\GUI\Assets\ActionResources_c\Icons\Resources\Missing\ACTIONRESOURCENAME.DDS
Mods\MODNAME\GUI\Assets\ActionResources_c\Icons\Resources\Used\ACTIONRESOURCENAME.DDS

 

 

Discussion
45 comments

Log in to join the discussion!
I'm having an issue where my Custom resource is not showing up on the Action Bar. It shows up on the Spells that need it to be cast but it wont show on the Action Bar where Action, Bonus Action, and Cantrip are. The resource is working, my characters have the resource and I can cast the spells its needed for but the icon doesn't show up only for the Action Bar I have ImpUI downloaded and up to date and the ActionResourceDefinitions > ShowOnActionResourcePanel set to yes. I've tried everything I can think of to get it to work!
What's the difference between "Used" and "Missing"? I get that "used" icons usually turn gray, but what would "Missing (it's been taken away)" be? The wording makes it sound like there would be no icon present at all, in which case why even bother with a folder?
Can verify that the custom icons need to be added in using the Convert UI Assets tool as mentioned below. Save all your images in .png and use the following paths for the toolkit to place your images where you need them without needing to move them around later: 1st type - Keyboard icon: Shared\Resources Shared\Resources\Highlight Shared\Resources\Missing Shared\Resources\Used 2nd type - Keyboard CC/level up icon: CC\icons_resources 3rd type - Controller front icon: ActionResources_c\Icons 4th type - Controller resource icon: ActionResources_c\Icons\Resources OPTIONAL ActionResources_c\Icons\Resources\Highlight ActionResources_c\Icons\Resources\Missing ActionResources_c\Icons\Resources\Used Please update the guide for clarity, thanks. Also, needs explanation about the ActionResourceDefinitions. It's also a must.
Working everywhere except under Passive abilities that require a cost/reactions. Any solves/anything I've missed?
Ok, thats how you make icons. But how do you make the custom action resources?
It's right up the top of this guide, you just need to define it in the ActionResourceDefinitions table in the UUID editor, give it to a class under the 'Boosts' field, then under the cost of whichever actions you'd like to use the resource you put your newly made resource.
I still can't get the resource icons to show up correctly. This guide is clearly missing the important step of setting up a metadata file that defines each of the DDS files, but I did manually do that, which fixed my class and subclass icons not showing up correctly. It also allowed the resource icon to show up is at the top of the character info panel. But, everywhere else, the resource icons still only show a red star One of the comment below suggests that you have to convert them from png to dds in the toolkit. While I haven't tried that, I did try various DDS settings in photoshop, and none of them seemed to change anything. Both BC3 and BC7 settings works for other icons, so it seems weird that you would need to use a different DDS conversion just for resource icons. Also, these resource image files are showing up on the character panel, so it looks like it's able to read them just fine, not to mention patch 6 was also able to use these image files just fine when I was using ImprovedUI to add them to the game. I've double checked all the paths and dimensions in the meta file are correct and made sure all of the files were in the correct folder and had the dimensions specified in the meta file. Any other ideas what could still be missing?
Hey, I'm running into the DDS metadata issue. How did you manually edit your DDS metadata? I can figure out how. I cannot edit it when going to Properties > Details even after I change the permissions on file access.
btw, the author of Dynamic Sidebar has figured out the issue. For now, you need to also be running BCPP or Better Inventory UI and have it in your load order after Dynamic Sidebar. Apparently, you need to be running at least one of his add-ons that propagates the changes that ImprovedUI makes to support custom resource icons, and BCPP and Better Inventory UI both do that.
So, I resolved my problem. It turns out Dynamic Sidebar was doing something that was breaking custom resource icons. Disabling it restored my custom resources. The funny thing is I went through all the hassle of converting all of my images to png and using the toolkit to convert the images instead of photoshop, like someone suggested in this thread. It probably wasn't necessary, but I can't say for sure. You do definitely have to make a metadata file in your GUI directory that has entries for all of the images. Each resource image will have an entry like this: ''' <node id="Object"> <attribute id="MapKey" type="FixedString" value="Assets/ActionResources_c/Icons/Resources/Missing/Snowball.png" /> <children> <node id="entries"> <attribute id="h" type="int16" value="64" /> <attribute id="mipcount" type="int8" value="1" /> <attribute id="w" type="int16" value="44" /> </node> </children> </node> '''
Hi, I cannot, for the love of god, get my action resource icons to show..... I got another mod that shows TWO different custom action resources made by myself properly. This other mod I have does not show it... I am going insane. Do you hav any more details on the meta file? Where is it located, what´s the name, etc.? I think I need to look into that. I have tried everything else already I feel like.
Is it possible to have an amount of a resource equal to a flat amount plus a stat modifier? E.g: ActionResource(Point,IntelligenceModifier+1,0)
You would have to set up a passive to do so. You would also want to look at the appropriate "BoostContext" as there are many ways for the ability scores to be adjusted through potions and spells, so you would need to decide if you want them to impact your action resources.
Sadly ActionResource() only takes Float as a parameter, so not currently able to pass it a Lua statement
Is the CL available on mod.io? I can't seem to find it.
We (I) never got around to porting it over to the toolkit so it was available on mod.io yet. Maybe I should up it on the priority list.
Not sure if this is known but if you have a Custom Action Resource on an interrupt/reaction, when the interrupt popup message appears it does not display the custom icon for the cost whether it is available or missing. Just shows a Red Star. Everything else seems to be working
I cant even get the icons to show up in the toolkit, and theres no error code for it, i have all the made dds. in every single place listed above but cant get it to show
Thanks for the guide. After following the guide, I notice that in resource icon does not appear in the following contexts: - Reaction submenu: - In the reactions' list. It appears as a red star. - In the tooltip when hovering the pointer over the reaction. It appears as a red point. - In the level up screen. It does not appear at all. Are there additional paths that are missing in the guide?
Have seen the same so possibly is not working as intended.
While following the guide I got my icons to show up properly inside the Toolkit Editor, when I load my mod in-game the icons are completely invisible or straight up missing (some are invisible and others are a red star indicating it's missing). Any idea what could happen this? I don't understand why it would work inside the Editor and not outside of it. Here's how it looks: https://imgur.com/a/impui-bug-YflFTq4
Djmr
Djmr
AUTHORSep 13, 20241 reply
Have the latest version of ImpUI? (There was a fix I added) Have you published the mod locally and that local file is enabled in the igmm?
Hello. Yes, I'm using the latest version. I published the mod locally and used that .pak to load it into the game, and it's enabled in-game too. I even unpacked the .pak with Multitool to make sure the icon files are in there and they indeed are. I've been told on the bg3 discord by another modder that this guide is incomplete/innaccurate, as it doesn't include the steps to create metadata for each asset. He told me I need to have my icons in .png format and create the .DDS files using the Convert UI Assets option in the editor (instead of creating them myself with my image editing software), and THEN put those .DDS created through the Editor in the folders you mentioned (I can't use manually created .DDS files). Is this true? I mean I understand the Editor itself creates the metadata for each asset when Publishing, but what the guide as it is now written suggests is you have to copy-paste your custom .DDS files (exported from your image editing software) into the folders you list directly, and that probably doesn't create any metadata for them since they are not officially added to the asset list by the Editor and I would understand why the lack metadata even after publishing. Can you confirm how it's supposed to be done to clear up the confusion? I'm also wondering if using ImpUI is absolutely necessary to implement Custom Action Resource Icons or if there's a way to do it all through the Toolkit editor. EDIT: I have to say, I tried what the modder told me to do (grab my custom icons in .png format and convert them to DDS through the Editor and THEN put those toolkit-created DDS in the folders you mentioned) and now everything works fine. So I'm inclined to believe he was right and this guide is not complete or at the very least clear enough.
When you say "ImpUI added as an active mod and enabled in BG3", is it possible to get it active in the modding tool ? I try to add my custom resource icon (using an base one) but it doesn't show up in the "preview game" inside the editor.
You need to go to Project Settings and set ImpUI as a dependency of your mod. That way your mod will force the Editor (and the game when you publish your mod) to load ImpUI BEFORE it loads your mod. To see ImpUI in the dependency list, you need to already have it installed on BG3 and activated before opening the Editor.
It's what I did but it doesn't seem to work (but work fine ingame) [EDIT] My bad, I wasn't on the right project xD
Hi. Is it possible to create a new message to show when you don't have the new resource? (For example, i found out that if you don't have your sneak charge, the game shows the corresponding message under "ErrorDescriptions > ConditionErrors", but i can't make the new message to show up.)
Djmr
Djmr
AUTHORSep 13, 20242 replies
Are you referring to either in-game messages or toolkit messages? There are messages in the toolkit if icons cannot be found but I can't change them.
In-game. I'm trying to do a pseudo sneak attack charge but, after using it, the skills are greyed out and don't show any message (unlike the original sneak attack skills). I wanted to show a message like "You can't use this until next turn", but i don't know where can i link the condition and the error message.
Just solved this. Yes, you can. If you are checking for a resource, you can create a ConditionError with name "CE_ActionResource_CustomResource_False" and it will automatically show when not having enough resources. To throw another ConditionError which doesn't depends on resources, you have to create a khonsu function that return that message in case of failure.
Is it possible to add icons to action resources without using ImpUI (and if so, how), or does the functionality not exist in the base Toolkit?
Djmr
Djmr
AUTHORSep 13, 20241 reply+3
In short, no. I did ask for more functionality found in ImprovedUI to be transferred into patch 7. The base game does support class, race and deity icons now. I'm just helping out with the rest. I mean if you're curious feel free to open up the code for ImpUI or view via github - https://github.com/TheRealDjmr/BG3ImprovedUI/blob/main/ImpUI_26922ba9-6018-5252-075d-7ff2ba6ed879/GUI/Library/IUI_ActionResources.xaml I've had to change a few things around to make it easier for dynamic icons to work, creating the file structure and fallbacks etc etc
Unfortunate. Regardless, thanks for the response, and for creating ImprovedUI, I'd be up the creek without a paddle without it.
I'm also interested in this. Been experimenting without any luck so far. The naming convention and file structure in game.pak file, which seem to have the GUI icons, is not intuitive for action resources.
When doing this, while icons seem to show properly inside the editor, I keep getting constant error pop-ups in-game and on the message log saying that Metadata missing for this asset ''metada missing for this asset'' ''please regenerate metadata'' What does this mean and how do I fix it? EDIT: Also when I exported the .pak and actually tried in the real game only the icon for CC appears, the rest are missing (in the editor they were all present so I don't know why this happens, maybe the metadata thing is related...). EDIT: I realized that the bug was caused by a different UI mod (Better Character and Party Panels by pavelk), my bad.
Metadata is generated when the mod is published online/locally for each asset. I'll add that to the guide
I made a custom spell and my custom resource is not consumed. The spell says the resource is required and an action gets consumed, but not the resource itself. I tried copying the data for the sorc points to spellslot, but nothing happened... help.
I just noticed that this only seems to happen when I give the player more than 1 of my custom resource.
Hi, I have exactly the same problem. have you found a solution?
I want to make a character that takes damage upon using spell slots. Would the best way to go about this to be creating special spell slots that have that effect, or is there an easier way? This may be the wrong place to ask but I am trying to learn and I'm not totally sure where to go.
It would probably be better to create a passive on the character that deals self damage when casting spells. I'm unsure if you can make it so it specifically damages when the slot is used, but you can definitely do the former. It would be much simpler rather than creating special spell slots, unless they would have other properties that seperate them from the usual.
Is there a way to check what replenish types there are for these resources? I want to make one that gives one per kill, rather than short rest or long rests.
Djmr
Djmr
AUTHORSep 6, 20241 reply
It's been a while since I've dabbled in things like that, but in theory you could have a passive that grants you a "temporary status boost" once you have killed (like the Dark One's Blessing for Fiend Warlocks), and that status will grant 1 of the resource.
What would be the best way to have that status stack so that the player can keep accumulating this resource?
Last updated
145d
Reading time
4 min read
Views
3,523
Comments
45
Tags
Summary

This is a quick guide going through how to implement custom action resources with ImpUI.

Author
Djmr
Djmr
Follow Djmr

mod.io uses essential cookies to make our site work. With your consent, we may also use non-essential cookies to enhance your experience and understand how you interact with our services. The latter will be set only upon approval. or read our Cookies Policy.