can anyone help me to add the weapon and Armor modification code into the Cheat engine, i am new to using CT. thanks for the help in advanceEvenLess wrote: ↑Sat Aug 12, 2023 9:31 pmWe don't need to get the latest and most legendariest of weapons to pack the biggest punch.
Screenshot of a Shadowheart only wearing underwear (to show she didn't get any boosts from any equipment). And yes, I chose Shadowheart because I find her more pleasant to look at than my own characterPlaying around, I found theSpoiler
CharacterWeaponDamage()
function, and using Zanzer's code for adding boosts, I modified it and made the following script, which uses a nice array of the damage types and variables, so it's easy to change the values. Then simply concatenating it all into a final string that can be injected using Zanzer's code.Also created another version ofCode: Select all
[ENABLE] {$lua} if syntaxcheck then return end local dmgType = { "Bludgeoning" ,"Piercing" ,"Slashing" ,"Acid" ,"Cold" ,"Fire" ,"Force" ,"Lightning" ,"Necrotic" ,"Poison" ,"Psychic" ,"Radiant" ,"Thunder" } local dmgRoll = "12d12" local dmgBonus = "20" local wpnEnch = "20" -- Combine everything to the AddBoosts string. local boost = "WeaponProperty(Magical);WeaponEnchantment(".. wpnEnch .. ");" for t = 1, #dmgType do boost = boost .. "CharacterWeaponDamage(" .. dmgRoll .."+" .. dmgBonus .. ", " .. dmgType[t] .. ");" end local cmdCall = getAddress("cmdCall") local cmdArgs = getAddress("cmdArgs") local cmdStr1 = getAddress("cmdStr1") local cmdStr2 = getAddress("cmdStr2") PrepareCall("GetHostCharacter") executeCodeEx(0, nil, cmdCall) local player = readPointer(cmdArgs + 0x08) player = readString(player, 256, false) writeString(cmdStr1, player) writeBytes(cmdStr1 + #player, 0) writeString(cmdStr2, boost) writeBytes(cmdStr2 + #boost, 0) PrepareCall("AddBoosts") writePointer(cmdArgs + 0x08, cmdStr1) writePointer(cmdArgs + 0x18, cmdStr2) writeQword(cmdArgs + 0x28, 0) writeQword(cmdArgs + 0x38, 0) executeCodeEx(0, nil, cmdCall) {$asm} assert(true) [DISABLE]
Zanzer's Add All Resistance
(he forgotSpellResistance()
), except this is granting immunity instead of merely resistance. As before, it's modified to use an array and variables for easier modification.Code: Select all
[ENABLE] {$lua} if syntaxcheck then return end local resistance = { "Bludgeoning", "Piercing", "Slashing", "Acid", "Cold", "Fire", "Force", "Lightning", "Necrotic", "Thunder", "Poison", "Psychic", "Radiant" } local spellResistance = true --local resistanceLevel = "Resistant" local resistanceLevel = "Immune" local boost = "" for r = 1, #resistance do boost = boost .. "Resistance(" .. resistance[r] .. "," .. resistanceLevel .. ");" end if spellResistance then boost = boost .. "SpellResistance(" .. resistanceLevel .. ");" end local cmdCall = getAddress("cmdCall") local cmdArgs = getAddress("cmdArgs") local cmdStr1 = getAddress("cmdStr1") PrepareCall("GetHostCharacter") executeCodeEx(0, nil, cmdCall) PrepareCall("AddBoosts") writePointer(cmdArgs + 0x18, cmdStr1) writeString(cmdStr1, boost) writeBytes(cmdStr1 + #boost, 0) writeQword(cmdArgs + 0x28, 0) writeQword(cmdArgs + 0x38, 0) executeCodeEx(0, nil, cmdCall) {$asm} assert(true) [DISABLE]
How to use this cheat table?
- Install Cheat Engine
- Double-click the .CT file in order to open it.
- Click the PC icon in Cheat Engine in order to select the game process.
- Keep the list.
- Activate the trainer options by checking boxes or setting values from 0 to 1