Package openmw.worldΒΆ

openmw.world is an interface to the game world for global scripts.

Can not be used from local scripts.

Usage:

local world = require('openmw.world')

Type world

world.activeActors

List of currently active actors.

world.getCellByName(cellName)

Loads a named cell

world.getExteriorCell(gridX, gridY)

Loads an exterior cell by grid indices

world.getGameTime()

Game time in seconds.

world.getGameTimeScale()

The scale of game time relative to simulation time.

world.getSimulationTime()

Simulation time in seconds.

world.getSimulationTimeScale()

The scale of simulation time relative to real time.

world.isWorldPaused()

Whether the world is paused (onUpdate doesn't work when the world is paused).

world.setGameTimeScale(ratio)

Set the ratio of game time speed to simulation time speed.

world.setSimulationTimeScale(scale)

Set the simulation time scale.

Type world

Field(s)

openmw.core#ObjectList world.activeActors

List of currently active actors.

world.getCellByName(cellName)

Loads a named cell

Parameter

  • #string cellName :

Return value

openmw.core#Cell:

world.getExteriorCell(gridX, gridY)

Loads an exterior cell by grid indices

Parameters

  • #number gridX :

  • #number gridY :

Return value

openmw.core#Cell:

world.getGameTime()

Game time in seconds.

Return value

#number:

world.getGameTimeScale()

The scale of game time relative to simulation time.

Return value

#number:

world.getSimulationTime()

Simulation time in seconds.

The number of simulation seconds passed in the game world since starting a new game.

Return value

#number:

world.getSimulationTimeScale()

The scale of simulation time relative to real time.

Return value

#number:

world.isWorldPaused()

Whether the world is paused (onUpdate doesn't work when the world is paused).

Return value

#boolean:

world.setGameTimeScale(ratio)

Set the ratio of game time speed to simulation time speed.

Parameter

  • #number ratio :

world.setSimulationTimeScale(scale)

Set the simulation time scale.

Parameter

  • #number scale :