World
game and camera
Time, view state, icons, interface settings and the camera.
game
game.in_game()boolean
Whether you're in the world (not loading, at character select or in a cinematic).
game.view_state()integer
One of the
game.VIEW_STATE_* constants.game.loading_stage()integer
How far a map load is.
Sets the loading stage.
The game window's size in pixels.
game.tick_count()integer
Ticks since the game started.
game.game_time()integer
The game clock, in milliseconds.
game.world_time()integer
The time of day in the world.
Sets the time of day on your screen.
game.ping()integer
Your ping, in milliseconds.
game.timeouts()table?
{model, map, agent}: how long the game keeps unused models, maps and agents loaded.Sets any of them.
game.steam()boolean
Whether the game runs through Steam.
game.color_blind_mode()boolean
Whether color-blind mode is on.
Turns color-blind mode on or off.
game.drawings_enabled()boolean
Whether overlays are drawn.
Turns overlays on or off.
A profession's icon, for
ui.image and gfx.image.A specialization's icon.
The icon for a profession with a specialization.
View states
VIEW_STATE_IN_GAMEVIEW_STATE_LOADING_SCREENVIEW_STATE_CHAR_SELECTVIEW_STATE_CINEMATICVIEW_STATE_SCOUTprofessions
Profession and specialization ids, as professions.GUARDIAN and so on, for game.profession_icon, game.spec_icon and agent:profession().
Professions
GUARDIANWARRIORENGINEERRANGERTHIEFELEMENTALISTMESMERNECROMANCERREVENANTElite specializations
DRAGONHUNTERFIREBRANDWILLBENDERLUMINARYBERSERKERSPELLBREAKERBLADESWORNPARAGONSCRAPPERHOLOSMITHMECHANISTAMALGAMDRUIDSOULBEASTUNTAMEDGALESHOTDAREDEVILDEADEYESPECTERANTIQUARYTEMPESTWEAVERCATALYSTEVOKERCHRONOMANCERMIRAGEVIRTUOSOTROUBADOURREAPERSCOURGEHARBINGERRITUALISTHERALDRENEGADEVINDICATORCONDUITgame_ui
The game's own interface settings.
game_ui.text_box_has_focus()boolean
Whether the player is typing in a text box, such as chat. Let keys through while this is true.
game_ui.interface_size()integer
0 small, 1 normal, 2 large, 3 larger.
game_ui.ground_targeting()integer
0 normal, 1 fast with range indicator, 2 instant.
Sets ground targeting.
game_ui.estate()integer
Raw interface state.
Sets it.
"en", "fr", "de", "es" or "zh".camera
Where a world position is on screen;
nil when it's behind the camera.The world position under the mouse cursor.
The first thing between two points:
{position, normal}.camera.zoom()number?
The camera's zoom.
Sets the zoom.
camera.max_zoom()number?
How far the camera can zoom out.
Sets how far it can zoom out.
Whether the world is drawn.
Turns drawing the world on or off.