• 🏆 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!

Combat Remake

Status
Not open for further replies.
This system expand standart combat mechanic. Added many new parameters which interact with each other.

Requirements:

  • cJass
    vJass
    JNGP
    1.26a

New parameters

  • Physical Attack
  • Physical Defence
  • Evade
  • Parry
  • Block
  • Physical Critical Strike
  • Accuracy
  • Attack Speed
  • Magical Attack
  • Magical Suppression
  • Magical Reflect
  • Magical Critical Strike
  • Magical Accuracy
  • Casting Speed
  • Weapon Mastery
  • Weapon Resist
  • Physical Effect Reflect
  • Magical Effect Reflect
  • Elemental Attack
  • Elemental Resist
  • Strength
  • Steadiness
  • Reaction
  • Agility
  • Intelligence
  • Will

lynuv


Now you need to wear items. Each item have their own rank, armor and weapon can be socketed with stones, one stone can give different bonuses depending on where he inserted (Diablo like). Item can have up to four additional bonus parameters.

Weapon values
  • Attack (phys/mag)
  • Critical Chance (phys/mag)
  • Critical Multiplier (phys/mag)
  • Attack Speed
  • Radius
  • Accuracy (phys/mag)
  • Dispersion

weved


Armor have defence as main, and jewelry - suppression.


Fullscreen Inventory
qosiw


Representing an inventory with 5 categories for different item types, 2 slots for weapon, 5 for armor, 3 for jewelry, 25 slots in each category.

Functionality
  • Possibility to share potions on hero, middle button in inventory right-bottom.
  • Socketing items, double click on stone and then on item, esc canceling aim. (color of slot selection changing)
  • Weight of inventory depends on strenght of hero. Reaching the limit cause speed suffering.
  • Book reading (TODO)


Combat Mechanic

Strikes from side nd back cannot be blocked, parried or evaded. You can block or parry critical strike. Existing possibility to reflect debuffs or damage back to attacker. Healing depends on healing rate, you can modify it.

New negative effects:
  • Stun
  • Paralyze
  • Fear
  • Physical, Magical, Universal silence
  • Blind

All negative effects laying with chance, but you can config debuff so he will be always 100% chance. If you attacking with effect on background, and strike was evaded or resisted, then effect will not be laid down on target.

Additional skill activators:
  • Weapon requirement
  • Effect
  • Position on back from target
  • Hp amount
  • Without silence

API

JASS:
EquipWeaponItem(unit u, item i, bool flag)
Equipping a weapon in main hand, flag means quip or uneqip

JASS:
EquipOffhandWeaponItem(unit u, item i, bool flag)
Same for offhand

JASS:
EquipShieldItem(unit u, item i, bool flag)
EquipArmorItem(unit u, item i, bool flag)
EquipJewelryItem(unit u, item i, bool flag)
Same for others custom items

JASS:
CreateShieldItem(int item_id, real x, real y)
CreateJewelryItem(int item_id, real x, real y)
CreateArmorItem(int item_id, real x, real y)
CreateWeaponItem(int item_id, real x, real y)
Creating item by id, on coords, returns item. For creating custom items you need to use this.


JASS:
RemoveCustomItem(item i)
Removing custom item.

BroadcastDamage(int status, real damage, unit for)
Broadcasting damage and attack status with texttag. Usually unsing in main functions.

JASS:
GetPositionDamageBonus(unit A, unit B)
Returning damage bonus depending on positioning

JASS:
GetAttackStatus(bool damage_type, unit A, unit B, real bonus)
Takes damage type, attacker, attacked, and accuracy bonus, returning attack status

JASS:
GetCriticalChance(unit A, bool damage_type, real bonus)
Same for critical chance

JASS:
MagicalDamage(unit A, unit B, real amount, bool can_crit, bool unavoidable, int eff)
simple, returning attack status

JASS:
PhysicalDamage(unit A, unit B, real amount, bool use_attack, bool can_crit, bool unavoidable, bool is_sound, int eff)
Same for physical damage

JASS:
HealUnit(unit A, unit B, real amount)
Also simple, unit A healing unit B with amount

