The Red Prince wrote: ↑Sat Oct 14, 2023 6:26 pm
EvenLess wrote: ↑Sat Oct 14, 2023 3:43 pm
PrinceRevivalDK wrote: ↑Sat Oct 14, 2023 2:46 pm
Add the dragonic ancestry resistance, they are permanent.
The only persistent immunity I know of is poison, which comes from the monk passive Purity of Body. Beyond those, all the Aspect of the Beast / TotemSpirit rage passives give you resistance to everything except psychic, but you just use the Thought Shield passives to get that resistance as well.
You could probably use a timer function (see the Table Lua Script in mine or TheMaoci tables, or the cheat engine tutorial for auto enable for reference) to continously re-apply the boosts you want. I don't know how that would affect the game (stability wise).
interesting, so what your saying is, I could add a code that keeps applying a certain buff? like for instance the fire myrmidon siphoning buff that gives me fire immunity? it turns off after death or long rest, if I could have that buff reapply, that would be great, its a messy long way to go about it, but if that's what must be done to be immune to fire, I will have to try.
Yes. But if it's just fire immunity, you could just add it as a boost, then it's only when the game is (re)loaded that it disappears, rather then also at long rests and death.
Code: Select all
AddBoostsToPlayer('Resistance(Fire, Immune);')
Here's 4 cheat entries (Full/Partial Resistance/Immunity) you can just copy/paste into your table, that you can use and/or edit to your liking. They are just variants of each other to show how the Resistance boost are put together.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>1111</ID>
<Description>"Partial Resistance"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript Async="1">{$lua}
if syntaxcheck then return end
local DamageType = { -- All available damage types.
--"Bludgeoning",
--"Piercing",
--"Slashing",
--"Acid",
--"Cold",
"Fire",
--"Force",
--"Lightning",
--"Necrotic",
--"Poison",
--"Psychic",
--"Radiant",
--"Thunder",
}
local Boost = ''
for i = 1, #DamageType do
Boost = Boost .. string.format("Resistance(%s, Resistant);", DamageType[i])
end
[ENABLE]
AddBoostsToPlayer(Boost)
[DISABLE]
RemoveBoostsFromPlayer(Boost)
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>1112</ID>
<Description>"Full Resistance"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript Async="1">{$lua}
if syntaxcheck then return end
local Boost = "Resistance(All, Resistant);"
[ENABLE]
AddBoostsToPlayer(Boost)
[DISABLE]
RemoveBoostsFromPlayer(Boost)
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>1113</ID>
<Description>"Partial Immunity"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript Async="1">{$lua}
if syntaxcheck then return end
local DamageType = { -- All available damage types.
--"Bludgeoning",
--"Piercing",
--"Slashing",
--"Acid",
--"Cold",
"Fire",
--"Force",
--"Lightning",
--"Necrotic",
--"Poison",
--"Psychic",
--"Radiant",
--"Thunder",
}
local Boost = ''
for i = 1, #DamageType do
Boost = Boost .. string.format("Resistance(%s, Immune);", DamageType[i])
end
[ENABLE]
AddBoostsToPlayer(Boost)
[DISABLE]
RemoveBoostsFromPlayer(Boost)
</AssemblerScript>
</CheatEntry>
<CheatEntry>
<ID>1114</ID>
<Description>"Full Immunity"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript Async="1">{$lua}
if syntaxcheck then return end
local Boost = "Resistance(All, Immune);"
[ENABLE]
AddBoostsToPlayer(Boost)
[DISABLE]
RemoveBoostsFromPlayer(Boost)
</AssemblerScript>
</CheatEntry>
</CheatEntries>
</CheatTable>
As for the timer, the simple version could look like this:
Code: Select all
local function Timer_callback(timer)
-- Continously check for the BG3 process and update the ActivePID with the "active" value.
local Executable = { 'bg3_dx11.exe', 'bg3.exe' }
local ActualPID = nil
for i = 1, #Executable do
ActualPID = getProcessIDFromProcessName(Executable[i])
if ActualPID ~= nil then break end -- The BG3 process was found.
end
-- Continously check if the opened process is the same as the actual process.
local OpenedPID = getOpenedProcessID()
if ActualPID == OpenedPID then
-- The game is running and attached to Cheat Engine.
if 'AddBoostsToPlayer' ~= nil then -- Check if Zanzer's functions (Register Commands) have been loaded.
AddBoostsToPlayer('Resistance(Fire, Immune)')
end
end
end
local Timer = createTimer(getMainForm())
Timer.Interval = 1000 -- milliseconds
Timer.OnTimer = Timer_callback
One caveat with this timer, is if you have had a game loaded, and thereby have Register Commands enabled, the
AddBoostsToPlayer()
will be executed even if you're aren't in a loaded game, and this might cause the game to crash (at least a call to
GetCharacterHost()
will.)
Also, if you're using a table that already have a timer included, such as mine or TheMaoci, you just need the
AddBoostsToPlayer
if
block.