Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Concerning the Lua script modification issue in Hades2

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
etioplmld
Advanced Cheater
Reputation: 0

Joined: 09 Feb 2021
Posts: 77

PostPosted: Sun Oct 19, 2025 10:50 pm    Post subject: Concerning the Lua script modification issue in Hades2 Reply with quote

The main program of Hades2 seems to be made in lua, and the game can be modified by modifying lua files.
In file TraitData_Keepsake.lua, the values of Keepsake can be modified, and most of them are valid.But Only in SkipEncounterKeepsake , it made the value of the souvenir cabinet change in reality, but it remained the same during the battle.
cfemen has created a script that enables the game to execute the user's lua file in real time.

The format is as follows
Code:

{$STRICT}
{$lua}
if syntaxcheck then return end
[ENABLE]
local s = [[
AddTraitToHero( { TraitName= "skipEncounterTrait", Rarity="Epic"} )
]]
Exec(init_script)
Exec(s)
[DISABLE]


All functions that appear in the lua script of the game can be used.It can call a bunch of graphic functions and execute them in real time, which is very beneficial for learning lua.
A lua code that allows for incorrect results
Code:

{$STRICT}
{$lua}
if syntaxcheck then return end
[ENABLE]
local s = [[
local objId = CreateScreenObstacle({ Name = "rectangle01", X = 1400, Y = 500})
SetColor({ Id = objId, Color = {0, 0, 0, 0.5} })
SetScaleX({ Id = objId, Fraction = 300 / 480 })
SetScaleY({ Id = objId, Fraction = 800 / 267 })

for k, traitData in ipairs( CurrentRun.Hero.Traits ) do
CreateTextBox({Id = objId,Text = traitData.Name,FontSize = 20,Color = {1,1,1,1},OffsetY = -380 + k * 25})
end
]]
Exec(init_script)
Exec(s)
[DISABLE]


Can the number of the souvenir FIG leaf be modified through ce or other methods?



jnp.jpg
 Description:
 Filesize:  152.66 KB
 Viewed:  282 Time(s)

jnp.jpg


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites