Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Advanced Weapons  (Read 2665 times)

Strik3r

  • Bay Watcher
  • Persistently work-in-progress.
    • View Profile
Advanced Weapons
« on: September 24, 2019, 06:41:39 am »

This is a suggestion for some new weapon related tags and behaviours as well the associated functionality in the code.

[THROWN] - This tag marks a weapon as a weapon suitable for throwing.
    Melee weapon token
    • This is mostly a AI tag, to indicate a thrown weapon.
      • AI will only throw the weapon if it has a backup weapon
      • If the AI has multiple throwable weapons, it will equip another throwable weapon after throwing it, equiping a non-throwable weapon last.

[RETRIVEABLE:X] Makes this weapon a melee/ranged hybrid weapon that can be thrown with a limited range and then retrieved via rope/chain etc.
    Melee weapon token
    • Implies THROWN
    • X is the range of the weapon, in tiles.
    • AI will throw these weapons if they are within range.
    • The weapon will be retrieved automatically unless its stuck in the target, in which case it'll need to be pulled out, which will also retrieve it.

[GRAB:X] -  These attacks will have a X percentage chance to "wrap around" the targeted BP if the attack hits.
    Attack token(This token goes on a weapon's attack rather than the weapon itself)
    • If the attack is bladed, the weapon will cut into the BP
    • Useful for non-lethal/capture purposes.
    • If a weapon with any GRAB tokens is thrown, the weapon will "wrap around" the hit BP.
      • The (highest/random/average)? GRAB chance will be used for this, should the weapon have multiple attacks with GRAB set.
    • If the thrown weapon in question is [RETRIVEABLE] then the attacker can pull the target back.
      • In adventure mode, this is done the same way as pulling out a stuck weapon
      • How many tiles the target gets moved per "Pull"(if at all) heavily depends on the difference in size between the attacker and the target.
    • EDIT: Targets hit by a GRAB attack will not be "propelled away" if hit with sufficent force but will be knocked down and dazed instead.

[RANGE:X] - Sets the max range for this attack, X is the range in tiles.
    Attack token
    • If you've played Crypt of the Necrodancer or RuneScape then you know how this works.
    • Attacks with at least 2 tiles of range can pass through fortifications
    • If any attack on the weapon has at least 2 tiles of range, the AI will try to stay at least a tile away from their target but will only move if it cannot attack with any attack on its weapon.
    • If the attack in question also has GRAB the target will be kept at the maximum range of the attack.
    • Defaults to 1

[MIN_RANGE:X] Sets the minimum range for this attack, in tiles.
    Attack token
    • 0 allows targets on the same tile as the attacker to be attacked
    • 1 means that the attacker can't be straight on top of the target.
    • 2,3,4,.. The target must be at least this far to be able to be attacked.
    • Defaults to 0

[UNBLOCKABLE:X] Decreases the chance to block this attack by X percent of the inital block chance.
    Attack token
« Last Edit: September 25, 2019, 06:23:37 am by Strik3r »
Logged
NOTICE: If you can't update your profile/signature, stop using a Imgur URL for your profile picture.
Upload it to somewhere else.

DerMeister

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #1 on: September 24, 2019, 06:19:34 pm »

Good idea. Also needs tokens for attack around the shield (whip, scourge and flail). And some wrestling-like usages of this weapons.
Logged

Strik3r

  • Bay Watcher
  • Persistently work-in-progress.
    • View Profile
Re: Advanced Weapons
« Reply #2 on: September 25, 2019, 12:27:02 am »

Good idea. Also needs tokens for attack around the shield (whip, scourge and flail). And some wrestling-like usages of this weapons.

I'm not sure that making it possible for some weapons to ignore shields a good idea but i suppose there could be a tag like [UNBLOCKABLE:X] that decreases the chance to block the attack by X percent.
And being able to manipulate weapons that are stuck inside or wrapped around a target is something that the game will need but is not really within the scope of this thread.
But i suppose as a stopgap, [GRAB] attacks with sufficent force could knock foes down.
Logged
NOTICE: If you can't update your profile/signature, stop using a Imgur URL for your profile picture.
Upload it to somewhere else.

Blastbeard

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #3 on: September 25, 2019, 04:39:56 am »

+1

The only hiccup I can see with throwing weapons would be that soldier NPCs would need their uniforms and skills redone so that they not only carry a backup weapon if they have a throwing weapon, but can also use it effectively when they run out.

What happens when a retrievable weapon gets stuck in the target? Is it lost, or does the user have to pull it out like with a normal weapon?

I don't think the [GRAB] token should necessarily give a 100% chance of a wraparound. Giving it a variable for percent chance would probably be better, that way you could make weapons that are purpose-built to wrap around the target as well as weapons that aren't designed to but might do so anyway. Same goes for the knockdown and daze effect.

Melee weapon range would make pikes relevant, which would be a welcome change. AI trying to stay at their maximum range could cause some issues, as I can already see myself abusing that to push a pikeman towards a cliff so they can dodge off of it. Minimum range presents the same problem, as shutting down the enemy is as simple as getting right up next to them, which is what every melee user does in the first place.
It might be better to make range a property of the weapon's attacks rather than the weapon itself, so that certain attacks have better reach but can't be used within on enemies that are too close.

All in all, I like this. The first thing I thought of when I tried putting the tags together was a Bolas, so there's room for creativity here.
The only thing I could think of to add to this would be a tag to control reload time for ranged weapons, but that's been suggested so many times it may as well be white noise at this point.
Logged
I don't know how it all works, I just throw molten science at the wall and see what ignites.

Strik3r

  • Bay Watcher
  • Persistently work-in-progress.
    • View Profile
Re: Advanced Weapons
« Reply #4 on: September 25, 2019, 05:37:38 am »

+1

The only hiccup I can see with throwing weapons would be that soldier NPCs would need their uniforms and skills redone so that they not only carry a backup weapon if they have a throwing weapon, but can also use it effectively when they run out.

What happens when a retrievable weapon gets stuck in the target? Is it lost, or does the user have to pull it out like with a normal weapon?

I don't think the [GRAB] token should necessarily give a 100% chance of a wraparound. Giving it a variable for percent chance would probably be better, that way you could make weapons that are purpose-built to wrap around the target as well as weapons that aren't designed to but might do so anyway. Same goes for the knockdown and daze effect.

Melee weapon range would make pikes relevant, which would be a welcome change. AI trying to stay at their maximum range could cause some issues, as I can already see myself abusing that to push a pikeman towards a cliff so they can dodge off of it. Minimum range presents the same problem, as shutting down the enemy is as simple as getting right up next to them, which is what every melee user does in the first place.
It might be better to make range a property of the weapon's attacks rather than the weapon itself, so that certain attacks have better reach but can't be used within on enemies that are too close.

All in all, I like this. The first thing I thought of when I tried putting the tags together was a Bolas, so there's room for creativity here.
The only thing I could think of to add to this would be a tag to control reload time for ranged weapons, but that's been suggested so many times it may as well be white noise at this point.

Obviously, some modifications to the combat/equipment system will need to be done to accomodate the new behaviours.

Retriveable weapons that get stuck would either need to be pulled out like a normal weapon(due to being "retriveable", it can be done at distance), or by exceeding the maximum retriveable range of the weapon, which will also pull it out.
This does not apply to [GRAB] weapons, they will tether the target to the attacker, as long as the latter is still holding the weapon. The tether probably can be broken, if the target is strong enough.

You're probably right about making GRAB percentage based as well, but the knockdown idea was made with the existing force calculation in mind, so that an attack that would normally propel a foe away will instead knock them to the ground (and with enough force behind the attack, daze them), if the attack succeeds in grabbing the target

Also the ranges are attack specific. i mean you can still shaft someone with a mancatcher or a pike at close range, but their primary attacks are only feasible at a longer range.

I'll make some improvements to the OP
Logged
NOTICE: If you can't update your profile/signature, stop using a Imgur URL for your profile picture.
Upload it to somewhere else.

Atarlost

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #5 on: September 25, 2019, 04:59:04 pm »

Ranged melee doesn't get really useful to NPCs until combat formations are introduced, but they could be programmed to drop them and use a secondary weapon if they can't safely back up, or if their opponent has reclosed the distance before they could make an attack. 

I'd consider a [Wearable:X] tag for secondary weapons.  A spear is never going to be wearable.  Even a short spear is most of the wielder's height.  You might be able to tie one to your pack, but you wouldn't be able to access it quickly.  A longsword is wearable for an adult human, but may be too long to hang from the belt of an elf and is almost certainly too long for a dwarf.  A shortsword is wearable for a dwarf, but might still be too long for at least some kobolds. 
Logged

DerMeister

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #6 on: September 25, 2019, 05:42:08 pm »

Ranged melee doesn't get really useful to NPCs until combat formations are introduced, but they could be programmed to drop them and use a secondary weapon if they can't safely back up, or if their opponent has reclosed the distance before they could make an attack. 

I'd consider a [Wearable:X] tag for secondary weapons.  A spear is never going to be wearable.  Even a short spear is most of the wielder's height.  You might be able to tie one to your pack, but you wouldn't be able to access it quickly.  A longsword is wearable for an adult human, but may be too long to hang from the belt of an elf and is almost certainly too long for a dwarf.  A shortsword is wearable for a dwarf, but might still be too long for at least some kobolds.
Spear will be wearable for troll or ogre.
Logged

Atarlost

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #7 on: September 27, 2019, 02:05:06 am »

Ranged melee doesn't get really useful to NPCs until combat formations are introduced, but they could be programmed to drop them and use a secondary weapon if they can't safely back up, or if their opponent has reclosed the distance before they could make an attack. 

I'd consider a [Wearable:X] tag for secondary weapons.  A spear is never going to be wearable.  Even a short spear is most of the wielder's height.  You might be able to tie one to your pack, but you wouldn't be able to access it quickly.  A longsword is wearable for an adult human, but may be too long to hang from the belt of an elf and is almost certainly too long for a dwarf.  A shortsword is wearable for a dwarf, but might still be too long for at least some kobolds.
Spear will be wearable for troll or ogre.
Trolls and ogres probably shouldn't be able to use conventional weapons at all.  The relative handle diameters are too small for much larger hands to grip properly if their hands are in proportion to their bodies.  There's a reason small diameter tools like awls and screwdrivers and fishing poles have larger diameter handles.  If they're intelligent enough to make weapons they should have their own racial weapons that smaller creatures can't get their hands around. 
Logged

voliol

  • Bay Watcher
    • View Profile
    • Website
Re: Advanced Weapons
« Reply #8 on: September 27, 2019, 12:24:00 pm »

+1 yes please :)

