Jump to content

How to filter Leveled Item lists in Containers based on location of Container?


Neckbeardism

Recommended Posts

I'm very new to modding, so please bear with me.

I'm trying to filter Leveled Item lists in Containers (i.e. bandit chest, Forsworn chest, etc.) based on where that Container is located in Skyrim; specifically, in which of the nine holds (Whiterun, The Reach, Winterhold, etc.) the Container is located. For example, loot obtained from a bandit chest in Whiterun would be slightly different from that in Winterhold, Hjaalmarch, etc.

 

I noticed you can add Global variable flags to Leveled Item lists, and discovered the "CWObjHold" variables, where Hold is replaced with any of the nine holds of Skyrim. This actually seemed to work at first; i.e. adding "CWObjWhiterun" to a leveled list and opening a bandit chest in Whiterun would yield loot from that Leveled List, and "CWObjWinterhold" would not. However, eventually I realized this "CWObjHold" variable must not do what I thought it was doing, because loot from the Leveled List with "CWObjReach" also was showing up in Whiterun chests. Bummer.

 

Is what I am trying to accomplish at all possible? Perhaps I can create my own Global variables that pass a leveled list through if the Container is located in a given hold? Please let me know, and thanks. Here's the structure I have right now so you can get a better picture:

  • Container (i.e. TreasBanditChest)
    • VanillaLeveledItemList
    • VanillaLeveledItemList
    • CustomLeveledItemList (flag UseAll, filtering the nested Leveled Lists based on location via Global variables)
      • CustomLeveledItemListWhiterun (flag CWObjWhiterun)
      • CustomLeveledItemListWinterhold (flag CWObjWinterhold)
      • CustomLeveledItemListReach (flag CWObjReach)
      • CustomLeveledItemListPale (flag CWObjWhiterun)
      • ...
Link to comment
Share on other sites

You're on the right track but you'll need your own variables rather than rely on anything from the rat's nest of civil war stuff.

 

I think you can just create your variables and use a small quest to set them based on the current hold. Start that quest from the story manager on a location change event checking the hold type keyword so that it fires whenever the player moves into a new hold. Strictly speaking you are filtering the contents on where the player is not where the chest is, but it amounts to the same thing.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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