Idea for unarmed combat skill

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Idea for unarmed combat skill

Post by Drakkan »

As you have probably noticed we do not have Unarmed combat skill in Log2. I quite liked it (somebody can see monk class here ?). Here is idea for such a skill, in case someone will try script it.
Feel free change anything, its just basic idea.

questions -
- what attack type is with bare hands ? (maybe application of unarmed skill means first to check if there are no weapons in champion hands ? )
- is this attack increasing by dexterity or on what damage depends

Code: Select all

defineSkill{
   name = "unarmed_combat",
   uiName = "Unarmed Combat",
   priority = 20,
   icon = 106,
   description = "You are trained in the martial art. You are able to strike hard without any weapon. By increasing this skill, your Accuracy, Dexterity, evasion and chances of performing special attacks increase.",
   traits = { [2] = "jab", [3] = "stun_kick", [5] = "five_point" },
-- each skill point increases accuracy, evasion and attack power by by 4 points and dexterity by 1 point
onComputeAccuracy = function(champion, weapon, attack, attackType, level)
return level * 4
end,   
onRecomputeStats = function(champion, level)
      champion:addStatModifier("evasion", level*4)
      champion:addStatModifier("dexterity", level*1)
end,

TO SCRIPT - increase attack power with bare hands by 4 points for each level

}

Traits

Code: Select all

defineTrait{
       name = "jab",
       uiName = "Hard Punch",
       icon = 94,
       description = "You have chance to deal extra damage with your bare hands. ",

TO SCRIPT: 
--each successful hit with hands have 60 % chance to deal extra damage (lets say equal to champion´s Dexterity or any other reasonable number) and consume 5 energy points. if not enough energy, just perform normal attack)

}

Code: Select all

defineTrait{
       name = "stun_kick",
       uiName = "Hard Kick",
       icon = 94,
       description = "You have chance to deal extra damage with your bare hands. ",
TO SCRIPT: 
--each successful hit with hands have 20 % chance to stun the monster (if not immune against stun) and it consumes 10 energy. If not enough energy just perform normal attack
}

Code: Select all

defineTrait{
       name = "five point",
       uiName = "Five Point technique",
       icon = 94,
       description = "You have chance to perform five fast attacks in a row with your bare hands. ",

TO SCRIPT: 
--each normal attack with hands have 30 % chance to chain four times (means five attacks alltogether), 
-- conditional – each attack is consuming some amount of energy on each attack (lets say 5). Still have chance to do previous special attack inside this chain. if not enough energy than just stop the chain and do regular attack. 
}
what you think ?
Breath from the unpromising waters.
Eye of the Atlantis
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Idea for unarmed combat skill

Post by Azel »

I dunno, the Monk didn't go too well when he made his appearance in the classic Diablo Mod, Hellfire. But it could work here if done correctly I'm sure.

I will say this... I tried this one Mod by Namas Knight, and holy jeebus that was terrible. Zero weapons for an eternity. Luckily I started the game by importing my Main Campaign finale party, so I walked around bitch slapping every mob (even bosses) with my bare hands. It worked fine so... maybe unarmed combat is a real possibility :P

It would need to be based solely on Strength, a blunt attack is its Type (although I guess Ninja Chops/Slashes could be argued). Special types of Knuckle weapons would need to be implemented in order to give special attacks (two handed swings, body bashes for stun, knockback, etc).
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Idea for unarmed combat skill

Post by minmay »

Azel wrote:It would need to be based solely on Strength, a blunt attack is its Type (although I guess Ninja Chops/Slashes could be argued). Special types of Knuckle weapons would need to be implemented in order to give special attacks (two handed swings, body bashes for stun, knockback, etc).
If unarmed combat involves using weapons, what's the point of having it at all? It's not meaningfully different from other melee attacks if you do that.

There is no good way to increase the attack power of bare-handed attacks that I know of. You would need an onComputeAttackPower() hook for that. You could fake it by increasing strength (and decreasing it after hitting) in onAttack, or by temporarily placing a weapon in the character's hands, but you would have the wrong attack power displayed on the character sheet, so those are not good solutions.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
User avatar
David Ward
Posts: 103
Joined: Wed Jan 07, 2015 11:44 pm
Location: Vancouver, BC, Canada

Re: Idea for unarmed combat skill

Post by David Ward »

Tell you what. If someone can script this, my friend and I will be add it as a skill into the game we're working on, as we're re-arranging a whole bunch of skills already.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Idea for unarmed combat skill

