MSFD Levelled List functions
[no fix] AddToLevCreature “levcreaname” “creature_ID” level_enum
[no fix] AddToLevItem “levitemname” “item_Id” level_enum
[no fix] RemoveFromLevCreature “levcreaname” “creature_ID” level_enum
[no fix] RemoveFromLevItem “levitemname” “item_ID” level_enum
These functions are used to manipulate Leveled Item and Leveled Creature lists at run-time. Leveled lists are comprised of object/level pairs where the level is the level the PC has to be to encounter the object. The AddTo functions will add the given object/level pair to the specified leveled list as long as the list does not already contain a matching pair. The RemoveFrom functions will remove all occurrences of the object/pair from the leveled list. Additionally, if a RemoveFrom function is given an object pair with a level of –1, all object pairs containing the specified object are removed.
Note: The RemoveFrom functions will not remove existing objects from the world. If a Leveled Creature reference has already calculated to be a certain creature, removing that creature from the Leveled Creature’s list will not get rid of the existing creature in the world. However it will prevent that Leveled Creature reference from calculating to be that creature again.
Note: The ability of creature leveled lists to call other leveled lists is only in Bloodmoon. Those wishing to "nest" creature leveled lists in their plugins must have that Bloodmoon dependency, even if they use no objects from Bloodmoon. (forum info / blockhead)
Warning: It is not recommended that you use these functions as it will break any other mod that uses leveled lists.
DarkDragon writes on the Official forums:
The problem lies in the way Morrowind loads items. First it loads ESMs, then ESPs, which can modify the leveled lists. If you have a list merger, you can merge those lists and keep the changes from all of them (where as before, the last loaded mod would take precedence). Then it loads ESS, or save files.
The problem is, if a script adds something to a Leveled List, it modifies the ESS (save game) and the save game then has a reference to that Leveled list. This is loaded last and it overwrites ANY changes done by other mods.
Sample Script:
When this script is placed on an object, activating it will toggle the existence of rats in the world by removing them from a Leveled Creature and removing rat meat from a Leveled Item.
Begin norats
short norats
if ( OnActivate == 1 )
if ( norats == 0 )
set norats to 1
RemoveFromLevCreature "rat_scamp_crab" "rat" -1
RemoveFromLevCreature "rat_scamp_crab" "rat-fast" -1
RemoveFromLevItem "lev_meat" "rat_meat" -1
MessageBox "No more rats."
Else
set norats to 0
AddToLevCreature "rat_scamp_crab" "rat" 1
AddToLevCreature "rat_scamp_crab" "rat-fast" 1
AddToLevItem "lev_meat" "rat_meat" 1
MessageBox "The rats return."
Endif
endif
end