[RELz] Enhanced Hotkeys

Post » Wed Jan 19, 2011 1:32 am

========= Enhanced Hotkeys 1.3 ============

Author: Ole B?e, a.k.a. TheNiceOne
Date: Oct 07, 2010
OBSE v 18 (or newer) required.
http://www.tesnexus.com/downloads/file.php?id=32200 v 3 (or newer) required for Wheel HUD icon.

Download: http://www.tesnexus.com/downloads/file.php?id=34735


========= Enhances hotkey functionality by giving you more and better hotkeys!

* Assign items to 30 hotkeys, with up to 4 wheels for a total of up to 120 hotkeys!
* Allows auto-casting of spells. Cast one or more spells by tapping a hotkey, without changing your current spell.
* Assign more than one item to the same hotkey, for cycling through the items, or casting them all at the same time (if spells).
* All hotkeys and their bound items can be viewed and easily changed.
* Will equip all arrows of a type if bound to a hotkey.
* Improved User Interface.


========= More hotkeys

The hotkey wheel has been increased to 3 x 10 visible keys. See them in the wheel, and add/use them like any other hotkey.
The 3 x 10 visible keys (you see 10 at a time) are:
1: Keys 0-9
2: Letters YUIOPGHJKL (the rightmost 5 of the two upper rows in a English keyboard).
3: Numpad 0-9

You can disable any of those 3 sets you don't want to use for hotkeys in the ini file.

When in the Inventory/Magic menu, tapping any of the hotkeys will open up a wheel displaying the 10 keys for that set, with the key you pressed being selected. The wheel then stays open until you tap the key for the selected hotkey again.

Switch selected hotkey by either tapping a new hotkey button, or by mouse clicking on the new hotkey's icon. Tapping a hotkey for one of the other 2 sets will make the wheel display the 10 keys for that set instead.


========= Multiple wheels:

Enhanced Hotkey supports up to 4 different wheels, controlled by configurable wheel selector keys. The wheel can be set to be sticky (you switch wheels by tapping the wheel-selector key), or non-sticky (you hold down the specific wheel-selector key for that wheel when tapping the hotkey).

If having sticky wheels, a Wheel icon in the HUD can display the active wheel number. The wheel icon is fully configurable in the ini, including its size, position, opaqueness and how long it is displayed after a wheel switch. MenuQue v 3 (or newer) is required for the Wheel HUD icon.

When the wheel is open in the Inventory/Magic menu, the active wheel number is displayed in the top right area of the wheel (between hotkey 1 and 2). Click on that wheel display to switch wheel.


========= Multiple items bound to one hotkey

When the wheel is open, you can add more items to one hotkey by holding down left Ctrl (configurable) when mouse clicking on an item in the Inventory/Spell menu. The text above the hotkey wheel will display hotkey mode, the name of the last added item and the number of items added to the hotkey.

You can remove an item from a hotkey by holding down left Alt (configurable) when clicking on the item in the Inventory/Spell menu. Clicking on an item in the Invnetory/Magic menu without holding down Ctrl or Alt, will replace all the content of that hotkey with the item you clicked on.

To view which items that are bound to a hotkey, hold down left Ctrl (configurable) and click on the hotkey's item icon. The icon will then switch to the one for the next item bound to the hotkey, and the text above the wheel will display that item's name and its position in the hotkey. Repeat this to cycle through all items in the hotkey. This has no ingame effect, but is simply a way to easily see the multiple items bound to the key, and their order.


========= Different hotkey modes

A hotkey can have one of several modes. To switch mode for a hotkey, click on the hotkey's icon. That will make the hotkey switch between the different hotkey modes, but only the modes that are applicable for the items bound to that hotkey. The following modes are applicable:
* Normal: Single item of any type
* Auto cast: Single spell/scroll
* Cycler (all three types): Multiple items of any type
* Multi cast: Multiple spells/scrolls

If a hotkey is set to any mode other than normal, its inner section of the wheel will display a letter indicating the mode, followed by the number of items (if more than one), and the text above the hotkey wheel will display mode the mode and number of items as well.

The functionality of the different modes are:
* Normal: As an unmodded hotkey, with two exceptions:
- - An item you no longer possess will not be removed from the hotkey. Instead, the hotkey icon will be dimmed, making it easy to see that the hotkey cannot currently be used. So if you have bound your repair hammers to a hotkey and then break all repair hammers, the hotkey will start work again as soon as you acquire new repair hammers.
- - Arrows bound to a hotkey will equip all arrows of that type and not only one when the key is used.

* Auto cast: Will switch to that spell, cast it, and then instantly switch back to your old spell. In effect cast the spell without making it active. If the item is a scroll, that scroll is selected, then cast.

* Multi cast: Same as Auto cast, but will cast multiple spells/scrolls in the set's order by one tap of the hotkey.

* Cycler: Will select one item/spell in the set, and activate that. Which item that is selected is dependent on Cycler mode (see below).


========= Cycler hotkeys

When multiple items are added to one single hotkey, the hotkey becomes a cycler hotkey.

Default cycle mode is (auto) Cycle. Click on the hotkey's icon to switch between three cycler modes. When you do that, the inner section of the wheel will display either C#, L# or N# (where # being the number of items) to indicate cycler mode for that hotkey. The functionality of the cycler modes are:

* Cycler (auto): If an item in the cycler is currently active (equipped item or selected spell), the next after that will be selected. If none are active, the first will be selected.
* Cycler-Last: If an item in the cycler is currently active (equipped item or selected spell), the next after that will be selected. If none are active, the last activated by the hotkey will be activated again.
* Cycler-Next: The last activated item by the hotkey is remembered, and the next after that will be selected, regardless of whether any is currently active.

Note that since Cycler (auto) and Cycler-Last looks for currently equipped item/active spell in order to determine which item to cycle to, they will probably not function as you intend if you add non-equippable non-spell items to them. Cycler-Next has no such restriciton.

When the wheel is open in the Inventory/Spell menu, hold down left Ctrl (configurable) and click on the hotkey icon, to cycle between the different items bound to that hotkey. This has no effect on the hotkey or the order of the items, but it will let you easily see the items bound to that key. The item you currently view is the item that will be affected by the Delete or Move item functions (see Hotkey command buttons below).


========= Auto cast hotkeys

If a single spell or scroll is bound to a hotkey, clicking on that hotkey icon will toggle the hotkey between Normal and Auto cast. If a hotkey is Auto cast, tapping the hotkey button will cast the spell/scroll without changing your active spell. The inner section of the wheel will display "A" for Auto cast hotkeys.

You can also use auto cast for multiple spells/scrolls bound to the same hotkey. Add the spells/scrolls to the same hotkey as for cyclers. When switching cycler mode, if all the items bound to a hotkey are spells, a fourth mode will be available: Multi Cast. The inner section of the wheel will display "M#" for a Multi Cast key. When the hotkey is tapped during gameplay, all the spells bound to the key will be cast in turn, without changing your active spell.

If one spell in a Multi Cast cannot be cast (not enough mana, too high level) that spell is simply bypassed, going to the next on the list, etc.

You can bind multiple instances of the same spell to a Multi Cast key. Adding the same Healing spell 3 times, will make you cast that spell 3 times by a single tap of the hotkey.


========= Hotkey command buttons

In the top left and right area of the wheel (between number 0 & 1, and 1 & 2), there are a number of hotkey command buttons. On the right is the wheel switcher button explained above (that lets you switch wheel while it is open). On the left are three buttons:

* Delete item: x
Will delete the viewed item of the selected hotkey. So if you have a cycler hotkey with 1. Sword, 2. Bow, 3. Staff, and the Bow is viewed, clicking on the Delete item button once will make the order 1. Sword, 2. Staff. If the item only has one item, the hotkey will be cleared.
The Delete item button is visible if the selected hotkey has one or more items.

* Move item: <
Will move the viewed item of the selected cycler/multi cast hotkey one position earlier in the group. So if you have a cycler hotkey with 1. Sword, 2. Bow, 3. Staff, and the Staff is viewed, clicking on the Move item button once will make the order 1. Sword, 2. Staff, 3. Bow.
The Move item button is only visible if the viewed item is not the first item in its hotkey group.

* Undo last change: <-
Clicking on the undo button will undo the last change to a hotkey, but only as long as the current key set of the current wheel has not been changed/closed. Any single Add/Delete item, Change mode or Move item change can be undone - and the Undo change can be Undone as well. So multiple clicking will toggle the last change on/off.
The Undo button is only visible if having done a change after opening the wheel or changing wheel/keyset.


========= COMPATIBILITY

