Jump to content

Allowed Offhand weapon types?


plainab

Recommended Posts

While I can create something for a specific set of items to swap back and forth, it is beginning to appear next to impossible to do it with an unknown set of items...

 

When trying to use two different melee weapons in dual wield, the on hand gets removed to inventory as well as the off hand. Which in and of itself is no problem for ranged mode, but when it comes time to re-equip, the main hand weapon gets recreated into the off hand as well.

 

HasItemEquiped() returns true for an item equipped in any of the slots. Forcing the player to carry just one of the given item for the offhand and one for the main hand doesn't help either. The dual wielding swap works great for two weapons of the same type, but not for different melee weapons. I can not justify forcing the player to use the same weapons when dual wielding...

 

Thankfully, for anyone who wishes to use dual wielding and switch to ranged weapons, the game can be paused and the inventory entered, the swap made by hand and return to the main game interface... The same is true for using shields and two handed ranged weapons.

 

I could set something up where the player could swap two identical melee weapons for the ranged weapon of their choice and back again as needed, but they'd still have to use the inventory interface if they chose to use different melee weapons. I'm not sure how well that would go over... I'm thinking it would need to be an all or nothing sort of mod.

 

Too bad there isn't a RemoveItemSlot effect. If there was, there could be less of a problem as the applied spell should only work if the given resource was in the assigned slot.

 

I'm wondering if some kind of dialog PID perhaps for the NPCs and an invisible character for the PC would be a better route to go. It would be immersion breaking, but would only really need to be done for dual wielding and shield users with 2h ranged weapons. Wouldn't have to be done for every party member... But then again, I don't know... I do find it kind of tedious to have to tell my henchmen in NWN how to act and behave, but there I have to because I can't control them at all...

 

This mod idea is at this time 'officially' dead. The working sample a few posts up could be modified by anyone who wants to use it to swap some specific items when dual wielding... I doubt I'll work on this again....

 

But I might go ahead and make available on my website the 'optional bag of holding' I had created to go along with this. It only stores weapons and shields so that the swap script wouldn't get confused about which items were to be moved back into the weapon and shield slots...

Link to comment

After some testing with the Remove Item effect, it can be possible in a way to swap out the offhand shield or weapon and swap in a non-stackable ranged weapon.

 

Since the weapon slots come after the main inventory slots, there all kinds of issues that creep up when trying to ensure that slot 35 is empty by removing what is there. Therefore the player would be required to NOT place anything in weapon slot #35 (the very first one on the left). There could be a check put in place to make sure that slot is empty before doing anything (because the Create Item in Slot effect overwrites whatever is in the slot). The player would also need to carry only ONE ranged weapon in the inventory of the party member using the swap out code...

 

Basically, it would boil down to...

 

A hotkey that causes a check for what is in the offhand, set a variable that will 'memorize' which item was in that hand before (so we can re-equip later), start a spell that will remove the item and recreate it in the main inventory. After that, a new check is put in place which will see what ranged weapon is in the main inventory, set a variable that will 'memorize' it (so we can remove it later), start a spell that will remove the item and recreate it in weapon slot 35 (provided it is empty).

 

The same hotkey pressed again, will cause the 'memorized' weapons to swap back to their original slots.

 

Unfortunately, any previously identified items will become unidentified. If zero lore custom items were put in their place, some mods that look for specific weapons (will not/might not) work correctly. To solve that problem, all items that could be used in the offhand would require having their lore value zeroed.

 

I believe that Mages would be the only class that would have an issue with this setup cause they only have one weapon slot available. Sure they can dual wield, but why?

 

If no one has concerns about this setup... I'll modify what I've already done to work in this manner, do some testing and then make it available for public consumption...

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...