det wrote:There is also a a gadget made by jK that can profile both widgets and gadgets but must be included in the mod. You can find it
here.
I would like to profile KP gadgets.
I tried using jK
profiler, however:
- First it complained about VFS.Include(SCRIPT_DIR .. 'callins.lua', nil, VFS.ZIP_ONLY) but that was easy to fix.
- Then it complains that 95: attempt to index local 'gh' (a nil value). A few line above it does local gh = gadgetHandler.gadgetHandler
- I tried just replacing it with gh = gadgetHandler but then the
profiler doesn't list any gadget.
- jK told me to use CA gadget handlers. (But not what files does that entail precisly.)
- So I copied \LuaRules\*.lua from C.A..
- faction.lua cause issue when outside CA, but that was easy to fix.
- But then most of KP gadgets failed!
- After some investigation I found it was due to GameStart not being called.
- Then TheFatController told me to use BA Chicken Defense gadget handlers, which are based of CA but do have the gamestart called.
- So I did, but then dbg_profiler.lua complained about gh being nil again.
- Then I mixed BACD's gadgets.lua with CA's gadgets.lua, and the
profiler worked, but I was back at the profilder listing 0 gadgets using 0.0% FPS, which is obviously wrong.
- As an aside, having to prefix all commands to gadgets by /LuaRules is rather inconvenient. I wish I could type /uprofile instead of /luarules uprofile.
To sum it up, can anyone help me get a gadget
profiler that work in a mod other than CA?