Package openmw.content
Allows for manipulation of the data loaded from content files while the game is first started.
Records can be created and deleted using this package as if a content file had done so.
Usage
local content = require('openmw.content')
Type content
Type ActivatorContent
| ActivatorContent.records |
A mutable list of all openmw.types#ActivatorRecords. |
Type ApparatusContent
| ApparatusContent.TYPE |
openmw.types#ApparatusTYPE: Apparatus types |
| ApparatusContent.records |
A mutable list of all openmw.types#ApparatusRecords. |
Type AttributeContent
| AttributeContent.records |
A mutable list of all openmw.core#AttributeRecords. |
Type BookContent
| BookContent.records |
A mutable list of all openmw.types#BookRecords. |
Type ClassContent
| ClassContent.records |
A mutable list of all openmw.types#ClassRecords. |
Type DoorContent
| DoorContent.records |
A mutable list of all openmw.types#DoorRecords. |
Type EnchantmentContent
| EnchantmentContent.TYPE |
openmw.core#EnchantmentType: Enchantment types |
| EnchantmentContent.records |
A mutable list of all openmw.core#Enchantments. |
Type FactionContent
| FactionContent.records |
A mutable list of all openmw.core#FactionRecords. |
Type GMSTContent
| GMSTContent.getFallbacks() |
Returns a table containing all fallback values defined in |
| GMSTContent.records |
A mutable list of all game settings. |
Type GlobalContent
| GlobalContent.records |
A mutable list of all global mwscript variables. |
Type IngredientContent
| IngredientContent.records |
A mutable list of all openmw.types#IngredientRecords. |
Type LevCreatureContent
| LevCreatureContent.records |
A mutable list of all openmw.types#CreatureLevelledListRecords. |
Type LevItemContent
| LevItemContent.records |
A mutable list of all openmw.types#ItemLevelledListRecords. |
Type LightContent
| LightContent.records |
A mutable list of all openmw.types#LightRecords. |
Type LockpickContent
| LockpickContent.records |
A mutable list of all openmw.types#LockpickRecords. |
Type MagicEffectContent
| MagicEffectContent.records |
A mutable list of all openmw.core#MagicEffects. |
Type MiscContent
| MiscContent.records |
A mutable list of all openmw.types#MiscellaneousRecords. |
Type PotionContent
| PotionContent.records |
A mutable list of all openmw.types#PotionRecords. |
Type ProbeContent
| ProbeContent.records |
A mutable list of all openmw.types#ProbeRecords. |
Type RaceContent
| RaceContent.records |
A mutable list of all openmw.types#RaceRecords. |
Type RepairContent
| RepairContent.records |
A mutable list of all openmw.types#RepairRecords. |
Type SkillContent
| SkillContent.records |
A mutable list of all openmw.core#SkillRecords. |
Type SoundContent
| SoundContent.records |
A mutable list of all openmw.core#SoundRecords. |
Type SpellContent
| SpellContent.TYPE |
openmw.core#SpellType: Spell types |
| SpellContent.records |
A mutable list of all openmw.core#Spells. |
Type StaticContent
| StaticContent.records |
A mutable list of all openmw.types#StaticRecords. |
Type content
Field(s)
- openmw.core#SpellRange content.RANGE
-
openmw.core#SpellRange: Magic ranges
- #ActivatorContent content.activators
-
#ActivatorContent: Activator manipulation.
- #ApparatusContent content.apparatuses
-
#ApparatusContent: Apparatus manipulation.
- #AttributeContent content.attributes
-
#AttributeContent: Attribute manipulation.
- #BookContent content.books
-
#BookContent: Book manipulation.
- #ClassContent content.classes
-
#ClassContent: Class manipulation.
- #DoorContent content.doors
-
#DoorContent: Door manipulation.
- #EnchantmentContent content.enchantments
-
#EnchantmentContent: Enchantment manipulation.
- #FactionContent content.factions
-
#FactionContent: Faction manipulation.
- #GMSTContent content.gameSettings
-
#GMSTContent: GMST manipulation.
- #GlobalContent content.globals
-
#GlobalContent: Global variable manipulation.
- #IngredientContent content.ingredients
-
#IngredientContent: Ingredient manipulation.
- #LevCreatureContent content.levelledCreatures
-
#LevCreatureContent: Levelled creature manipulation.
- #LevItemContent content.levelledItems
-
#LevItemContent: Levelled item manipulation.
- #LightContent content.lights
-
#LightContent: Light manipulation.
- #LockpickContent content.lockpicks
-
#LockpickContent: Lockpick manipulation.
- #MagicEffectContent content.magicEffects
-
#MagicEffectContent: Magic effect manipulation.
- #MiscContent content.miscs
-
#MiscContent: Misc manipulation.
- #PotionContent content.potions
-
#PotionContent: Potion manipulation.
- #ProbeContent content.probes
-
#ProbeContent: Probe manipulation.
- #RaceContent content.races
-
#RaceContent: Race manipulation.
- #RepairContent content.repairs
-
#RepairContent: Repair item manipulation.
- #SkillContent content.skills
-
#SkillContent: Skill manipulation.
- #SoundContent content.sounds
-
#SoundContent: Sound manipulation.
- #SpellContent content.spells
-
#SpellContent: Spell manipulation.
- #StaticContent content.statics
-
#StaticContent: Static manipulation.
Type ActivatorContent
Field(s)
- #list<openmw.types#ActivatorRecord> ActivatorContent.records
-
A mutable list of all openmw.types#ActivatorRecords.
Usage
content.activators.records.MyActivator = { mwscript = 'float', model = 'meshes/w/w_chitin_arrow.nif', name = 'Quest marker' }
Type ApparatusContent
Field(s)
- openmw.types#ApparatusTYPE ApparatusContent.TYPE
-
openmw.types#ApparatusTYPE: Apparatus types
- #list<openmw.types#ApparatusRecord> ApparatusContent.records
-
A mutable list of all openmw.types#ApparatusRecords.
Record IDs are immutable.
Usages
content.apparatuses.records.MyAlembic = { name = 'Industrial Alembic', model = 'meshes/a/alembic.nif', icon = 'icons/a/alembic.dds', type = content.apparatuses.TYPE.Alembic, quality = 2.5, weight = 4, value = 300 }content.apparatuses.records.BetterAlembic = { template = content.apparatuses.records.MyAlembic, quality = 10 }
Type AttributeContent
Field(s)
- #list<openmw.core#AttributeRecord> AttributeContent.records
-
A mutable list of all openmw.core#AttributeRecords.
Usage
content.attributes.records.MyAttribute = { name = 'Toddhood', description = 'n% of the power to reach Bethesda.', werewolfValue = 100 }
Type BookContent
Field(s)
- #list<openmw.types#BookRecord> BookContent.records
-
A mutable list of all openmw.types#BookRecords.
Usage
content.books.records.MyBook = { template = content.books.records['bk_lustyargonianmaid'], text = content.books.records['bk_BoethiahPillowBook'].text }
Type ClassContent
Field(s)
- #list<openmw.types#ClassRecord> ClassContent.records
-
A mutable list of all openmw.types#ClassRecords.
Usage
content.classes.records.MyClass = { name = 'Nightbonk', template = content.classes.records['Nightblade'], majorSkills = { 'BluntWeapon', 'Mysticism', 'Illusion', 'Alteration', 'Sneak' } }
Type DoorContent
Field(s)
- #list<openmw.types#DoorRecord> DoorContent.records
-
A mutable list of all openmw.types#DoorRecords.
Usage
content.doors.records.MyDoor = { template = content.doors.records['door_dwrv_double00'], mwscript = 'blockedDoor', name = 'Overly Heavy Dwemer Door' }
Type EnchantmentContent
Field(s)
- openmw.core#EnchantmentType EnchantmentContent.TYPE
-
openmw.core#EnchantmentType: Enchantment types
- #list<openmw.core#Enchantment> EnchantmentContent.records
-
A mutable list of all openmw.core#Enchantments.
Usage
content.enchantments.records.MyEnchantment = { type = content.enchantments.TYPE.CastOnUse, charge = 1, cost = 1, effects = { { id = 'FortifySkill', affectedSkill = 'enchant', duration = 5, magnitudeMin = 50, magnitudeMax = 100 } } }
Type FactionContent
Field(s)
- #list<openmw.core#FactionRecord> FactionContent.records
-
A mutable list of all openmw.core#FactionRecords.
Usage
content.factions.records.MyFaction = { name = 'Peons', hidden = false, reactions = { Hlaalu = -1, Telvanni = 1 }, attributes = { 'Luck', 'Willpower' }, skills = { 'Destruction', 'HeavyArmor' }, ranks = { { name = 'Peon' }, { name = 'Minion', attributeValues = { 50, 50 }, primarySkillValue = 100 } } }
Type GMSTContent
Field(s)
- GMSTContent.getFallbacks()
-
Returns a table containing all fallback values defined in
openmw.cfg.Return value
#table:
- #map<#string,#any> GMSTContent.records
-
A mutable list of all game settings.
Usage
content.gameSettings.records.fJumpAcrobaticsBase = 1024
Type GlobalContent
Field(s)
- #map<#string,#number> GlobalContent.records
-
A mutable list of all global mwscript variables.
Usage
content.globals.records.MyVariable = 42
Type IngredientContent
Field(s)
- #list<openmw.types#IngredientRecord> IngredientContent.records
-
A mutable list of all openmw.types#IngredientRecords.
Note that ingredient effects only have the
id,affectedAttribute, andaffectedSkillproperties.Usage
content.ingredients.records.MyIngredient = { template = content.ingredients.records['ingred_ectoplasm_01'], name = 'Soylent', effects = { { id = 'vampirism' } } }
Type LevCreatureContent
Field(s)
- #list<openmw.types#CreatureLevelledListRecord> LevCreatureContent.records
-
A mutable list of all openmw.types#CreatureLevelledListRecords.
Usage
content.levelledCreatures.records.MyLevCreature = { calculateFromAllLevels = true, chanceNone = 0.5, creatures = { { id = 'scrib', level = 1 }, { id = 'fargoth', level = 2 } } }
Type LevItemContent
Field(s)
- #list<openmw.types#ItemLevelledListRecord> LevItemContent.records
-
A mutable list of all openmw.types#ItemLevelledListRecords.
Usage
content.levelledItems.records.MyLevItem = { calculateForEach = true, calculateFromAllLevels = true, items = { { id = 'keening', level = 1 }, { id = 'sunder', level = 1 } } }
Type LightContent
Field(s)
- #list<openmw.types#LightRecord> LightContent.records
-
A mutable list of all openmw.types#LightRecords.
Usage
content.lights.records.MyLight = { template = content.lights.records['torch'], duration = -1, name = 'Infinite Torch' }
Type LockpickContent
Field(s)
- #list<openmw.types#LockpickRecord> LockpickContent.records
-
A mutable list of all openmw.types#LockpickRecords.
Usage
content.lockpicks.records.MyLockpick = { template = content.lockpicks.records['skeleton_key'], name = 'Digipick' }
Type MagicEffectContent
Field(s)
- #list<openmw.core#MagicEffect> MagicEffectContent.records
-
A mutable list of all openmw.core#MagicEffects.
Usage
content.magicEffects.records.MyMagicEffect = { template = content.magicEffects.records['summonscamp'], name = 'Summon Nothing' }
Type MiscContent
Field(s)
- #list<openmw.types#MiscellaneousRecord> MiscContent.records
-
A mutable list of all openmw.types#MiscellaneousRecords.
Usage
content.miscs.records.MyMisc = { template = content.miscs.records['gold_001'], mwscript = 'BILL_MarksSpiritSummon', weight = 5 }
Type PotionContent
Field(s)
- #list<openmw.types#PotionRecord> PotionContent.records
-
A mutable list of all openmw.types#PotionRecords.
Usage
content.potions.records.MyPotion = { template = content.potions.records['p_dispel_s'], name = 'Too Strong', effects = { { id = 'FireDamage', duration = 10, range = content.RANGE.Self, magnitudeMin = 100 } } }
Type ProbeContent
Field(s)
- #list<openmw.types#ProbeRecord> ProbeContent.records
-
A mutable list of all openmw.types#ProbeRecords.
Usage
content.probes.records.MyProbe = { template = content.probes.records['probe_bent'], quality = 5, name = 'Alien Probe' }
Type RaceContent
Field(s)
- #list<openmw.types#RaceRecord> RaceContent.records
-
A mutable list of all openmw.types#RaceRecords.
Usage
content.races.records.MyRace = { template = content.races.records['wood elf'], name = 'Sheep Elf', height = { male = 2, female = 2 }, weight = { male = 2, female = 2 } }
Type RepairContent
Field(s)
- #list<openmw.types#RepairRecord> RepairContent.records
-
A mutable list of all openmw.types#RepairRecords.
Usage
content.repairs.records.MyRepair = { template = content.repairs.records['hammer_repair'], name = 'Hammer Time' }
Type SkillContent
Field(s)
- #list<openmw.core#SkillRecord> SkillContent.records
-
A mutable list of all openmw.core#SkillRecords.
Usage
content.skills.records.MySkill = { name = 'C++', werewolfValue = 0, attribute = 'MyAttribute', specialization = 'magic' }
Type SoundContent
Field(s)
- #list<openmw.core#SoundRecord> SoundContent.records
-
A mutable list of all openmw.core#SoundRecords.
Usage
content.sounds.records.MySound = { template = content.sounds.records['MournDayAmb'], fileName = 'sound/fx/funny.wav' }
Type SpellContent
Field(s)
- openmw.core#SpellType SpellContent.TYPE
-
openmw.core#SpellType: Spell types
- #list<openmw.core#Spell> SpellContent.records
-
A mutable list of all openmw.core#Spells.
Usage
content.spells.records.MySpell = { name = 'Enchantment?', type = content.spells.TYPE.Spell, cost = 1000, starterSpellFlag = true, isAutocalc = true, effects = { { id = 'FortifyAttribute', affectedAttribute = 'intelligence', duration = 5, magnitudeMin = 5, magnitudeMax = 10 } } }
Type StaticContent
Field(s)
- #list<openmw.types#StaticRecord> StaticContent.records
-
A mutable list of all openmw.types#StaticRecords.
Usage
content.statics.records.MyStatic = { model = 'meshes/b/B_N_Wood Elf_M_Head_02.nif' }