Re: Unarmed combat equipment - (nearly solved)
Posted: Wed Apr 10, 2013 8:19 am
OK, sorry if I have not been clear....
to answer you both I will explain exactly what I have done and am then getting stuck on
Unarmed combat (although there is indeed room for debate on this across game titles) does include both, fighting with bare fists - hand to hand- AND fighting hand to hand with special gloves, claws, spikey gauntlets etc (as is seen with pit fighter gauntlets). The pit fighter gauntlets are actually a gauntlet armour, which just provides a gameEffect bonus - +4 attack power when fighting unarmed (which we can not easily replicate).
I wanted to include more variety for people who are interested in fighting unarmed (as many folk enjoy a 'monk' or 'martial artist' type champion build). I also figured that seeing your champions bare empty hands for the entire game could get quite boring. At least I think I would be - I could be wrong in my assumptions. So >>> more unarmed pit fighter glove type items that can be seen in the champions hands is what I am trying to achieve here.
We can easily create such an item by giving the item the unarmed skill requirement. If the item happens to a big claw or even a spikey shield, we can give it (shield = true) in its definition. Such an item is easy to make and does exactly what I am after..... eg
However, I was trying to include some of these items into my special weapon scripts which use the onAttack hook (which passes "weapon = nil" if attacking unarmed... which technically you are not - there is indeed a weapon there).
So that is fine, champion still passes through as it is, we check against a table of unarmed combat items to see if the champion has one of them equipped. Which I have nearly done. However, I am not the sharpest tool in the scripting shed and the game kept crashing when trying to get all this to work.
So now I am just trying to get a script to work really.... and would love some help to that effect. Because then things like power gloves, magical claws etc can be created .... and all the folk who enjoy monk builds will be happy (not me personally, but I would like to cater for them in my mod)
Dr Disaster - indeed knives belong to daggers and even fist daggers do too... the items I am creating here are like slipover/clip on additions (like adding spikes to your leather gloves)... so an unarmed/martial art skill is still being used here, technically (at least this is how many other games handle such items)... Also, a syphon!!?? I have never heard of a syphon being a cudgel/mace type weapon, that is very interesting indeed (is there a game or link you can show me as an example??
)... When I spoke of syphon, I thought Xanathar was talking about scripting a drain or leech effect for the weapon (syphon being another word for such an effect).. sorry about the confusion 
to answer you both I will explain exactly what I have done and am then getting stuck on
Unarmed combat (although there is indeed room for debate on this across game titles) does include both, fighting with bare fists - hand to hand- AND fighting hand to hand with special gloves, claws, spikey gauntlets etc (as is seen with pit fighter gauntlets). The pit fighter gauntlets are actually a gauntlet armour, which just provides a gameEffect bonus - +4 attack power when fighting unarmed (which we can not easily replicate).
I wanted to include more variety for people who are interested in fighting unarmed (as many folk enjoy a 'monk' or 'martial artist' type champion build). I also figured that seeing your champions bare empty hands for the entire game could get quite boring. At least I think I would be - I could be wrong in my assumptions. So >>> more unarmed pit fighter glove type items that can be seen in the champions hands is what I am trying to achieve here.
We can easily create such an item by giving the item the unarmed skill requirement. If the item happens to a big claw or even a spikey shield, we can give it (shield = true) in its definition. Such an item is easy to make and does exactly what I am after..... eg
SpoilerShow
Code: Select all
defineObject{
name = "rampage_shield",
class = "Item",
uiName = "Rampage Shield",
model = "assets/models/items/small_shield.fbx",
gfxIndex = 55,
skill = "unarmed_combat",
requiredLevel = 18,
attackPower = 26,
accuracy = -5,
evasion = 10,
coolDownTime = 3.5,
attackMethod = "meleeAttack",
attackSwipe = "horizontal",
attackSound = "swipe_heavy",
impactSound = "impact_blunt",
shield = true,
weight = 4.5,
}SpoilerShow
Code: Select all
cloneObject{
name = "party",
baseObject = "party",
onAttack = function(champion, weapon)
return attackingWeaponScripts.unarmedStuff(champion, weapon)
end
}SpoilerShow
Code: Select all
function unarmedStuff(champion, weapon)
unarmedList = {"brass_knuckles", "pit_guards" , "bladed_guards" , "fetid_talons" , "razor_claws" , "tempered_claws"}
for slot = 7,8 do
local x = champion:getItem(slot)
if x and isInUnarmedTable(unarmedList, x.name) then
hudPrint("Oh finally it works!!")
return true
end
end
return false
end
function isInUnarmedTable(table, element)
for _,value in pairs(table) do
if value == element then
return true
end
end
return false
endDr Disaster - indeed knives belong to daggers and even fist daggers do too... the items I am creating here are like slipover/clip on additions (like adding spikes to your leather gloves)... so an unarmed/martial art skill is still being used here, technically (at least this is how many other games handle such items)... Also, a syphon!!?? I have never heard of a syphon being a cudgel/mace type weapon, that is very interesting indeed (is there a game or link you can show me as an example??