Hades [Lua Script Loader]

Upload your cheat tables here (No requests)
Post Reply
User avatar
cfemen
RCE Fanatics
RCE Fanatics
Posts: 877
Joined: Fri Feb 15, 2019 5:45 pm
Reputation: 1511

Hades [Lua Script Loader]

Post by cfemen »

Hey,

longer time ago I made this -> viewtopic.php?p=121562#p121562
back then in early-access the devs used the Monogame-Engine, the final release changed the engine.

this topic is only about the used Lua I won't bother to do a normal table( e.g doing string compares to get pointers to the Lua variables ) so this here is for people who likes to experiment and explore with commands.

While looking at the Lua in this game I noticed that some stuff is different,the Lua functions are inside the EngineWin64s.dll instead of in the Lua52.dll and some of the macros are replaced with functions.

what do I mean with macros:

Code: Select all

#define luaL_dostring(L, s) \
	(luaL_loadstring(L, s) || lua_pcall(L, 0, LUA_MULTRET, 0))
normally dostring does execute loadstring and then pcall, but this game has a own dostring function that can be called directly coz its not a macro :)

my table is getting the lua_state before a lua_gettop call ( the game has more than one lua_state) and then calling dostring with the lua_state instance and a string that contains Lua script :)

how the table works:
activate Enable and if you click on Execute Lua a input window will appear, you can use lua commands here.

some easy commands that are tested and working:

Code: Select all

AddMoney( 1000, "GrantUpgrade" )
AddResource( "MetaPoints", 100, "Debug" )
AddResource( "Gems", 100, "Debug" )
AddResource( "LockKeys", 100, "Debug" )
AddResource( "GiftPoints", 100, "Debug" )
AddResource( "SuperLockKeys", 100, "Debug" )
AddResource( "SuperGems", 100, "Debug" )
AddResource( "SuperGiftPoints", 100, "Debug" )
AddRerolls( 99, "Debug", { IgnoreMetaUpgrades = true } )
CreateWeaponLoot()
CreateStackLoot()
AddSuperRarityBoost()
SetPlayerInvulnerable()
SetPlayerVulnerable()
BuildSuperMeter( CurrentRun, 100 ) 
DestroyRequiredKills() --kills all enemies in room
Hero Health Commands ( will only update if you get damage / heal / change room )
xxx = any value you want:

Code: Select all

CurrentRun.Hero.MaxHealth = xxx
CurrentRun.Hero.Health = xxx
HeroData.DefaultHero.MaxHealth = xxx
Hero.MaxHealth will be overriden from the game after a new room.
DefaultHero.MaxHealth is permanent until you reload the savegame.

not tested / not working correctly:

Code: Select all

LiveFillInShopOptions() StartUpStore() 
GenerateMarketItems()
RecordFish(GetFish("Tartarus", "Good"))
I guess the commands names already tell what they should do :)

you can also do more complex stuff:

e.g if you want a full heal you could spawn lots of heal items:

Code: Select all

local playerId = GetIdsByType({ Name = "_PlayerUnit" })  for i=0,20 do DropHealth( "HealDropMinor", playerId ) end
Spawning God Gifts:

Code: Select all

CreateLoot({ Name = "AthenaUpgrade" , OffsetX = 100 })
--
CreateLoot({ Name = "DionysusUpgrade" , OffsetX = 100 })
--
CreateLoot({ Name = "AresUpgrade" , OffsetX = 100 })
--
CreateLoot({ Name = "PoseidonUpgrade" , OffsetX = 100 })
--
CreateLoot({ Name = "ZeusUpgrade" , OffsetX = 100 })
--
CreateLoot({ Name = "AphroditeUpgrade" , OffsetX = 100 })
--
CreateLoot({ Name = "ArtemisUpgrade" , OffsetX = 100 })
--
CreateLoot({ Name = "HermesUpgrade" , OffsetX = 100 })
--
CreateLoot({ Name = "DemeterUpgrade" , OffsetX = 100 })
Weapon Upgrades:

Code: Select all

local consumableName = "ChaosWeaponUpgrade" local playerId = GetIdsByType({ Name = "_PlayerUnit" }) local consumableId = SpawnObstacle({ Name = consumableName, DestinationId = playerId, Group = "Standing" }) local consumable = CreateConsumableItem( consumableId, consumableName, 0 )
Unlock Codex:

Code: Select all

UnlockEntireCodex() thread( ShowCodexUpdate )
Change Weapon:

Code: Select all

