Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CR] [WIP] Initial magazine implementation #14149

Closed
wants to merge 15 commits into from

Conversation

Projects
None yet
7 participants
@mugling
Copy link
Contributor

commented Nov 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:

  • capacity maximum number of rounds
  • reliability chance to jam when feeding a round
  • reload_time per individual round

A major outstanding question would include how do firearms specify their magazine. For the below example we could potentially define a compatible field set to STANAG and then implement other compatible types such as stanag50 and stanag100? Firearms would then have a magazine field specifying their compatible types?

@kevingranade

This comment has been minimized.

Copy link
Member

commented Nov 24, 2015

@ghost

This comment has been minimized.

Copy link

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.

@mugling

This comment has been minimized.

Copy link
Contributor Author

commented Nov 24, 2015

@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

Is there a pressing reason to identify magazine types by anything other than their ammunition type?

Consider for example the following 223 firearms:

  • AR-15
  • Ruger Mini-14
  • L2037 Backup

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.

but I find that hard to justify when there's little to no differentiation between them

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.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Nov 24, 2015

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.

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.

@kevingranade

This comment has been minimized.

Copy link
Member

commented Nov 24, 2015

@kevingranade

This comment has been minimized.

Copy link
Member

commented Nov 24, 2015

@chaosvolt

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2015

Hmm. Interesting.

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.

Copy link
@BevapDin

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.

@DeadLeaves

This comment has been minimized.

Copy link
Contributor

commented Dec 1, 2015

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 and others added some commits Dec 12, 2015

chaosvolt
MShock Modded Tileset Series 24
changes:
* More subtle sprite for floor trunks, provided by BeerBeer.
* Made the 32x32 version of elevator grates and half-built wood walls
less low-res.

Sprite assignments:
* Steerable wheels (normal, armored, bicycle, motorbike, small, wide)

Sprite additions:
* Small 1-cylinder engine
* Gave rebar cages and half-built reinforced concrete walls proper
sprites.
* Machinery (light, electronic, heavy, old) thanks to Egomassive
* Conveyor belts (thanks to Egomassive)
* Egomassive again, gave covered wells a proper sprite.
* Shady zombies

Misc:
* Credit update in tileset file proper.
fix error from pr 14474 Chai tea
syntax error, my bad.  Slight difficulty tweak  too.
Merge pull request #14498 from Cyrano7/fix_for_14474
fixed error from pr 14474 Chai tea

@mugling mugling closed this Dec 20, 2015

@DeadLeaves DeadLeaves referenced this pull request Jan 24, 2016

Closed

Reload using magazines #14981

1 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.