List of LuaSTG Global Variables

From LuaSTG Wiki
Jump to navigation Jump to search

This page is created for documentation of global variables in LuaSTG.

The following items should be recorded in the table below:

  1. Where a global variable is created
  2. Positions in the code where it is modified and where it is set to nil
  3. Brief description of its variable type, meaning and intended use.

Disclaimer: Most of LuaSTG global variables exist because they have been this way for a long time, and this is likely not gonna change for reasons like compatibility.

The creation of this page is not to encourage people to add new global variables into the source code.

General Global Variables in LuaSTG[edit | edit source]

Some variables may only exist in particular versions of LuaSTG.

Name Description
stage.groups
scoredata
scoredata.difficulty_select
lstg.group_name
player_list
scoredata.player_select
lstg.var.player_name
lstg.var.rep_player
lstg.practice
lstg.stage_name
lstg.var.sc_index
lstg.tmpvar.rep_path
lstg.tmpvar.rep_stage
setting
ext.pause_menu_order This is a string that specifies what is selected in the game pause menu; set to nil in the dispatch of 'onStageSet' event
stage.preserve_res Whether or not to not clear the 'stage' resource pool at the end of a stage; set to true in the dispatch of 'onStageReset' event

Visual and Gameplay Related[edit | edit source]

Some variables may only exist in particular versions of LuaSTG.

Name Description
lstg.world
lstg.view3d
screen.scale
cheat
player
_boss refers to the current boss when a boss is present
lstg.var.lifeleft number of player life; the game is over when this gets below 0
lstg.var.bomb number of player bomb
lstg.var.power player power (represented as an integer 100 times as big as the actual power)
lstg.var.pointrate
lstg.var.graze
lstg.var.score
lstg.var.faith
lstg.var.chip
lstg.var.bomb_chip number of bomb chips
lstg.var.bonusflag
lstg.var.score_tmp
lstg.var.score_draw
lstg.var.bombchip
lstg.var.coun_num
lstg.var.collectitem
lstg.var.itembar
lstg.var.block_spell
lstg.var.chip_bonus
lstg.var.bombchip_bonus
lstg.var.init_player_data