Jump to content

How do you remove a formlist from a leveled item?


Recommended Posts

I've got a quest with a script that adds a formlist to a leveled item, and I've verified it's working.  The problem is when I come to try to remove the form.  I'll do

Container_Loot_Cooler.RemoveAddedForm(itn_inthewilds_distribution)

 Only to be given "RemoveAddedForm is not a function or does not exist" when I compile it.

There's a piece of code that does the same thing to remove an injected workshop menu which compiles fine, so I'm guessing there's an issue with it being a leveled item.  Could anyone please tell me whether this is or isn't possible with leveled items and if so how I can fix it?

Thanks in advance.

Link to comment
Share on other sites

You can only add to or revert() the levelled item list (to the state before any script touched it)

https://ck.uesp.net/wiki/LeveledItem_Script

If you want insert and remove things without interfering with other mods touching the same list, you could insert your own LL instead of inserting the items directly, and then you can revert() your injected LL any time to put other things in it.

  • Like 1
Link to comment
Share on other sites

  On 4/10/2025 at 6:59 AM, NeinGaming said:

You can only add to or revert() the levelled item list (to the state before any script touched it)

https://ck.uesp.net/wiki/LeveledItem_Script

If you want insert and remove things without interfering with other mods touching the same list, you could insert your own LL instead of inserting the items directly, and then you can revert() your injected LL any time to put other things in it.

Expand  

I made a mistake in my original post, and realised later it was another leveled item I was injecting, and research on that has lead me to the conclusion it's not possible.

This is specifically to allow a user to perform an uninstall and attempting to minimise anything getting baked into the save (or more than it needs to).  I'd considered the approach you suggested, but do you know how the game would handle it simply disappearing on the mod being removed?  If it will just shrug and forget about it, then I may as well leave it (same result either way), but if it does have a consequence (especially the save file) am I right in the assumption an empty formlist  would be better than something populated?

Link to comment
Share on other sites

Then Container_Loot_Cooler probably isn't a form list, or you shouldn't get that compilation error?

I'm confused by "I'm guessing there's an issue with it being a leveled item" -- you mean the thing you want to remove? Shouldn't matter, AFAIK any form can go into a form list, and the compilation error isn't about the argument of the function, but the function itself, so it doesn't even get to the part of maybe having a problem with what you want to remove.

Link to comment
Share on other sites

"Container_Loot_Cooler" is a leveled item, as is "itn_inthewilds_distribution" (this is the one I mistakenly said was a form list).  All the research I've read sine my original post has said there's no way to remove a form list or leveled item from another leveled item.

Thanks anyway ๐Ÿ™‚

Link to comment
Share on other sites

Vanilla Papyrus only has Revert() to remove all script added forms.

Someone requested a few LeveledList (LeveledItem, LeveledCharacter and LeveledSpell) functions earlier. I added some of them to Garden of Eden SE, if you're insterested.

  Reveal hidden contents

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
ร—
ร—
  • Create New...