Ranged melee doesn't get really useful to NPCs until combat formations are introduced, but they could be programmed to drop them and use a secondary weapon if they can't safely back up, or if their opponent has reclosed the distance before they could make an attack. 

I'd consider a [Wearable:X] tag for secondary weapons.  A spear is never going to be wearable.  Even a short spear is most of the wielder's height.  You might be able to tie one to your pack, but you wouldn't be able to access it quickly.  A longsword is wearable for an adult human, but may be too long to hang from the belt of an elf and is almost certainly too long for a dwarf.  A shortsword is wearable for a dwarf, but might still be too long for at least some kobolds.
Spear will be wearable for troll or ogre.
Trolls and ogres probably shouldn't be able to use conventional weapons at all.  The relative handle diameters are too small for much larger hands to grip properly if their hands are in proportion to their bodies.  There's a reason small diameter tools like awls and screwdrivers and fishing poles have larger diameter handles.  If they're intelligent enough to make weapons they should have their own racial weapons that smaller creatures can't get their hands around. 

The "X" in "[Wearable:X]" is the size of the applicable creature, no?

Atarlost's point is a good one, what about a "[SIZE_DIMINISHES_FORCE:X]" where any creature over the size of X wielding the weapon gets a force penalty, to make the force equal to the same attack by a creature with the size of X. It is not the most elegant model for this, but I have no idea how one would do it truly realistically, and a notion of it in the game would surely be nice.