Post by akroma222 »

This is how my "unarmed combat" skill is looking atm... this is just a rough outline.
the idea is to use knuckle/fist/claw type weapons (which have 'unarmed trait' trait)
SpoilerShow

Code: Select all

defineSkill{
	name = "unarmed",
	uiName = "Unarmed Combat",
	priority = 110,
	icon = 106,
	description = "Increases Accuracy and Critcal Chance of unarmed attacks by 3% per level. At level 2, you gain the Counter Striker trait, giving the % chance (Dexterity), to counterstrike when enemys attack you. At level 3, you gain the Improved Dual Wield trait, enabling you to dual wield any Light Weapons. At level 4 you gain the Unarmed Finese trait, reducing cooldown times for unarmed attacks by 20%.",
	onComputeAccuracy = function(champion, weapon, attack, attackType, level)
		if weapon == nil or weapon:hasTrait("unarmed") then
			return level * 3
		end
	end,
	onComputeCritChance = function(champion, weapon, attack, attackType, level)
		if weapon == nil or weapon:hasTrait("unarmed") then
			return level * 3
		end
	end,
	traits = {   [2] = "counter_striker", [3] = "improved_dual_wield", [4] = "unarmed_speed" },
}
Not sure how to handle the dual wielding here though, improved dual wield seems pretty powerful to give at level 3, but I want unarmed combatants dual wielding early (as they would). I figure no one is going to sink 3 skill points into unarmed combat just to pick up the improved dual wield trait earlier than they would if they were putting points into light weapons (changed improved dual wield to level 4).

Counter striker lets a champion stop an enemy attack (based on dexterity) and counter strike at the enemy, possibly stunning the enemy (unless the enemy has both the skilled and fast traits)
SpoilerShow

Code: Select all

defineTrait{
	name = "counter_striker",
	uiName = "Counter Strike",
	icon = 0,
	charGen = false,
	description = "You gain the % chance (= Dexterity), to counterstrike when enemies attack you.",
}
Uses on damage hook - (code is very rough, but you get the idea - there is a chance to strike 2x if your DEX roll is good enough)
EDIT - Also working on making sure weapon requirements check out and also temporarily reducing cooldown time to 0.1
(counterstriking and then suffering cooldown when you were about to save the party with a fireball or heal spell will get quite annoying)
SpoilerShow

Code: Select all

		onDamage = function(self, champion, damage, damageType)
			
			local counter = champion:hasTrait("counter_striker")
			if counter then	
				local slot = 1
				local item1 = champion:getItem(ItemSlot.Weapon)
				local item2 = champion:getItem
				--local cool = ""
				--local req = {}
				if item1 and item1:hasTrait("weapon") then
					slot = 1
				elseif item2 and item2:hasTrait("weapon") then
					slot = 2
				end		
				local dex = champion:getCurrentStat("dexterity")
				local dx,dy = getForward(self.go.facing)
				local map = self.go.map
				local x = self.go.x + dx	
				local y =  self.go.y + dy
	
	
				for i in map:entitiesAt(x,y) do
					if i and i.monster then
						local skil = i.monster:hasTrait("skilled")
						local fast = i.monster:hasTrait("fast")
						if fast and skil then
							if math.random(1,120) >= dex then
								return true
							end
						elseif fast or skil then
							if math.random(1,100) >= dex then
								return true
							end
						end
						if math.random(1,80) <= dex then
							i.animation:stop()
							champion:attack(slot, false)
							playSound("swipe_claw")
							local quick = champion:hasTrait("quick")
							local finese = champion:hasTrait("unarmed_speed")
							local uncanny = champion:hasTrait("uncanny_speed")
							if quick or finese or uncanny then
								champion:attack(slot, false)
								playSound("spike_trap")
								i.monster:setCondition("stunned", 15)
								i.monster:showDamageText("Counter Striker!!")
								return false
							end
							i.monster:showDamageText("Counterstrike!")
							return false
						end
					end
				end
			end
Unarmed Finese trait just improves cooldown times for unarmed attacks (coz Monks/martial artists are crazy fast I guess?)
SpoilerShow

Code: Select all

