Changeing damage on Spells
Changeing damage on Spells
Hello i tried to change the damage output on different spells. But it seems that the damage does not change at all.
defineObject{
name = "fireburst",
baseObject = "base_spell",
components = {
{
class = "Particle",
particleSystem = "fireburst",
offset = vec(0, 1.2, 0),
destroyObject = true,
},
{
class = "Light",
color = vec(0.75, 0.4, 0.25),
brightness = 40,
range = 4,
offset = vec(0, 1.2, 0),
fadeOut = 0.75,
disableSelf = true,
},
{
class = "TileDamager",
attackPower = 1,
damageType = "fire",
sound = "fireburst",
screenEffect = "fireball_screen",
--cameraShake = true,
},
},
}
As you can see i changed the attackPower to 1 and before that i changed it to 50
The damage always stays the same.
Also how the damage is calculated is not very clear..the spell deals damage in the range of 10-60 and the base attack power is 20 of fire burst
defineObject{
name = "fireburst",
baseObject = "base_spell",
components = {
{
class = "Particle",
particleSystem = "fireburst",
offset = vec(0, 1.2, 0),
destroyObject = true,
},
{
class = "Light",
color = vec(0.75, 0.4, 0.25),
brightness = 40,
range = 4,
offset = vec(0, 1.2, 0),
fadeOut = 0.75,
disableSelf = true,
},
{
class = "TileDamager",
attackPower = 1,
damageType = "fire",
sound = "fireburst",
screenEffect = "fireball_screen",
--cameraShake = true,
},
},
}
As you can see i changed the attackPower to 1 and before that i changed it to 50
The damage always stays the same.
Also how the damage is calculated is not very clear..the spell deals damage in the range of 10-60 and the base attack power is 20 of fire burst
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Changeing damage on Spells
I'm not sure if it is possible to override an original game spell this way.
I know I could not replace a spell with a custom one by overriding its gesture at least (well it is a little different from what you try to do...).
Have you tried to make it a totally new spell to check ? With a new name and an unused gesture ? If it works, it would mean that the original fireburst was not overriden at all...
I know I could not replace a spell with a custom one by overriding its gesture at least (well it is a little different from what you try to do...).
Have you tried to make it a totally new spell to check ? With a new name and an unused gesture ? If it works, it would mean that the original fireburst was not overriden at all...
Re: Changeing damage on Spells
The wierd thing is. i gave fireburst a new name a new description and a new energy cost which worked! I even made a new scroll and that worked too.
just the damage stays the same it seems.
the reason could be that all changes that worked are in the defineSpell component....but the Attackpower is in the defineObjekt and that seems to be unchangeable.
I will try to make a new objekt and see if that changes anything
just the damage stays the same it seems.
the reason could be that all changes that worked are in the defineSpell component....but the Attackpower is in the defineObjekt and that seems to be unchangeable.
I will try to make a new objekt and see if that changes anything
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Changeing damage on Spells
Yes, I bet it will work with an object named "fireburst_custom" for example ! So the reference to the object "fireburst" in your spell seems to still be pointing to the original definition whatever you do...
Re: Changeing damage on Spells
No it does not work.
When i cast the custom fireburst the charakter learns the spell in traits window. he also looses the energy. but nothing is actually cast
In the console screen i only get Warning! unknown built-in spell: brennendehaende (thats the name of my custom spell) and i typed everything correct
i tried the same with a custom fireball spell and i get the same error.
When i cast the custom fireburst the charakter learns the spell in traits window. he also looses the energy. but nothing is actually cast
In the console screen i only get Warning! unknown built-in spell: brennendehaende (thats the name of my custom spell) and i typed everything correct
i tried the same with a custom fireball spell and i get the same error.
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Changeing damage on Spells
So, the spell in spells.lua, the object in objects.lua, and the object is unknown ? Weird... Can you show us the code in your spells.lua file ?
Re: Changeing damage on Spells
Here is the full code
Code: Select all
defineSpell{
name = "brennendehaende",
uiName = "Brennende Haende",
gesture = 1,
manaCost = 20,
onCast = "brennendehaende",
skill = "concentration",
requirements = { "fire_magic", 1 },
icon = 60,
spellIcon = 1,
description = "Ein Kegel sengender Flammen stroemt aus deinen Handflaechen. Alle Gegner vor dir erleiden Feuerschaden",
}
defineObject{
name = "brennendehaende",
baseObject = "base_spell",
components = {
{
class = "Particle",
particleSystem = "Feuerkegel",
offset = vec(0, 1.2, 0),
destroyObject = true,
},
{
class = "Light",
color = vec(0.75, 0.4, 0.25),
brightness = 40,
range = 4,
offset = vec(0, 1.2, 0),
fadeOut = 0.75,
disableSelf = true,
},
{
class = "TileDamager",
attackPower = 1,
damageType = "fire",
sound = "Feuerkegel",
screenEffect = "fireball_screen",
--cameraShake = true,
},
},
}
defineParticleSystem{
name = "Feuerkegel",
emitters = {
-- smoke
{
emissionRate = 20,
emissionTime = 0.3,
maxParticles = 100,
boxMin = {0.0, 0.0, 0.0},
boxMax = {0.0, 0.0, 0.0},
sprayAngle = {0,100},
velocity = {0.1, 0.5},
texture = "assets/textures/particles/smoke_01.tga",
lifetime = {1,2},
color0 = {0.25, 0.20, 0.17},
opacity = 1,
fadeIn = 0.3,
fadeOut = 0.9,
size = {2, 3},
gravity = {0,0,0},
airResistance = 0.1,
rotationSpeed = 0.5,
blendMode = "Translucent",
},
-- flames
{
spawnBurst = true,
maxParticles = 50,
sprayAngle = {0,360},
velocity = {0,3},
objectSpace = true,
texture = "assets/textures/particles/torch_flame.tga",
frameRate = 35,
frameSize = 64,
frameCount = 16,
lifetime = {0.4,0.6},
color0 = {1, 0.5, 0.25},
opacity = 1,
fadeIn = 0.1,
fadeOut = 0.3,
size = {1, 2},
gravity = {0,0,0},
airResistance = 0.5,
rotationSpeed = 2,
blendMode = "Additive",
},
-- glow
{
spawnBurst = true,
emissionRate = 1,
emissionTime = 0,
maxParticles = 1,
boxMin = {0,0,-0.1},
boxMax = {0,0,-0.1},
sprayAngle = {0,30},
velocity = {0,0},
texture = "assets/textures/particles/glow.tga",
lifetime = {0.5, 0.5},
colorAnimation = false,
color0 = {1.500000, 0.495000, 0.090000},
opacity = 1,
fadeIn = 0.01,
fadeOut = 0.5,
size = {4, 4},
gravity = {0,0,0},
airResistance = 1,
rotationSpeed = 2,
blendMode = "Additive",
}
}
}
defineSound{
name = "Feuerkegel",
filename = "assets/samples/magic/fireburst_01.wav",
loop = false,
volume = 1,
minDistance = 1,
maxDistance = 10,
}
defineObject{
name = "scroll_brennendeHaende",
baseObject = "scroll_light",
components = {
{
class = "Item",
uiName = "Schriftrolle Brennende Haende",
gfxAtlas = "assets/textures/gui/items.tga",
gfxIndex = 113,
weight = 0.3,
},
{
class = "SpellScrollItem",
spell = "brennendehaende",
}
},
}
- AndakRainor
- Posts: 674
- Joined: Thu Nov 20, 2014 5:18 pm
Re: Changeing damage on Spells
Oh ok I see, the problem is in
This does not refer to an object name but to a function name, it explains your problem in your first post.
You have at least one option: define your onCast function instead of naming it;
in it you will be able to use:
More infos in this thread: viewtopic.php?f=22&t=8265&start=10#p88192
Code: Select all
onCast = "brennendehaende",
You have at least one option: define your onCast function instead of naming it;
Code: Select all
onCast = function(champion, x, y, direction, elevation, skillLevel)
Code: Select all
spawn("brennendehaende", level, x, y, direction, elevation)
Re: Changeing damage on Spells
That works perfectly thank you 
i only changed it to spawn("brennendehaende")
because you can set the spawning coordinates in the object itself with offset =
(at least it worked that way for this spell)

i only changed it to spawn("brennendehaende")
because you can set the spawning coordinates in the object itself with offset =
(at least it worked that way for this spell)
Re: Changeing damage on Spells
Hm my custom Fireball always hit myself
What do i need to set the spawn("Feuerball", level, x, y, direction, elevation)
to let it spawn in front of me and fly into my view direction?
And sorry to ask stupid Questions
What do i need to set the spawn("Feuerball", level, x, y, direction, elevation)
to let it spawn in front of me and fly into my view direction?
And sorry to ask stupid Questions