Basically, if a giant (size 9'000'000) tries to wield a human-sized spear with [SIZE_DIMINISHES_FORCE:100000] (an arbitrary number for now) it would not hit with the force of a giant, but of a humanoid the size 100'000.

A [MAX_SIZE:X] token I find unrealistic, as one can stick a toothpicks into blocks of cheese or fruit IRL, although not with great force.

Atarlost

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #9 on: September 27, 2019, 05:22:31 pm »

A [MAX_SIZE:X] token I find unrealistic, as one can stick a toothpicks into blocks of cheese or fruit IRL, although not with great force.

One can't use a toothpick or even a pencil as a spear, though.  At some point it's silly and while Cyclopses are currently able to wield dwarf socks as weapons, they shouldn't want to.  At a certain point everything but logs and furniture falls into the category of silly small things that make no sense to strike with. 

I got off track on wearability specifically.  Wearability is partly about size  and partly about banging around and partly about being designed with some way of attachment so it can be quickly drawn.  Swords are (except the zweihander/montante/greatsword) short enough to wear from a human's belt and they fit in and don't fall out of scabbards that can hang from a belt.  Warhammers often have flat belt hooks on the side of the head, making them also wearable.  Maces in spite of being of length similar to warhammers don't have a flat side of the head for a hook and if you hang them from the other end they swing around and smash your knees so they aren't wearable in spite of being half or less the length of a human wearable longsword.  Spears are both too long for a human (the largest civilized species in DF I think) to wear and don't have a way to hang them from the belt or over the shoulder or otherwise wear.  Some 19th century firearms are with bayonet in the lower end of spear length and can be worn over the shoulder, but I've never seen a historical depiction of a spear with sling swivels. 
Logged

Pillbo

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #10 on: September 27, 2019, 05:51:51 pm »

A [MAX_SIZE:X] token I find unrealistic, as one can stick a toothpicks into blocks of cheese or fruit IRL, although not with great force.
One can't use a toothpick or even a pencil as a spear, though.  At some point it's silly and while Cyclopses are currently able to wield dwarf socks as weapons, they shouldn't want to.  At a certain point everything but logs and furniture falls into the category of silly small things that make no sense to strike with. 

But you can use a pencil as a shiv no problem.  So why couldn't a giant use a spear like a dagger?  Different uses for the same weapon based on size and maybe other traits would be cool.
Logged

DerMeister

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #11 on: September 27, 2019, 11:13:33 pm »

A [MAX_SIZE:X] token I find unrealistic, as one can stick a toothpicks into blocks of cheese or fruit IRL, although not with great force.
One can't use a toothpick or even a pencil as a spear, though.  At some point it's silly and while Cyclopses are currently able to wield dwarf socks as weapons, they shouldn't want to.  At a certain point everything but logs and furniture falls into the category of silly small things that make no sense to strike with. 

But you can use a pencil as a shiv no problem.  So why couldn't a giant use a spear like a dagger?  Different uses for the same weapon based on size and maybe other traits would be cool.
And, probably, different skills. Gremlin use knife as sword and fork as spear, kobold use spear as pike, troll use pike as spear etc.
Logged

Blastbeard

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #12 on: September 29, 2019, 10:52:32 am »

It might be simpler to just size weapons according to the user in a similar way to what we already do with clothing. A human, a giant, and an amphibian man are going to have different ideas about what counts as a "long" sword and are likely to make three different weapons and call them by the same name. There might be some issues  getting contact areas and penetration to scale with size, but if it works out every race would get a full arsenal.
Logged
I don't know how it all works, I just throw molten science at the wall and see what ignites.

Strik3r

  • Bay Watcher
  • Persistently work-in-progress.
    • View Profile
Re: Advanced Weapons
« Reply #13 on: September 29, 2019, 11:53:22 am »

It might be simpler to just size weapons according to the user in a similar way to what we already do with clothing. A human, a giant, and an amphibian man are going to have different ideas about what counts as a "long" sword and are likely to make three different weapons and call them by the same name. There might be some issues  getting contact areas and penetration to scale with size, but if it works out every race would get a full arsenal.

if weapon size is an issue that even needs resolving then this is probably the best way to do it and have a kind of a relative weight system for weapons.
A kobold probably could use a human dagger as a sword but isn't gonna be able to use a human greatsword at all. Something maybe like [MIN_WEIGHT:X] With X being the percentage of the making creature's average adult weight multiplied by 10. So, a sword made for average weight of a creature would be [MIN_WEIGHT:1000], and would translate to 70000 for humans, 60000 for dwarves/elves and 40000 for kobolds and so on. And remove the current size tags for weapons or keep them for backwards compatability with existing mods and allow weapons to still have hardcoded size restrictions, maybe for some more exotic weapons, perhaps something extracted from a creature or something.

This would actually have the benefit of preventing two handed weapons from being wielded in one hand with little to no effort. So, another tag will be needed to determine the relative weight to be able to 1-hand the weapon.

If it is a problem that's worth fixing. It may be better to ignore and disregard the absurdity of a kobold strapping a two hander onto its back, for the sake of gameplay convinience.
« Last Edit: September 29, 2019, 11:57:03 am by Strik3r »
Logged
NOTICE: If you can't update your profile/signature, stop using a Imgur URL for your profile picture.
Upload it to somewhere else.

DerMeister

  • Bay Watcher
    • View Profile
Re: Advanced Weapons
« Reply #14 on: September 29, 2019, 12:48:53 pm »

Good idea. Also needs tokens for attack around the shield (whip, scourge and flail). And some wrestling-like usages of this weapons.

I'm not sure that making it possible for some weapons to ignore shields a good idea but i suppose there could be a tag like [UNBLOCKABLE:X] that decreases the chance to block the attack by X percent.
And being able to manipulate weapons that are stuck inside or wrapped around a target is something that the game will need but is not really within the scope of this thread.
But i suppose as a stopgap, [GRAB] attacks with sufficent force could knock foes down.
It's not only grabbing by weapon. I talk about flexible weapons. This also can be debugging of scourge and whip penetration power.
Logged
Pages: [1] 2