Bay 12 Games Forum

Please login or register.

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

Author Topic: Advanced weapons systems.  (Read 14601 times)

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Advanced weapons systems.
« on: December 16, 2010, 09:45:12 pm »

Am I the only one who noticed the distinct lack of detail in the weapon systems? I mean spear, swords and axes are basically just differing sized lumps of metal with related attacks.  I figure weapons, like creatures, should be at least composed of smaller parts, with each part able to perform its own functions, and together act like a weapon.

Component raws.
So just as creatures are made from body parts, and we have separate raws for body parts, we would need separate raws for weapon components. These raws would include its size, attacks, and what the part could be made of. For example
[COMPONENT:POMMEL]
   [SIZE:20]
   [WOOD][METAL]
   [ATTACK:BLUNT: MISC_WEAPON:100:1000:strike:strikes:pommel:1000]

Size is self explanatory, it’s how big the piece is. The next line shows that this can be made of wood or metal, required tags for this would be [WOOD] [METAL] [STONE] [LEATHER] [ROPE] [CLOTH] [THREAD] and any others you or Toady think are needed. The next line is the standard attack tag, but with one argument added, that is MISC_WEAPON. This extra argument shows the skill related to this attack. This means a weapon will have multiple skills attached to it, making selected attacks in adventure mode all the better.

Sockets and plugs.
Because certain components can only attach to certain other components, we need a system to control how a weapon is built. The solution is that each weapon has a number of sockets and plugs that go together, so that you can put a blade at the end of a pommel, but not a bow string. An example of this in the raws.
[COMPONENT:POMMEL]
   [SIZE:20]
   [WOOD][METAL]
   [SOCKET:BLADE]
   [ATTACK:BLUNT: MISC_WEAPON:100:1000:strike:strikes:pommel:1000]

[COMPONENT:BLADE]
   [SIZE:80]
   [METAL]
   [PLUG:BLADE]
   [ATTACK:EDGE:SWORD:20000:4000:slash:slashes:NO_SUB:1250]

The BLADE argument here tells what sort of socket/plug were using. Another example would be [STRING] for bows and cross bows. It would, of course, be possible to let a component have both a plug and a socket, so for example a chain in a flail would require both [SOCKET:BLADE] and PLUG:BLADE] allowing for it to be put in between the pommel and whatever you wanted to attack with.

Other tags.
Apart from this basic structure, we need a few other tags to tell how the weapon behaves. A [GRIP] tag would allow for this component to be held, and a [FLEXIABLE] tag would be used on chains and whips to change how the weapon is used.

Weapons.
Now that we have out components, we need raws to put them together into weapons. This is done by declaring  it’s components and how they relate, such as
[ITEM_WEAPON:ITEM_WEAPON_SWORD_SHORT]
   [NAME:short sword:short swords]
   [ATTACH: BLADE: POMMEL]

[ITEM_WEAPON:ITEM_WEAPON_MACE]
   [NAME:mace: maces]
   [ATTACH: SPIKE_BALL: POMMEL]

[ITEM_WEAPON:ITEM_WEAPON_FLAIL]
   [NAME:flail: flails]
   [ATTACH: CHAIN: POMMEL]
[ATTACH: SPIKE_BALL: CHAIN]

The new tag here is ATTACH, and it makes a relationship between one thing and another. For simplicity sake we could say that the plug always goes before the socket, I’m sure toady could make it polymorphic, but why bother? Entity’s would make and name weapons in the recipe defined in the weapon raws, in accordance to what their own raws allow.

Handling weapons in fortress mode.
Just telling your weapon smith to “Make a axe” would obviously be a little harder now. Instead you would need to tell him to “Make an axe blade” and have your wood crafter “Make a short handle”. Then have them put together, probably at a craftdwarf workshop. This would take a little longer, but it would be more realistic, so deal with it.

Adventure mode custom weapons.
So you’re in adventure mode, and you’re using a spear with a steel tip and pine shaft. You come across a new spear with a bronze tip, but a really nice mahogany shaft. What one to use? Simple solution, take both apart, then go into your adventure mode reactions, go to “Make new weapon”, select “New spear” and then use the components you just got to make a awesome new spear.

Handling [FLEXIABLE]
This is an interesting tag to handle the logic of. I’m thinking the best way would be that any component with [FLEXIABLE] on it would separate the mass of the weapon, without separating the speed. So for example, in a mace collision, the mass of the handle is counted towards the impact, but in a flail only the chain and head count. It would also allow for much faster acceleration, because the same force is being put into less mass, so the head of a flail would be going faster than the head of a mace. This means that for whips, you would get deadly fast speed with little follow through (Like in real life) and for weapons with a lot of mass, such as flails, there would still be follow through, but at a higher speed.

