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.71K

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

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

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

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

3 years ago

I saw the update. Good job!

New response