265 lines
11 KiB
Lua
265 lines
11 KiB
Lua
---
|
|
-- 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.
|
|
-- @context load
|
|
-- @module content
|
|
-- @usage local content = require('openmw.content')
|
|
|
|
|
|
--- @{openmw.core#SpellRange}: Magic ranges
|
|
-- @field [parent=#content] openmw.core#SpellRange RANGE
|
|
|
|
|
|
--- @{#ActivatorContent}: Activator manipulation.
|
|
-- @field [parent=#content] #ActivatorContent activators
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#ActivatorRecord}s.
|
|
-- @field [parent=#ActivatorContent] #list<openmw.types#ActivatorRecord> records
|
|
-- @usage
|
|
-- content.activators.records.MyActivator = { mwscript = 'float', model = 'meshes/w/w_chitin_arrow.nif', name = 'Quest marker' }
|
|
|
|
--- @{#ApparatusContent}: Apparatus manipulation.
|
|
-- @field [parent=#content] #ApparatusContent apparatuses
|
|
|
|
--- @{openmw.types#ApparatusTYPE}: Apparatus types
|
|
-- @field [parent=#ApparatusContent] openmw.types#ApparatusTYPE TYPE
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#ApparatusRecord}s. Record IDs are immutable.
|
|
-- @field [parent=#ApparatusContent] #list<openmw.types#ApparatusRecord> records
|
|
-- @usage
|
|
-- 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 }
|
|
-- @usage
|
|
-- content.apparatuses.records.BetterAlembic = { template = content.apparatuses.records.MyAlembic, quality = 10 }
|
|
|
|
--- @{#AttributeContent}: Attribute manipulation.
|
|
-- @field [parent=#content] #AttributeContent attributes
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.core#AttributeRecord}s.
|
|
-- @field [parent=#AttributeContent] #list<openmw.core#AttributeRecord> records
|
|
-- @usage
|
|
-- content.attributes.records.MyAttribute = { name = 'Toddhood', description = 'n% of the power to reach Bethesda.', werewolfValue = 100 }
|
|
|
|
--- @{#BookContent}: Book manipulation.
|
|
-- @field [parent=#content] #BookContent books
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#BookRecord}s.
|
|
-- @field [parent=#BookContent] #list<openmw.types#BookRecord> records
|
|
-- @usage
|
|
-- content.books.records.MyBook = { template = content.books.records['bk_lustyargonianmaid'], text = content.books.records['bk_BoethiahPillowBook'].text }
|
|
|
|
--- @{#ClassContent}: Class manipulation.
|
|
-- @field [parent=#content] #ClassContent classes
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#ClassRecord}s.
|
|
-- @field [parent=#ClassContent] #list<openmw.types#ClassRecord> records
|
|
-- @usage
|
|
-- content.classes.records.MyClass = { name = 'Nightbonk', template = content.classes.records['Nightblade'], majorSkills = { 'BluntWeapon', 'Mysticism', 'Illusion', 'Alteration', 'Sneak' } }
|
|
|
|
--- @{#DoorContent}: Door manipulation.
|
|
-- @field [parent=#content] #DoorContent doors
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#DoorRecord}s.
|
|
-- @field [parent=#DoorContent] #list<openmw.types#DoorRecord> records
|
|
-- @usage
|
|
-- content.doors.records.MyDoor = { template = content.doors.records['door_dwrv_double00'], mwscript = 'blockedDoor', name = 'Overly Heavy Dwemer Door' }
|
|
|
|
--- @{#EnchantmentContent}: Enchantment manipulation.
|
|
-- @field [parent=#content] #EnchantmentContent enchantments
|
|
|
|
--- @{openmw.core#EnchantmentType}: Enchantment types
|
|
-- @field [parent=#EnchantmentContent] openmw.core#EnchantmentType TYPE
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.core#Enchantment}s.
|
|
-- @field [parent=#EnchantmentContent] #list<openmw.core#Enchantment> records
|
|
-- @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 } } }
|
|
|
|
--- @{#FactionContent}: Faction manipulation.
|
|
-- @field [parent=#content] #FactionContent factions
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.core#FactionRecord}s.
|
|
-- @field [parent=#FactionContent] #list<openmw.core#FactionRecord> records
|
|
-- @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 } } }
|
|
|
|
--- @{#GMSTContent}: GMST manipulation.
|
|
-- @field [parent=#content] #GMSTContent gameSettings
|
|
|
|
---
|
|
-- Returns a table containing all fallback values defined in `openmw.cfg`.
|
|
-- @function [parent=#GMSTContent] getFallbacks
|
|
-- @return #table
|
|
|
|
---
|
|
-- A mutable list of all game settings.
|
|
-- @field [parent=#GMSTContent] #map<#string, #any> records
|
|
-- @usage
|
|
-- content.gameSettings.records.fJumpAcrobaticsBase = 1024
|
|
|
|
--- @{#GlobalContent}: Global variable manipulation.
|
|
-- @field [parent=#content] #GlobalContent globals
|
|
|
|
---
|
|
-- A mutable list of all global mwscript variables.
|
|
-- @field [parent=#GlobalContent] #map<#string, #number> records
|
|
-- @usage
|
|
-- content.globals.records.MyVariable = 42
|
|
|
|
--- @{#IngredientContent}: Ingredient manipulation.
|
|
-- @field [parent=#content] #IngredientContent ingredients
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#IngredientRecord}s.
|
|
-- Note that ingredient effects only have the `id`, `affectedAttribute`, and `affectedSkill` properties.
|
|
-- @field [parent=#IngredientContent] #list<openmw.types#IngredientRecord> records
|
|
-- @usage
|
|
-- content.ingredients.records.MyIngredient = { template = content.ingredients.records['ingred_ectoplasm_01'], name = 'Soylent', effects = { { id = 'vampirism' } } }
|
|
|
|
--- @{#LevCreatureContent}: Levelled creature manipulation.
|
|
-- @field [parent=#content] #LevCreatureContent levelledCreatures
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#CreatureLevelledListRecord}s.
|
|
-- @field [parent=#LevCreatureContent] #list<openmw.types#CreatureLevelledListRecord> records
|
|
-- @usage
|
|
-- content.levelledCreatures.records.MyLevCreature = { calculateFromAllLevels = true, chanceNone = 0.5, creatures = { { id = 'scrib', level = 1 }, { id = 'fargoth', level = 2 } } }
|
|
|
|
--- @{#LevItemContent}: Levelled item manipulation.
|
|
-- @field [parent=#content] #LevItemContent levelledItems
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#ItemLevelledListRecord}s.
|
|
-- @field [parent=#LevItemContent] #list<openmw.types#ItemLevelledListRecord> records
|
|
-- @usage
|
|
-- content.levelledItems.records.MyLevItem = { calculateForEach = true, calculateFromAllLevels = true, items = { { id = 'keening', level = 1 }, { id = 'sunder', level = 1 } } }
|
|
|
|
--- @{#LightContent}: Light manipulation.
|
|
-- @field [parent=#content] #LightContent lights
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#LightRecord}s.
|
|
-- @field [parent=#LightContent] #list<openmw.types#LightRecord> records
|
|
-- @usage
|
|
-- content.lights.records.MyLight = { template = content.lights.records['torch'], duration = -1, name = 'Infinite Torch' }
|
|
|
|
--- @{#LockpickContent}: Lockpick manipulation.
|
|
-- @field [parent=#content] #LockpickContent lockpicks
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#LockpickRecord}s.
|
|
-- @field [parent=#LockpickContent] #list<openmw.types#LockpickRecord> records
|
|
-- @usage
|
|
-- content.lockpicks.records.MyLockpick = { template = content.lockpicks.records['skeleton_key'], name = 'Digipick' }
|
|
|
|
--- @{#MagicEffectContent}: Magic effect manipulation.
|
|
-- @field [parent=#content] #MagicEffectContent magicEffects
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.core#MagicEffect}s.
|
|
-- @field [parent=#MagicEffectContent] #list<openmw.core#MagicEffect> records
|
|
-- @usage
|
|
-- content.magicEffects.records.MyMagicEffect = { template = content.magicEffects.records['summonscamp'], name = 'Summon Nothing' }
|
|
|
|
--- @{#MiscContent}: Misc manipulation.
|
|
-- @field [parent=#content] #MiscContent miscs
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#MiscellaneousRecord}s.
|
|
-- @field [parent=#MiscContent] #list<openmw.types#MiscellaneousRecord> records
|
|
-- @usage
|
|
-- content.miscs.records.MyMisc = { template = content.miscs.records['gold_001'], mwscript = 'BILL_MarksSpiritSummon', weight = 5 }
|
|
|
|
--- @{#PotionContent}: Potion manipulation.
|
|
-- @field [parent=#content] #PotionContent potions
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#PotionRecord}s.
|
|
-- @field [parent=#PotionContent] #list<openmw.types#PotionRecord> records
|
|
-- @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 } } }
|
|
|
|
--- @{#ProbeContent}: Probe manipulation.
|
|
-- @field [parent=#content] #ProbeContent probes
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#ProbeRecord}s.
|
|
-- @field [parent=#ProbeContent] #list<openmw.types#ProbeRecord> records
|
|
-- @usage
|
|
-- content.probes.records.MyProbe = { template = content.probes.records['probe_bent'], quality = 5, name = 'Alien Probe' }
|
|
|
|
--- @{#RaceContent}: Race manipulation.
|
|
-- @field [parent=#content] #RaceContent races
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#RaceRecord}s.
|
|
-- @field [parent=#RaceContent] #list<openmw.types#RaceRecord> records
|
|
-- @usage
|
|
-- content.races.records.MyRace = { template = content.races.records['wood elf'], name = 'Sheep Elf', height = { male = 2, female = 2 }, weight = { male = 2, female = 2 } }
|
|
|
|
--- @{#RepairContent}: Repair item manipulation.
|
|
-- @field [parent=#content] #RepairContent repairs
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#RepairRecord}s.
|
|
-- @field [parent=#RepairContent] #list<openmw.types#RepairRecord> records
|
|
-- @usage
|
|
-- content.repairs.records.MyRepair = { template = content.repairs.records['hammer_repair'], name = 'Hammer Time' }
|
|
|
|
--- @{#SkillContent}: Skill manipulation.
|
|
-- @field [parent=#content] #SkillContent skills
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.core#SkillRecord}s.
|
|
-- @field [parent=#SkillContent] #list<openmw.core#SkillRecord> records
|
|
-- @usage
|
|
-- content.skills.records.MySkill = { name = 'C++', werewolfValue = 0, attribute = 'MyAttribute', specialization = 'magic' }
|
|
|
|
--- @{#SpellContent}: Spell manipulation.
|
|
-- @field [parent=#content] #SpellContent spells
|
|
|
|
--- @{openmw.core#SpellType}: Spell types
|
|
-- @field [parent=#SpellContent] openmw.core#SpellType TYPE
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.core#Spell}s.
|
|
-- @field [parent=#SpellContent] #list<openmw.core#Spell> records
|
|
-- @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 } } }
|
|
|
|
--- @{#StaticContent}: Static manipulation.
|
|
-- @field [parent=#content] #StaticContent statics
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.types#StaticRecord}s.
|
|
-- @field [parent=#StaticContent] #list<openmw.types#StaticRecord> records
|
|
-- @usage
|
|
-- content.statics.records.MyStatic = { model = 'meshes/b/B_N_Wood Elf_M_Head_02.nif' }
|
|
|
|
--- @{#SoundContent}: Sound manipulation.
|
|
-- @field [parent=#content] #SoundContent sounds
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.core#SoundRecord}s.
|
|
-- @field [parent=#SoundContent] #list<openmw.core#SoundRecord> records
|
|
-- @usage
|
|
-- content.sounds.records.MySound = { template = content.sounds.records['MournDayAmb'], fileName = 'sound/fx/funny.wav' }
|
|
|
|
--- @{#WeatherContent}: Weather manipulation.
|
|
-- @field [parent=#content] #WeatherContent weathers
|
|
|
|
---
|
|
-- A mutable list of all @{openmw.core#WeatherRecord}s.
|
|
-- @field [parent=#WeatherContent] #list<openmw.core#WeatherRecord> records
|
|
-- @usage
|
|
-- content.weathers.records.MyWeather = { template = content.weathers.records['snow'], particleEffect = 'meshes/fire_small.nif' }
|
|
|
|
return nil
|