Skip to content

Add lua function world.overrideRecord to allow scripts to override records that exist

Zackhasacat requested to merge zackhasacat/openmw:override_lua into master

This exposes the record overriding built into the engine. This is what allows the player to have their name or race changed in chargen for example.

This would allow for mods to change features or names of objects. It would also mean that "player clones" as discussed in !3039 (closed) would not be necessary.

For example, you can change the player's name with this one liner in the console with the player selected(luag mode)

Just NPC for now, but creature and containers can also be overridden.

world.overrideRecord(types.NPC.createRecordDraft({template = types.NPC.record(selected.recordId),name = "My New Name"}))

Merge request reports