Jump to content

Recommended Posts

@RomanR

Thanks for the info about magical items.

I'll probably be doing more tests with scripted item and enchantment blocks to get a better understanding of any potential issues, but I'll be sure to keep your findings in mind.

If that's just the way it is, I won't be too worried if I end up with similar results to yours.

 

@GamerRick

Does this flag actually affect how RemoveAllItems work? Or it's just visibility?

Also, what is MS05?

Edited by Eillis
Link to comment
Share on other sites

Thanks RomanR. Yesterday, I wanted to see how it was done in vanilla, and quest MS05 was the first thing that I thought of. Oddly the code to remove the player items is in the amulet script MS05DreamworldAmuletScript.

 

I was surprised to see that command setshowquestitems. Never knew about it before that. I verified that the relevant code was from Oblivion.esm and not from the UOP.

 

The only problem I can see with it, if is if want the player to have a quest item on them that they have access to, after stripping them of everything else. But if that's the way Bethesda did it and no one ever thought it needed fixing and it always works as it should ever time I have done that quest, then obviously it works.

 

Also, why do you need to do anything special for unplayable items? They are always invisible to the player. Most are tokens added by mods that tell them they already messed with that container (like one added by COBL to tell it it already checked that container). If you remove those, the mods will think they haven't checked the player yet.

Edited by GamerRick
Link to comment
Share on other sites

@GamerRick

Just hiding quest items on player is not enough in my case.

I'd gladly go with leaving quest and unplayable items where they are, and in fact, that is what I'm trying to do. It's just not that simple.

NPC will transfer his/her quest items to player. That requires workarounds.

 

@RomaR

Forgot to mention it earlier, but GetItems does in fact return object IDs.

I recently tested it to be 100% sure.

Link to comment
Share on other sites

Then I apologize for a misleading info about GetItems. As I see RemoveAllItems docs on CS Wiki it seems that unsetting playable flag is enough to be ignored by this command. So for quest items (in fact all) you need unset this flag only and they don't need to be unequiped as they will be ignored afterwards. With recorded info about changed items and setting this flag back after both transfers I think this problem is much easier to solve, perhaps you don't even need a temp container for this.

Link to comment
Share on other sites

There's nothing to be sorry about. We're all here to share knowledge. A lot of this stuff is very confusing.

 

 

Setting unplayable will work in case of armor/clothing.
Other item types don't have this option.

 

So this leaves the problem for non-armor/clothing quest items of NPC.

Link to comment
Share on other sites

Here is another way you could transfer all items from the player to a container:

foreach refItem <- player
     set count to refItem.GetRefCount
     if count > 0
          refItem.RemoveMeIR refOtherContainer
     endif
loop

No need to check playable or quest flag it will move everything. I never tried it on something the player could be wearing or have equipped though. This command (RemoveMe & RemoveMeIR) and RemoveAllItems are the commands that fit your needs here. They will keep the items' reference settings when moved. Reference settings would be like the current health of a weapon or armor piece and the soulgem level for ones that you filled with a Soul Trap spell. When you do an AddItem(NS) and a RemoveItem to "move" the item, you are really deleting the current one and adding a brand new one in its place.

Edited by GamerRick
Link to comment
Share on other sites

Well, for player, the problem is practicaly solved - unsetting playable flag will make clothes or armor to be ignored and as quest items will not affected too, I dare to say that using RemoveAllItems should be safe enough.

 

But for NPC I begin to think that using this command is almost useless. With no such restrictions as for player you will be forced to filter and move NPC's items by hand and make a record what will stay in NPC's inventory to avoid accidentaly transfer to player. Temp container will be needed too.

 

The only question is how to handle scripted items. The safest way would be to ignore them too.

Edited by RomanR
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...