Any questions?

Jacob/Lee

  • Bay Watcher
    • View Profile
Re: Advanced weapons systems.
« Reply #1 on: December 16, 2010, 10:00:40 pm »

This is an interesting feature, but of course DF is in Alpha. This will be added in the next decade before the game is finished.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Advanced weapons systems.
« Reply #2 on: December 16, 2010, 10:01:17 pm »

I know, I know... But a modder can hope.

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Advanced weapons systems.
« Reply #3 on: December 16, 2010, 10:19:23 pm »

This comes up every so often:

Quote from: Toady One
Quote from: Footkerchief
Quote from: diefortheswarm
Question about adamantine weapons.

If you wanted to make an adamantine hammer,  you could make a hollow adamantine shell and fill it with molten lead.  This would be a very effective weapon!  Will we be able to do anything like this in the foreseeable future?

I could have sworn this exact idea came up before, but I couldn't find much.  Anyway, it basically depends on whether/when Toady implements a system for multi-component or multi-material items.  The quote below is about armor made of both leather and metal, but the challenges are mostly the same, so it's relevant:

There's some trickiness with items that are actually made from multiple materials.  Things like studding aren't as much of a problem, since the "improvements" on leather items can handle this.  But a lot of the in-game items should actually have several materials just for their basic structure, and it becomes harder to account for them.  Armok I played with making items up from components, but that was sort of a mess.  On the other hand, I'd want to avoid going through all the hassles of fully respecting a half-leather/half-metal item (with respect to things like weight and temperature effects) if I'm just going to flesh it out more later.  So, I dunno.  I have to think more about what items will be like if I change it.  Something like how it keeps track of threads and dyes might work for quite a long time (I think you can change the material of a bucket handle right now for instance), but certain items really don't have one main material, which is the problem.

Yeah, I remember it coming up before as well, at least as somebody's offhand remark, and yeah, we need some more backing in the code but it's definitely something that dwarves would want to do, assuming they don't have some weird ethics regarding mixing adamantine with stuff.  I think at some point there was a rule against improving adamantine items or improving with adamantine, but that might be long gone.
Logged

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Advanced weapons systems.
« Reply #4 on: December 16, 2010, 10:28:13 pm »

Well there is a differance between saying that something should be done, and giving some details on how to do it. While I fully respect that giving examples of how the raws would work in far from explaining the programming logic, it does imply similar methods to what the raws currently use.

Toady is able to give us creatures made of several differing materials, after all, and he does this by having a larger object composed of several smaller ones, rather then simple assigning multiple qualitys to the same object. As such I am saying why not do the same for weapons? Most of the "Weapons made from both wood and metal are hard because they have multiple materials" are from older debates that don't go so far as to say 'spear head' and 'shaft' should be two seperate objects.

Funk

  • Bay Watcher
    • View Profile
Re: Advanced weapons systems.
« Reply #5 on: December 17, 2010, 11:34:53 am »

this is the problem
Spoiler (click to show/hide)
just how do you have both types of sword but not have loads of diffent type of swords.

as  Max said we brake up the parts,but if we use a range of parts the Oakeshott Sword Typology or some other Typology.
with every part haveing its own there own [DESCRIPTION] tag and Rarity i.e.

[WEAPON:ITEM_WEAPON_SWORD_SHORT]
         [COMPONENT:POMMEL:COMMON]
         [COMPONENT:GRIP_1HAND:COMMON]
         [COMPONENT:BLADE_SHORT:COMMON]
         [COMPONENT:BLADE_SHORT_CURVING:UNCOMMON]

only rarely will a short sword have a curving blade, and it will have that in its description.

Logged
Agree, plus that's about the LAST thing *I* want to see from this kind of game - author spending valuable development time on useless graphics.

Unofficial slogan of Bay 12 Games.  

Death to the false emperor a warhammer40k SG

irmo

  • Bay Watcher
    • View Profile
Re: Advanced weapons systems.
« Reply #6 on: December 17, 2010, 02:48:44 pm »

Some thoughts about this:

So just as creatures are made from body parts, and we have separate raws for body parts, we would need separate raws for weapon components. These raws would include its size, attacks, and what the part could be made of. For example
[COMPONENT:POMMEL]

I disagree with this. Attacks should be bound to the weapon as a whole. A pommel by itself isn't capable of any attacks at all, and components used in several different weapons (like the SPIKE_BALL you have on the mace and flail) will have different attack stats for each of them. I also think all the attacks with a given weapon should use the same skill--the Swordsman skill should, by definition, cover all the ways of attacking with a sword.

