PDA

View Full Version : Hotkeys for 2nd bar of shorctus Mod


robmack
12-09-2010, 07:14 PM
I noticed you could add another bar of shortcuts, but I don't see how to map them to hotkeys. Is it possible and I just don't see how?

Would it be easy to mod this in?

Any help would be appreciated.

Thanks!

Shadow
12-09-2010, 07:44 PM
There isn't a way directly in the game, but it could probably be modded in. You would need to change stuff in game.mnu and add new hotkey stuff to the 2nd bar of shortcuts.

robmack
12-09-2010, 08:31 PM
Hey, thanks for the quick response!

This seems like it would be a good thing to have native support. You could also include entries on the input editor.

Is there any chance it would make it into the main build?

Shadow
12-10-2010, 11:22 AM
The biggest problem with putting it into the main game is there really isn't enough room for 10 more items in the keyboard options.

robmack
12-10-2010, 02:20 PM
Yeah, I see what you mean, it would be hard to find more space.

What if you had a toggle switch above the 10 keyboard shortcuts? The default would be to display the primary 10 shortcuts, when you toggle, it shows the alternate 10?

That way most people won't notice the difference, but the few people that care can click the toggle button and then set the alternates as they wish.

I know this doesn't seem like a big deal, but I am terrible at fast click mousing, so I just want to use shortcuts. I end up limiting the number of skills I get, because I can't use more than the hotkeys, which I also need for potions.

If the gui is too much of an issue, could it be done with a modifiable hotkey file?

jeremyosborne
12-21-2010, 07:19 PM
but it does work.

What is this?

It's a packaged up copy of the game.mnu file found in the assets003.zip file delivered with the Din's Curse 1.010 patch with 20 additional lines that I've added, not including some extra white space. 10 lines are commands, 10 lines are comments. I changed nothing else compared to the original game.mnu UI file.

What does it do?

It hardcodes, as in unchangeable without changing this file, the function keys F1 through F10 as action keys for the extra item slots.

Any caveats?
Yes.


Since F1-F10 are now hard coded, I do not know if they will affect any of the "Select player" commands. It doesn't seem to cause a problem in Single player games in my tests.
If you want to change the hard coded keys, open up the file and search for the string "Jeremy:" without the quotes.
For the hotkeys to work, you have to have the extra item slots visible. I couldn't figure out an addCommand way to make the extra slots work when they were hidden.
There's no pretty text showing that the extra hot keys are F1-F10 when the extra use slot tab is open.


How do I install this?


Download the attached zip file.
Go to your Din's Curse install folder.
Drop the zip file into the Assets folder.


Please consider this a stop gap, merely an experiment to see if I could tie a command to the extra slots. Use at your own risk, but my guess is if you use this, you probably know what you're doing.

When I'm done with this, how do I uninstall it?

Delete the zip file form your assets folder.

benloran
02-24-2011, 08:10 PM
Today, I've been trying to make a mod to be able to map the Extra Bar slots to hotkeys, using the in-game keyboard configuration menu (I had to rearrange it a bit and it is definitely crowded, but it all fits... see attachment if you're curious). I've actually got everything working, but one of the things I had to do was add lines for the extra slots into User/default.cfg, like so:

VirtualKey UseSlot11 "keypad 1"
VirtualKey UseSlot12 "keypad 2"
etc.

What I haven't been able to figure out, and would very much like to know, is if there's a way to define those extra VirtualKey entries without having to modify the default.cfg, since default.cfg lives outside of the Assets directory? I've tried guessing about 20 different commands to create these definitions through an "addShowCommand" line in game.mnu, but have had no luck so far.

benloran
02-26-2011, 04:52 AM
I've made a little progress. I was able to avoid rearranging the Keyboard Configuration menu by adding a "More" button (using mergeWith) and creating a second Keyboard Configuration menu with the new keys.

However, I'm still having to resort to doing two things that I'd rather avoid:

1. I can't use mergeWith to add the hotkey definitions to the UseSlot entries in game.mnu, so I have to include a replacement game.mnu in the mod. I think that I could avoid this if the original game.mnu assigned names to the UseSlots, which would allow me to use mergeWith and add the hotkeys. Is that correct? Is there any other way around this?

2. I still have to go into User/default.cfg and add the VirtualKey UseSlotXX lines manually, which I really don't like having to do. Is there any way to add new default VirtualKey entries through the SDK?

I've been having fun trying to get these mods working, hopefully there are yet some solutions to be had.

Crisses
02-26-2011, 09:16 AM
I wish I could help...I was able to create the plugin for the Dvorak keyboard layout ( which Shadow merged into a release) but this is entirely different.... But thanks for doing this!!!

Shadow
02-28-2011, 02:22 PM
I'm not positive this will work with the use slots but you might be able to use mergeWith by adding completely new slots, keep everything the same, but change the drawOrder to be higher so that they draw on top of the old ones.

I don't think there is a work around for the proper VirtualKey stuff right now, although that's something that I should probably add support for eventually. You should be able to hardcode the hotkeys in the mnu file though instead of using a configurable hotkey.

benloran
02-28-2011, 04:52 PM
I'm not positive this will work with the use slots but you might be able to use mergeWith by adding completely new slots, keep everything the same, but change the drawOrder to be higher so that they draw on top of the old ones.

Excellent, thank you! That appears to be working! Which is great because it reduces the potential of breaking the mod when the game updates.

I don't think there is a work around for the proper VirtualKey stuff right now, although that's something that I should probably add support for eventually. You should be able to hardcode the hotkeys in the mnu file though instead of using a configurable hotkey.

Well, having the hotkeys configurable is the whole point of the mod! :) (since the mellowUI mod already has hardcoded hotkeys for the extra bar slots)... Thanks for the response, though, and I'll keep an eye out for any VirtualKey support through the API in the future.

If anyone would like to give it a try, I've attached the mod to this post. Just put it in the Din's Curse/Expansions/Demon War/Assets directory. Additionally, you need to edit Din's Curse/User/default.cfg and add these lines at the bottom (the Configure Input menu will not allow you to assign keybindings unless you do so):

VirtualKey UseSlot11 "numpad 1"
VirtualKey UseSlot12 "numpad 2"
VirtualKey UseSlot13 "numpad 3"
VirtualKey UseSlot14 "numpad 4"
VirtualKey UseSlot15 "numpad 5"
VirtualKey UseSlot16 "numpad 6"
VirtualKey UseSlot17 "numpad 7"
VirtualKey UseSlot18 "numpad 8"
VirtualKey UseSlot19 "numpad 9"
VirtualKey UseSlot20 "numpad 0"

You can change the keybindings in-game, but the defaults need to be there so just leave them as the numpad keys in that file (so that they don't conflict with any of the other defaults).

To change the keys in-game, go to the Configure Input option menu, and hit the little "More" button in the lower right corner. You should then see Use Slot 11-20 available to configure. The bindings will only work when the extra bar is visible on screen in the game.

Due to the fact that the default.cfg needs to be modified, it's possible that this mod will break after a game update patch. If that happens, probably all that is needed is to go into the default.cfg and add those lines again.

Thanks also to jeremyosborne's mellowUI mods. I learned a lot from them and this mod treads a little bit on mellowUI's territory, so I hope that's alright.