Enhanced Hotkeys is compatible with all User Interface mods. Just ensure that Enhanced Hotkey's version of quickkeys_menu.xml overwrites any installed by Darnified UI or other UI mods.
Enhanced Hotkeys is also compatible with mods that use one or more of the hotkeys for other purposes. Just don't assign any item to that hotkey button, and the other mod will work as normal - or just disable one of the 3 key sets in the ini.
Enhanced Hotkeys does not use Oblivion.esm as master and is fully compatible with Nehrim and other total conversion mods.

Enhanced Hotkeys is NOT compatible with any other hotkey mod, but should be fully compatible with mods that adds (clutter) items that work similar to hotkeys. If you want gear hotkeys, install Fast Equipping and assign its gear clutter items to hotkeys.

Partial incompatibility with Supreme Magicka has been reported. SM has special handling of Summon spells, so if you bind summon spells to Auto Cast/Multi Cast keys when using SM, it causes lockup for some players. If this happens with SM installed, avoid binding Summon spells to Auto Cast/Multi cast hotkeys.

Partial incompatibility with Audacious Magery has been reported. If using Auto Cast/Multi Cast spells, AM may not be fast enough, and think that wrong spell is cast, and make incorrect decision about spell penalties.


========= (UN-)INSTALLATION

The mod is OMOD-ready, so installing with OBMM will ensure that you get correct setup. It should also be BAIN friendly, so using OBMM or BAIN is adviced. For manual install, extract the archive, and copy Enhanced Hotkeys.esp and the three folders except "omod conversion data" to your Oblivion/Data folder.

If un-installing Enhanced Hotkeys, one special step must be taken afterwards: The keyboard buttons bound to the 8 standard hotkeys must be re-assigned to keyboard buttons 1-8. To do so, download the EH Uninstallation zip file and unzip the contents (one txt file without any .txt tag, named EHuninstall) to your Oblivion (not Oblivion/data) folder.

Then, after having disabled Enhanced Hotkeys.esp, start up your game, open the console and type RunBatchScript EHuninstall. This will re-adjust your hotkeys back to 1-8, and you can delete the EHuninstall file afterwards.


========= CREDITS

The OBSE team for OBSE - an absolutely necessary tool for this mod
kyoma for MenuQue, a powerful OBSE plugin for handling menu/hud elements
shadeMe for ConScribe, which is just necessary when debugging
skyranger-1 for Super Hotkeys, which was my main inspiration


========= CHANGELOG

1.3
* Added possibility of seeing hotkey wheel in gamemode (hold down a hotkey)
* Scrolls can now be bound to Auto cast / Multi cast keys
* Added option of whether to see Cast messages when using Auto cast or Multi cast
* Removed incorrect icon from cast message (now always displays standard Oblivion icon)
* Changed code to allow more keys as wheel modifier keys (numeric keys, etc.)
* Changed how waiting for each individual multi-cast spell work. This should fix multi-cast problem for some users

1.2
* Added buttons for Delete (item from hotkey), Move (item earlier in Cycler/Multi cast group) and Undo (last hotkey change)
* Numpad keys can now be used as non-sticky wheel selector keys (they could be used for sticky already).
* The Wheel HUD icon is changed to use MenuQue for its display. This fixes the Streamline incompatibility
* Fixed OBMM installation script

1.1
* The wheel number will now be displayed when the wheel is open. You can also change wheel without closing it, by clicking on the wheel number display.
* A new wheel number icon can be displayed in the HUD if sticky wheels are enabled.
* There is now an option to not display any message when weapon/arrows/armor/clothing is (un)equipped using a hotkey. If the message is displayed, equipping arrows will display the number of arrows equipped in addition to their name, and selecting a spell will display its name.
* There is an option for setting the position of the open wheel.
* The message saying "Cast " when Auto/Multi Casting spells will now use the normal Oblivion icon.
* Fixed one OMOD installation script bug

1.0
* Addition of 10 letters and 10 numpad keys as fully functioning hotkeys.
* Reduced the number of wheels from 6 to 4.
* Changed behaviour of sticky wheels. You now use one key to cycle between all the wheels.
* Switched default modifier keys for hotkey mode switching (now only a click) and icon cycling (now ctrl-click)
* Various bugfixes and improvements. Most important was that the one that would make the mod stop working if trying to use a Cycler-Last hotkey.
* Added Omod installation script

0.9.5
* Various bugfixes. Most important was that the mod could stop working, especially if using key 8. This is hopefully fixed now.
* Added Multi-cast option. Now you can cast multiple spells with one key.
* The icon for equipments not in your inventory will now be dimmed.

