Page 2 of 2

Re: Unarmed combat equipment - (nearly solved)

Posted: Wed Apr 10, 2013 8:19 am
by akroma222
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
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,
}
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).
SpoilerShow

Code: Select all

cloneObject{
   name = "party",
   baseObject = "party",
   onAttack = function(champion, weapon)
      return attackingWeaponScripts.unarmedStuff(champion, weapon)                        
   end
}
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.
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
end
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 ;)

Re: Unarmed combat equipment - (nearly solved)

Posted: Wed Apr 10, 2013 1:37 pm
by Dr.Disaster
akroma222 wrote: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)...
I see no problem with gloves or other armor parts (perhaps boots?); it's armor after all.
akroma222 wrote: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 ;)
I've seen some FPS game(s) having a drain pipe as the weapon of last resort, beside going bare handed, but i can't recall what it was; too long ago.

Re: Unarmed combat equipment - (SOLVED)

Posted: Fri Apr 12, 2013 7:59 am
by akroma222
Finally, a working solution, this is a link to the weapons thread :D
viewtopic.php?f=14&t=4088

Re: Unarmed combat equipment - (SOLVED)

Posted: Sun Apr 21, 2013 3:30 am
by akroma222
Hi Bernhardz,
Check out the link above :)
Basically, I have just defined some unarmed combat 'weapons' - like brass knuckles or spiked gauntlets.
They can be easily created by just adding - skill = "unarmed_combat",
These were inspired by the original game's "pit fighter gauntlets" except that I wanted them to be seen in-hand (not just in the gauntlet slot of your champions inventory)

Very very simple to do... unfortunately I made a big fuss when the weapons did not work - as I was leaving spaces in the weapon definitions to try and chunk bits of info together (rookie error!! :oops: )

But its all fixed up now, just follow the link above :)