Unarmed combat equipment - (SOLVED)

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Unarmed combat equipment - (SOLVED)

Post by akroma222 »

SOLVED -

Well it was something to do with way I was setting up the weapon definition in items.lua....
I had been putting space lines between chucks of info I wanted to group together... Idiot!! :oops:

So for a working solution to the unarmed item/weapon dilema, go here:
viewtopic.php?f=14&t=4088
Last edited by akroma222 on Fri Apr 12, 2013 7:58 am, edited 9 times in total.
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: Custom unarmed combat equipment - question/advice?

Post by Dr.Disaster »

akroma222 wrote:I am currently trying to come up with a way for equipment (gauntlets similar to pit fighter gauntlets) to add bonuses to attack power when fighting unarmed.
As far as i checked the mod section (very brief) either cloneObject{} or defineObject{} your gauntlet, set all properties it should have and then add an onEquipItem hook with a function for it's special bonus when unarmed.

http://www.grimrock.net/modding/asset-d ... reference/
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Custom unarmed combat equipment - question/advice?

Post by akroma222 »

Thanks Dr Disaster :)
I have used that method for many custom items already actually (see the link to the weapons script thread above) eg...
SpoilerShow

Code: Select all


cloneObject{
		name = "fetid_talons",
		baseObject = "pit_gauntlets",
		uiName = "Fetid Talons",
		model = "assets/models/items/pit_gauntlets.fbx",
		gfxAtlas = "mod_assets/textures/akroma_icon_atlas.tga",
		gfxIndex = 56,
		slot = "Gauntlets",
		skill = "unarmed_combat",
		requiredLevel = 20,
		strength = 2,
		protection = 2,
		weight = 0.9,
		damageType = "poison",
		onEquipItem = function(champion, slot)
      			return specialWeaponScripts.fetidtalonsEquip(champion, slot)
   		end,
   		onUnequipItem = function(champion, slot)
      			return specialWeaponScripts.fetidtalonsUnequip(champion, slot)
   		end,
		gameEffect = "Attack Power +10 when unarmed",
	}


cloneObject{
		name = "razor_claws",
		baseObject = "pit_gauntlets",
		uiName = "Razor Claws",
		model = "assets/models/items/pit_gauntlets.fbx",
		gfxAtlas = "mod_assets/textures/akroma_icon_atlas.tga",
		gfxIndex = 66,
		slot = "Gauntlets",
		skill = "unarmed_combat",
		requiredLevel = 35,
		strength = 1,
		protection = 3,
		weight = 0.9,
		onEquipItem = function(champion, slot)
      			return specialWeaponScripts.razorclawsEquip(champion, slot)
   		end,
   		onUnequipItem = function(champion, slot)
      			return specialWeaponScripts.fetidtalonsUnequip(champion, slot)
   		end,
		gameEffect = "Attack Power +12 when unarmed",
	}

And have the hooks call scripts which I posted in the first post.... but this way I can not increase attack power unless I add the trait aggressive or unarmed_combat (which the champ is likely to already have if the player decided on unarmed combat) ... and I do not want to add strength for the above mentioned reasons... and attack power can not be increased this way either :x
So, I used the onAttack hook, calling a script which checks for the monster in front of the party (Grimwolds old script) and for if the item in question is equipped.... then that calls the function to deal the extra damage and do all the cool things..... but for some reason the damagetile does not go off :o I am not sure why, obviously an error of some form on my part....

Also looking for alternative methods to handle custom unarmed equipment....
Have you created some??

Thank you for replying though! :D
Akroma
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: Custom unarmed combat equipment - question/advice?

Post by Dr.Disaster »

akroma222 wrote:Thanks Dr Disaster :)
I have used that method for many custom items already actually (see the link to the weapons script thread above) eg...
SpoilerShow

Code: Select all


cloneObject{
		name = "fetid_talons",
		baseObject = "pit_gauntlets",
		uiName = "Fetid Talons",
		model = "assets/models/items/pit_gauntlets.fbx",
		gfxAtlas = "mod_assets/textures/akroma_icon_atlas.tga",
		gfxIndex = 56,
		slot = "Gauntlets",
		skill = "unarmed_combat",
		requiredLevel = 20,
		strength = 2,
		protection = 2,
		weight = 0.9,
		damageType = "poison",
		onEquipItem = function(champion, slot)
      			return specialWeaponScripts.fetidtalonsEquip(champion, slot)
   		end,
   		onUnequipItem = function(champion, slot)
      			return specialWeaponScripts.fetidtalonsUnequip(champion, slot)
   		end,
		gameEffect = "Attack Power +10 when unarmed",
	}


