Page 1 of 1
protection on shield not working ? - solved
Posted: Wed Apr 08, 2015 10:19 pm
by Drakkan
Have i missed something ?
why when I set protection for some shield its not working ? :/
example:
Code: Select all
defineObject{
name = "test_shield",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/crystal_shield.fbx",
},
{
class = "Item",
uiName = "test shiel",
description = " no proterction bonus when equiped ",
gfxAtlas = "mod_assets/icons/drakkanicons.tga",
gfxIndex = 54,
weight = 12,
traits = { "shield", "epic" },
},
{
class = "EquipmentItem",
protection = 10,
immunities = { "petrified" },
},
},
}
Re: protection on shield not working ?
Posted: Wed Apr 08, 2015 11:08 pm
by Skuggasveinn
Protection is a part of the armor traits and gets applied when in item is in an armor slot.
Protection is be design ignored when its being held to prevent someone holding a heavy armor and getting the protection bonus.
If you want an Item to apply the protection bonus when being held (also known as a weapon slot) you need to assign the EquipmentItem class to a specific slot by doing slot = "Weapon",
Code: Select all
defineObject{
name = "test_shield",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/crystal_shield.fbx",
},
{
class = "Item",
uiName = "test shiel",
description = " no proterction bonus when equiped ",
gfxAtlas = "mod_assets/icons/drakkanicons.tga",
gfxIndex = 54,
weight = 12,
traits = { "shield", "epic" },
},
{
class = "EquipmentItem",
slot = "Weapon", -- THIS WILL GIVE YOU THE PROTECTION WHEN PLACED IN A WEAPON SLOT
protection = 10,
immunities = { "petrified" },
},
},
}
kind regards
Skuggasveinn.
Re: protection on shield not working ?
Posted: Thu Apr 09, 2015 7:51 am
by Drakkan
Skuggasveinn wrote:Protection is a part of the armor traits and gets applied when in item is in an armor slot.
Protection is be design ignored when its being held to prevent someone holding a heavy armor and getting the protection bonus.
If you want an Item to apply the protection bonus when being held (also known as a weapon slot) you need to assign the EquipmentItem class to a specific slot by doing slot = "Weapon",
Code: Select all
defineObject{
name = "test_shield",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/crystal_shield.fbx",
},
{
class = "Item",
uiName = "test shiel",
description = " no proterction bonus when equiped ",
gfxAtlas = "mod_assets/icons/drakkanicons.tga",
gfxIndex = 54,
weight = 12,
traits = { "shield", "epic" },
},
{
class = "EquipmentItem",
slot = "Weapon", -- THIS WILL GIVE YOU THE PROTECTION WHEN PLACED IN A WEAPON SLOT
protection = 10,
immunities = { "petrified" },
},
},
}
kind regards
Skuggasveinn.
make sense. thanks Skugg !