Quote
Sockets and plugs.
Because certain components can only attach to certain other components, we need a system to control how a weapon is built. The solution is that each weapon has a number of sockets and plugs that go together, so that you can put a blade at the end of a pommel, but not a bow string. An example of this in the raws.

Why the directionality of plug -> socket? Why not have a HANDLE with [LINK:BLADE] and a BLADE with [LINK:HANDLE]?

Or, if you're trying to make the components interchangeable across weapon types, why not just make them a HANDLE and a BLADE and have the definition of the weapon include one of each?

Quote
[ITEM_WEAPON:ITEM_WEAPON_SWORD_SHORT]
   [NAME:short sword:short swords]
   [ATTACH: BLADE: POMMEL]

Like that. The components don't need to know how they'll fit together.

Quote
Handling weapons in fortress mode.
Just telling your weapon smith to “Make a axe” would obviously be a little harder now. Instead you would need to tell him to “Make an axe blade” and have your wood crafter “Make a short handle”. Then have them put together, probably at a craftdwarf workshop. This would take a little longer, but it would be more realistic, so deal with it.

I'm not sure I want to "deal with it" just for the sake of a marginal increase in realism. Multi-step jobs are a massive pain in the ass: you have to wait for a dwarf with the labor to be free, then they do the first step, then someone starts hauling the product to a stockpile on the other side of everything, then another dwarf becomes free to start the second step, then they go on break, then...

So I'd rather see something like this wait for more flexible workshops. Then you can put a forge and a woodworking bench in the same shop, and give the shop as a whole the order to "make an axe", and have the job done from start to finish by one artisan.
Logged

therahedwig

  • Bay Watcher
    • View Profile
    • wolthera.info
Re: Advanced weapons systems.
« Reply #7 on: December 17, 2010, 02:53:10 pm »

I thought pommels were used to... well... pummel someone?

Okay, perhaps a bit obscure, but pommels were used to beat people up when the owner couldn't shed blood or be bothered to unsheathe his sword... So you can attack someone with them...
Logged
Stonesense Grim Dark 0.2 Alternate detailed and darker tiles for stonesense. Now with all ores!

Funk

  • Bay Watcher
    • View Profile
Re: Advanced weapons systems.
« Reply #8 on: December 17, 2010, 05:12:58 pm »

the reason for weapon parts to have the attack is so that parts can be reused.
but different weapons can have different parts i.e. short sword and long swords will have different blades but may or maynot share other parts i.e. the grip on a long sword can often be use with 2 hands.
Logged
Agree, plus that's about the LAST thing *I* want to see from this kind of game - author spending valuable development time on useless graphics.

Unofficial slogan of Bay 12 Games.  

Death to the false emperor a warhammer40k SG

shadowform

  • Bay Watcher
    • View Profile
Re: Advanced weapons systems.
« Reply #9 on: December 17, 2010, 06:25:35 pm »

Another problem with this is that I know I've seen pommel strikes (with swords) and shaft strikes (with spears) in the combat log, so regardless of whether or not this system is implemented, you can work around this issue simply by allowing those alternate attack types (eg, slash/thrust/pommel with a sword) through how the combat system is coded, which seems to be what Toady has done.
Logged
Q: What do you get when you take 100 clear glass windows, 1000 silver bars, 6700 gold bars, and 18,000 marble blocks?

A: A very large wall.

"Alright, here's Helltooth... Harborfence... Urist, come get GenericBlade... and you. Welcome to the Danger Room. First timers get good ol' Ballswallowed. Have fun and try not to take off your own toe."

Bohandas

  • Bay Watcher
  • Discordia Vobis Com Et Cum Spiritum
    • View Profile
Re: Advanced weapons systems.
« Reply #10 on: December 17, 2010, 09:00:41 pm »

This is an interesting feature, but of course DF is in Alpha. This will be added in the next decade before the game is finished.

I know, I know... But a modder can hope.

The problem is that for every two steps forward the weapon system seems to take one step back.

Compare:
http://df.magmawiki.com/index.php/40d:Weapon#Damage_calculation
Vs.
http://df.magmawiki.com/index.php/DF2010:Attack_Type
Logged
NEW Petition to stop the anti-consumer, anti-worker, Trans-Pacific Partnership agreement
What is TPP
----------------------
Remember, no one can tell you who you are except an emotionally unattached outside observer making quantifiable measurements.
----------------------
Έπαινος Ερις

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Advanced weapons systems.
« Reply #11 on: December 17, 2010, 09:12:48 pm »

Another problem with this is that I know I've seen pommel strikes (with swords) and shaft strikes (with spears) in the combat log.

What you saw was an attack from the weapon that said it was using a shaft, but realy was just using a block of unknown shape.