0.9
* Initial version
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Wed Jan 19, 2011 7:53 am

Nice! i opened the forums and this is the first thing i see! DLing now. thanks TN1! that was fast. :goodjob:
User avatar
Kelly Tomlinson
 
Posts: 3503
Joined: Sat Jul 08, 2006 11:57 pm

Post » Wed Jan 19, 2011 3:39 pm

Thanks to all for the input and ideas, and thanks to kyoma (as usual) for providing me with an xml detail (as usual) :)


I will re-visit the http://www.gamesas.com/index.php?/topic/1116963-wipz-yet-another-hotkey-mod/ for more ideas later, but wanted to get a first version out now...
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Wed Jan 19, 2011 5:34 am

========= Auto cast hotkeys

If a single spell is bound to a hotkey, hold down the Ctrl key (configurable) when clicking on that hotkey icon. This will toggle the hotkey between Normal and Auto cast. If a hotkey is Auto cast, clicking on the hotkey will cast the spell (if you have enough mana), but not change your active spell. The hotkey will display "A" on the inside of the wheel for Auto cast keys.


Does this mean that you can't use it as Auto-Cast in Super Hotkeys, e.g. to bind a sequence of spells that are automatically cast with a hot key? That's one of my favorite features with Super Hotkeys.

Anyway, thanks for the release! :foodndrink:
User avatar
CHARLODDE
 
Posts: 3408
Joined: Mon Apr 23, 2007 5:33 pm

Post » Wed Jan 19, 2011 4:41 pm

Does this mean that you can't use it as Auto-Cast in Super Hotkeys, e.g. to bind a sequence of spells that are automatically cast with a hot key? That's one of my favorite features with Super Hotkeys.
The auto-cast key only supports one single spell for now. But increasing to multiple spells is among the top ideas for the to-do list.

Anyway, thanks for the release! :foodndrink:
Thanks :)
User avatar
Nims
 
Posts: 3352
Joined: Thu Jun 07, 2007 3:29 pm

Post » Wed Jan 19, 2011 1:03 pm

I just noticed that I had erroneously added an older .ini file to the top level of the archive. Don't use that one, but the one within the Ini folder. :banghead:
User avatar
Nana Samboy
 
Posts: 3424
Joined: Thu Sep 14, 2006 4:29 pm

Post » Wed Jan 19, 2011 5:03 pm

When the wheel is open in the Inventory/Spell menu, number keys are sticky, so you don't need to keep the number key pressed while selecting items. You can switch selected key while the wheel is open, by either clicking on a hotkey in the wheel or by pressing the number on your keyboard. You close the wheel by pressing the selected key again (or by exiting Inventory/Spell menus).

This is worth it for hotheys #9 and #0 alone.

That said, I've always had a problem with many OBSE mods. Often, extra keys work poorly or not at all. It's the same in this case, and the mod is last in my load order so nothing else should be interfering. I went with the default ini file too.

To give an example:-

I can bring up the new wheel just fine (with say key 1 or key 0). I can select items for the slots. I can click on a slot to change it. However, once the wheel is open, pressing a new number, say 6 does nothing. Clicking on slot 6 selects it. Pressing a number again does not close the wheel. I can close the wheel only by quiting the inventory. Can't seem to select any other wheel either which is a shame.

Very similar with your map mod by the way. Can't use the M key.

I've tried with mod free setups and varied load orders. The only thing I can think of is that my O/S is Win2000. Could this be the issue?

Superb work as usual though.
User avatar
Joe Alvarado
 
Posts: 3467
Joined: Sat Nov 24, 2007 11:13 pm

Post » Wed Jan 19, 2011 9:27 am

Trying it out right now! :) So far looking good, but two things I noticed. The text in the upper left corner is cut off (probably fixed by removing the tag for that element).

Another thing is that this text seems to display the last used info. Or something similar. When I press another hotkey it briefly displays Hotkey x.. but then immediately goes back to whatever item or spell was most recently added/selected (to whatever hotkey). When the QuickKeys menu has been closed and reopened it seems to always display Hotkey 8 (still flashing the correct hotkey when it is pressed though).

P.S. This flashing of which hotkey is selected doesn't work at all for both 9 and 0. Just the, presumable, Hotkey 9 and Hotkey 0 text, when binding something to them it displays the proper text.

[edit]Oh and it seems you sometimes display the wrong icon for multi-effect spells.[/edit]

