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

Explosion Script!

Lucas Rodriguez

New Member
Joined
Sep 2, 2020
Messages
37
Reaction score
1
Hello brothers.i new here, i test this script for explosion rune and is very very low, example lvl 50 ml 45 max hit 36?omg...
tibia 7.4



local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setArea(createCombatArea(AREA_CROSS1X1))

function onGetFormulaValues(player, level, maglevel)
local base = 60
local variation = 40

local formula = 3 * maglevel + (2 * level)

local min = (formula * (base - variation)) / 100
local max = (formula * (base + variation)) / 100
return -min, -max
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
 
Solution
The formula is pretty straigh forward. Its a matter of tweaking the numbers.

A thing I noticed is that base + variation is 100 so it doesn't make much sense to add those and then divide them by 100 for the local max part.

Other than that - welcome to the wonderful world of balancing. If you want to get deep into this I'd suggest an excel sheet with X and Y representing player level and player skill (ML for this case) and have the sheet autocomplete for every possible combination.

This way you'll have a visual representation of the average hit a player with those skills can get and tweak numbers as you need.

1604928581752.png

You can even colour the cells that most players will fall in (like level 20 - ML 20, level 60 - ML 40, level 100 -...
The formula is pretty straigh forward. Its a matter of tweaking the numbers.

A thing I noticed is that base + variation is 100 so it doesn't make much sense to add those and then divide them by 100 for the local max part.

Other than that - welcome to the wonderful world of balancing. If you want to get deep into this I'd suggest an excel sheet with X and Y representing player level and player skill (ML for this case) and have the sheet autocomplete for every possible combination.

This way you'll have a visual representation of the average hit a player with those skills can get and tweak numbers as you need.

1604928581752.png

You can even colour the cells that most players will fall in (like level 20 - ML 20, level 60 - ML 40, level 100 - ML 60... for a caster) This way you have a clear visual guide on where most of the players will be and how much damage they'll be dealing while they progress.

I am unable to assist with this as I had to ask for help myself as you'll need some knowledge about scripts for excel.

If you just want to up/down the damage without brainstorming too much... well, consider increasing the base/variation values (but they will fall short at higher numbers/levels) or tweak the formula itself but changing that will potentially break the balance either at low level or high level, depending how you do it.

Thats pretty much the reason why formulas use a base damage for low levels (to keep damage significant) but for higher levels the important part is the formula itself (so this is why you don't want to go crazy on the formula part)
 
Last edited:
Solution
The formula is pretty straigh forward. Its a matter of tweaking the numbers.

A thing I noticed is that base + variation is 100 so it doesn't make much sense to add those and then divide them by 100 for the local max part.

Other than that - welcome to the wonderful world of balancing. If you want to get deep into this I'd suggest an excel sheet with X and Y representing player level and player skill (ML for this case) and have the sheet autocomplete for every possible combination.

This way you'll have a visual representation of the average hit a player with those skills can get and tweak numbers as you need.

View attachment 51516

You can even colour the cells that most players will fall in (like level 20 - ML 20, level 60 - ML 40, level 100 - ML 60... for a caster) This way you have a clear visual guide on where most of the players will be and how much damage they'll be dealing while they progress.

I am unable to assist with this as I had to ask for help myself as you'll need some knowledge about scripts for excel.

If you just want to up/down the damage without brainstorming too much... well, consider increasing the base/variation values (but they will fall short at higher numbers/levels) or tweak the formula itself but changing that will potentially break the balance either at low level or high level, depending how you do it.

Thats pretty much the reason why formulas use a base damage for low levels (to keep damage significant) but for higher levels the important part is the formula itself (so this is why you don't want to go crazy on the formula part)
I have never actually thought about using excel for this kind of things lol, smart af, thanks
 
Last edited:
Thanks
I tested 100 explo lvl 49 ml 45... max hit 34 why? Thanks
Post automatically merged:

I work!!!! is this :

local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, true)
combat:setArea(createCombatArea(AREA_CROSS1X1))

function onGetFormulaValues(player, level, maglevel)
local base = 60
local variation = 40

local value = math.random(-variation, variation) + base
local formula = 3 * maglevel + (2 * level)

return -(formula * value / 100)
end

combat:setCallback(CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues")

function onCastSpell(creature, variant, isHotkey)
return combat:execute(creature, variant)
end
 
Last edited:
Back
Top