• 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!

How to increase strength of summons

bizao030188

Member
Joined
Jun 4, 2012
Messages
50
Solutions
2
Reaction score
7
Hi all!
I am trying to increase the strength of monsters that players summon on TFS 1.2. I want they stronger than normal spawned monsters (more attack damage and defense).
I know it is possible to create new xml for these monsters but I wanna do directly on the script.

To summon monsters I am using:

Lua:
local monster = Game.createMonster(name, player:getPosition())
if monster ~= nil then
    monster:setMaster(player)
end

I was thinking on something like this:

Lua:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
condition:setParameter(CONDITION_PARAM_TICKS, -1)
condition:setParameter(CONDITION_PARAM_SKILL_MELEE, -100)
condition:setParameter(CONDITION_PARAM_SKILL_SHIELD, -100)
doAddCondition(monster, condition)

The problem is that these skills does not work for monsters.
So I started to search on sources what I can change but did not find anything.

I appreciate any kind of help.
 
Solution
What about increase/decrease dmg in onChangeHealth func? (If monster and summon and master is player~)
Can be done both through lua or cpp edit
What about increase/decrease dmg in onChangeHealth func? (If monster and summon and master is player~)
Can be done both through lua or cpp edit
 
Solution
What about increase/decrease dmg in onChangeHealth func? (If monster and summon and master is player~)
Can be done both through lua or cpp edit
Thanks! Now I can control the damage dealt to summons, but can not control the damage dealt by summons since I did not figure out how to register events on spawn. I saw in a different post that it is possible to register the event directly on monster xml but I tried to insert <event name="MonsterHealthChange"/> and did not work. Any idea?

Got it! It needs to be inside <script> command
Code:
<script>
        <event name="eventname"/>
</script>

Thank you very much!
 
Last edited by a moderator:
Yes, the problem was that I didn’t know how to register the event for monsters on spawn (that are not summons), but now I figured that out. Thank you again!
 
A simpler (and worse) method would be to create new monster files with same name and individually increase the damage output.
 
A simpler (and worse) method would be to create new monster files with same name and individually increase the damage output.

You are right. This should also work, but it’s a lot of work if in the future you want to balance the monsters since you will have to do everything twice.
 
Back
Top