-kyoma
User avatar
DAVId MArtInez
 
Posts: 3410
Joined: Fri Aug 10, 2007 1:16 am

Post » Wed Jan 19, 2011 12:34 pm

I can bring up the new wheel just fine (with say key 1 or key 0). I can select items for the slots. I can click on a slot to change it. However, once the wheel is open, pressing a new number, say 6 does nothing. Clicking on slot 6 selects it. Pressing a number again does not close the wheel. I can close the wheel only by quiting the inventory. Can't seem to select any other wheel either which is a shame.

Very similar with your map mod by the way. Can't use the M key.

I've tried with mod free setups and varied load orders. The only thing I can think of is that my O/S is Win2000. Could this be the issue?
I really have no idea. But it seems that OBSE key functions just doesn't work in your setup...



Trying it out right now! :) So far looking good, but two things I noticed. The text in the upper left corner is cut off (probably fixed by removing the tag for that element).
That text was supposed to be completely hidden. So ignore it, it will not be there in the next version (I was smart labeling this 0.9, and not 1.0 :) )

If you ignore that text, is there any other problem with the keys, etc.?

[edit]Oh and it seems you sometimes display the wrong icon for multi-effect spells.[/edit]
Hm, yes, that may be. Do you know how I can retreive the correct one? What I do to find the right icon, is:

		let mc := GetNthEffectItemCode object 0 		let s1 := GetMagicEffectIconC mc 
...where s1 then holds the path to the icon. I must admit that I didn't investigate this much. Do you know of a better way to find the icon?
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Wed Jan 19, 2011 7:11 am

I really have no idea. But it seems that OBSE key functions just doesn't work in your setup...

Well, it does sort of. Some extra keys work. For example, the 9 and 0 keys work just fine.
OK, thanks, I'll have to keep digging.
User avatar
latrina
 
Posts: 3440
Joined: Mon Aug 20, 2007 4:31 pm

Post » Wed Jan 19, 2011 3:41 pm

That text was supposed to be completely hidden. So ignore it, it will not be there in the next version (I was smart labeling this 0.9, and not 1.0 :) )

If you ignore that text, is there any other problem with the keys, etc.?
Apart from that text everything works like it should. :)

Hm, yes, that may be. Do you know how I can retreive the correct one? What I do to find the right icon, is:

		let mc := GetNthEffectItemCode object 0 		let s1 := GetMagicEffectIconC mc 
...where s1 then holds the path to the icon. I must admit that I didn't investigate this much. Do you know of a better way to find the icon?
Well I got some old code laying around for getting the spell's school (it's rather complicated when dealing with scripted effects) but I may have a better idea. Why not grab the item's or spell's icon right from the active element?
User avatar
Darlene Delk
 
Posts: 3413
Joined: Mon Aug 27, 2007 3:48 am

Post » Wed Jan 19, 2011 6:50 pm

The auto-cast key only supports one single spell for now. But increasing to multiple spells is among the top ideas for the to-do list.


Thanks. I'll wait until it's implemented before I'll switch to this. :)

Also, I second this:

All of the previous posts cover all of the annoyances of Super Hotkeys except for one: long OnEquip messages when using item cyclers and especially gear-style hotkeys. This gets bothersome when they crowd out more important messages, due to the imperfect way Oblivion handles messages. It would be great if cyclers can be renamed, have very short names, or even removed entirely.


I've been meaning to check out how to shorten the display time of messages because of this, but it would of course be better if it's addressed in the mod instead if possible.
User avatar
Irmacuba
 
Posts: 3531
Joined: Sat Mar 31, 2007 2:54 am

Post » Wed Jan 19, 2011 5:39 am

Another nice one :P 8 keys are not enough for mages.
User avatar
ijohnnny
 
Posts: 3412
Joined: Sun Oct 22, 2006 12:15 am

Post » Wed Jan 19, 2011 6:55 am

I just came across what I think is a bug. My hotkeys stopped working and in the console it kept spamming EH:1, sometimes interrupted by EH:Clear hotkeys. I'm not sure when this happened so I can't really say what I was doing. I'll keep an eye out for it in the future.

Oh and the problem went away after a reload.
User avatar
Judy Lynch
 
Posts: 3504
Joined: Fri Oct 20, 2006 8:31 am

Post » Wed Jan 19, 2011 11:40 am

First of all great work, thanks! You were right about the cycling keys, I've made good use of them already.

