• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ Help: Implementing Global Multipliers for Monster Attack Speed and Damage

_M4G0_

Intermediate OT User
Joined
Feb 6, 2016
Messages
535
Solutions
16
Reaction score
106
Hello everyone,
I'm trying to implement a system where I can globally modify the attack interval and damage of all monsters through values set in config.lua. The idea is to avoid having to edit each monster individually, and instead apply a global multiplier for both melee and spell attacks.
Something like this in config.lua:
LUA:
monsterAttackIntervalMultiplier = 1.0
monsterDamageMultiplier = 1.0
I’d like to know the best way to hook into the monster behavior so I can apply these multipliers dynamically, affecting all monsters’ melee and spell attacks.
Has anyone done something similar or could point me in the right direction (e.g., which part of the source to modify, or how to intercept the attack calculations)?

Thanks in advance!

tfs 1.4
 
Last edited:
Back
Top