Need help cloning Lightning Blade
Posted: Sun Oct 26, 2014 11:39 pm
I am trying to make a custom sword that is similar to the Lightning Blade, but has no level requirement, a different attack power, and a different charge attack.
I am using the following code in my items.lua script:
However, when I start the game it says "warning! invalid component property item.attackPower" in the HUD.
I imagine this is because the name for what controls the attack power is not "attackPower", but I have tried various different names and none have worked. If anyone knows the name for changing the attack power it would be much appreciated. Same thing applies for the level requirement, as I would like to lower the requirement from Light Weapons 1 to none.
In addition to the previous problem, there appears to be no charge attack for the cloned sword. I imagine there is some sort of component I have to set to put a charge attack on the weapon, and this component was lost when defining the new object. If anyone knows how to add charge attacks that would be useful. I imagine there are a set of values you would need to set, like the spell it uses, mana cost, number of charges, and the level requirement, but I have no idea what these values would be.
tl;dr I would like to know what values need to be set on an item to change attack power, level requirements, and charge attacks. A full list of values that could be set would also be useful as a reference if one exists.
I am using the following code in my items.lua script:
Code: Select all
defineObject{
name = "hero_blade",
baseObject = "lightning_blade",
components = {
{
class = "Item",
uiName = "Hero's Blade",
gfxIndex = 85,
description = "The power to expel evil lies within this sword. Its great strength is only granted to true heroes.",
weight = 3.2,
attackPower = 32,
}
},
}However, when I start the game it says "warning! invalid component property item.attackPower" in the HUD.
I imagine this is because the name for what controls the attack power is not "attackPower", but I have tried various different names and none have worked. If anyone knows the name for changing the attack power it would be much appreciated. Same thing applies for the level requirement, as I would like to lower the requirement from Light Weapons 1 to none.
In addition to the previous problem, there appears to be no charge attack for the cloned sword. I imagine there is some sort of component I have to set to put a charge attack on the weapon, and this component was lost when defining the new object. If anyone knows how to add charge attacks that would be useful. I imagine there are a set of values you would need to set, like the spell it uses, mana cost, number of charges, and the level requirement, but I have no idea what these values would be.
tl;dr I would like to know what values need to be set on an item to change attack power, level requirements, and charge attacks. A full list of values that could be set would also be useful as a reference if one exists.