I have a problem with hotkey 8. Items I assign to that hotkey immediately unequip themselves after I equip them with the hotkey or vice versa (if already equipped they immediately equip again if I unequip them by using the hotkey). This only happens with hotkey 8.

I can confirm that the message in the upper left corner is cut off.

There is also a tiny mistake in the ini file documentation:

; Set modifier key used for deleting an item from a hotkey, by clicking on the item in the inventory/spell lists; Default left alt (29)set tnoEH.delKey to 56


EDIT: Also, would it be possible to add a 'remove' key? Sometimes I have an item in a slot that I don't have/need anymore and nothing to replace it with. The icon still shows up then. Would be great if I could clean a hotkey completely (no icon/nothing bound to hotkey). Or did I miss something and this is already possible?
User avatar
Jessica Stokes
 
Posts: 3315
Joined: Fri Jul 28, 2006 11:01 am

Post » Wed Jan 19, 2011 5:25 pm

Apart from that text everything works like it should. :)

Well I got some old code laying around for getting the spell's school (it's rather complicated when dealing with scripted effects) but I may have a better idea. Why not grab the item's or spell's icon right from the active element?
Because I don't necessarily bind the items to any hotkey for real. It is possible, but a bit more complicated, so I rather nor.


I just came across what I think is a bug. My hotkeys stopped working and in the console it kept spamming EH:1, sometimes interrupted by EH:Clear hotkeys. I'm not sure when this happened so I can't really say what I was doing. I'll keep an eye out for it in the future.

Oh and the problem went away after a reload.
Thanks. I am working on it. Please keep debug set to 2 in the ini for maximum debug spam :)



First of all great work, thanks! You were right about the cycling keys, I've made good use of them already.

Good to hear :)

I have a problem with hotkey 8. Items I assign to that hotkey immediately unequip themselves after I equip them with the hotkey or vice versa (if already equipped they immediately equip again if I unequip them by using the hotkey). This only happens with hotkey 8.
Thanks, and you are completely right. The items are not really bound to hotkeys until you press a key, and then the right item becomes temporarily bound to key 8, and that key is tapped - and if that is the real pressed key, something goes wrong. I am working on it.


There is also a tiny mistake in the ini file documentation:

; Set modifier key used for deleting an item from a hotkey, by clicking on the item in the inventory/spell lists; Default left alt (29)set tnoEH.delKey to 56
Will be fixed.

EDIT: Also, would it be possible to add a 'remove' key? Sometimes I have an item in a slot that I don't have/need anymore and nothing to replace it with. The icon still shows up then. Would be great if I could clean a hotkey completely (no icon/nothing bound to hotkey). Or did I miss something and this is already possible?
It is already possible. By holding down Alt (configurable in the ini) when clicking on an item in the inventory/magic menu, that item gets removed from the selected key (assuming it is bound of course).

As you may have noticed, items don't get removed from a key even if you drop the item. I always found it irritating that if I used my last repair hammer, that key was lost.
User avatar
cosmo valerga
 
Posts: 3477
Joined: Sat Oct 13, 2007 10:21 am

Post » Wed Jan 19, 2011 12:58 pm

Because I don't necessarily bind the items to any hotkey for real. It is possible, but a bit more complicated, so I rather nor.
Ah yes, hadn't thought of that. Well I'm 90% sure the spell icon is derived from the most expensive effect so something like this might work:
let highest_effect := 0let highest_cost := -1let effects := GetMagicItemEffectCount rSpellWhile effects > 0	let effects -= 1	RemoveAllEffectItems 	CopyNthEffectItem rSpell  effects	if GetSpellMagickaCost  >= highest_cost		let highest_cost := GetSpellMagickaCost 		let highest_effect := GetNthEffectItemCode rSpell effects	endifLoop;Then just use GetTexturePath with the magic effect code

User avatar
cutiecute
 
Posts: 3432
Joined: Wed Sep 27, 2006 9:51 am

Post » Wed Jan 19, 2011 12:31 pm

In your introductory post, you say "enhanced ecomomy" under compatibility and installation. I take it you mean enhanced hotkeys :) I guess you copied this from your other mod? See, we do read your readme's and posts!
User avatar
:)Colleenn
 
Posts: 3461
Joined: Thu Aug 31, 2006 9:03 am

Post » Wed Jan 19, 2011 5:06 am

From Kyoma's comments, then this won't be compatible with http://www.tesnexus.com/downloads/file.php?id=26196? Or am I misunderstanding things?
User avatar
NIloufar Emporio
 
