• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Minigame] Combat system for upcoming maps!

Status
Not open for further replies.
Level 11
Joined
Oct 9, 2015
Messages
721
Hello everyone, I would like to dedicate this thread to my Combat System that is being developed, for divulgation and feedback purposes this thread is here by dedicated to this project!

Introduction
This is a combat system I've beeen developing for a while now and I think on it's current stage it's apresentable. It's influencied by the combat mechanics of games like Mount & Blade, War of the Roses, Chivalry: Medieval Warfare and Reign of Kings. The movments consists of an third person (maybe both third and first person in the future) camera arrow key movment system integrated with a very dynamic skill-based combat system where you use the most common abilities shortcuts to fit your needs during a fight.

Resume:
Arrow Key Movment System:
This arrow key system works with the default arrows up, down, left and right:
-Up arrow makes the character walks fowars
-Down arrow makes the characts walk backwards, if pressed twice makes it turn arround (180*)
-Left and Right arrows lets you turn the character to the sides, if pressed twice it'll make it strife to the sides



The Combat Techniques

The fighting movments consists of the A,S,W,D,Q keys:

A: Horizontal Blow, an horizontal swing causes medium in damage, range and speed.
-The Hozirontal Blows swing the blade back and forth by the side of the fighter, hitting any targets that it passes throught.
Horizontal Blow:
projeto-horizontal-blow.gif


S: Stabbing Blow is a fast and long range blow.
-The stabbing blow will hit any enemies in front at a longer range
Stabbing Blow:
projeto-stabbing-blow.gif


W: Overhead Blow, it's the slowest combat blow, but which takes the greater damage as it targets dangerous areas like head and shoulder;
-The Overhead Blow will hit enemies in the back (as it prepares to swing the overhead blow, it goes trought an area behind the back of the fighter, as the arm is taken backwars to performe the swing)
Overhead Blow:
projeto-overhead-blow.gif


E: Parry - The parry key will allow you to deflect an incoming front attack
Parry:
projeto-parry.gif


D: Defend - The defend key makes you raise/lower your shield to block any incoming front attacks.

Defend:
projeto-defend.gif


Q: Feint, is an strategy used to lure your opponent on defending an attack
-You can feint your attack during the windup phase with Q to make your enemy block early or to cancel your attack so you can parry instead.
Feint:
projeto-feint1.gif
projeto-feint.gif


R: Kick - Kicking an oponent will throw it into the ground stunning it for a short period (the time necessary for he to get up)

F: Shield Attack/Shoot - If you have a shield you can perform a shield attack that will cause bashing damage to the enemy. If you have a bow, crossbow or throwing weapon it will let you perform a ranged action (shooting/throwing)

The Arrow key moviments works along the combat system, so any attack can be blow both while standing and while walking.
projeto-defend-walking.gif
projeto-horizontal-blow-walking.gif
projeto-stabbing-blow-walking.gif
projeto-overhead-blow-walking.gif
projeto-parry-walking.gif


Combat Mechanics

Melee Combat

1 - Attacking
The melee attacks are composed by three periods, Windup Phase, Release Phase and Recovery Phase

First
Windup Phase: The period on which you are preparing your blow, if you press Q (Feint) or recieves damage during this phase your attack is canceled.

Second
Release Phase: The period on which your blow is released, this phase of the attack can't be interupted and you'll often trade hits if struck during this phase.

Third
Recovery Phase: The period just after you finishes your attack, you cannot attack on this phase.

2 - Defending
Parry: With your weapon you can defend an front incoming attack by using the parry technique (E)

Block: If you have a shield you can raise it by pressing (D) to turn your defense on/off, you'll defend any front incoming blows

3 - Feinting
Feint: If you wish to avoid trading hits, you can feint (Q) during your windup and instantly parry instead.

4 - Dragging
Drag: You can turn into attacks to speed them up, or turn away from attacks to slow them down. This throws off your opponent's block timing.

Dragging to slow your attack and throw off opponent's block timing:
draggin2.gif


Dragging to speed up your attack:
draggin1.gif


5 - Flinch and Riposte
Flinch: A flinch occours if you are struck during windup phase, your current attack is canceled and you enter recovery phase.

Riposte: After you parry an attack you can immediatly counter-attack and perform a riposte.

Gameplay Tips

Parry/Block only blocks front attacks

Attacks from the flanks and from behind takes 2x damage

The damage formula:

Horizontal Attacks have moderated speed and will cause one third of damage

Stabbing Attacks have more speed and will case half damage

Overhead Attacks are slower and will cause full damage

If you and your opponent are walking towards each other, you're going to cause more damage as you're going into encounter. If you or your opponent are walking backwards then attacks will cause less damage as you or the target are walking away from the attack.



The Stats system

The stats system works with the combat system as an catalyst and makes it even more enjoyable, here's what the stats do and their respective functions:

Health:

-The Health Stat determines the well-being of your character, you have an total of 100% health. As it goes down you start moving and attacking slowler and your attacks deal less damage.
-The Energy Stat determines the energy your character has to move and fight, if your energy gets bellow 25% your character will fatigate, moving and attacking slowler.

Attributes

-Strenght: The Strenght attribute determines the damage you will deal with melee weapons, bows and throwing weapons;

-Agility: The Agility attribute corresponds to your movment and attack speed;

-Inteligence: The Inteligence attribute determines how much energy you will use on each attack.

Armors and Weapons

The Weapons present on this project will have traits of it's own, the material it's made of will determine it's resistence before losing it's integrity and breaking, it's type of weapon will determine the attack type of each different blow.

You can change your loadout by entering the ESC menu (double tap Esc to open menu)

Weapons

Weapon Types:
Melee Weapons
- Dagger (Shorter ranged fast one-handed melee weapon with slashing and piercing damage)

- Short Sword (Mid ranged fast one-handed melee weapon with slashing and piercing damage)

- Short Axe (Shorter ranged with average speed melee weapon with chopping and piercing damage)

- Short Hammer (Mid ranged slow speed one-handed melee weapon with bashing damage)

- Short Mace (Mid ranged fast speed one-handed melee weapon with bashing and piercing damage)

- Longsword (Long ranged fast two-handed melee weapon with slashing and piercing damage)

- Waraxe (Long ranged fast two-handed melee weapon with chopping and piercing damage)

- Long Hammer (Long ranged slow two-handed melee weapon with bashing damage)

- Long Mace (Long ranged avarage speed two handed melee weapon with bashing and piercing damage)

Ranged Weapons
- Sling shot
- Bow and arrow
- Crossbow

Throwing Weapons (You can use throwing weapons for normal attacks aswell)
- Stones
- Throwing Knife
- Throwing Axe
- Throwing Hammer
- Throwing Dart


Weapons Stats
Swords:
-Horizontal Blows (A) and Overhead Blows (W) will cause slashing damage.
-Stabbing Blows (S) will cause piercing damage.

Axes:
-Horizontal Blows (A) and Overhead Blows (W) will cause chopping damage.
-Stabbing Blows (S) will cause piercing damage.

Hammers:
-Horizontal Blows (A), Stabbing Blows (S) and Overhead Blows (W) will cause bashing damage.

Spears
-Horizontal Blows (A) and Overhead Blows (W) will cause slashing damage.
-Stabbing Blows (S) will cause piercing damage.

Maces
-Some maces may cause piercing in both Overhead, Horizontal and Stabbing blows.

There will be about 5 type of materials of weapons will be made of, which one with it's particularities
Stone - Weapons made of stone have very low integrity and cause very low damage
Tin - Weapons made of Tin have lower integrity and cause lower damage
Bronze - Weapons made of Bronze have moderated integrity and cause moderated damage
Iron - Weapons made of Iron have good integrity and cause good damage
Steel - Weapons made of Steel have higher integrity and cause higher damage
Refined Steel - Weapons made of Refined Steel have greater integrity and cause greater damage

Armors
There will be a total of 5-6 different armor sets each one with it's particularities, an armor set is made of an Armor Item (which protects chest, upper arms, hip, legs and chins), an Helm Item (which protects the head), an Glove/Bracer Item (which protects hands or wrists) and an Boots Item (which protects foot)

Rags - Starting set of cloth, it takes full damage from all attack types.
Rags.png


Clothing - Normal clothing, small protective but lets you move freely as it has no incuberance.

Linen Clothing.png
Gamberson.png


Leather Armor - Leather Armor gives greater protection than Clothing Armor and are good at softing bashing blows, but not so good against slashing and chopping blows.
Wolf Armor.png
Leather.png


Chainmail Armor - Great protection against slashing blows, moderate protection against bashing, but is less effective against chopping and piercing damage.
Mail.png


Half-Plate Armor - Armor set made of a few parts of plate armor and leather or chainmail armor, is good at protecting against slashing and chopping damage, but not so good against piercing and bashing damage.
Bronze.png
Light Half.png
Heavy Half.png


Full-Plate Armor - Offers great protection against slashing, chopping and piercing damage, but not against bashing damage.
Plate.png
Plate Open.png


Polearm Combat Mechanics
Easy to manufacture, polearms are cheaper than swords, and sometimes can be more efficient. Polearms are generaly compost by a pole and a blade or blunt head. To strike with polearms means to be precise and to measure your distance from the opponent: if you try to hit an opponent that is really close with a long range polearm, you will most likely hit it with the pole, instead of the head, therefore making your strike useless. if you're opponent is too far you'll miss. So to use polearms one has to measure correctly the distance it is from it's target so that only the head of the weapon will be landing on your opponent.
polearm1.gif

polearm2.gif

Ranged Combat
Mechanics
The ranged combat will be using the (F) key as a shortcut (but can also be used directly throught mouse) to load your arrow, then you'll have to hover your mouse and choose where you want to shoot.

Ammo
You'll need ammo to shoot, if you shoot an arrow it will land on the ground and can then be recovered, if it hits a target it gets stuck on it and you'll be able to recover it only when the target dies.

Ranged Combat Tips
-It's easier to shoot while standing still, as the easiest way to do so if to use the shorcut (F) key and directly choose the target point with mouse.
-It's harder to shoot while walking/running as you would have to use the ability throught mouse as you move using the arrow keys.

Shooting while standing still:
shooting.gif

Shooting while running:
shooting-mouse.gif


Targetting Precision:
targetting.gif


Screenshots

War3 2016-10-10 02-18-20-13.jpg



(while some helmets offers great protection it may incubers the wearer and limit it's periferical view)
War3 2016-10-10 02-28-35-36.jpg




War3 2016-10-10 02-33-33-81.jpg

PS:Upcoming screenshots, videos, gifs replays


Videos
Please take note that this is just a demo video, it doesn't have combat special effects like blood, sparks and screams, which will be implemented later, as the main focus of the project for now is the mechanics of the combat system.

I have provided a test map, you can turn on/off bots by typing "-bot" and "-bot off"

Credits
Graber -Villager 255 Animations
BloodSoul - Help with hashtables for projectile recovery system.
General Frank - Bloodelf Paladin (Bronze Sword, Extraction)
Blood Raven - Bronze Buckler
@PurgeandFire - Script Language Translations (The whole hitbox uses his translations)
InfernalTater - Black Steel Helmet (Bronze Helmer)(Pending)
Kitabatake - Copper Bow (Bronze Bow) (Pending)
NFWar - GUI Bullet/Arc Missile
Sunchips - Two-Handed Spiked Mace (Bronze Long Mace)(Pending)
 

Attachments

  • Combat System.w3x
    1.9 MB · Views: 144
Last edited:
Level 14
Joined
Aug 30, 2004
Messages
909
Looks cool. I love the helmet overlay, that's really creative.

Have you considered using mouse-clicks instead of arrow keys for movements? I played with arrow-key movement systems but they don't allow for any turn speed options, and they're hard to turn precisely. For example, if you wanted the knight in the last picture to turn toward a tree, you'd have to hold it down precisely the amount of time needed to turn.

I've found using a mouse-click system works pretty intuitively. For example, then you would just click near or on the tree, and the knight would turn toward that point until facing it.

You can see roughly how it works in my Battle for Tatooine GOLD map. I'm not sure you'll like it better, but you should consider it if you haven't already.

If you're looking for more ideas, here are some suggestions:

1. Make a shield block button so you can temporarily reduce damage.
2. Make a weapon "clank" effect so that if two people try to hit each other at the same time, their weapons "clank" together. In other words, you can use an attack as a parry. More powerful effects can overcome the parry of quick attacks...so if you do a slow overhand blow, and I hit a quick slash, I'll still take some damage.
3. A collision system so if a mounted attacker charges an unmounted attacker they get pushed out of the way and damaged.

Keep up the good work.
 
Level 11
Joined
Oct 9, 2015
Messages
721
The combat system is almost complete, many of the features you mentioned are already included on the project, I'm updating the thread when I can, but almost every feature is already in. Like the shield and parry system, it's already implemented (and gave me some headaches to create in the past), you see there's the ability to parry (the character evens make the parry animation), where for a short time, your sword is up parrying and you block any incoming attacks coming from your front, dealing the damage to your energy instead of health. The shield block system is already in also, you can turn on/off the shield, while it's raised you'll block every incoming attack from the front with your shield, the damage will also be dealt to your energy, you can even parry and shield block while on horse back! Also if you passes throught units mounted on horse you will push them away from you. I'm just having trouble on how to tell you guys all the features I have to show, but believe me there are a lot of them, even things that can barely be noticed but which makes a huge difference on combat atmosphere and gameplay!

PS: I'll check your project to see how it is.

PS2: I'm trying to make some videos and gifs to demonstrate, but I don't know much about editing those things, make if I can disponibilize the map with an tutorial inside it that would be easier
 
Last edited:
Level 14
Joined
Jul 1, 2008
Messages
1,314
hey streetpunk,

I can see you have put a lot of effort in this and it actually looks pretty cool (not so much when walking to be honest) ...

I think this is actually pretty cool, but one problem I see here, whithout having checked the code, as I cannot dl it right now, that you have to use that model of yours because of the animations. If we could simply transfer these animations to another model, that would be really great, but I think it will not work?

Anyway, if one is happy to use the 255 villager (which is amazing anyway), I think this will be useful!

Will be interesting to check out the code to see how you did it :)

One thing, that would be nice would be to implement the possibility to miss attacks when units are on different fly heights, but that may also simply go too far.

best
 
Level 11
Joined
Oct 9, 2015
Messages
721
hey streetpunk,

I can see you have put a lot of effort in this and it actually looks pretty cool (not so much when walking to be honest) ...

I think this is actually pretty cool, but one problem I see here, whithout having checked the code, as I cannot dl it right now, that you have to use that model of yours because of the animations. If we could simply transfer these animations to another model, that would be really great, but I think it will not work?

Anyway, if one is happy to use the 255 villager (which is amazing anyway), I think this will be useful!

Will be interesting to check out the code to see how you did it :)

One thing, that would be nice would be to implement the possibility to miss attacks when units are on different fly heights, but that may also simply go too far.

best

Thanks a lot, it indeed needed a lot of effort, I'll post the core code eventualy as I further update the thread. It has already passed by my mind about that height check thing, and I'll certainly try my best to implement it, otherwise if you're in a hill combat would be unrealistic. There are plenty of stuff that is already made and is not yet mentioned on the thread, like ranged combat and the dynamic spell system (which will also be shown later).

man i love this i am the biggest fan i needed this system for my map sadly i quited

Why did you quited, man? You seem to be a really great terrainer, how did you achieved those terrains from Trigar? are you on unity now? I downloaded unity engine once but I don't think I can manage to work with that.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
I see that you go for arrow key turning in your design. Here's some food for thought, though:
From my experience, people hate arrow key turning, as most of the time you want strafing for the arrow keys. And double-hitting the arrow keys for strafing feels slow and clunky, especially with the added delay of the keypress events.

The most popular control scheme in action combat games is permanent mouse lock. In other words: you turn your camera directly with the movement of the mouse and use arrow keys (or A and D) only for strafing. Now, obviously, this is impossible to do in wc3 unless you use SharpCraft.

But here is an idea you might want to tinker around with: How about making all right-click actions a camera lock-on? So when you lock on a target by right-clicking, strafing will always move in the direction that is in a 90 degrees angle to the current lock-on direction. In combat, this would basicly mean that instead of strafing, you actually circle around the target unless you lock on a different target or the ground while doing it.

Since your combat seems to be hitbox based and not tab-targetting, how about making enemy units unselectable and always make the player lock on the ground? In that case, players could quickly adjust the facing direction in combat without having to use the arrow keys, having their hands free for the ability buttons.
Also, I highly recommend making WASD movement and adding abilities to Q,E,R,F,C and V, as that is the standard control scheme of most action combat games. Using arrow keys for movement and QWERASDF for abilities is bad, as now you'd need three hands to control the game as soon as you need the mouse for something...
 
Level 11
Joined
Oct 9, 2015
Messages
721
I see that you go for arrow key turning in your design. Here's some food for thought, though:
From my experience, people hate arrow key turning, as most of the time you want strafing for the arrow keys. And double-hitting the arrow keys for strafing feels slow and clunky, especially with the added delay of the keypress events.

The most popular control scheme in action combat games is permanent mouse lock. In other words: you turn your camera directly with the movement of the mouse and use arrow keys (or A and D) only for strafing. Now, obviously, this is impossible to do in wc3 unless you use SharpCraft.

But here is an idea you might want to tinker around with: How about making all right-click actions a camera lock-on? So when you lock on a target by right-clicking, strafing will always move in the direction that is in a 90 degrees angle to the current lock-on direction. In combat, this would basicly mean that instead of strafing, you actually circle around the target unless you lock on a different target or the ground while doing it.

Since your combat seems to be hitbox based and not tab-targetting, how about making enemy units unselectable and always make the player lock on the ground? In that case, players could quickly adjust the facing direction in combat without having to use the arrow keys, having their hands free for the ability buttons.
Also, I highly recommend making WASD movement and adding abilities to Q,E,R,F,C and V, as that is the standard control scheme of most action combat games. Using arrow keys for movement and QWERASDF for abilities is bad, as now you'd need three hands to control the game as soon as you need the mouse for something...

