Project

General

Profile

Bug #4351

Using AddSoulgem fills all soul gems of the specified type

Added by Nick S 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Scripting
Target version:
Start date:
03/09/2018
% Done:

100%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

Using the AddSoulGem script function seems to add an additional soulgem and fills it with the correct soul; however, it also adds that soul to any other empty soul gems of that type.

Example:

Player->AddSoulGem "nix-hound", Misc_SoulGem_Petty

If the player has 4 empty Petty Soul Gems, the result will be a stack of 5 petty soul gems, all of which are filled with Nix-Hound souls.

This issue occurs in OpenMW 0.43.0. From my testing, it seems to occur every time. I have not tested it while having filled soul gems of the same type in the inventory.

Associated revisions

Revision 62c04c67 (diff)
Added by Andrei Kortunov 3 months ago

Unstack soulgem, added via AddSoulGem console command (bug #4351)

History

#1 Updated by Andrei Kortunov 3 months ago

  • Status changed from New to Confirmed
  • Operating system changed from Windows to Other

I suppose we just need to unstack the new item before calling the setSoul(), as we do for soultrapping:

// Set the soul on just one of the gems, not the whole stack
gem->getContainerStore()->unstack(*gem, caster);
gem->getCellRef().setSoul(mCreature.getCellRef().getRefId());

// Restack the gem with other gems with the same soul
gem->getContainerStore()->restack(*gem);

#2 Updated by Andrei Kortunov 3 months ago

  • Status changed from Confirmed to Resolved
  • Assignee set to Andrei Kortunov
  • Target version set to openmw-0.44

#3 Updated by Andrei Kortunov 3 months ago

  • % Done changed from 0 to 100

#4 Updated by Andrei Kortunov 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF