DougHamil / DragonbornSpeaksNaturally

SkyrimVR mod for dialogue and other voice control
MIT License
20 stars 21 forks source link

Simple equip #6

Closed Odie closed 6 years ago

Odie commented 6 years ago

Howdy!

This is a collection of commits aimed at simplifying equipping items from the favorites menu. It's been working very well for my VR playthrough for the past few days.

Usage examples

Details

1) Clean items names of tags/symbols introduced by VIS This makes switching to these tagged items actually possible. As an example, the a spell like "[A2] Wither" can now be equipped by saying "equip wither".

2) Map specific item names to a new phrase VIS renames some spells that makes it very difficult to say. For example, the "Healing" spell is renamed as "[R1] Heal Self I: Slow". There is simply no regex that can possibly reverse this sort of renaming.

To deal with this, we read from a data file 'item-name-map.json' that can be used to reverse the renaming done by VIS. A sample of the json file is included in f7ce8da. The sample file already includes all of the spells that are renamed in a fashion where cleaning via regex cannot derive the original name of the spell.

In any case, this enable selecting the spell "[R1] Heal Self I: Slow" by saying "equip Healing".

3) Select weapon by type In my current playthrough, I'm using the weapons: "Ancient Nord Hero War Axe" and "Ancient Nord Supple Bow of Ice". As you can imagine, these are extremely hard to say, especially in the middle of combat.

8de9129 scans item names for certain equipment type keywords. So if an item has the word "axe" in it, it is then accessible by saying "equip axe". At the moment, this works for "daggar", "mace", "sword", "axe", "battleaxe", "greatsword", "warhammer", "bow", "crossbow", and "shield".

The caveat here is that it will only record & use the *first* item of a type of equipment. So, if the user has two axes or two bows, in their favorites menu, only the "first" axe and "first" bow will be accessible this way.

4) Configurable default/main hand While exploring dungeons, I found myself frequently trying to cast Candlelight. The current default behavior of dsn would put candlelight in both hands. This means in the middle of exploring the dungeon, when candlelight expires, I'd have to do this in sequence:

DougHamil commented 6 years ago

Sorry for the delay, I haven't had much time recently to contribute to this project, but this looks great. I'll merge your changes in and do some testing myself and release a new version of DSN if it works out.

I was hoping something like the item-names-map.json would be unnecessary, but I can't think of a better way to support those complex item names.

Odie commented 6 years ago

No worries! Thanks for putting together such a useful utility in the first place! Glad to be able to add some minor improvements.