I disagree with this. Attacks should be bound to the weapon as a whole. A pommel by itself isn't capable of any attacks at all, and components used in several different weapons (like the SPIKE_BALL you have on the mace and flail) will have different attack stats for each of them. I also think all the attacks with a given weapon should use the same skill--the Swordsman skill should, by definition, cover all the ways of attacking with a sword.

If I had just the pommel of a sword, I would very well hit you with it. It would be lighter then if there were a blade attached, but thats why weight is taken into account. Further more, if I had trained with a spear all my life, then picked up a pole axe, the action of bashing with the pole remains the same, while using the weapon head differs.

Why the directionality of plug -> socket? Why not have a HANDLE with [LINK:BLADE] and a BLADE with [LINK:HANDLE]?

Or, if you're trying to make the components interchangeable across weapon types, why not just make them a HANDLE and a BLADE and have the definition of the weapon include one of each?

Quote
[ITEM_WEAPON:ITEM_WEAPON_SWORD_SHORT]
   [NAME:short sword:short swords]
   [ATTACH: BLADE: POMMEL]

Like that. The components don't need to know how they'll fit together.

Well the idea was that in the future, as well as random creatures, there would be random weapons. So a demon would run out of hell carrying a pommel, attached to a chain, attached to a axe blade, and despite the fact that no other thing had ever seen something like this before, it would be possible, and limited to logical creation, otherwise we would get two pommels stuck together.

Of corse that is something for the future, and not within the scope of this suggestion, just allowing for future development.

shadowform

  • Bay Watcher
    • View Profile
Re: Advanced weapons systems.
« Reply #12 on: December 18, 2010, 12:37:01 am »

Further more, if I had trained with a spear all my life, then picked up a pole axe, the action of bashing with the pole remains the same, while using the weapon head differs.
Using two spears can be radically different.  A 10 or 15 foot pike is a MUCH different weapon from a 5-foot halberd, and that halberd itself is used in a much different fashion than, say, the spears used by the Greeks, which had a much different head.  Even if you're only talking about the shaft itself, there's a big difference between a 5' 5lb spear with a thrusting point on one end and a 5' 15lb pole axe with a heavy head (and yes, it HAS to be a heavy head or else it won't have the mass to achieve it's intended purpose, chopping through armor) on one end.

Weapons are not nearly as universal as you'd like to think.  Especially when you're talking about people who have mastered the use of a specific weapon, changing the weight of the weapon as a whole and how that weight is distributed can have a big effect on how it gets used.
Logged
Q: What do you get when you take 100 clear glass windows, 1000 silver bars, 6700 gold bars, and 18,000 marble blocks?

A: A very large wall.

"Alright, here's Helltooth... Harborfence... Urist, come get GenericBlade... and you. Welcome to the Danger Room. First timers get good ol' Ballswallowed. Have fun and try not to take off your own toe."

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Advanced weapons systems.
« Reply #13 on: December 20, 2010, 02:43:10 am »

Somebody trained in a military art should be able to adapt to different weapons of there chosen skill. So a spearmen should be able to pick up any number of spears and use them to a degree of skill. True, he may not be the best in the world if the weapon is othidox for their standards, such as it has a longer reach, or heavyer head, but they should still be better then a begginer.

With this in mind, a spearman using the same axemen, both with the same polearm, with differing heads, the only differance they would notice is in the weighted end, so a good weapon user would easily be able to adapt, through change in direction, force, or stance.

The axemen, however, would not be trained to handle the stabbing motion that the spearman aculaly uses with the spear head, just as the spearmen would not be able to use the axe head's weight to any effectivness, so when the weapon heads are involved, thats when specific skills come in, and therefor the best way to emulate this is by attaching attacks to the weapon parts, rather then weapons.

Urist McCheeseMaker

  • Bay Watcher
    • View Profile
Re: Advanced weapons systems.
« Reply #14 on: December 24, 2010, 07:08:29 pm »

Of course, it'd be silly to have a "stab" attack on a spearhead attached to a chain. Also, getting a feel for a weapon's weight isn't that hard.. the hard part is figuring out the weapon type. I'm still no good with staves, for example, even after messing with them for a while. But I'm fairly decent with anything that's short and only points one way (hammers, axes, short/medium length swords).

I think that's a better way to approximate it anyway. Have general "speardorf", "axedorf" and "swordsdorf" skills, but break them down into more specific skills, some of which overlap and some of which don't. Like stabbing, twirling (for staves or other long weapons, also somewhat relevant for heavy, unbalanced weapons), bashing (also hacking/slashing), and so on. And just have the weapon head allow certain kinds of attacks, like stabbing, twirling and bashing, with certain conditions (like, no stabbing if any part between the head and the handle is too flexible)
Logged
Pages: [1] 2 3 ... 7