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

i Quick way to locate a prototype when debugging a mod.

4 years ago

Is it possible to add a search text editor widget to the 3rd tab to help find the item of an entity prototype? And if it's possible not to display all the nil variables?
Or should I simply do it in the first tab with game.entity_prototype["the-entity-here"]? Or assign it to some global variable in order to watch it in the second tab?

4 years ago
(updated 4 years ago)

For now, viewer doesn't have search function. I think it is quite hard work for me now, because it has tree gui. I have been thinking how to make it with factorio gui system.
I recommend to make a new global variable tracking sub property of an entity.

4 years ago

I tried 1 or 2 way but failed. I can't remember the detail. The simplest way might be, a check box to control whether to display the nil attributes. The same way as whether to display the function members. I went over some of the vanilla lua code to see how they implemented the prototypes. I found the index strings for different prototypes are different. Some are very short with very few attributes.
I don't know. If this is not possible, it could be harder than expected.

4 years ago

I saw the update. Good job!

New response