Lua API global Variable Viewer (gvv)

by Ritn

This is a debugging tool. This mod adds commands /gvv and others and a hotkey(Ctrl+Shift+V) to allow you to check _G and global table of map or each mods. Only admins can use command if it is multiplay game. You have to input some code for temporary accessibility or have to edit "control.lua" of other mod or map to access global table of the mod or map. See "Helper" tab for instructions.

Utilities
a month ago
1.0 - 2.0
3.33K

b Missing LuaPlayer.selected

4 years ago
(updated 4 years ago)

Inherited from LuaControl

BTW thanks for this very usefull mod :-)
I found it much too late.

4 years ago

Did you uncheck "View nil" in property viewer? "View nil" shows properties can be defined in the object but not has value currently. It's different to "n/a", which is can not be defined.
If you uncheck "View nil" in property viewer, the values are only shown when it is not nil at the moment you refresh data of tree GUI.
Refresh can be done by opening sub folder at first time after refresh or clicking current object entry at left side bar list.

4 years ago
(updated 4 years ago)

ah ok, not a bug its an an operator error ;-)
now i see 'selected' is always nil. because if I click to update the gui. there is nothing more selected.
added to variable trace: (game.players[1].character.selected) shows "LuaEntity"
difficult to explore the selected thing ;-)
Could be here a keyboard shortcut to refresh the ui w/o mouse? so i can keep selecting anything during refresh
thanks for help

4 years ago

There is a tip for registering an selected entity in global table at "Helper > Usage Tips". A sniffet for chat console to input when you targeting an entity.

4 years ago

ok thanks I will have a closer look at it

4 years ago

step1, paste the string in helper-the second section-the first text editor, to your control.lua, inside mod or scenario.
step2, /c some name = game.players[1].seleted
step3, in the second tab in gvv, find your mod or level, the variable "some name" would do it for you.

New response