[1.6.5] [patch] game doesn't start without luajit2

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
lifanov
Cornac
Posts: 32
Joined: Sat Jan 14, 2012 12:53 am

[1.6.5] [patch] game doesn't start without luajit2

#1 Post by lifanov »

Edit: there are a lot more issues with trying to use portable Lua than this.
This used to work before, but the build option should probably just be removed now.
See below post that updates luajit2 instead.


With all official addons (orcs, cults, ashes, possessors), the game runs against the memory limit in luajit2
frequently. This is the easiest to reproduce by going below level 50 in Infinite Dungeon as a technomancer
or just possessing everything in sight as a possessor with 14+ body storage capacity. I switched to lua=default,
but the game no longer starts in this configuration. It crashes as soon as I get to character creation screen.
Below is needed to get the game to start without luajit2:

Code: Select all

diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua
index ae57364eb..5a42992b7 100644
--- a/game/modules/tome/class/Game.lua
+++ b/game/modules/tome/class/Game.lua
@@ -725,7 +725,7 @@ function _M:updateCurrentChar()
 
 	local class_evo = ""
 	if self.descriptor and self.descriptor.class_evolution then class_evo = " ("..self.descriptor.class_evolution..")" end
-	profile:currentCharacter(self.__mod_info.full_version_string, ("%s the level %d %s %s"):format(player.name, player.level, player.descriptor.subrace, (player.descriptor.subclass or "")..class_evo), player.__te4_uuid)
+	profile:currentCharacter(self.__mod_info.full_version_string, ("%s the level %d %s %s"):format(player.name, player.level, (player.descriptor.subrace or ""), (player.descriptor.subclass or "")..class_evo), player.__te4_uuid)
 
 	if core.discord and self.zone then
 		local all_kills_kind = player.all_kills_kind or {}
In case above one-liner is copywritable, I assign copyright to darkgod.
Last edited by lifanov on Wed Dec 25, 2019 10:15 pm, edited 1 time in total.

lifanov
Cornac
Posts: 32
Joined: Sat Jan 14, 2012 12:53 am

Re: [1.6.5] [patch] game doesn't start without luajit2

#2 Post by lifanov »

There are a lot of other issues with trying to use vanilla lua. Instead, please look at an update
to bundled luajit2 to the latest release from OpenResty's branch. This seems to be the most
active branch since 2017 and introduces (optional) support for 64 bit pointers, arm64, and mips64.

The patch is too big to attach here:
https://lifanov.com/files/patches/te4-l ... date.patch

The bundled tome.patch file has been updated. I built it with 64 bit pointers and am currently
happily running a Possessor through Infinite Dungeon using Psychic Crush and possessing
and mulching everything in sight.

lifanov
Cornac
Posts: 32
Joined: Sat Jan 14, 2012 12:53 am

Re: [1.6.5] [patch] game doesn't start without luajit2

#3 Post by lifanov »

After playing for a few more hours, my possessor is still unplayable. The game doesn't crash or corrupt the save file, but it becomes very slow without saving and exiting every map.

However, my high-level technomancer is now snappy and not crashing anymore!

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: [1.6.5] [patch] game doesn't start without luajit2

#4 Post by darkgod »

Hum well luajit may need update, I'll go check that out; but the memory bloat is not normal in any cases though.

Could you post me the savefile of the technomancer & the possessor? I need to analyze what's taking so much space.

Thanks for the details report ! :)
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply