Page 1 of 1

global Variable Viewer and event Viewer

Posted: Sat Sep 05, 2020 6:48 am
by x2605
I made 2 mods usable in actual game.

Lua API Event Trace
https://mods.factorio.com/mod/0-event-trace
This mod monitors events listed in defines.events
Provides filtering function.

Lua API global Variable Viewer (gvv)
https://mods.factorio.com/mod/gvv
You can explore global table of map or each mod you are developing, with directory foldable structure GUI!
You can periodically track specific variables or entity/object's property.
It provides report for multiplay instable or dangerous / unable to be remoted variables in global table by diagnosis.

Visit each link for more information and download.
github links are also available.

You can download them from in-game mod portal too.

Running console lua code in sandbox scope of a mod

Posted: Mon Sep 07, 2020 2:15 pm
by x2605
Lua API global Variable Viewer (gvv) 0.2.0 update.
https://mods.factorio.com/mod/gvv/changelog

Now gvv mod is updated to 0.2.0 and have commands similar to built-in commands /c and /sc.
To make it available to run lua code in the sandbox of each mod which loaded gvv's remote module.

/g-c --[[<mod_name>]] <lua_code> : Execute Lua code in global scope of given mod. Uses gvv if no mod name given. Only for admin.
/g-sc --[[<mod_name>]] <lua_code> : Execute Lua code in global scope of given mod without printing input to console. Uses gvv if no mod name given. Only for admin.

And added internal remote function, which is used by /g-c commands,

Code: Select all

remote.call("__<mod_name>__gvv", "c", <script>, ...)
And,

Code: Select all

...
will become

Code: Select all

local arg = {...}
inside of <script>(string type).

There is an example of using remote function at /editor Lua snippet in "Usage Tips" menu of in-game gvv main GUI.

Running console lua code in sandbox scope of a mod

Posted: Tue Sep 08, 2020 10:26 am
by x2605
My mistake.
I didn't know built-in /c command already can access mod's sandbox using /c __<mod_name>__ header.

So I updated gvv to 0.2.1 and removed /g-c command I was made. Still you can see source code of them at 0.2.0 source if you have interest.
Also I made gvv to generate pasteable code to make any mods temporarily accessible by gvv mod without editing "control.lua". Yeah! 8-)

Track events and look into properties of tracked LuaObjects

Posted: Wed Sep 09, 2020 9:42 pm
by x2605
I just updated Event Trace mod,
https://mods.factorio.com/mod/0-event-trace

Now saving event log at global variable scope became possible if gvv mod is active too.
They are in collaborative now!
https://mods.factorio.com/mod/gvv