-
Notifications
You must be signed in to change notification settings - Fork 0
locationTypes
New location types. One element of this array is one location type (like City or Inn). New location types are included into the randomization, and you can also add randomization conditions.
You need to create a FormList record for your location type and specify it here. You can either pre-fill this formlist with all locations (those records that you specify in fLocation in the locations array) that belong to this type or keep the formlist empty and make SUR fill it by setting this formlist in fLocationTypeList for each location that belongs to this type (not needed if you fill the formlist yourself).
The name of this location type.
The description of this location type that is displayed at the bottom of the MCM when you highlight the MCM option.
If you need to run a custom script when teleporting the player to locations of this type, you can specify here your quest with the script. See Locations with Scripts.
A custom string parameter passed as locationTypeParam to your location script. See Locations with Scripts.
Sets how Local Inhabitant = Auto works for locations of this type. Valid values: "Disabled", "Region", "Settlement". If not set, it's "Disabled". This property can also be set for a specific location, the location value overrides the location type value. Also check Local Inhabitant for mod-added settlements.
Enables the Auto Bounty feature for this location type. Contains 3 elements: the minimum bounty, the maximum bounty and the bounty chance in % (0-100). You can set -1 in any of the three elements to use the default value (the one used for bandit camps) for that element. Example: 60% chance of a bounty between 250 and 2500 septims:
"iAutoBounty" : [ 250, 2500, 60 ]Conditions that restrict what starting options the player can get randomly if this location type is selected by the player or randomly, and when this location type is included into the randomization if the location is randomized (i.e. conditions work in both directions). For example, hasSpells : 1 (which means that the player must have spells with this location type) prevents getting this location type if the location is randomized and the player selected to have 0 spells. Or if the player left the number of spells random and this location type was selected by the player or randomly, then the player won't get 0 spells. The player still can choose your location type with any options they want manually.
All conditions are optional.
Conditions can be added to locations and location types. Conditions on the same level are combined via logical AND. Conditions on the location override the same conditions on its location type. Different conditions on the location and location type levels are combined via logical AND. You can also reset any condition on the location type by adding the same condition on the location with value -1 (for single number conditions) or [] (an empty array - for array conditions).
If there are no locations with matching conditions in the location types and holds selected in the MCM, SUR ignores all conditions.
It's recommended to only use conditions to exclude combinations of options that make no sense with your location type, rather than just selecting the options that you like more. This makes it consistent with the conditions on default locations, prevents your location type from being excluded from the randomization when it's not necessary (remember, conditions work in both directions), and prevents the situation when SUR can't find a matching location and has to ignore all conditions.
Conditions:
- never : 1. Never true. Allows to exclude this location from the randomization.
- raceIs : string[]. Allowed races. Valid values: "Argonian", "Breton", "Dark Elf", "Imperial", "High Elf", "Khajiit", "Nord", "Orc", "Redguard", "Wood Elf". raceIs on a location overrides raceIsNot on the location type.
- raceIsNot : string[]. Races that are not allowed. raceIsNot on a location overrides raceIs on the location type.
- sexIs : string. Valid values: "M", "F".
- isVampire : 0/1. Whether the player must not/must be a vampire.
- isWerewolf : 0/1. Whether the player must not/must be a werewolf.
- armorTypeIs : string[]. Allowed armor types. Valid values: "Clothes", "Light", "Heavy".
- isInRags : 0/1. Whether the player must not/must be in the Rags armor set.
- armorIs : form[]. Allowed armor sets or FormLists with allowed armor sets (nested formlists are not supported). armorIs on a location type overrides armorAddToRandom on the hold. It's allowed to specify here armors that are not included into the randomization by default. For example, faction armor usually shouldn't be included into the randomization, but you can specify it in armorIs so that it will be auto selected with your faction location. Also read Notes about armorIs/armorIsNot/armorAddToRandom.
- armorIsNot : form[]. Armor sets or FormLists with armor sets that are not allowed (nested formlists are not supported). armorIsNot on the location type has priority over armorAddToRandom on the hold if they contain same armor sets. Also read Notes about armorIs/armorIsNot/armorAddToRandom.
- armorAddToRandom : form[]. Armor sets or FormLists with armor sets (nested formlists are not supported) that will be added to the armor randomization if this location type is selected. armorAddToRandom on the location type is combined with armorAddToRandom on the hold. Also read Notes about armorIs/armorIsNot/armorAddToRandom.
- headgearIs : string[]. Allowed values of the Headgear option. Valid values: "Nothing", "Default", "Hood". Specifying "Hood" as the only allowed headgear prevents getting armors with NoRandomHood flag.
- hasWeapon : 0/1. Whether the player must not/must have at least one weapon. Doesn't count items from the Inventory tab as weapons.
- hasSpells : 0/1. Whether the player must not/must have at least one spell. 0 prevents getting armors with MageOutfit flag.
- hasWeaponOrSpells : 0/1. Whether the player must not/must have at least one weapon or spell. 0 prevents getting armors with MageOutfit flag.
- wealthMin : 1-4. The minimum required wealth level. 1 = Beggar, 2 = Poor, 3 = Medium, 4 = Wealthy. 2+ prevents getting rags as outfit.
- wealthMax : 1-4. The maximum required wealth level.
- hasBounty : 0/1. Whether the player must not/must have a bounty on their head. Has priority over the iAutoBounty bounty chance.
An example for a location that is by some reason only fits noble breton or high elf spell warriors:
"conditions" : {
"raceIs" : [ "Breton", "High Elf" ],
"armorTypeIs" : [ "Light", "Heavy" ],
"hasWeapon" : 1,
"hasSpells": 1,
"wealthMin" : 3
}For the list of default conditions, see Conditions on default locations, location types and holds.
- For default armor sets you must specify here the corresponding ArmorSets_... (not ArmorSet_...) leveled list from Skyrim Unbound.esp. For addon-added armor sets you must specify here the same form as in fArmorSet.
- It's recommended to use formlists so that other people can add more armors to them, if that makes sense in your case. Also, if there are already existing formlists in SUR that you can use, use them.
- There are armor filters such as the "Only Entry-Level Armors" option, randomization restrictions (clothes must not be given with shields, heavy armor must not be given with only a dagger as a weapon) and armor flags that are applied on top of these conditions. For example, if your location doesn't include any entry-level armors but the player enabled "Only Entry-Level Armors", your locations will be excluded from the randomization. Or if your locations includes both entry-level armors and non-entry-level armors, only entry level armors will be given with your location.
Flags here are strings in the array. To add a flag, add it to the array. Flags:
- "DisableNearbyPredators" - Enables the default auto predators disabler script for this location type. It automatically disables nearby predators in a certain radius from the player when the player is teleported. It only disables actors that have ActorTypeAnimal keyword and are in one of the following factions: PredatorFaction, SkeeverFaction, TrollFaction. It's always automatically enabled for Wilderness locations, you don't need to add this flag to them.
- "AlwaysGiveLightIfRandom" - By default when the light (torch/lantern) is set to Random, SUR gives the player a light with 100% chance if the player spawns inside an interior, the parent location of which has LocTypeDungeon keyword, if the player is not a vampire or khajiit, doesn't have Candlelight or Magelight spell. This flag allows to enable this feature for other locations.
"locationTypes" :
[
{
"fLocationTypeList" : "0x0|Plugin Name.esp",
"sName" : "Location Type Name",
"sDescription" : "Location type description.",
"fQuest" : "0x0|Plugin Name.esp",
"sParam" : "CustomParameter",
"sAutoLocalInhabitant" : "Disabled/Region/Settlement",
"iAutoBounty" : [ 250, 2500, 0-100 ],
"conditions" : {
"never" : 1,
"raceIs" : [ "Argonian", "Breton", "Dark Elf", "Imperial", "High Elf", "Khajiit", "Nord", "Orc", "Redguard", "Wood Elf" ],
"raceIsNot" : [ "Argonian", "Breton", "Dark Elf", "Imperial", "High Elf", "Khajiit", "Nord", "Orc", "Redguard", "Wood Elf" ],
"sexIs" : "M/F",
"isVampire" : 0-1,
"isWerewolf" : 0-1,
"armorTypeIs" : [ "Clothes", "Light", "Heavy" ],
"isInRags" : 0-1,
"armorIs" : [ "0x0|Plugin Name.esp", "0x0|Plugin Name.esp" ],
"armorIsNot" : [ "0x0|Plugin Name.esp", "0x0|Plugin Name.esp" ],
"armorAddToRandom" : [ "0x0|Plugin Name.esp", "0x0|Plugin Name.esp" ],
"headgearIs" : [ "Nothing", "Default", "Hood" ],
"hasWeapon" : 0-1,
"hasSpells": 0-1,
"hasWeaponOrSpells" : 0-1,
"wealthMin" : 1-4,
"wealthMax" : 1-4
},
"sFlags" : [ "DisableNearbyPredators", "AlwaysGiveLightIfRandom" ]
}
]See the Orc Strongholds addon.