Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[CR] [WIP] Initial magazine implementation #14149
Conversation
This comment has been minimized.
This comment has been minimized.
|
Is there a pressing reason to identify magazine types by anything other
than their ammunition type? It might be technically more correct to have
one or more magazine definition per gun, but I find that hard to justify
when there's little to no differentiation between them.
|
This comment has been minimized.
This comment has been minimized.
ghost
commented
Nov 24, 2015
|
Good to see this making it into the game. You beat me to implementing it. Different mag types for the the same ammo type would be useful if you wanted to implement completely different weapons using the same ammo type. Hydrogen comes to mind. |
This comment has been minimized.
This comment has been minimized.
|
@kevingranade I think that concern separated as two issues - firstly what do we need to support in the code and secondly what is actually good for balance and game play
Consider for example the following 223 firearms:
The first takes STANAG magazines as suggested by @Rivet-the-Zombie, probably a standard and high capacity variant. Maybe also a craftable jungle clip version? The second takes it's own unique magazine and the fact its considerably smaller differentiates it. The L2037 would be implemented with an integral magazine.
I think this is a symptom of a wider problem - there are too many indistinct firearms. We could consider dropping any 223 firearms that don't take STANAG magazines unless there is a significant distinction that makes them worthy of inclusion. The same could apply for 9mm pistols (glock magazines) etc. Revolvers of course remain as they provide an interesting tactical dimension once magazine reloading goes in. |
This comment has been minimized.
This comment has been minimized.
This is a really neat PR, but we're not getting rid of any guns because they're inconvenient to have to implement it on. |
This comment has been minimized.
This comment has been minimized.
|
Ok, point taken about some guns being restricted to lower-capacity
magazines by this mechanism, that's the differentiation I was missing,
though it will be tricky to label them properly.
So how about a question from a different angle, if we do implement magazine
'families' like STANG, how many more types will we end up with compared
with just grouping them by ammo type? I'm assuming that's a relatively
high proportion, but if it isn't then that would be nice to have at low
cost.
As Rivet says, eliminating gun types isn't really on the table.
|
This comment has been minimized.
This comment has been minimized.
|
Just remembered, for people who want fewer gun variants, there's a 'simple
guns mod' that strips the gun variations down to a more typical game-like
level.
|
This comment has been minimized.
This comment has been minimized.
|
Hmm. Interesting. |
BevapDin
reviewed
Nov 30, 2015
| void Item_factory::load_magazine(JsonObject &jo) | ||
| { | ||
| itype *new_item_template = new itype(); | ||
| load_slot( new_item_template->magazine, jo ); |
This comment has been minimized.
This comment has been minimized.
BevapDin
Nov 30, 2015
Contributor
You should also add a call to load_slot_optional at the end of Item_factory::load_basic_info, so any item can gain magazine properties.
Actually, do we need a new item type in JSON for this? The magazine data could be loaded from the magazine slot of a GENERIC item in load_basic_info. The category can be set from JSON as well.
This comment has been minimized.
This comment has been minimized.
|
I think that the magazines should have both a family ID, and a personal ID. This allows a weapon to specify a certain family of ammo and/or certain magazines to use. Gun A might only be able to use mag A, While gun B can use both mag A and B. Gun A specifies that it can use mag A, while gun B specifies family A which both mag A and B are a part of. A second thing that needs to be taken into consideration are gun-mods. Some mods allow you to change the caliber of the gun to a completely different ammo type. But this would also allow you to create mods that just change the magazine compitability of a gun, which would be sweet. |
mugling commentedNov 23, 2015
This PR concerns the design of
islot_magazine. It can be merged only once the necessary refactoring has been done in #14132 and subsequent PRs.The following properties are used:
capacitymaximum number of roundsreliabilitychance to jam when feeding a roundreload_timeper individual roundA major outstanding question would include how do firearms specify their magazine. For the below example we could potentially define a
compatiblefield set toSTANAGand then implement other compatible types such asstanag50andstanag100? Firearms would then have amagazinefield specifying their compatible types?