defineTrait{
	name = "unarmed_speed",
	uiName = "Unarmed Finese",
	icon = 52,
	description = "The cooldown period for unarmed attacks you perform is decreased by 20%.",
	onComputeCooldown = function(champion, weapon, attack, attackType, level)
		if level > 0 then 
			if weapon == nil or weapon:hasTrait("unarmed") then
				return 0.80 
			end
		end
	end,
}
Last edited by akroma222 on Sat Feb 07, 2015 11:05 am, edited 1 time in total.
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Idea for unarmed combat skill

Post by Azel »

minmay wrote:If unarmed combat involves using weapons, what's the point of having it at all?

Knuckle and fist reinforcement gear is vital in unarmed combat. If you've ever played an RPG that contains unarmed combat then you would be less likely opposed to the idea. The damage modifier is typically minimal, or even non-existent, where the main benefit is the special ability. For example, wearing Iron Knuckles does not increase your attack damage but adds the "Bash" ability to your strikes. So where the best Axe in the game will add +75 to your attack... the best Knuckles in the game simply add a 3-second stun.

Most people understand this, like akroma up there who has the right idea:
akroma222 wrote:This is how my "unarmed combat" skill is looking atm... this is just a rough outline.
the idea is to use knuckle/fist/claw type weapons (which have 'unarmed trait' trait)

Love it!
User avatar
JohnWordsworth
Posts: 1397
Joined: Fri Sep 14, 2012 4:19 pm
Location: Devon, United Kingdom
Contact:

Re: Idea for unarmed combat skill

Post by JohnWordsworth »

I think for 'armed unarmed combat' to work (knuckle weapons etc), then Unarmed Combat should have a distinctly different feel to regular weapons. One suggestion is that you can dual weild these weapons from the start, but they do less damage.

I like the idea that monk attacks and weapons are based around debufing the enemy instead of dealing massive damage, but this needs to be really well balanced to provide satisfaction that it's worthwhile without being so powerful you can just paralyze all the bad guys.

Overall though, I like the idea, especially if it's fits with the flavor of the mod.
My Grimrock Projects Page with links to the Grimrock Model Toolkit, GrimFBX, Atlas Toolkit, QuickBar, NoteBook and the Oriental Weapons Pack.
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Idea for unarmed combat skill

Post by akroma222 »

JohnWordsworth wrote:I think for 'armed unarmed combat' to work (knuckle weapons etc), then Unarmed Combat should have a distinctly different feel to regular weapons. One suggestion is that you can dual weild these weapons from the start, but they do less damage.
A Question John/(everyone?) - Dual wielding is hard coded, so I believe... has anyone come up with a work around/alternative/decent hack to replicate the dual wielding ability??
I ask because, I also think that dual wielding early on for 'armed/unarmed combat' should be a thing... but only Improved dual wield (any light weapon) will allow this....
(unless you trait up the 'armed unarmed weapons' with the 'dagger' trait and give champs the normal dual wield trait- which then creates further complications)

We need a dual wielding hack for 'armed unarmed weapons' I believe...
User avatar
akroma222
Posts: 1029
Joined: Thu Oct 04, 2012 10:08 am

Re: Idea for unarmed combat skill

Post by akroma222 »

Drakkan wrote: questions -
- what attack type is with bare hands ? (maybe application of unarmed skill means first to check if there are no weapons in champion hands ? )
- is this attack increasing by dexterity or on what damage depends
Also, Drakkan, have we answered your questions yet?
I have used:
SpoilerShow

Code: Select all

onComputeAccuracy = function(champion, weapon, attack, attackType, level)
      if weapon == nil or weapon:hasTrait("unarmed") then
       ..................
..............
to check for the unarmed attack... you can also use:
SpoilerShow
if attack:getUnarmedAttack() then
to check, as this method will just return true or false.

Try adding this to your skill or any trait the skill gives you - to investigate further...
SpoilerShow

Code: Select all

onComputeCooldown = function(champion, weapon, attack, attackType, level)
		if level > 0 then
		        print(weapon, attack, attack:getUnarmedAttack(),  attackType, level)
	        end
	end,
minmay might be able to help further here, he is pretty clued in when it come to exactly what happens step by step, when a champ makes an attack
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Idea for unarmed combat skill

Post by Drakkan »

thanks everyone. As I said this was more just a random idea. Although I like akromas way of skill I see unarmed skill really more like unarmed, more concentrated on disarming opponent / make your character withstand more damage / become resistant. Which could be connected to some kind of Dodge skill as well. I will see if I get to this more, but not for now, maybe somebody else will come with some other idea(s) as well.
Breath from the unpromising waters.
Eye of the Atlantis
Post Reply