For the moment the mouse will be associated with the ranged combat system (bows, crossbows, throwing weapons, spells etc) I'll fill the deatils in the main post when I have the time, so you guys can see it. I don't know how to use sharpcraft, but if that way would be taken, I'd choose to walk on WASD, the vision would be associated with mouse movment, and the attacks with mouse right/left click, scroll up/down and scroll click buttons, like Chivalry: Medieval Warfare and Reign of Kings, I think this way would be smoother. Sadly I know nothing about sharpcraft, but I saw a guy was doing an online MMO that would break the 12 player limit, and that came to my interest, but I don't know how players would react about having to download a third part program just to play my map.
 
Level 11
Joined
Oct 9, 2015
Messages
721
(STABLE)
Updated
+Implemented Ranged Combat System and Description (with GIFs on thread)
+Implemented Polearm Combat Mechanics and Description (with GIFs on thread)
+Added equipment:
Bronze Dagger
Bronze Sword
Bronze Buckler
Bronze Bow
Bronze Greatsword
Bronze Spear
Bronze Long Mace
+Provided Working Demo Map
+Improved Respawn System, allowing to choose equipment each time you respawn so you don't have to restart the map to test every weapon

(BETA)
+Implemented melee attack height detection (If the target is in higher or lower ground than the weapon, the attack will be missed)
+Added equipment:
Bronze Short Axe
Bronze Double Axe
Bronze Short Hammer
+Improved Equipment Choice Menu
+Improved death animation

Fixes
Fixed polearm mechanics distance error
Improved dragging system
 
Last edited:
Level 11
Joined
Oct 9, 2015
Messages
721
+NEW BETA RELEASE:

(BETA)
+Added equipment:

Stone Weapons:
Dagger
Short Sword
Short Mace
Short Hammer
Short Spear

Tin Weapons:
Dagger
Short Sword
Short Mace
Short Hammer
Short Spear

Bronze Weapons:
Dagger
Short Sword
Greatsword
Short Mace
Long mace
Short Hammer
Long Hammer
Short Axe
Long Axe
Double Axe
Spear

Iron Weapons:
Dagger
Short Sword
Greatsword
Short Mace
Long mace
Short Hammer
Long Hammer
Short Axe
Long Axe
Double Axe
Spear

Steel Weapons:
Dagger
Short Sword
Greatsword
Short Mace
Long mace
Short Hammer
Long Hammer
Short Axe
Long Axe
Double Axe
Spear

Refined Steel Weapons:
Dagger
Short Sword
Greatsword
Short Mace
Long mace
Short Hammer
Long Hammer
Short Axe
Long Axe
Double Axe
Spear

+Implemented new full armor system with models

+Gamberson Armor and Cap

+Wolf Pelt Armor and Cap

+Leather Armor and Cap

+Bronze Armor and Helmet

+Chainmail Armor and Coif

+Light Half-Plate Armor and Helmet

+Heavy Half-Plate Armor and Helmet

+Full-Plate Armor and Helmet


+Improved Equipment Choice Menu
+Implemented Options Menu (Esc Button)


Will post screenshots of the new content when I have the time

BE AWARE, THIS IS A BETA RELEASE AND ALL BUGS SHOULD BE FIXED BEFORE GOING TO STABLE!
 
Level 11
Joined
Oct 9, 2015
Messages
721
01/31/2017
Update
Improved melee combat system (sharpier and shinier)
Fixed spawn bugs - players were stunned when they spawned (I can't feel my legs!)
Added unarmed combat (time to throw some punches and kick some a*s)
Added Shield Attack (bash them, baby)
Added Kick ability - the kick ability will throw enemies on the ground stunning them until they get up (Stay on the ground, filthy peasant!)
 
Level 11
Joined
Oct 9, 2015
Messages
721
02/02/2017
Update
*Added crossbow reload system (you have to click the arrow and then select the crossbow)
*Fixed crossbows not showing model bug (oh, there you are!)
*Fixed damage delay on overhead and stabbing blows (were you glitchy, bro?)
*Fixed unarmed Parry and Defend abilities
*Corrected ability buttons positions (it was time to clean up that mess)

[HOTFIX]
*Crossbow reload system fixed
*Weapon incompability fixed (you could for example use a crossbow and a shield)
*ESC Menu fix, you have to double tap ESC to open menu
*Polearms attack reach and stucking fixed
 
Last edited:
Level 1
Joined
Dec 27, 2022
Messages
4
Hi bro, can you pass me this map, it's protected, I want to learn how to use that combat style.
 
Status
Not open for further replies.
Top