Is it possible to assign one class' interface to that of another class?
Contemplative_Hamster
Member Posts: 844
Is it possible to assign one class' interface to another class? Like, assigning the cleric's or cleric/mage's panel to a single-class mage for that sweet Turn Undead button (which does nothing in itself, of course)?
Post edited by Contemplative_Hamster on
0
Comments
The actionbar is one of the most hardcoded things in the UI. At the moment, there is nothing you can do in UI.MENU to alter the actionbar, or what appears in it. If you were *really* determined to change buttons around in the actionbar, you could technically re-implement it from scratch, though this is monumental task in of itself. Basically, you would be creating a custom actionbar, hiding the real actionbar, and simply mimicking the buttons of the real action bar. It would be more akin to macro buttons that link back to the original actionbar, but it would have the advantage of allowing complete customization. New buttons could be added, buttons could be removed, buttons could be moved around, etc.
Edit: You would have to overcome some very big obstacles in order to create a completely custom actionbar... it is just the only way I can think of doing what you want. Of course you can add new buttons next to the actionbar very easily, if that also works.
This is, of course, strictly talking about the UI side of things. I am not sure if you could implement what you want in some other part of the engine.
If I were to obtain the cleric/mage action bar for my mage by other means - a dual-classed cleric 2/specialist wizard X (dual classing into a kit thanks to Kjeron's mod) - is there a way to reassign what the Turn Undead button does?
2. Scroll down until you see this code:
button { area 231 1 52 52 actionBar 3 enabled "buttonArray:GetButtonEnabled(3)" tooltip lua "actionBarTooltip[3]" action "buttonArray:OnLButtonPressed(3)" actionAlt "buttonArray:OnRButtonPressed(3)" }
3. Replace that code with this code:
button { area 231 1 52 52 actionBar 3 enabled "buttonArray:GetButtonEnabled(3)" tooltip lua "actionBarTooltip[3]" action " if actionBarTooltip[3] == 'F4 : Turn Undead' then Infinity_DisplayString('Overriden Behavior!') -- Do whatever you want your custom action to be here. else buttonArray:OnLButtonPressed(3) end " actionAlt "buttonArray:OnRButtonPressed(3)" }
It's even possible to check against the current player's class behavior overriding. Here's an example where only Cleric / Mages' Turn Undead button is overridden:
button { area 231 1 52 52 actionBar 3 enabled "buttonArray:GetButtonEnabled(3)" tooltip lua "actionBarTooltip[3]" action " if actionBarTooltip[3] == 'F4 : Turn Undead' then Infinity_UpdateLuaStats() if characters[id].class == 'Cleric / Mage' then Infinity_DisplayString('Overriden Behavior!') -- Do whatever you want your custom action to be here. else buttonArray:OnLButtonPressed(3) end else buttonArray:OnLButtonPressed(3) end " actionAlt "buttonArray:OnRButtonPressed(3)" }
Thanks; that's a good point! Here's a version of the first example which should work with any game language (and having the keybindings text disabled in Baldur.lua), just to show that it is possible:
button { area 231 1 52 52 actionBar 3 enabled "buttonArray:GetButtonEnabled(3)" tooltip lua "actionBarTooltip[3]" action " tooltipString = actionBarTooltip[3] firstColonIndex = tooltipString:find(':', 1, true) if firstColonIndex == nil then firstColonIndex = -1 end actionbarButtonText = tooltipString:sub(firstColonIndex + 2, #tooltipString) if actionbarButtonText == Infinity_FetchString(4974) then Infinity_DisplayString('Overriden Behavior!') -- Do whatever you want your custom action to be here. else buttonArray:OnLButtonPressed(3) end " actionAlt "buttonArray:OnRButtonPressed(3)" }
It should work, (in Baldur's Gate II, at least), as the string at strref 4974 is the Turn Undead label. We are also cutting off the key binding text, to make sure we are only comparing the actual button label.
Years later, the 2.6 version of EEex allows hotbar UI customization - not merely switching one class's hotbar layout for another.
I have done this by having the special ability button pull up the Thief context menu rather than the special abilities menu.
My question is whether there is a way to *only* display the 3 Thief skills (or some other subset of the bar).