-
Posts
584 -
Joined
-
Last visited
Posts posted by ethanwdp
-
-
8 hours ago, Fenris_Wolf said:
Kahlua has a limit of 200 local variables on any given stack. Your ISUICheatMenu.createMenuEntries function defines near 150 of them (minus a few in comments).
The local stack includes more then the 150 in your function, the launching of debug mode is obviously introducing extra variables onto the stack that don't exist in normal launch.
Note not all 150 of yours will actively be on a stack, ones defined local in a "if" statement or other block should fall out of scope, but I'm not a expert on the kahlua internals and how it tracks the stack count.
Refactor your function into multiple smaller functions and blocks so un-needed variables fall out of scope faster, and/or reuse variables instead of declaring new ones.
Refactoring the Vehicle submenu creation loop into a separate function seems to have fixed the error, so I guess now is a good time to get around to that rewrite I keep procrastinating on. Thank you so much for your help.
-
1 hour ago, Planet Algol said:
yeah, cheat menu does not work in debug mode, straight up.
1 hour ago, Planet Algol said:Use necroforge instead.
That's why I made this thread, haha. It kinda sucks that some of my mod's users have turned to alternatives such as NF because of this issue, but I'm really not sure how to fix it.
-
When loading my Cheat Menu mod with the game's Debug Mode enabled, I get the following error:
LOG : Lua, 1581544592023> LuaManager.RunLua> Loading: C:/Users/Owner_/Zomboid/Workshop/Cheat Menu/Contents/mods/Cheat Menu/media/lua/client/ISUI/CheatCoreForCheatMenu.lua LOG : General, 1581544592025> [CHEAT MENU] CheatCore successfully loaded LOG : Lua, 1581544592026> LuaManager.RunLua> Loading: C:/Users/Owner_/Zomboid/Workshop/Cheat Menu/Contents/mods/Cheat Menu/media/lua/client/ISUI/CheatMenuCompassPresets.lua LOG : Lua, 1581544592027> LuaManager.RunLua> Loading: C:/Users/Owner_/Zomboid/Workshop/Cheat Menu/Contents/mods/Cheat Menu/media/lua/client/ISUI/CheatMenuHomeWindow.lua LOG : Lua, 1581544592027> LuaManager.RunLua> Loading: C:/Users/Owner_/Zomboid/Workshop/Cheat Menu/Contents/mods/Cheat Menu/media/lua/client/ISUI/CheatMenuTerraformTiles.lua LOG : Lua, 1581544592028> LuaManager.RunLua> Loading: C:/Users/Owner_/Zomboid/Workshop/Cheat Menu/Contents/mods/Cheat Menu/media/lua/client/ISUI/CrucibleUI/crucibleMain.lua LOG : Lua, 1581544592029> LuaManager.RunLua> Loading: C:/Users/Owner_/Zomboid/Workshop/Cheat Menu/Contents/mods/Cheat Menu/media/lua/client/ISUI/GenericInputWindow.lua LOG : Lua, 1581544592029> LuaManager.RunLua> Loading: C:/Users/Owner_/Zomboid/Workshop/Cheat Menu/Contents/mods/Cheat Menu/media/lua/client/ISUI/ISUICheatMenu.lua Feb 12, 2020 4:56:32 PM zombie.Lua.LuaManager RunLua SEVERE: Error found in LUA file: C:/Users/Owner_/Zomboid/Workshop/Cheat Menu/Contents/mods/Cheat Menu/media/lua/client/ISUI/ISUICheatMenu.lua ERROR: General, 1581544592035> ExceptionLogger.logException> Exception thrown java.lang.ArrayIndexOutOfBoundsException: 200 at LexState.new_localvar line:762. ERROR: General, 1581544592035> DebugLogStream.printException> Stack trace: java.lang.ArrayIndexOutOfBoundsException: 200 at org.luaj.kahluafork.compiler.LexState.new_localvar(LexState.java:762) at org.luaj.kahluafork.compiler.LexState.localstat(LexState.java:1648) at org.luaj.kahluafork.compiler.LexState.statement(LexState.java:1767) at org.luaj.kahluafork.compiler.LexState.chunk(LexState.java:1791) at org.luaj.kahluafork.compiler.LexState.block(LexState.java:1351) at org.luaj.kahluafork.compiler.LexState.test_then_block(LexState.java:1600) at org.luaj.kahluafork.compiler.LexState.ifstat(LexState.java:1611) at org.luaj.kahluafork.compiler.LexState.statement(LexState.java:1737) at org.luaj.kahluafork.compiler.LexState.chunk(LexState.java:1791) at org.luaj.kahluafork.compiler.LexState.body(LexState.java:1027) at org.luaj.kahluafork.compiler.LexState.simpleexp(LexState.java:1208) at org.luaj.kahluafork.compiler.LexState.subexpr(LexState.java:1304) at org.luaj.kahluafork.compiler.LexState.expr(LexState.java:1322) at org.luaj.kahluafork.compiler.LexState.explist1(LexState.java:1037) at org.luaj.kahluafork.compiler.LexState.assignment(LexState.java:1404) at org.luaj.kahluafork.compiler.LexState.exprstat(LexState.java:1697) at org.luaj.kahluafork.compiler.LexState.statement(LexState.java:1780) at org.luaj.kahluafork.compiler.LexState.chunk(LexState.java:1791) at org.luaj.kahluafork.compiler.LexState.compile(LexState.java:199) at se.krka.kahlua.luaj.compiler.LuaCompiler.loadis(LuaCompiler.java:132) at se.krka.kahlua.luaj.compiler.LuaCompiler.loadis(LuaCompiler.java:124) at zombie.Lua.LuaManager.RunLua(LuaManager.java:461) at zombie.Lua.LuaManager.RunLua(LuaManager.java:431) at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:279) at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:206) at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:324) at zombie.GameWindow.init(GameWindow.java:1008) at zombie.GameWindow.mainThreadInit(GameWindow.java:523) at zombie.GameWindow.mainThread(GameWindow.java:463) at java.lang.Thread.run(Thread.java:745)
It doesn't specify a line, but if I'm reading the error correctly then there's something about one of my if/then expressions that the compiler doesn't like. This only happens when Debug Mode is enabled, so I'm guessing that there's a conditional for the Debug flag somewhere in the game's code that modifies how the compiler handles expressions. Some insight on how to solve this would be greatly appreciated.
The Lua file that's encountering the error is over 600 lines long and I don't really expect anyone to dig through it, but I've attached it for good measure.
-
Quote
which game files have the code that runs zombie migration?
I think the files you're looking for are in (game folder)/zombie/popman. All of the files in this folder have the .class extension, which can be viewed with a Java decompiler.
-
I'm not sure if this is a bug with LuaManager or if I'm doing something wrong, but calling addVehicle spits out an invocation error on 41.21. The vehicle seems to be spawned correctly, but it disappears when the player leaves the cell. On Build 40 neither the error nor the despawning occurs.
Code to replicate the error:
addVehicle("Base.SmallCar") -- spawns a Chevalier Dart
The error:
QuoteLOG : General, 1575119689371> ERROR4!!!
LOG : General, 1575119689375>
LOG : General, 1575119689379> -----------------------------------------
LOG : General, 1575119689383> STACK TRACE
LOG : General, 1575119689386> -----------------------------------------
LOG : General, 1575119689390> Callframe at: addVehicle
LOG : General, 1575119689394> function: stdin -- file: objects.lua line # 1
LOG : General, 1575119689398> function: runLua -- file: LuaInterpreter.lua line # 192
LOG : General, 1575119689402> function: onMouseUp -- file: ISButton.lua line # 55
ERROR: General, 1575119689406> ExceptionLogger.logException> Exception thrown java.lang.reflect.InvocationTargetException at NativeMethodAccessorImpl.invoke0 (Native Method).
ERROR: General, 1575119689410> DebugLogStream.printException> Stack trace:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at se.krka.kahlua.integration.expose.caller.MethodCaller.call(MethodCaller.java:62)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:198)
at se.krka.kahlua.integration.expose.LuaJavaInvoker.call(LuaJavaInvoker.java:188)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:186)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1006)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:167)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1942)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1744)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
at zombie.ui.UIElement.onMouseUp(UIElement.java:1137)
at zombie.ui.UIElement.onMouseUp(UIElement.java:1091)
at zombie.ui.UIManager.update(UIManager.java:767)
at zombie.GameWindow.logic(GameWindow.java:234)
at zombie.core.profiling.AbstractPerformanceProfileProbe.invokeAndMeasure(AbstractPerformanceProfileProbe.java:71)
at zombie.GameWindow.frameStep(GameWindow.java:673)
at zombie.GameWindow.run_ez(GameWindow.java:594)
at zombie.GameWindow.mainThread(GameWindow.java:460)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at zombie.vehicles.BaseVehicle.save(BaseVehicle.java:2456)
at zombie.vehicles.VehiclesDB.addVehicleInt(VehiclesDB.java:1036)
at zombie.vehicles.VehiclesDB.addVehicle(VehiclesDB.java:899)
at zombie.Lua.LuaManager$GlobalObject.addVehicle(LuaManager.java:5950)
... 22 more -
Use Perks.FromString (or Perks.fromIndex if you're iterating numerically). I don't know why, but accessing Perks like a regular table & passing it to a Kahlua function results in errors.
for i, k in pairs(Perks) do local perk = Perks.FromString(i) if PerkFactory.getPerk(perk) ~= nil then getPlayer():getXp():AddXP(perk,10) end end
Some of the "perks" (i.e Agility) are categories, so I'd recommend using PerkFactory.getPerk to ensure that the perk exists.
-
On 10/20/2019 at 10:05 AM, ZombieSlasher said:
I'm using 40.43 and mod don't appear to me. It doesn't work with this version or it's a problem of mine?
It's most likely a problem on your end, as it works fine for me. If you don't mind, could you load into a save with Cheat Menu enabled & send me the console.txt after closing the game?
-
Great update!
Is there any way to get the console back? Being able to print stuff to the console while testing mods was super useful.
-
On 9/8/2019 at 12:49 AM, syfy said:
ok, too long to read.....
is it possible to use this to edit other players individual skill levels while in game?
No.
-
6 hours ago, bobthejob said:
please please post a direcct download link so gog users can enjoy this mod! thank you!
Apologies for the late reply, I don't check this forum much. I've updated the description to include another manual download link.
-
Updated to V2.7.1
Changelog:
Prevent Death now functions properly, courtesy of Slok. Thanks to his code contribution, nothing short of falling several stories will kill you.
Fixed quite a few bugs for Warp Time, it now correctly sets days/months.
Changed the amount of years in Warp Time from 1 - 20 (additive) to 1993 - 2077.
Fixed a minor bug in the Vehicles submenu that added engine power/loudness/quality setters to every menu in the Under-the-hood category. -
-
Updated to V2.7.
Changelog:
Added Vehicle Godmode.
Added Repair All Parts, Add Key To Inventory, Permanently Remove Vehicle, and Toggle Hotwire.
Added vehicle part editing, every part on the vehicle can now be edited.
Added Freeze Day/Night Cycle.
Redid the UI elements so that they now scale properly for different resolutions.
Changed how Stats Toggle works, mostly just a behind-the-scenes change.
Tidied up CheatCoreForCheatMenu.lua.
-
13 hours ago, Jericoshost said:
Thanks I will give it a try! Do you know if it works with IWBUMSB?
Also I would like your reply but I have apparently reached the like limit?
It works with every version from 32 and onwards. It's modular, so if one feature breaks the rest will still be working.
-
Cheat Menu has Instant Actions which makes all item transfers complete instantly, as well as building things (don't think it works on crafting, since there's a separate function for that in the mod).
-
-
On 2016-12-01 at 1:02 PM, Snakeman said:
local first = ZombRand(11);
local sec = ZombRand(11);
if first > sec then
first = sec;
end
QueenGlory = getText("Popular_Queen Glory") .. first .. "/" .. sec;
minor efficiency tweak:
local function retPopularity(username) local sec = ZombRand(11); local first = ZombRand(sec); -- ensures that it will always be within sec. example: sec is 7, first will be number between 0 and sec local userPop = popularity[username] .. first .. "/" .. sec; return userPop; end retPopularity("snakeman")
-
On 2016-10-15 at 10:48 AM, Cithanor said:
Okay, I am having a few issues with the mod on multiplayer.
I am an admin, and have the files loaded, so I am unsure why they aren't all working properly.
-When using the zombie brush, the zombies show up and disappear after 2-3 seconds.
-When using the warp time command, after a few seconds it changes back again. Any idea why these wouldn't be working?Both zombies and time are server-sided, unfortunately. Cheat Menu spawns them client-sided, and as far as I'm aware there is no way for me to spawn them server-sided.
-
Instead of implementing structural integrity or percentage-based chances for them to break while climbing, why not just have zeds destroy them? Every sheet rope would have a health bar to it. A zombie would attack it a couple of times, and it would get torn down.
(Apologies if this has already been suggested, the search bar is a bit wonky.)
-
3 hours ago, Queen Glory said:
Wait theres a mod for being able to cheat on singleplayer? how have I not known this? well now "it is known"
Yeah, it's been out for about a year now
-
7 hours ago, JohnDoh337 said:
You're welcome, I don't mind helping. I tested it more thoroughly, results below:
Not Working
33.20&2.5.1 results:
Right click to open context window first time, console spammed with Cheat Menu.
Right click second time, game locks up and have to force close.WORKS
34.26&2.5.1:
Open context window, no console spam, select Insta-kill Melee, no console spam, equip rolling pin, insta-kill zombie. Then equipped bat in one hand, no insta-kill. Equipped bat in both hands insta-kill works. This version seems to be working fine. Insta-kill only works with two handed weapons if weapon is equipped in both hands.WORKS (see edit)
33.20&2.5.1NAC:
Right click, no console spam, select Insta-kill Melee, no console spam, equip rolling pin, console spam and insta-kill not working.
Unequip rolling pin, console stops spamming, equip baseball bat in both hands, console spammed and insta-kill not working. All other cheats work.
EDIT:must have weapon equipped before enabling Insta-kill Melee or it won't work and console will get spammed. Two handed weapons like baseball bat, golfclub and poolcue must be equipped in both hands to insta-kill34.26&2.5.1NAC
Same results as 33.20&2.5.1NACI have all the consoles saved if you'd like them. I have attached the one that didn't work
Strange... 33.20 must have something funky going on, since this issue seems to only occur on that version. Thankfully, it appears to be fixed on newer versions (34.26 and above). Again, I'd like to thank you for your input on this issue!
-
16 hours ago, JohnDoh337 said:
The mod (with admin check) does work on my system when playing PZ version 34.26 IWBUMS
I tired the version without admin check and it doesn't show the CheatMenu context menu when right clicked.
I've attached the save console logs for each version of game and mod.
Console34.26 is larger because it started spamming the console after I tried enabling Melee insta-kill.
If there is anything else I can do to help, I don't mind helping. Thanks for your time.
I may have figured out why this issue is occurring. Looking back at previous Cheat Menu versions, I called Events.OnFillWorldObjectContextMenu.Add(ISUICheatMenu.createMenuEntries) in ISUICheatMenu.lua. When I added the admin check, I moved that over to the CheatCoreForCheatMenu.lua file. It seems that ISUICheatMenu.lua is loaded after CheatCoreForCheatMenu.lua, and I was calling Events.OnFillWorldObjectContextMenu.Add(ISUICheatMenu.createMenuEntries) too early.
As for melee insta kill erroring out, I've realized a flaw I made - it checks for the primary weapon, and not if it's equipped in both hands. Keep in mind that insta-kill melee is over a year old, back in 1.3 I believe was when I added it. I barely knew how to code then, and I'm much better with lua than I was before. As such, I'll have to regut it.
The patches for both of those issues will be out soon. I've found out how to fix the infinite menu error, and I'll get to work on melee-insta-kill when I'm done writing this.
I'd also like to second to express my thanks. These issues have been in the mod for a while, and you've helped me exponentially with those logs.
Since the fixes will be in the next version, and the infinite menu error is rather dire, I'll upload a corrected version of Cheat Menu that has the admin checking code stripped and with the infinite menu error fixed.
https://drive.google.com/open?id=0B4TTdnrg9gSLMU1CSmxmYU9jRDQ
Edit: V2.5.1 is now out. Please let me know if you have issues with it.
-
4 hours ago, JohnDoh337 said:
The mod (with admin check) does work on my system when playing PZ version 34.26 IWBUMS
I tired the version without admin check and it doesn't show the CheatMenu context menu when right clicked.
I've attached the save console logs for each version of game and mod.
Console34.26 is larger because it started spamming the console after I tried enabling Melee insta-kill.
If there is anything else I can do to help, I don't mind helping. Thanks for your time.
Strange... It might be a problem with a specific game version.
-
On 2016-09-12 at 7:15 AM, JohnDoh337 said:
I'm stumped as to why this is happening. It seems to only happen to some people, and I don't see a pattern to this. I've received numerous reports from several different users about this issue, yet I cannot reproduce the problem on any of the systems I've tried it on and neither can my friends.
I've opened a thread in the Mods Help section, as I'm not too sure what to do. I have isolated the problem to the admin checking code, but due to the spontaneous nature of this bug I'm unable to find any error in the code that's responsible for this. What's happening is that, for some reason, the game doesn't have the Events.OnTick.Remove function which I use to remove the admin check when it completes successfully so as to not result in this cloning bug.
I've put a link below to a modified version of Cheat Menu V2.5 that doesn't have the admin check, and thus shouldn't have this issue. Please let me know if it works.
https://drive.google.com/open?id=0B4TTdnrg9gSLVVJNT25tRmxsNTg
Cheat Menu V2.9.1
in Mods
Posted
Yes.
Thanks, I'll add that to the workshop FAQ.