Skip to content

Add functionality for lua to view and modify ownership data for GameObjects

This allows lua scripts to see and modify the ownership data for items/containers/activators.

It adds these functions to gameObject. If it's preferable, it can instead be added to types.Container, types.Activator, and types.Item

You can test these functions in the console, you can read the values from any script, but must be in a global script to set values.

If you type 'luag' in the console, then you can type 'selected.owner' to check the owner NPC, or selected:setOwner("fargoth"). If your NPC specified is invalid, it will remove ownership.

You can do similar with selected.ownerFaction, and selected:SetownerFaction("mages guild"), and selected:setOwnerFactionRank(2)

Merge request reports

Loading