EquipPlayerWeapon( WeaponData.SwordWeapon, { PreLoadBinks = true, LoadPackages = true } )
--
EquipPlayerWeapon( WeaponData.SpearWeapon, { PreLoadBinks = true, LoadPackages = true } )
--
EquipPlayerWeapon( WeaponData.ShieldWeapon, { PreLoadBinks = true, LoadPackages = true } )
--
EquipPlayerWeapon( WeaponData.BowWeapon, { PreLoadBinks = true, LoadPackages = true } )
--
EquipPlayerWeapon( WeaponData.GunWeapon, { PreLoadBinks = true, LoadPackages = true } )
--
EquipPlayerWeapon( WeaponData.FistWeapon, { PreLoadBinks = true, LoadPackages = true } )
Add Trait:

Code: Select all

AddTraitToHero({TraitData = GetProcessedTraitData({ Unit = CurrentRun.Hero, TraitName = "SpearThrowBounce", Rarity = "Common"}) }) 
traits will stack ( level up ) you can also try out other traits - "SpearThrowBounce" is just an example, take a look at the TraitData.lua

of course you can do way way more :lol: didn't have the time yet to dig deep into it ... also I didn't look yet to dump all the _G globals edit : dumped some stuff - its now attached as txt file to this post and I've added some more useful Lua commands here.

feel free to share lua scripts if you find something useful :)
if you go into the Hades\Content\Scripts folder you can see all the .lua scripts that are loaded from the game, this should help to figure out more stuff.

note : its only for the x64 version of the game

make sure to use Cheat Engine 7.3 - some older versions will freeze if you attach it to the game!

make sure that the game is paused if you are playing in windowed mode while executing lua scripts
Im not sure why but windowed mode can cause a crash if you spawn something,

solutions to it : play in fullscreen mode or pause the process with a cheat engine hotkey (settings->hotkey->pause the selected process)

//

added the UDF method from SunBeam, thanks for that!
now there is a big input field and a Log that shows previous commands, you can send commands with Shift+Enter.

//

reuploaded the UDF table with "0FR" prefix to exclude it from FearlessRevolution BETA ( UDF controls are not compatible for now )

How to use this cheat table?
  1. Install Cheat Engine
  2. Double-click the .CT file in order to open it.
  3. Click the PC icon in Cheat Engine in order to select the game process.
  4. Keep the list.
  5. Activate the trainer options by checking boxes or setting values from 0 to 1
Attachments
0FRHades.CT
UDF Console Update
Hades V1.38246
Lua Script Loader
(5.25 KiB) Downloaded 2565 times
dump.txt
Hades Lua Functions & Globals Dump
(139.15 KiB) Downloaded 659 times
Hades.CT
Hades V1.38246
Lua Script Loader
(2.85 KiB) Downloaded 2174 times
Last edited by cfemen on Sat Jan 29, 2022 5:01 pm, edited 12 times in total.

User avatar
SunBeam
Administration
Administration
Posts: 4783
Joined: Sun Feb 04, 2018 7:16 pm
Reputation: 4413

Re: Hades [Lua Script Loader]

Post by SunBeam »

You may want to take a look at my Far Cry 6 table ;) -> viewtopic.php?f=4&t=17693. The "Toggle Console UDF" part. I don't mind if you use it in your table ;) It will show an UDF in which you can type stuff, much like an external console, if you like. With logging.

beguiler
Expert Cheater
Expert Cheater
Posts: 100
Joined: Sun Mar 19, 2017 1:31 pm
Reputation: 70

Re: Hades [Lua Script Loader]

Post by beguiler »

Just a note, I had issues with this script not finding EngineWin64s.dll and it seems for some reason my game was loading EngineWin64sv.dll. So 2 changes in the script to look for that dll fixed it for me. I was using the Epic Store version BTW.

Thanks for the table btw. :)

xGeno
What is cheating?
What is cheating?
Posts: 1
Joined: Thu Jan 20, 2022 10:38 am
Reputation: 0

Re: Hades [Lua Script Loader]

Post by xGeno »

So I managed to overload the lua script and now it jus says "No Lua State" any way to fix this? Sorry I'm a noob at this still lol.

TheThing
Noobzor
Noobzor
Posts: 6
Joined: Sun Mar 12, 2017 5:02 am
Reputation: 0

Re: Hades [Lua Script Loader]

Post by TheThing »

Not working with Cheat Engine 7.5
No Lua state

Post Reply

Who is online

Users browsing this forum: AmazonBot, Aratsei, Bing [Bot], BLEXBot, Chikaze, fcssnake, Google [Bot], Google Adsense [Bot], JembutKambing, keic4912, killerbee01, MaestroOD, Mr. Seth Marshall, Royce G, Sora3100, Tales, Xzib