cloneObject{
		name = "razor_claws",
		baseObject = "pit_gauntlets",
		uiName = "Razor Claws",
		model = "assets/models/items/pit_gauntlets.fbx",
		gfxAtlas = "mod_assets/textures/akroma_icon_atlas.tga",
		gfxIndex = 66,
		slot = "Gauntlets",
		skill = "unarmed_combat",
		requiredLevel = 35,
		strength = 1,
		protection = 3,
		weight = 0.9,
		onEquipItem = function(champion, slot)
      			return specialWeaponScripts.razorclawsEquip(champion, slot)
   		end,
   		onUnequipItem = function(champion, slot)
      			return specialWeaponScripts.fetidtalonsUnequip(champion, slot)
   		end,
		gameEffect = "Attack Power +12 when unarmed",
	}

And have the hooks call scripts which I posted in the first post.... but this way I can not increase attack power unless I add the trait aggressive or unarmed_combat (which the champ is likely to already have if the player decided on unarmed combat) ... and I do not want to add strength for the above mentioned reasons... and attack power can not be increased this way either :x
So, I used the onAttack hook, calling a script which checks for the monster in front of the party (Grimwolds old script) and for if the item in question is equipped.... then that calls the function to deal the extra damage and do all the cool things..... but for some reason the damagetile does not go off :o I am not sure why, obviously an error of some form on my part....

Also looking for alternative methods to handle custom unarmed equipment....
Have you created some??

Thank you for replying though! :D
Akroma
I see you already did dig into it ;) The original pit fighter gauntlets raise attack power whenever a player has at least one empty hand and work for every class. Yet mages and Toorum have no Unarmed skills but gain their attack power bonus and i can't imagine AH added a lot of hooks and functions to make this work.

Hmm .. what happens when you add "attackPower" to the defineObject{}?
I know it's ment for weapons and your items are gauntlets so this should not do anything but maybe .. just a thought ..
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Custom unarmed combat equipment - question/advice?

Post by akroma222 »

Indeed... it would be so very nice of them to allow us to alter attack power somehow other than just through weapon definitions ( pretty please AH :) !!!!)
Unfortunately trying to give the gauntlets attackPower does not work :( just weapons can not give you an evasion bonus..
The particular stats that various armours can increase and decrease are interesting though... cloaks can change a lot!
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: Custom unarmed combat equipment - question/advice?

Post by Xanathar »

Is it possible to do the opposite approach ?
That is having a weapon that uses the wrestling (or whatever is called) skill.
Something like this:

http://www.gamebanshee.com/showshot.php ... uckles.jpg

(Disclaimer: I haven't even thought about it for more than 1 minute, let alone investigated whethere it's possible or not, just throwing the idea in the air :) )
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Unarmed combat equipment - (nearly solved)

Post by akroma222 »

Hey Xanathar,
do you mean like scripting the damage some other way? (like the syphon fists transfer HP from monster to you..?)
I had thought of this and have done something similar for other weapons (drain HP or energy)
Anyways, I did manage to make an item weapon that uses unarmed skill
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,
}
I am just having problems with the scripting that comes after, given the weapon is passed as 'nil' through the onAttack hook it just crashes out unless I do something about it ... I have managed to check hand items against a table and then display some print... but I think I am getting my returns mixed up along the way.... will have an another look at it tomorrow :oops:
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Unarmed combat equipment - (nearly solved)

Post by akroma222 »

It would be very nice Indeed Jasjohnie!
Im sure I will figure this one out soon ;) :?
User avatar
Xanathar
Posts: 629
Joined: Sun Apr 15, 2012 10:19 am
Location: Torino, Italy
Contact:

Re: Unarmed combat equipment - (nearly solved)

Post by Xanathar »

Hey Xanathar,
do you mean like scripting the damage some other way? (like the syphon fists transfer HP from monster to you..?)
No, I didn't want to suggest implementing the syphon aspect.. it was more of suggesting of implementing knuckles and fist daggers rather than gloves and gauntlets as "unarmed weapons" :)

EDIT: but of course the syphon aspect is cool :)
Waking Violet (Steam, PS4, PSVita, Switch) : http://www.wakingviolet.com

The Sunset Gate [MOD]: viewtopic.php?f=14&t=5563

My preciousss: http://www.moonsharp.org
User avatar
Dr.Disaster
Posts: 2876
Joined: Wed Aug 15, 2012 11:48 am

Re: Unarmed combat equipment - (nearly solved)

Post by Dr.Disaster »

jasjohnie wrote:unarmed combat and be able to skillfully fight with the knife and bayonet. keep the essential equipment/weapons operating when combat power is crucial.it would be so very nice of them to allow us to alter attack power somehow other than just through weapon definitions
Xanathar wrote:No, I didn't want to suggest implementing the syphon aspect.. it was more of suggesting of implementing knuckles and fist daggers rather than gloves and gauntlets as "unarmed weapons" :)

EDIT: but of course the syphon aspect is cool :)
I could be mistaken but doesn't unarmed combat imply that you are fighting with empty hands, hence unarmed?
By the weapon definitions we have in LoG knifes belong to Daggers and a syphon is a crude Mace like the cudgel.
Post Reply