I am changing EFF_RETCHED so there is no speed bonus.
I also want to change the effect description.
I'm using a 'ToME:load' hook.
This works fine without changing the long_desc.
However, when I also try to change the string using the following, the game hangs without crashing and without an error message with the screen flashing very fast:
Code:
local Effects = require 'engine.interface.ActorTemporaryEffects'
local TemporaryEffectDefinition = Effects.tempeffect_def
TemporaryEffectDefinition.EFF_RETCHED.activate = function(self, eff)
-- Do nothing.
end
-- Modifying long_desc() to change the description.
TemporaryEffectDefinition.EFF_RETCHED.long_desc = 'Since the Ghoul Global Speed Penalty has been removed, they no longer get a Global Speed Boost when in their own Retch.'
From the log files there were tons of errors like this from all over:
Code:
Lua Error: /mod/class/uiset/Minimalist.lua:1154: attempt to call field 'long_desc'
So I feel that I might have been defining that last command wrong.
Additional Question: Is there any difference between the chance of applying a negative effect on hitting an enemy/a specified check using one or more of your stats (such as sum of Strength and Constitution) against the enemy's stats (such as Physical Power)? Is it possible to do both: do a specified check only if you land a hit (melee, ranged or other type of damage such as spell) using an attack, talent or item?
Thank you for your help!