Posts: 3366
Joined: Tue Dec 19, 2006 6:18 pm

Post » Wed Jan 19, 2011 9:30 pm

It is already possible. By holding down Alt (configurable in the ini) when clicking on an item in the inventory/magic menu, that item gets removed from the selected key (assuming it is bound of course).

As you may have noticed, items don't get removed from a key even if you drop the item. I always found it irritating that if I used my last repair hammer, that key was lost.


Unfortunately it's only possible if you still have the item. Of course I could just add a different item and remove it directly, so I guess if you ever intend to make a different approach for this it would be last on your list.

Good idea that the items don't get removed automatically (never bound repair hammers to a hotkey since I often run out of them and it's more work to reassign the key constantly than to open the inventory), but maybe you could limit it to consumable items like potions, arrows, torches, repair hammers, scrolls etc. For regular equipment (weapons/armor/clothing items) it might be better if the item was removed imo. Can be a bit confusing if you have lots of hotkeys and items and for example sell old equipment before binding the new equipment to a key.

EDIT: Or even better, you could make a switch so the player can choose which items he wants to keep in the hotkey menu no matter what and which ones should be removed upon depletion/removal (default would be the item is deleted from the hotkey, with a modifier key you could set the item to stay in the menu even if the player has none in his inventory).
User avatar
Casey
 
Posts: 3376
Joined: Mon Nov 12, 2007 8:38 am

Post » Wed Jan 19, 2011 5:24 pm

Ah yes, hadn't thought of that. Well I'm 90% sure the spell icon is derived from the most expensive effect so something like this might work:
...

Thanks. I will try that :)


From Kyoma's comments, then this won't be compatible with http://www.tesnexus.com/downloads/file.php?id=26196? Or am I misunderstanding things?
I haven't looked into that mod yet, but since I determine the right icon "manually" in my code, it will definitely be possible to check for that mod and retreive icons in another way then - unless the code kyoma provided worked directly.


Unfortunately it's only possible if you still have the item. Of course I could just add a different item and remove it directly, so I guess if you ever intend to make a different approach for this it would be last on your list.
No, I was actually considering adding a new click modifier - when you hold it down and click on a hotkey, you clear the hotkey directly. It will require 5 lines of code or so, so I will get that in.

Good idea that the items don't get removed automatically (never bound repair hammers to a hotkey since I often run out of them and it's more work to reassign the key constantly than to open the inventory), but maybe you could limit it to consumable items like potions, arrows, torches, repair hammers, scrolls etc. For regular equipment (weapons/armor/clothing items) it might be better if the item was removed imo. Can be a bit confusing if you have lots of hotkeys and items and for example sell old equipment before binding the new equipment to a key.
Good point. I was considering to make the icon less visible if the item is not currently possessed, giving a clear visual indication. With that I don't think I need to limit it.

EDIT: Or even better, you could make a switch so the player can choose which items he wants to keep in the hotkey menu no matter what and which ones should be removed upon depletion/removal (default would be the item is deleted from the hotkey, with a modifier key you could set the item to stay in the menu even if the player has none in his inventory).
A good idea. I'll consider it :)
User avatar
Samantha Pattison
 
Posts: 3407
Joined: Sat Oct 28, 2006 8:19 pm

Post » Wed Jan 19, 2011 6:54 am

Wow, already a release? Nice! Thank you! :foodndrink:
User avatar
Ricky Rayner
 
Posts: 3339
Joined: Fri Jul 13, 2007 2:13 am

Post » Wed Jan 19, 2011 12:22 pm

I was considering to make the icon less visible if the item is not currently possessed, giving a clear visual indication. With that I don't think I need to limit it.


If you could do that it would certainly be a nice feature.

Another bug report - I equipped a ring via hotkey 9 (EDIT: Most likely I equipped a repair hammer with hotkey 8 after equipping the ring and forgot about it :P) and suddenly all of my hotkeys stopped working. Had debug mode set to 1, couldn't see anything special in the console. Had to reload to fix the issue (no need for a game restart, but fiddling with the hotkeys etc didn't help).

I also see an 'E' in the upper right corner of the screen (in game mode and menu mode) sometimes when I reload a save game. It disappears as soon as I access the hotkey menu or use a hotkey. It is in the position where the name of the item is displayed above the hotkey wheel.

