Damage system

User avatar
Naj
Member
 
Posts: 170
Joined: Sat Sep 19, 2015 21:14
GitHub: pyrollo
In-game: naj

Damage system

by Naj » Thu Aug 18, 2016 12:00

Hello, this is only a idea about damage management in Minetest.

On most servers, mythril or diamon armor and sword are the best weapons and armors. This mean that you always end up with such equipment and that's it.

I think this lacks some fun and it could be better to have various armors and weapons with different caracteristics. For example, an armor preventing for fire damage, another very strong against sword but weak agains hammers.

But to acheive that, the damage system has to be radically changed in minetest API. Actually there is no damage API, only get_hp/set_hp methods. The usual code for damages is :

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
player:set_hp(player:get_hp() - 5)

First of all, I find that quite ugly. I think there should be a method to tell "I want to hurt that player that strong" and it's up to the player model to react to that. The 3D armor mods use a sort of workaround to change the way player gets hurt.

In my opinion, a good API would be :

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
player:affect(type, strength)

type could be : "heal", "hunger", "fire", "suffocation", "radiation", "hurt" and every kind of damage (more accurate like "pierce", "impact"...). Default behavior shoud be to increase/decrease HP by strength.

Unfortunately, this would break most of mods dealing with damages :/

What is you opinion ?
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Damage system

by azekill_DIABLO » Thu Aug 18, 2016 14:12

very great idea! but before we need a better Pvp. Better than two guys swingin' sword for hours.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: Damage system

by Byakuren » Thu Aug 18, 2016 17:29

Punches account for armor values. If you want to account for armor, you can do a punch with tool capabilities including the damage groups you want to do, and this is what Technic does for radiation damage. What we need is a better API for armor groups, which could come in the form of a mod (for example, armor_monoid).
Every time a mod API is left undocumented, a koala dies.
 

User avatar
SegFault22
Member
 
Posts: 870
Joined: Mon May 21, 2012 03:17

Re: Damage system

by SegFault22 » Wed Aug 24, 2016 14:22

There is usually more than one way to use any weapon on someone - so it could be possible to implement a system, where when you are pressing a certain key and click to strike another player, the weapon is used differently. For example, the sword could be swung from up to down with one key and a click inflicting some amount of impact damage as well as regular cutting damage, and another key causes the sword to be "stuck" forward like in a stabbing motion dealing piercing damage.

Each different way of using the same weapon would inflict different damage "types", but probably retaining a base type that is a characteristic of the weapon. For example, stabbing with the sword would inflict piercing damage, but also some amount of cutting damage that is regular for that weapon, while swinging it down would inflict impact damage as well as cutting damage, but significantly more impact damage than when it is swung from the side. A battle-axe would act differently, the "non-keyed" attack mode swinging the weapon down and dealing cutting damage and impact damage, but if a key is pressed then it is used as an impact weapon from the side, having the effect of disorienting the other player or slowing down their walking ability for half a second, while not dealing any cutting damage since there isn't a blade on the sides of the axe-head, only the edges. If the axe has a pointy tip on the end, it could also be used in a forward stabbing mode of attack. There's also this spike-ball-on-a-stick weapon, which can be swung like an axe except it deals much more impact damage, and it can also be used in stabbing mode to inflict piercing damage as well as some amount of impact damage (because it's heavy on the business-end, thus inertia)

However, most weapons are only designed to be used in a single mode of attack, so it may be difficult or impossible to implement alternative modes - for example a pike (stick with a sharp pointy tip) is usually only used in a stabbing motion, because swinging it isn't effective and would cause more damage to the extra-long handle (tool damage) than if it were used the regular way. So in order for it to make sense that weapons can be used in different "modes" by pressing a certain key while the weapon is used by clicking, new types of weapons will have to be invented which are optimized for different modes of attack. Also, the damage dealt by different weapons is specific to their form, so they will have to be carefully configured such that the damage modes make sense considering the shape of the weapon and the mode it is being used in.

If this were implemented (which is difficult since we've kinda run out of keyboard space near the WASD keys, except for Z, X, C, F and R which are kinda difficult to reach while still hovering over WASD - F and C would be the easiest, though) it would add more to the combat system while also implementing damage "types". It would be much easier to use a specialized interface for the weapon mode-switch functions, such as a customized keyboard or a high-tech neural interface, allowing more unique functions than can be expressed with a single key-press on a traditional keyboard and possibly allowing them to be executed faster than with the traditional keyboard/mouse system.

What do you think?
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Damage system

by azekill_DIABLO » Wed Aug 24, 2016 17:09

I think combo attacks should be good and dermined by the number of click, the enemy distance, the stamina maybe.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
pandaro
Member
 
Posts: 266
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro

Re: Damage system

by pandaro » Wed Aug 24, 2016 17:24

I post in this conversation because I consider it interesting
My personal opinion is this

1- if there are a method to get the key pressed while an attack is running, the best optimization is use the WASD keys itself, where:
W = lunge
A and D = orizzontals
S = defense
other is useless for me.

2- i think we need a little redraw of the API where are the definition of the weapons:
Actually the definition of a weapon is closed on it self:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    tool_capabilities = {
        full_punch_interval=1.5,
        max_drop_level=1,
        groupcaps={
            crumbly={maxlevel=2, uses=20, times={[1]=1.60, [2]=1.20, [3]=0.80}}
        }
        damage_groups = {fleshy=2},
}

i hope a opening to some external data.
so the previous definition will become in a more complete way with optional external call:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    tool_capabilities = {
        playerRef = true,(true or false)
        customRef =  myTable,(false or a reference)
        full_punch_interval=1.5,
        max_drop_level=1,
        groupcaps={
            crumbly={maxlevel=2, uses=20, times={[1]=1.60, [2]=1.20, [3]=0.80}}
        }
        damage_groups = {fleshy=2*playerRef.hp, fire = 10 * myTable.fire},
}


But i think all this is not easy to do but can be useful for true moddable damage system
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: Damage system

by Byakuren » Wed Aug 24, 2016 17:50

pandaro wrote:I post in this conversation because I consider it interesting
My personal opinion is this

1- if there are a method to get the key pressed while an attack is running, the best optimization is use the WASD keys itself, where:
W = lunge
A and D = orizzontals
S = defense
other is useless for me.

2- i think we need a little redraw of the API where are the definition of the weapons:
Actually the definition of a weapon is closed on it self:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    tool_capabilities = {
        full_punch_interval=1.5,
        max_drop_level=1,
        groupcaps={
            crumbly={maxlevel=2, uses=20, times={[1]=1.60, [2]=1.20, [3]=0.80}}
        }
        damage_groups = {fleshy=2},
}

i hope a opening to some external data.
so the previous definition will become in a more complete way with optional external call:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
    tool_capabilities = {
        playerRef = true,(true or false)
        customRef =  myTable,(false or a reference)
        full_punch_interval=1.5,
        max_drop_level=1,
        groupcaps={
            crumbly={maxlevel=2, uses=20, times={[1]=1.60, [2]=1.20, [3]=0.80}}
        }
        damage_groups = {fleshy=2*playerRef.hp, fire = 10 * myTable.fire},
}


But i think all this is not easy to do but can be useful for true moddable damage system


It's already possible to make a weapon use dynamic tool capabilities by overriding on_punch and explicitly calling punching there.
Every time a mod API is left undocumented, a koala dies.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron