Kaedrin's Custom Content
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Problems with re-equiping items on load

5 posters

Go down

Problems with re-equiping items on load Empty Problems with re-equiping items on load

Post  Nameless One Mon Oct 01, 2012 5:44 pm

cmi_pc_loaded script re-equips all items equipped by a PC when the game is loaded. In addition to not working an leaving an item unequipped in the inventory from time to time, this also causes a very bad problem with spellcasting classes that memorize spells and have items equipped that give them additional spell slots, such as Ring of Wizardry and Ring of Divine Power. When those items are re-equipped, the additional slots are also removed and then added again, causing them to lose memorized spells.

You could fix this by checking items for properties that grant additional spell slots and skipping them if they have those. Increasing the delays for re-equipping items might fix the first problem. Maybe you could display a modal "loading..." dialog while all this is happening if it takes too much time.

Nameless One

Posts : 4
Join date : 2012-09-22

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  Kaedrin Mon Oct 01, 2012 5:47 pm

Unfortunately the exploit is FAR worse than the issue with the fix. Having to rest for using bonus spell slots is a small price to pay compared to what the abuse leads to.

Kaedrin
Admin

Posts : 352
Join date : 2011-04-15
Age : 48

https://nwn2customcontent.forumotion.com

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  Nameless One Mon Oct 01, 2012 5:49 pm

What's the exploit? Is there a risk of accidentally using it in a single player game? If not, is it possible to easily disable the re-equipping of items on load?

Nameless One

Posts : 4
Join date : 2012-09-22

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  Kaedrin Mon Oct 01, 2012 5:54 pm

While I won't detail the exploit I do believe it is limited to multiplayer servers. Change line 47 of the cmi_options to 0 and it will stop doing this (UseConFix line).

Kaedrin
Admin

Posts : 352
Join date : 2011-04-15
Age : 48

https://nwn2customcontent.forumotion.com

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  Nameless One Mon Oct 01, 2012 6:02 pm

Thanks. I modified cmi_pc_loaded like this:
Code:
       oItem = GetItemInSlot(INVENTORY_SLOT_LEFTRING,OBJECT_SELF);
       if (!GetItemHasItemProperty(oItem, ITEM_PROPERTY_BONUS_SPELL_SLOT_OF_LEVEL_N)) {
         DelayCommand(0.4f, ActionUnequipItem(oItem));
         DelayCommand(0.5f, ActionEquipItem(oItem, INVENTORY_SLOT_LEFTRING));
      }
and similarly for the right ring and it fixed the problem with Rings of Wizardry and Divine Power.

Nameless One

Posts : 4
Join date : 2012-09-22

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  The Man In The Moon Thu Oct 25, 2012 5:10 pm

I want to fix this issue for myself too. Would you mind explaining how? I don't quite understand, from what's here.

The Man In The Moon

Posts : 17
Join date : 2012-10-18

Back to top Go down

Problems with re-equiping items on load Empty Bump?

Post  The Man In The Moon Thu Nov 15, 2012 5:02 am

Hello? I'd really like some help with this issue myself - I don't understand, from what's been posted here so far, how to do it.

The Man In The Moon

Posts : 17
Join date : 2012-10-18

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  Raygereio Thu Nov 15, 2012 9:23 am

Kaedrin wrote:While I won't detail the exploit I do believe it is limited to multiplayer servers. Change line 47 of the cmi_options to 0 and it will stop doing this (UseConFix line).
cmi_options refers to a .2da file included in Kaedrin's pack. Open that with any 2da editor from the NWvault, or just a decent text editor such as notepad++ and change the line Kaedrin indicated.

Raygereio

Posts : 21
Join date : 2011-07-24

Back to top Go down

Problems with re-equiping items on load Empty reply

Post  The Man In The Moon Fri Nov 16, 2012 1:27 am

Forgive my pedestrianism, but can you recommend one, maybe provide a direct link? I find NWvault confusing to navigate, I can never be sure I'm downloading the right thing - and I don't really know if I know anything about text editors outside of that. Also, which .2da file does it apply to, and in which edition of the patch? There appear to be a LOT of .2da files, just from leafing through the raw downloads.

The Man In The Moon

Posts : 17
Join date : 2012-10-18

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  Raygereio Fri Nov 16, 2012 2:58 pm

In the directory where you unpacked Kaedrin's pack, you should see a folder "Core 2DA", cmi_options.2da is in there.
This particular .2da file doesn't have any funky formatting or anything, so the regular windows notepad texteditor should suffice. Just open up with notepad (right-click, open with) and change the 1 behind UseConFix to a 0.

Raygereio

Posts : 21
Join date : 2011-07-24

Back to top Go down

Problems with re-equiping items on load Empty Roger

Post  The Man In The Moon Sat Nov 17, 2012 12:54 am

It looks like I was able to fix it. Thanks!

The Man In The Moon

Posts : 17
Join date : 2012-10-18

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  Gert Sat Nov 17, 2012 12:40 pm

Kaedrin wrote:While I won't detail the exploit I do believe it is limited to multiplayer servers.

I recently tried it in a module, and it did work, at least for me. I don't think there's a large chance SP users will realize it to full extent, though.

Gert

Posts : 18
Join date : 2011-10-25

Back to top Go down

Problems with re-equiping items on load Empty Re: Problems with re-equiping items on load

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum