Permanent Thieving Button! Whaaat?
Dee
Member Posts: 10,447
Cleric/Thieves are at a slight disadvantage when it comes to thieving, because the Thieving button is sitting in the Special Abilities menu.
But what if it wasn't?
Bear in mind, this is a hacky solution; I'm only sharing it to show the functionality. This isn't going to be pretty, but it's functional.
Here's the code you'll be copying:
Change the 'a' to whatever the Thieving button is mapped to on your own game. (by default it's not mapped to anything, so you'll need to configure that however you're most comfortable either from BGEE.lua or from within the game.)
Here's where you'll be copying the above code to (on my system it's somewhere around line 10403):
Launch the game, get to the gameplay screen, and voila:
I said it wasn't going to be pretty. But there you have it.
But what if it wasn't?
Bear in mind, this is a hacky solution; I'm only sharing it to show the functionality. This isn't going to be pretty, but it's functional.
Here's the code you'll be copying:
button
{
area 766 1 52 52
bam GUIBTACT
frame 26
tooltip "Thieving"
action "Infinity_PressKeyboardButton('a')"
}
Change the 'a' to whatever the Thieving button is mapped to on your own game. (by default it's not mapped to anything, so you'll need to configure that however you're most comfortable either from BGEE.lua or from within the game.)
Here's where you'll be copying the above code to (on my system it's somewhere around line 10403):
button
{
area 710 1 52 52
actionBar 11
enabled "buttonArray:GetButtonEnabled(11)"
tooltip lua "actionBarTooltip[11]"
action "buttonArray:OnLButtonPressed(11)"
actionAlt "buttonArray:OnRButtonPressed(11)"
}
[[[[ COPY IT HERE ]]]]
}
Launch the game, get to the gameplay screen, and voila:
I said it wasn't going to be pretty. But there you have it.
Post edited by Dee on
23
Comments
I added this line to the new button that @Dee created...
enabled "string.find(string.lower(characters[id].class), string.lower('Thief'))"
Basically this will only enable / show the button when the selected character has Thief in the class name - you can add it underneath the area line.
I went down the whole list and it worked fine.
You may need to play around with the spacing - eg is it 'Cleric/Thief' or 'Cleric /Thief' or 'Cleric/ Thief' or 'Cleric / Thief'...
EDIT: I updated the code in the first post to remove some crufty bits that were only there because I was copying the button from somewhere else. It should now only contain the pieces you need to get it working.
You could also add additional conditions with 'or' in between them if you want to make sure all thieves regardless of class/kits have the option.
enabled "string.find(string.lower(characters[id].class), string.lower('Thief')) or string.find(string.lower(characters[id].class), string.lower('Bounty Hunter')) or string.find(string.lower(characters[id].class), string.lower('Shadowdancer')) .... ...."
It'd be great if you didn't have to hardcode each thief kit into UI.menu oh wait you could totally do that check with a .lua file never mind.
Just to confirm - Dee's original post stands and works fine... my suggestion didn't work as the worldscreen doesn't know which character is currently selected.
But once that editing has been done, yes, you should be able to use WeiDU to modify the table in the Lua file.
I've posted a version of Dee's thieving button as part of EEUITweaks v1.7. It has a few enhancements:
The code (SOD - change x,y as appropriate):
Enjoy!
Version 2.1 of EEUITweaks features a new implementation of Dee's Permanent Thieving Button. It's fully integrated visually with the Action Bar; and when disabled (by not having a hotkey assigned to Thieving), it is displayed in a disabled state rather than disappearing. The pictures below show the button enabled and disabled, respectively
Enjoy!
I don't know about implementing it with hotkeys, but it would be possible to make the button automatically open the Special Abilities menu, search for the Thieving tooltip, and then press the corresponding button. Essentially it is a glorified macro, but it gets the job done. If you want I could mod that for you.
I suspect the only problem to get this working would be to assign a keyboard short cut in the first place (and without the external keyboard for those who don't). I also have Hacker's Keyboard installed which can be access from within the game and keys are functional. I can't try the Button due to being still on version 1.3.x .
Having said that, once you set the keymap then it activates the button for use on screen. When you set the keymap, it writes this line to the baldur.lua:
SetPrivateProfileString('Keymap Action','Thieving','110')
I mapped to the N key just as a proof of concept (closest thing to my fingers at the time), which resulted in 110, but a better key could be mapped for something more permanent. If this line were to be added manually or as part of an install script, then I am sure the button would be usable.
Gus
Edit: Should have mentioned that as part of the proof, I then unassigned the key, exited the game, then added the line to the .lua and restarted. The button was active.
Dee's Permanent Thieving Button doesn't work on my setup (BGEE v2.3.67.3b + SoD + modmerge + lefreut's Enhanced UI v3.3 + EEUITweaks UI Mods Collection v2.9.1)
The Thieving button is visible but stays inactive even with a cleric/thief character.