Skip to content

Commit f6efb28

Browse files
committed
Merge branch 'lua_case' into 'master'
Add more information about generated IDs and record info. See merge request OpenMW/openmw!3384
2 parents c33aaa5 + d368937 commit f6efb28

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

files/lua_api/openmw/world.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
-- After creation the object is in the disabled state. Use :teleport to place to the world or :moveInto to put it into a container or an inventory.
154154
-- Note that dynamically created creatures, NPCs, and container inventories will not respawn.
155155
-- @function [parent=#world] createObject
156-
-- @param #string recordId Record ID in lowercase
156+
-- @param #string recordId Record ID. String ids that came from ESM3 content files are lower-cased. If another ID is provided, it must be provided exactly as it is, case sensitive.
157157
-- @param #number count (optional, 1 by default) The number of objects in stack
158158
-- @return openmw.core#GameObject
159159
-- @usage -- put 100 gold on the ground at the position of `actor`
@@ -162,9 +162,11 @@
162162
-- @usage -- put 50 gold into the actor's inventory
163163
-- money = world.createObject('gold_001', 50)
164164
-- money:moveInto(types.Actor.inventory(actor))
165+
-- @usage -- create the an object for the first generated item
166+
-- potion = world.createObject('Generated:0x0', 1)
165167

166168
---
167-
-- Creates a custom record in the world database.
169+
-- Creates a custom record in the world database; String ids that came from ESM3 content files are lower-cased.
168170
-- Eventually meant to support all records, but the current
169171
-- set of supported types is limited to:
170172
--
@@ -177,7 +179,7 @@
177179
-- * @{openmw.types#ActivatorRecord},
178180
-- * @{openmw.types#LightRecord}
179181
-- @function [parent=#world] createRecord
180-
-- @param #any record A record to be registered in the database. Must be one of the supported types.
182+
-- @param #any record A record to be registered in the database. Must be one of the supported types. The id field is not used, one will be generated for you.
181183
-- @return #any A new record added to the database. The type is the same as the input's.
182184

183185
--- @{#VFX}: Visual effects

0 commit comments

Comments
 (0)