JASS:
ApplyEffect(unit source, unit victim, real x, real y, int eff, int level
Applying effect from unit source on unit victim, if victim dont exists we put here null and write effect coords in x and y, effect we needed and its level

JASS:
AddBuffToUnit(unit target, unit caster, int buff_id, int level)
simple, but max level is 5

JASS:
RemoveBuff(int id, unit A)
also simple

PushMissile(unit from, int skill_id, real start_x, real start_y, real end_z)
launching missile to coords.

JASS:
OpenInventory()

CloseInventory()
for inventory

Config
JASS:
        MAX_EVADE = 70.
        MIN_EVADE = 5.
        
        MAX_PARRY = 70.
        MIN_PARRY = 5.
        
        MAX_BLOCK = 70.
        MIN_BLOCK = 5.
        
        MAX_RESIST = 65.
        MIN_RESIST = 5.
        
        MAX_CRITICAL = 52.
        MIN_CRITICAL = 0.
        
        MAX_MAG_CRITICAL = 40.
        MIN_MAG_CRITICAL = 0.
        // защита
        VALUE_BY_PERCENT_1 = 11
        FIRST_DEF_LIMIT = 350
        VALUE_BY_PERCENT_2 = 15
        SECOND_DEF_LIMIT = 650
        VALUE_BY_PERCENT_3 = 19
        // маг атака
        MA_VALUE_BY_PERCENT_1 = 16
        MA_FIRST_LIMIT = 475
        MA_VALUE_BY_PERCENT_2 = 19
        MA_SECOND_LIMIT = 725
        MA_VALUE_BY_PERCENT_3 = 22

Formulas

Physical damage calculates as
((((attack * weapon mastery * weapon resist) + additional) * critical rate * position bonus * attribute bonus * blocked) * physical damage redution rate)

Magical
amount * attribute bonus * magic boost * critical_rate

Hit chances
(1. - (parameter / accuracy) + RND(-0.06, 0.06)) * 100.

Debuff
(base chance / (PARAMETER * 0.09)) / resist rate

Triggers and code

Main
http://www.hiveworkshop.com/forums/pastebin.php?id=a8vo9y

MISC
http://www.hiveworkshop.com/forums/pastebin.php?id=bxula8

Utils
http://www.hiveworkshop.com/forums/pastebin.php?id=yb70r7

Main Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=gf8lth

Attacks Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=s3fuxy

Buffs Engine
http://www.hiveworkshop.com/forums/pastebin.php?id=v7m4rq

Movement
http://www.hiveworkshop.com/forums/pastebin.php?id=1fk2os

GUI
http://www.hiveworkshop.com/forums/pastebin.php?id=l9phtu

Buttons
http://www.hiveworkshop.com/forums/pastebin.php?id=nqrs4x

Sliders
http://www.hiveworkshop.com/forums/pastebin.php?id=j1bubc

Inventory
http://www.hiveworkshop.com/forums/pastebin.php?id=42vzlk

Book
http://www.hiveworkshop.com/forums/pastebin.php?id=4gdma8



Test commands - inv and book in chat

please comment and discuss, sorry for bad english

changlelog
  • 1.1 beta - negative effects with alternate state require rank
 

Attachments

  • New Mechanic 11 Eng.w3x
    1.2 MB · Views: 129
Last edited:
Wow. This might just turn out better than this http://www.hiveworkshop.com/forums/spells-569/mui-full-screen-inventory-shop-custom-item-230191/ since its not limited by jass limitations. Kudos.

my full screen system for now only single, but with some work its can be multi. and in comparsion with that system in link - my is very flexible and easy to import, with this you can create almost everything, im even dont mention usable sliders that give even more space to imagination, you can create inventory which moving slots by slider as in all nowadays RPG!

i think what must add fsgui api in firts post too, so will do this in a while

have anyone ideas for improving this systems?
 
Level 28
Joined
Oct 28, 2011
Messages
4,759
Your system features so many things that is very unique to War3 modding that its actually kinda hard to give suggestions. Probably more into the coding aspect but since I'm not a coder I can't really say something about that.

Question though since I can't check the map yet. Does this support melee/range? Sword = melee and Bow = range and animation changes?
 
i dont actually open in editor that map, however, in my system its change attack range and launching missiles that blueprinted in databases, for example bow in testmap

JASS:
        WeaponId[4] = 'I00C'
        WeaponDamage[4] = 18
        WeaponMagicalDamage[4] = 6
        WeaponAccuracy[4] = 46.
        WeaponMagicalAccuracy[4] = 17.
        WeaponShellModel[4] = "Abilities\\Weapons\\Arrow\\ArrowMissile.mdx"
        WeaponShellSpeed[4] = 1200.
        WeaponShellSize[4] = 70.
        WeaponType[4] = BOW
        WeaponRank[4] = RARE_ITEM
        WeaponSoundVariation[4] = BOW_EQUIP

shell lines describes its behavior, all is remaining - animation tag, i think add them on next version
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
and in comparsion with that system in link - my is very flexible and easy to import
Huh? That link re-directs you to the most dynamic & user-friendly inventory system so far. And it's easy to import either.

Expanding system is always easy for the creator, but if you place yourself as user, are you sure it's easy to use or even modify?

EDIT:

Im concerning on your inventory and I found a big problem here:
JASS:
GUI_AddBackground(3, 10); GUI_AddBackground(3, 9); GUI_AddBackground(3, 8); GUI_AddBackground(3, 7)
            GUI_AddBackground(4, 10); GUI_AddBackground(4, 9); GUI_AddBackground(4, 8); GUI_AddBackground(4, 7)
            GUI_AddBackground(2, 6); GUI_AddBackground(3, 6); GUI_AddBackground(4, 6); //GUI_AddBackground(4, 7)
            // _____
            GUI_CreatePanel(0, 10, 1, 1, HUMAN_UI); GUI_AddBackground(0, 10)
            GUI_CreatePanel(0, 8, 1, 1, HUMAN_UI); GUI_AddBackground(0, 8)
            GUI_CreatePanel(0, 6, 1, 1, HUMAN_UI); GUI_AddBackground(0, 6)
            // ______
            GUI_CreatePanel(6, 10, 1, 1, HUMAN_UI); GUI_AddBackground(6, 10)
            GUI_CreatePanel(6, 8, 1, 1, HUMAN_UI); GUI_AddBackground(6, 8)
            GUI_CreatePanel(6, 6, 1, 1, HUMAN_UI); GUI_AddBackground(6, 6)
            // ______
            GUI_CreatePanel(0, 4, 1, 1, HUMAN_UI); GUI_AddBackground(0, 4)
            GUI_CreatePanel(2, 4, 1, 1, HUMAN_UI); GUI_AddBackground(2, 4)
            GUI_CreatePanel(4, 4, 1, 1, HUMAN_UI); GUI_AddBackground(4, 4)
            GUI_CreatePanel(6, 4, 1, 1, HUMAN_UI); GUI_AddBackground(6, 4)
            
            GUI_CreatePanel(0, 2, 7, 3, HUMAN_UI)
            GUI_AddBackground(0, 0); GUI_AddBackground(0, 1); GUI_AddBackground(0, 2)
            
            GUI_AddBackground(1, 0); GUI_AddBackground(1, 1); GUI_AddBackground(1, 2)
            
            GUI_AddBackground(2, 0); GUI_AddBackground(2, 1); GUI_AddBackground(2, 2)
            
            GUI_AddBackground(3, 0); GUI_AddBackground(3, 1); GUI_AddBackground(3, 2)

            GUI_AddBackground(4, 0); GUI_AddBackground(4, 1); GUI_AddBackground(4, 2)
            
            GUI_AddBackground(5, 0); GUI_AddBackground(5, 1); GUI_AddBackground(5, 2)
            
            GUI_AddBackground(6, 0); GUI_AddBackground(6, 1); GUI_AddBackground(6, 2)
            
            // _____
            GUI_CreatePanel(8, 8, 9, 9, HUMAN_UI)
            GUI_AddBackground(8, 8)
            GUI_AddBackground(8, 7)
            GUI_AddBackground(8, 6)
            GUI_AddBackground(8, 5)
            GUI_AddBackground(8, 4)
            GUI_AddBackground(8, 3)
            GUI_AddBackground(8, 2)
            GUI_AddBackground(8, 1)
            GUI_AddBackground(8, 0)
            
            GUI_AddBackground(9, 8)
            GUI_AddBackground(9, 7)
            GUI_AddBackground(9, 6)
            GUI_AddBackground(9, 5)
            GUI_AddBackground(9, 4)
            GUI_AddBackground(9, 3)
            GUI_AddBackground(9, 2)
            GUI_AddBackground(9, 1)
            GUI_AddBackground(9, 0)
            
            GUI_AddBackground(10, 8)
            GUI_AddBackground(10, 7)
            GUI_AddBackground(10, 6)
            GUI_AddBackground(10, 5)
            GUI_AddBackground(10, 4)
            GUI_AddBackground(10, 3)
            GUI_AddBackground(10, 2)
            GUI_AddBackground(10, 1)
            GUI_AddBackground(10, 0)
            
            GUI_AddBackground(11, 8)
            GUI_AddBackground(11, 7)
            GUI_AddBackground(11, 6)
            GUI_AddBackground(11, 5)
            GUI_AddBackground(11, 4)
            GUI_AddBackground(11, 3)
            GUI_AddBackground(11, 2)
            GUI_AddBackground(11, 1)
            GUI_AddBackground(11, 0)
            
            GUI_AddBackground(12, 8)
            GUI_AddBackground(12, 7)
            GUI_AddBackground(12, 6)
            GUI_AddBackground(12, 5)
            GUI_AddBackground(12, 4)
            GUI_AddBackground(12, 3)
            GUI_AddBackground(12, 2)
            GUI_AddBackground(12, 1)
            GUI_AddBackground(12, 0)
            
            GUI_AddBackground(13, 8)
            GUI_AddBackground(13, 7)
            GUI_AddBackground(13, 6)
            GUI_AddBackground(13, 5)
            GUI_AddBackground(13, 4)
            GUI_AddBackground(13, 3)
            GUI_AddBackground(13, 2)
            GUI_AddBackground(13, 1)
            GUI_AddBackground(13, 0)
            
            GUI_AddBackground(14, 8)
            GUI_AddBackground(14, 7)
            GUI_AddBackground(14, 6)
            GUI_AddBackground(14, 5)
            GUI_AddBackground(14, 4)
            GUI_AddBackground(14, 3)
            GUI_AddBackground(14, 2)
            GUI_AddBackground(14, 1)
            GUI_AddBackground(14, 0)
            
            GUI_AddBackground(15, 8)
            GUI_AddBackground(15, 7)
            GUI_AddBackground(15, 6)
            GUI_AddBackground(15, 5)
            GUI_AddBackground(15, 4)
            GUI_AddBackground(15, 3)
            GUI_AddBackground(15, 2)
            GUI_AddBackground(15, 1)
            GUI_AddBackground(15, 0)
            
            GUI_AddBackground(16, 8)
            GUI_AddBackground(16, 7)
            GUI_AddBackground(16, 6)
            GUI_AddBackground(16, 5)
            GUI_AddBackground(16, 4)
            GUI_AddBackground(16, 3)
            GUI_AddBackground(16, 2)
            GUI_AddBackground(16, 1)
            GUI_AddBackground(16, 0)
            
            GUI_CreatePanel(8, 10, 1, 1, HUMAN_UI); GUI_AddBackground(8, 10)
            GUI_CreatePanel(10, 10, 1, 1, HUMAN_UI); GUI_AddBackground(10, 10)
            GUI_CreatePanel(12, 10, 1, 1, HUMAN_UI); GUI_AddBackground(12, 10)
            GUI_CreatePanel(14, 10, 1, 1, HUMAN_UI); GUI_AddBackground(14, 10)
            GUI_CreatePanel(16, 10, 1, 1, HUMAN_UI); GUI_AddBackground(16, 10)
            
            GUI_CreatePanel(18, 10, 5, 8, HUMAN_UI)
            GUI_AddBackground(18, 10); GUI_AddBackground(19, 10)
            GUI_AddBackground(18, 9); GUI_AddBackground(19, 9)
            GUI_AddBackground(18, 8); GUI_AddBackground(19, 8)
            GUI_AddBackground(18, 7); GUI_AddBackground(19, 7)
            GUI_AddBackground(18, 6); GUI_AddBackground(19, 6)
            GUI_AddBackground(18, 5); GUI_AddBackground(19, 5)
            GUI_AddBackground(18, 4); GUI_AddBackground(19, 4)
            GUI_AddBackground(20, 10); GUI_AddBackground(21, 10)
            GUI_AddBackground(20, 9); GUI_AddBackground(21, 9)
            GUI_AddBackground(20, 8); GUI_AddBackground(21, 8)
            GUI_AddBackground(20, 7); GUI_AddBackground(21, 7)
            GUI_AddBackground(20, 6); GUI_AddBackground(21, 6)
            GUI_AddBackground(20, 5); GUI_AddBackground(21, 5)
            GUI_AddBackground(20, 4); GUI_AddBackground(21, 4)
            GUI_AddBackground(22, 10); GUI_AddBackground(22, 9)
            GUI_AddBackground(22, 8); GUI_AddBackground(22, 7)
            GUI_AddBackground(22, 6); GUI_AddBackground(22, 5)
            GUI_AddBackground(22, 4)
            GUI_AddBackground(18, 3); GUI_AddBackground(19, 3); GUI_AddBackground(20, 3)
            GUI_AddBackground(21, 3); GUI_AddBackground(22, 3)
            // ~~~
            GUI_CreatePanel(18, 1, 5, 2, HUMAN_UI)
            Sliders_Show(StatesSlider)
            
            //GUI_CreatePanel(18, 0, 1, 1, HUMAN_UI)
            GUI_AddBackground(18, 0)
            GUI_AddBackground(19, 0)
            GUI_AddBackground(20, 0)
            GUI_AddBackground(21, 0)
            GUI_AddBackground(22, 0)
            GUI_AddBackground(18, 1)
            GUI_AddBackground(19, 1)
            GUI_AddBackground(20, 1)
You are re-creating the interface everytime you open the inventory which is literally bad.
 
Level 5
Joined
Nov 10, 2009
Messages
85
Hey, can this be made or modified for an AoS type game I am creating?

It's going to be like dota but with different types of characters and classes included... It will be a little advanced but i think this combat thing might fit for what I am trying to accomplish... Can provide more details about my project as soon as i get it up and running and begin working on it
 
Huh? That link re-directs you to the most dynamic & user-friendly inventory system so far. And it's easy to import either.

Expanding system is always easy for the creator, but if you place yourself as user, are you sure it's easy to use or even modify?

You are re-creating the interface everytime you open the inventory which is literally bad.

if user know jass on basic level, he can use simple functions to build interface what he want. i have very easy and simple names and functions, which allowing any user with basic knowledge use them.

as for re-creating - i assumed, what keeping all objects created - not serve right purpose, and make more complicated system. and its not bottleneck. idea here, what this type of system allow you to change FSGUI in-game dynamically, which very painfully if you place objects in editor.

you can draw whatever you want whatever you need - system very simple, easy, and flexible.


however, i think one mistake here for system that it dont have one expendable background function, like a panel function


Hey, can this be made or modified for an AoS type game I am creating?

It's going to be like dota but with different types of characters and classes included... It will be a little advanced but i think this combat thing might fit for what I am trying to accomplish... Can provide more details about my project as soon as i get it up and running and begin working on it

whats kind of changings you want? aslo you can find me on skype if needed.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
So another FSI that is only compatible to singleplayer simply because the maker was too lazy to make it multiplayer compatible, despite that not being that much of additional work.

Also, this system is extremely hardcoded and allows next to no customization. What if I don't like certain stats from the default set? What if I don't want to implement a custom attacking system and instead go with the (much more fluent and easier to handle) wc3 default?

Why rewrite approved and accepted systems just for replacing them with your own less flexible hardcoded version?
All missile, buff, stat and status systems you can find on hive are both more optimized and more flexible.

No serious mapper will ever consider importing this system if they need to replace their current buff/missile/stat/status systems.

Yawn, nothing to see here.
 
its compatible for singe only because map for what im making it was singleplayer. im posted before what i can modify it for multi.

if you dont understand jass - ofcourse you can curse creator for harcoded stats, like suppression on jewelry, but if you have some abilities it is no much of a problem.

and who need wc3 default combat? for what?

and i doubt that systems which you mentioned have additional non warcraft stats
 

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
and i doubt that systems which you mentioned have additional non warcraft stats
Wrong.

Anyway, custom stats is not an extraordinary thing. The most important thing I see here is your inventory, yet it's not that pleasing. I still so much prefer the other ones.

if you dont understand jass - ofcourse you can curse creator for harcoded stats, like suppression on jewelry, but if you have some abilities it is no much of a problem.
Wrong again. He said so because he knows Jass pretty well and understand well how limited is your system.
 

Zwiebelchen

Hosted Project GR
Level 35
Joined
Sep 17, 2009
Messages
7,236
It is inflexible because it has absolutely zero modularity and compatibility to other systems. I can't just replace your missile system for Dirac's missile, as they work completely different. But in comparison to yours, Dirac's system is a lot more powerful, so the choice is obvious.
And please don't tell me that it works having both in my map. Any serious mapper who cares about efficiency will never import two of a kind.

The argument that it takes only a little bit of JASS knowledge to change hardcoded features is invalid. When I download a system or lib, I expect a system to be plug-and-play or I don't care about it - especially when theres other systems around that do the same that are. In fact, configurability is a requirement for approval here.

If you use your own selfmade systems just as a requirement for your custom combat system to work, then you force people to replace systems in their maps that are acknowledged standards - which is highly unlikely. I won't break compatibility to three systems just to get one other system to work.
 
Level 31
Joined
Jul 10, 2007
Messages
6,306
Don't reinvent the wheel. Make use of pre-existing systems. Just pick ones that you like. There are a variety of systems that do the same thing that range in ease of use, flexibility, and performance. They are good systems, use them, lol...

From there, you can bring them all together to make your awesome Combat System. I personally think that full scaled combat systems have too much overhead, but when there is only small-scale combat, they work I suppose. I'd personally just stick with the default wc3 combat and an attack indexer as that supports as many custom stats as you want, as many combat stages as you want, and has minimal overhead ; ). However, that's just me. Doing that won't help you much for things like projectiles. For that, you can go between default wc3 projectiles for simple things and custom coded projectiles for complex things. You get a win-win. Just have multiple missile types that interface with the combat system. This of course requires that your combat system be flexible so that users can put whatever they like into it.

A combat system primarily defines stages of combat, not stats or special things like parry. Those are more on the user-end, when they want to plug stuff into the combat system. A combat system would do things like seamlessly integrate indexed attacks and custom attacks with damage detection and run it all through a variety of standard phases that can be expanded upon ^)^. From there, you could have an example with custom stats like parry and so on. Also, you could have LOTS of resources, like the Parry resource etc, which can all be plugged into the combat system freely, adding more depth to the game with simple plug-and-play. Those are the makings of a good system.

The more hard-coded and rigid something is. The more the user has to modify your actual code... the suckier it is =p.


Most coders make huge libraries and complete solutions. Here, coders focus on modularity. A good balance between flexibility, performance, and modularity, allowing people to use a resource however they like without ever having to modify the code of that resource. Also giving users the bare minimum so that users are free to customize behavior to their needs by building layers on top of that bare minimum. Build your thing, layer by layer, piece by piece.

This coding approach is different from what most coders do. A lot of people outside of the wc3 community struggle with it, with the idea of next to nothing being coupled and everything being plug-and-play. This style is of course used because mappers want to use whatever they want. The more modular your thing is, the more likely that they will use it in conjunction with other things. Let them build their project using your stuff as components =p. Support mix and match. If they don't want a feature, they should be able to just not include it, not delete traces of it from all over your code. Originally, constant booleans and static ifs were used to delete things. Now things are just separate libraries called extensions and are automatically injected via static ifs and possibly textmacros/modules. This allows users to even inject their own behavior if they dislike yours for whatever reason. StructureDD and DDS are probably the very best examples of this. Save/Load with Snippets and Codeless Save/Load are the best examples of using TONS of public resources to build something cool.
 
Status
Not open for further replies.
Top