Lua API global Variable Viewer (gvv)

by x2605

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
2 years ago
1.0 - 1.1
2.66K

b Missing LuaPlayer.selected

3 years ago
(updated 3 years ago)

Inherited from LuaControl

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

3 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.

3 years ago
(updated 3 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

3 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.

3 years ago

ok thanks I will have a closer look at it

3 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