Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
steamapps/workshop/content/108600/1299328280/mods/More Traits/42/media/lua/client/More Traits.lua
In this file, find a function called GymGoer (or any other one with AddXP calls you want to fix). Outside the function definition create a local boolean variable for the lock and initialize it as false. Then, in the beginning of a function, return if that lock var is true. And then just wrap AddXP call in setting lock to true and then to false right after.
-- Define boolean var for a "lock"
local xp_lock = false
function GymGoer(_player, _perk, _amount)
-- Return if "locked"
if xp_lock then return end;
local player = _player;
local perk = _perk;
local amount = _amount;
local modifier = 200;
if SandboxVars.MoreTraits.GymGoerPercent then
modifier = SandboxVars.MoreTraits.GymGoerPercent;
end
modifier = modifier * 0.01;
if perk == Perks.Fitness or perk == Perks.Strength then
-- This is a check I added to not add anything for 0 XP events
if amount ~= 0 then
-- Removed the amount fix, as it is not needed anymore
-- Recursion guard
xp_lock = true;
player:getXp():AddXP(perk, amount * (modifier - 1), false, false, false);
-- Release Lock
xp_lock = false;
end
end
end
end
Also, no implementation errors found all over the comments can often be fixed by simply replacing HaloTextHelper calls with smth else (player:Say or player:addLineChatElement)
tl;dr: Indie Stone slightly borked the AddXP function going from 41 to 42, so More Trait's method of altering the XP amount creates a recursive(infinite) loop.
at zombie.MovingObjectUpdateScheduler.postupdate(MovingObjectUpdateScheduler.java:180)
at zombie.iso.IsoWorld.updateWorld(IsoWorld.java:4171)
at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:4278)
at zombie.iso.IsoWorld.update(IsoWorld.java:4192)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1811)
at zombie.gameStates.IngameState.update(IngameState.java:1507)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:101)
at zombie.GameWindow.logic(GameWindow.java:388)
at zombie.GameWindow.frameStep(GameWindow.java:928)
at zombie.GameWindow.run_ez(GameWindow.java:821)
at zombie.GameWindow.mainThread(GameWindow.java:619)
at java.base/java.lang.Thread.run(Unknown Source)
at zombie.characters.IsoPlayer.actionStateChanged(IsoPlayer.java:10259)
at zombie.characters.action.ActionContext.invokeAnyStateChangedEvents(ActionContext.java:623)
at zombie.characters.action.ActionContext.postUpdateInternal(ActionContext.java:99)
at zombie.characters.action.ActionContext.update(ActionContext.java:73)
at zombie.characters.IsoGameCharacter.postUpdateInternal(IsoGameCharacter.java:12476)
at zombie.characters.IsoGameCharacter.postupdate(IsoGameCharacter.java:12435)
at zombie.characters.IsoPlayer.postupdateInternal(IsoPlayer.java:4360)
at zombie.characters.IsoPlayer.postupdate(IsoPlayer.java:4352)
at
at se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
at zombie.Lua.Event.trigger(Event.java:72)
at zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:364)
at zombie.ai.states.SwipeStatePlayer.enter(SwipeStatePlayer.java:246)
at zombie.ai.StateMachine.stateEnter(StateMachine.java:245)
at zombie.ai.StateMachine.ensureSubstateActive(StateMachine.java:127)
at zombie.ai.StateMachine.lambda$changeState$1(StateMachine.java:55)
at zombie.util.lambda.Consumers$Params1$CallbackStackItem.accept(Consumers.java:39)
at zombie.util.list.PZArrayUtil.forEach(PZArrayUtil.java:974)
at zombie.util.list.PZArrayUtil.forEach(PZArrayUtil.java:1000)
at zombie.ai.StateMachine.changeState(StateMachine.java:51)
at zombie.ai.StateMachine.changeState(StateMachine.java:34)
at
function: progun -- file: MoreTraits.lua line # 1998 | MOD: More Traits
java.lang.RuntimeException: No implementation found
at se.krka.kahlua.integration.expose.MultiLuaJavaInvoker.call(MultiLuaJavaInvoker.java:112)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:192)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:988)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
at se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1790)
Thanks!
Theres something i can edit in modfile ?
function: EveryOneMinute -- file: MoreTraits.lua line # 4367 | MOD: More Traits
java.lang.RuntimeException: No implementation found
`
Getting this error while hooking a melee on the belt or the back or even using the hotbar...
Wouldn't hold out hope for help.
You may want to try that.
function: GymGoer -- file: MoreTraits.lua line # 3205 | MOD: More Traits.
Callframe at: setMutualExclusive
function: initToadTraits -- file: MoreTraitsMainCreationMethods.lua line # --- | MOD: More Traits
java.lang.reflect.InvocationTargetException
at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
from what i can gather it's a compatibility issue with even more traits, as when i disable either one they both work flawlessly, but when they're together they cause issues. whether that's an issue with this mod or even more traits (or both), i don't know. if you want to recreate it just get both mods and add all off the positive traits from both.
@zipdye can you recreate the error messages and then post the errors from the console?
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@b6a941c1
function: EveryOneMinute -- file: MoreTraits.lua line # 4367 | MOD: More Traits
java.lang.RuntimeException: No implementation found