EDIT: My hotkeys now stop working whenever I access the repair menu via hotkey. Only reloading fixes it. The 'E' I see is the same 'E' that shows when I hold a hotkey (hotkey menu appears and 'E' is where the name of the item would be).

EDIT2: After setting debug text to 2 I can say that I have the same problem Kyoma reported. After accessing the repair menu the console spams EH:1 and hotkeys stop working.

EDIT3: Seems like it has something to do with the mysterious hotkey number 8. When I put an item that brings up a menu (like a filled soulgem or a repair hammer) on slot 8 and equip it the hotkeys all stop working and the EH:1 spam starts. Other objects just do the equip/unequip stuff I mentioned before. If I put the menu items on a different slot everything works fine.
User avatar
Robert Devlin
 
Posts: 3521
Joined: Mon Jul 23, 2007 2:19 pm

Post » Wed Jan 19, 2011 2:34 pm

I now have everything working. (I also now see the cursive E by the way.)

As I knew is was looking for issues with IsKeyPressed, it wasn't too hard to track down.
From http://cs.elderscrolls.com/constwiki/index.php/IsKeyPressed
This function won't work correctly under Windows 2000 unless the .ini setting bBackground Keyboard:Controls is set to 1. You can use con_SetINISetting to do this (make sure to set it whenever the game is loaded).

Seems to make it all work just fine. No observable performance effect on my game yet.

The reason I've had inconsistency might be explained by this:-

Deprecated from OBSE v0013: replaced by IsKeyPressed3 which uses the DX scan codes like the other input functions.

So I guess scripts that used IsKeyPressed3 were the ones that worked OK for me.

Once again. excellent work. A keeper I think!
User avatar
sam
 
Posts: 3386
Joined: Sat Jan 27, 2007 2:44 pm

Post » Wed Jan 19, 2011 7:12 pm

Enhanced Hotkeys 0.9.5 is out.

Still a beta, but should be quite much more stable :)

Special thanks to Phitt and Kyoma for testing and bug reports.


From the changelog:
* Various bugfixes. Most important was that the mod could stop working, especially if using key 8. This is hopefully fixed now.
I have hopefully catched most of the bugs, and at least the known ones. Hotkey 8 should now work just as well as the others.

* Added Multi-cast option. Now you can cast multiple spells with one key.
You select this mode just as you toggle between cycle modes. Only available if all items bound to one key are spells.

* The icon for equipments not in your inventory will now be dimmed.
Will make it easy to see if a hotkey is currently unusable.


Thanks. I'll wait until it's implemented before I'll switch to this. :)
You can try it out now. It is implemented in 0.9.5 :)


If you could do that it would certainly be a nice feature.
You can try it out now :)

Another bug report - I equipped a ring via hotkey 9 (EDIT: Most likely I equipped a repair hammer with hotkey 8 after equipping the ring and forgot about it :P) and suddenly all of my hotkeys stopped working. Had debug mode set to 1, couldn't see anything special in the console. Had to reload to fix the issue (no need for a game restart, but fiddling with the hotkeys etc didn't help).
Try out the new version. I hope it works much better now.

I also see an 'E' in the upper right corner of the screen (in game mode and menu mode) sometimes when I reload a save game. It disappears as soon as I access the hotkey menu or use a hotkey. It is in the position where the name of the item is displayed above the hotkey wheel.
Thanks for reporting. This is fixed in 0.9.5.

EDIT: My hotkeys now stop working whenever I access the repair menu via hotkey. Only reloading fixes it. The 'E' I see is the same 'E' that shows when I hold a hotkey (hotkey menu appears and 'E' is where the name of the item would be).

EDIT2: After setting debug text to 2 I can say that I have the same problem Kyoma reported. After accessing the repair menu the console spams EH:1 and hotkeys stop working.

EDIT3: Seems like it has something to do with the mysterious hotkey number 8. When I put an item that brings up a menu (like a filled soulgem or a repair hammer) on slot 8 and equip it the hotkeys all stop working and the EH:1 spam starts. Other objects just do the equip/unequip stuff I mentioned before. If I put the menu items on a different slot everything works fine.
Thanks for all the reports. Please see if 0.9.5 fixes it.



I now have everything working. (I also now see the cursive E by the way.)
Good to hear about the workaround for OBSE key functions :)


Once again. excellent work. A keeper I think!
Thanks :)
User avatar
Mrs. Patton
 
Posts: 3418
Joined: Fri Jan 26, 2007 8:00 am

Next

Return to IV - Oblivion