Home » MODDING HQ 1.13 » v1.13 Coding Talk » [IDEA] New Magazine System
[IDEA] New Magazine System[message #280585] Tue, 24 May 2011 11:50 Go to next message
Taro_M

 
Messages:296
Registered:November 2008
I dont know if it was discussed before, but new ammunition system would be nice. Im thinking about something like in 7.62, where bullets are separate from magazines. You load magazine with bullets and gun with magazine. I just find it odd in JA2 that you can ram 4 8Rnd pistol magazines into mp5 and somehow, magically they turn into full mp5 magazine. Also my sniper with PSG-1 wouldnt be able to magically convert bag of 7.62 ammo into magazines Wink.

[Updated on: Fri, 27 May 2011 20:19] by Moderator

Re: [IDEA] New Ammunition System[message #280587] Tue, 24 May 2011 11:59 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3804
Registered:July 2009
That pops up every once in a while (most recent thread I remember) and the micro management junkies among us would love it. The problem with it is the truly unholy amount of items it would create when every single bullet and the magazine counts as a separate item. So unless someone has a truly ingeneous idea how to solve that performance issue, it's not gonna happen.


Re: [IDEA] New Ammunition System[message #280588] Tue, 24 May 2011 12:02 Go to previous messageGo to next message
Toneone

 
Messages:383
Registered:October 2008
Location: Germany
Has been discussed before and it is probably not happening.
IIRC the engine of the game just can not handle magazines as a seperate container for different bullets, could be wrong though.
ED: Ninja

[Updated on: Tue, 24 May 2011 12:02] by Moderator

Re: [IDEA] New Ammunition System[message #280589] Tue, 24 May 2011 12:23 Go to previous messageGo to next message
Tue

 
Messages:45
Registered:April 2008
Location: Copenhagen, Denmark
I would absolutely hate that. Probably to the point of not playing this wonderful game. IMO it only make the game more tedious, not more enjoyable. Sometimes less realism is better - at least that's my opinion. Smile
Re: [IDEA] New Ammunition System[message #280590] Tue, 24 May 2011 12:55 Go to previous messageGo to next message
Kazuya

 
Messages:211
Registered:January 2009
DepressivesBrot
That pops up every once in a while (most recent thread I remember) and the micro management junkies among us would love it. The problem with it is the truly unholy amount of items it would create when every single bullet and the magazine counts as a separate item. So unless someone has a truly ingeneous idea how to solve that performance issue, it's not gonna happen.


Kazuyas truly ingenious idea, that was presented in the thred, that DepressivesBrot linked to:

Kazuya
ChrisL
Just keep in mind that if you treat ammo like an attachment, you increase the number of OBJECTs in the game to a very high number. Ammo treated as attachments would mean tracking each round as an individual OBJECT.

After thinking a little bit about this, I had the following idea:

Instead of modelling every single bullet as an object, use ammo objects with the following properties:

pseudocode:

class TAmmo
attribute: ammocount (integer) //represents the number of cartridges in that object
attribute: sequence (list) //represents a sequence of cartridges. The last item points to the first item (ringlist)
attribute: seq_pointer (pointer) // a pointer for traversing the sequence list



An ammo object is an attachment for a magazine and weapons get an additional "chamber" attachment.
When the player loads a gun, he attaches a full magazine to the gun. He then works the charging handle similar to a shotgun. This calls the "cycle" methode. This methode checks, if the ammocount is larger than zero. If so, the ammocount is reduced by one and another ammo object is created with ammocount=1. This new ammoitem gets automatically attached to the chamber attachment slot. Its sequence is a one item list with the value of ammo.seq_pointer (the ammoitem of the magazine, of course)
When a gun is fired, it fires the item from the chamber slot (deletes it) and calls the cycle methode.

In case it is not clear, what the sequence attribute is for:
sequence could look something like this:
"AP -> AP -> AP -> TR" With TR pointing to the first AP item again.
This would represent an ammo item, where three AP rounds are followed by one tracer round. seq_pointer would traverse the ringlist one by one, everytime the cycle mehtode is called to make sure, that the correct type of ammo is spawned in the chamber.

Of course, this would mean that a new interface would be needed for handling the new ammo and allowing additional merging and splitting of ammoitems, but on the other hand, only two additional attachments would be created.


Re: [IDEA] New Ammunition System[message #280591] Tue, 24 May 2011 13:09 Go to previous messageGo to next message
Taro_M

 
Messages:296
Registered:November 2008
Hmm, I cant say I understand much from that idea, but I presume its good one.

I also understand that only some would like seperate magazines and ammo, that is why there should be setting that would allow to enable such system, everyone will be happy then Very Happy.
Re: [IDEA] New Ammunition System[message #280593] Tue, 24 May 2011 13:15 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1540
Registered:March 2009
Location: Broadwurschd-City
DepressivesBrot
and the micro management junkies among us would love it.


afair Depri is the chairman of the board of mm junkies
Re: [IDEA] New Ammunition System[message #280597] Tue, 24 May 2011 15:01 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3804
Registered:July 2009
Tue
I would absolutely hate that. Probably to the point of not playing this wonderful game. IMO it only make the game more tedious, not more enjoyable. Sometimes less realism is better - at least that's my opinion. Smile

Of course such an OCD feature would never ever become the default or sole behavior of the game, so don't even attempt to derail the discussion with the 'I wouldn't use it therefore it sucks and nobody should get it' argument.


Re: [IDEA] New Ammunition System[message #280602] Tue, 24 May 2011 15:26 Go to previous messageGo to next message
Taro_M

 
Messages:296
Registered:November 2008
Yes, if this would ever make it into next version this system should be turned OFF be default, this way if dont want to use it then you will not even have to change any settings. If you like microing then you just change one stetting and there you go. As I said before: everybody will be happy.

[Updated on: Tue, 24 May 2011 15:27] by Moderator

Re: [IDEA] New Ammunition System[message #280604] Tue, 24 May 2011 15:34 Go to previous messageGo to next message
Tue

 
Messages:45
Registered:April 2008
Location: Copenhagen, Denmark
DepressivesBrot
Of course such an OCD feature would never ever become the default or sole behavior of the game, so don't even attempt to derail the discussion with the 'I wouldn't use it therefore it sucks and nobody should get it' argument.


That's not what I said, so don't even attempt to derail the discussion with a strawman argument.

I have absolutely no problem with making it an option. More options are always better.
Re: [IDEA] New Ammunition System[message #280606] Tue, 24 May 2011 16:19 Go to previous messageGo to next message
Lamach_Head

 
Messages:423
Registered:November 2008
Location: Mars
Kazuya
An ammo object is an attachment for a magazine and weapons get an additional "chamber" attachment.
When the player loads a gun, he attaches a full magazine to the gun. He then works the charging handle similar to a shotgun. This calls the "cycle" methode. This methode checks, if the ammocount is larger than zero. If so, the ammocount is reduced by one and another ammo object is created with ammocount=1. This new ammoitem gets automatically attached to the chamber attachment slot. Its sequence is a one item list with the value of ammo.seq_pointer (the ammoitem of the magazine, of course)
When a gun is fired, it fires the item from the chamber slot (deletes it) and calls the cycle methode.

Actually I see this as a great idea. This would also ease the engine, because rounds in magazines wouldn't be handled as full "OBJECTs".
I don't think that the engine wouldn't stand that, I think it would. Most of the time you would probably not even mess with single ammo rounds, as you would be using magazines on magazines or boxes on magazines etc. to fill your desired type of magazine.
(More so, you could really ease the engine simply by creating different ITEM variable just for the single ammo rounds. This would be stored in different xml and has only those tags which are neccessary for it.)

Personally I like the idea and I would use it in my games if it'd be done.


[Updated on: Tue, 24 May 2011 16:20] by Moderator



Re: [IDEA] New Ammunition System[message #280607] Tue, 24 May 2011 16:26 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1540
Registered:March 2009
Location: Broadwurschd-City
Sandro


Personally I like the idea and I would use it in my games if it'd be done.




why didn't You write:

Personally I like the idea and I will use it in my games when I've done it.


????
Re: [IDEA] New Ammunition System[message #280608] Tue, 24 May 2011 16:38 Go to previous messageGo to next message
Taro_M

 
Messages:296
Registered:November 2008
Could someone explain that idea in layman's terms? I just understand that ammo would be attached to magazine and magazine would be attached to weapon. Or is it different?
Re: [IDEA] New Ammunition System[message #280612] Tue, 24 May 2011 17:31 Go to previous messageGo to next message
Lamach_Head

 
Messages:423
Registered:November 2008
Location: Mars
Gorro der Gr


Re: [IDEA] New Ammunition System[message #280613] Tue, 24 May 2011 17:51 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
With only a vague understanding of in-game mechanics, my original idea was very close to Taro's model of ammo-in-magazine leading to magazine-in-gun. To be honest, I'm not sure if the last postings on possible implementation techniques still resembled this. Attachments (defined in attachments.xml) seems to have been dropped in favour of a new "does-this-NMS-magazine-fit-system."

Later on I spun off the idea of loose ammo as a minor change to the existing ammo system. One that would result in not only less items in items.xml, but also less micromanagement, and perhaps a stepping stone towards NMS. Basically, one size-fits-ejects-all magazine class item (item specified in magazine.xml) for weapons not flagged for magazine feed. See here: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=269976#Post269976 Odd how changing how reloading/unloading shotguns (and revolvers) hasn't garnered more comment.

[Updated on: Tue, 24 May 2011 17:53] by Moderator



Re: [IDEA] New Ammunition System[message #280614] Tue, 24 May 2011 17:52 Go to previous messageGo to next message
Taro_M

 
Messages:296
Registered:November 2008
Sandro

Not really. It means magazines would have their own variable containing ammo informations, thus the rounds themself wouldn't exist as separate objects. Weapons will have one more attachment slot - the chamber. When firing the weapon, the next ammo round from magazine is "created" and attached to that "chamber" attachment slot. When you fire a weapon the ammo object from the chamber is always deleted - used for the shot.
This would be a very ellegant solution.

So it will kinda work like grenade launcher, will there be any problems with burst and auto firing?
What about bullets? How would you transfer them from one magazine to another, or from ammo box etc.?

[Updated on: Tue, 24 May 2011 17:54] by Moderator

Re: [IDEA] New Ammunition System[message #280615] Tue, 24 May 2011 17:55 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
I suggested just clicking the NMS magazine item on the ammo crate. Same hot key for unloading rounds into ammo crate. Don't think we got far enough for suggestions of magazine to magazine transfers.

EDIT: for the record I have never advocated individual bullets as discrete items to be tracked in-game. Even the multiple ammo-types in the same magazine were in the context of a formula where ammotype1, ammotype2... ammotypeX, and a variable for where in the order would be tracked. Loose ammo in my strange inventory filled world is just a mini-ammo crate.

[Updated on: Tue, 24 May 2011 18:07] by Moderator



Re: [IDEA] New Ammunition System[message #280617] Tue, 24 May 2011 18:05 Go to previous messageGo to next message
Taro_M

 
Messages:296
Registered:November 2008
Hmm, how about creating separate bullets items? Then you could make magazine an item that you can "attach" bullets, ie. 30Rnd MP5 magazine will have 30 attachment slots for bullets. When you chamber a bullet it is deleted from magazine attachment slot and same one is created in chamber.

BTW: This way we would finally be able to keep that one extra bullet in chamber like many always wanted Wink.
Re: [IDEA] New Ammunition System[message #280618] Tue, 24 May 2011 18:09 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1540
Registered:March 2009
Location: Broadwurschd-City
but then you need a "chance of oops" depending on type and condition of gun


Re: [IDEA] New Ammunition System[message #280619] Tue, 24 May 2011 18:13 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
Ah, that is the computer resource burden that DepressiveBrot warned about, and I fully acknowledge as a problem (not to mention disassociate myself with, see my comments above, and in the NMS discussion).

Like the idea of a chamber is good though, magazine fed weapons would replenish from the magazine that is "loaded." (Not saying attached as it wouldn't be a real attachment).

[Updated on: Tue, 24 May 2011 18:16] by Moderator



Re: [IDEA] New Ammunition System[message #280620] Tue, 24 May 2011 18:14 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3804
Registered:July 2009
No! First, how would you handle the 200 (or more) rounds in a belt? Second, that's the very problem we're trying to circumvent i.e. having thousands of extra items when you just need to store caliber and type in a list*.

Btw, has anyone thought of streamlining the item struct? ~60 of the ~110 or so tags are booleans that still need a full byte each so using an integer/bit field representation would cut the 'size' of an item significantly. Would be an insanely tedious task to change all the conditions to bitwise comparisons though ... just an idea.


*representative of any linear data type, whatever fits best.


Re: [IDEA] New Ammunition System[message #280621] Tue, 24 May 2011 18:16 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1540
Registered:March 2009
Location: Broadwurschd-City
yupp a magazine isn't a fancy accessory like a pink scope
Re: [IDEA] New Ammunition System[message #280623] Tue, 24 May 2011 18:27 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
Yeah, it took me a while to fully understand that when a weapon is loaded, the magazine item disappears with the weapon "inheriting" ammotype and number of rounds variables; and unloading creates a new magazine item from the weapons currently loaded ammotype and number of rounds (zeroing them out for the weapon in the process). Any NMS discussions should be in the context of either building on this, or providing an alternative to these mechanics.

[Updated on: Tue, 24 May 2011 18:28] by Moderator



Re: [IDEA] New Ammunition System[message #280624] Tue, 24 May 2011 18:28 Go to previous messageGo to next message
Taro_M

 
Messages:296
Registered:November 2008
DepressivesBrot
Second, that's the very problem we're trying to circumvent i.e. having thousands of extra items when you just need to store caliber and type in a list*.
*representative of any linear data type, whatever fits best.


If you are talking about bullets in editor then my idea would actually require less items. For example now you have 9x18 in following magazines: 8, 15 and 30. Thats normal ones, but then you have HP, AP, Gl and so on. That is at least 12 different items that are exactly the same in game terms. With my idea you would only have 3 mags and 3 bullet types.

I agree that my idea isnt the best, but we should discuss every possibility and maybe we will run into best solution.

[Updated on: Tue, 24 May 2011 18:29] by Moderator

Re: [IDEA] New Ammunition System[message #280625] Tue, 24 May 2011 18:29 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1540
Registered:March 2009
Location: Broadwurschd-City
You would have SINGLE bullets
Re: [IDEA] New Ammunition System[message #280626] Tue, 24 May 2011 18:33 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3804
Registered:July 2009
We're not talking about the editor, it'll be more items in the end anyway because we're obliged to keep the old magazines. The problem is that you just don't want to create 100 attachments if you could use a list with 100 entries that allows for the same degree of freedom but needs far less resources (memory in this case)
Less resources needed = better performance


Re: [IDEA] New Ammunition System[message #280627] Tue, 24 May 2011 18:33 Go to previous messageGo to next message
Taro_M

 
Messages:296
Registered:November 2008
Yeah, if you would unload that you could have several hundreds in one sector or more. However as I said: we need to brainstom this bitch Smile. Maybe we could use something similar to 5 loose 7.62 rounds? To handle loose bullets, ie. all the bullets would be combined into one item. Lets say that this "loose bullets" item would be a "gun" that can hold 50 bullets.

[Updated on: Tue, 24 May 2011 18:39] by Moderator

Re: [IDEA] New Ammunition System[message #280628] Tue, 24 May 2011 18:43 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3804
Registered:July 2009
Hmmm
How about this:
- loose rounds are automatically consolidated into crates.
- you access crates in a similar way to money
- you specify a stack size and how many stacks you want
- you then drop those stacks into you magazine

This would allow for a pretty fluent handling. You could just draw 10 stacks of 30rds AP each if you just want to fill some mags or you draw 6 stacks of 4rds AP each and 6 stacks of 1 rd T to feed them alternating.


Re: [IDEA] New Ammunition System[message #280631] Tue, 24 May 2011 18:49 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1540
Registered:March 2009
Location: Broadwurschd-City
or select a prototype mag and click it on a stack of mags (empty or not) and get the stack filled like the prototype IF there is enough of the required ammo in the sector.

This would allow mixed mags.

OC You would have to fill the prtotype by hand
Re: [IDEA] New Ammunition System[message #280632] Tue, 24 May 2011 18:54 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
DepressiveBrot's idea of handling loose ammo like money could be implemented right now for non-magazine fed weapons.

EDIT: A money-like item would still be needed for any calibres using this feature. Each click of the ammocrate item would deplete one round into the new item, same for non-magazine fed weapons, 1st click creates the loose rounds item (with one round, one round lost from weapon), each click adds to the loose round's total, and depletes the weapon by one. Better than my idea where the loose round had a maximum size and you had to deal with multiple loose ammo items. Although how would item size be handled?

[Updated on: Tue, 24 May 2011 18:59] by Moderator



Re: [IDEA] New Ammunition System[message #280633] Tue, 24 May 2011 19:03 Go to previous messageGo to next message
Gorro der Grüne

 
Messages:1540
Registered:March 2009
Location: Broadwurschd-City
by mass and number
Re: [IDEA] New Ammunition System[message #280634] Tue, 24 May 2011 19:07 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3804
Registered:July 2009
... which reminds me of another problem:
100g steps are way too inaccurate to have single rounds.

@ Wil: I think we need a proper interface for this. If we are to apply this to all weapons, you just can't fill a 200rd belt that way, at least it's no fun.


Re: [IDEA] New Ammunition System[message #280635] Tue, 24 May 2011 19:14 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
In the context of a real-Magazine item (covers empty belts as well), my original thought of simply clicking the real-magazine item into the ammo crate would be used. The money like loose rounds covers things like non-magazine fed weapons, topping up real-magazines, +1 in the Chamber, pocketing loose rounds when real-magazine items are not available and ammo crates are not convenient.

Without a real-magazine item system (ie. today's ammunition handling), the loose rounds would just be for non-magazine fed weapons.

EDIT: JMich's work on expanding NIV sizes would be useful in this regard. I acknowledge that a lot of other things much be in place before a real-magazine item system can be contemplated. Hence my interest in improving loose ammo handling.

EDIT2: "In the context of" sounded better than "Given"

[Updated on: Tue, 24 May 2011 19:23] by Moderator



Re: [IDEA] New Ammunition System[message #280636] Tue, 24 May 2011 19:47 Go to previous messageGo to next message
Kazuya

 
Messages:211
Registered:January 2009
Taro
Could someone explain that idea in layman's terms? I just understand that ammo would be attached to magazine and magazine would be attached to weapon. Or is it different?


Okay, let's assume, that your merc has an AKM.

The AKM has two new attachment slots, one called "chamber" and the other one "magazine"
Your AKM magazin contains a new value, capacity (30) and an ammo attachment slot.
Then you have your actual ammo, which represents loose 7.62x39 rounds. This ammo item is what I defined earlier in the thread.
Lets assume, that for our scenario, your merc has such an item in his inventory. ammocount=40.
Now you attach your ammo item to the magazine. When you do, the game checks if your ammo item can be attached to the ammo slot of the magazine. Both are 7.62x39, but capacity of the magazine is only 30. So now the game creates an ammo item in the ammo slot of the magazine with ammocount=30 and your original ammoitem, that you picked up with your cursor has now an ammocount of 10. You put the 10 rounds back in your inventory. Now you take your magazine and attach it to the magazine slot of the gun. The game checks, if your magazine fits, it does, so it gets attached. Now you operate the charging handle, which is similar to a bolt action rifle or a pump gun. This makes the game check your gun. It checks if a magazine is attached to the magazine slot. If it is, it checks if an ammoitem is attached to the magazine. In our case everything is fine so far, so now it reduces the ammocount of the ammoitem by 1 and spawns a new ammoobject with ammocount=1 in the chamber slot of the gun. Now you can fire, just like you used to do. But that's not it. You could also detach your magazine again and "merge" your ammoitem in your inventory with the 29 remaining rounds in your magazine and attach the magazine to the gun again. Now you can fire 31 rounds.

Firearms, that have no detachable magazines, like revolvers or shotguns, can attach the loos rounds item directly to the magazine slots. And would work from there. Internally, there would have to be a capacity for the gun, to determine how large ammocount may be for attaching to the magazine slot. If there is no such value, only magazines can be attached.

That's essentially what you would see as a player. But my system would allow for more things, like merging different ammoitems of the same calibre, but different rounds. For example, 7.62x39 AP rounds with 7.62x39 Tracer rounds. That's what would be handled with the sequence list.
A sequence list could look like this:
1. AP <-
2. AP
3. AP
4. TR

When the cycle method is called, either because the player operated the charging handle, or it is called by the game, because the player fired a gun, the arrow would go down the list. If it reached the bottom and cycle is called, it would jump back to 1. Now, when the game has to spawn a new ammoitem in th chamber, it would look at which position the arrow is, and spawn an ammoitem according to the value, that the arrow points to. In our case, we would get a tracer round after three armor piercing rounds have been fired.

Another sideeffect would be, that it gets easier to create new weapons with different "magazine capacities". Let's take a look at the Glock 17 for example. The standard magazine for the Glock 17 holds 17 rounds in real life. If we want to enable that in the game, a modder has to create a new magazine type and draw the picture for every single ammotype there is. So you have to create one 17 round magazine for the standard 9mm ammunition, one for AP rounds, one for hollow point and so on and so forth. With my system, all you need to do, is to create one new item. The actual 17 round magazine. Then you define, that AP, HP and so on can be attached to its ammoslot and you are done. As a side effect, we would get rid of many magazine items, that are currently present in the game. But we could also define alternative magazines for already existing guns. A 75 round drum magazine for the AKM for example would only require one new item in the items.xml. The current sytem doesn' really allow for different magazine for the same gun. But even if you manage to circumvent this restrictions, as some mods do, you would still have to create a new drum magazine for AP, HP, Tracer and so on and so forth. It gets even worse, if you want to add a new ammotype of a certain calibre. Let's say you want to create 9x19mm rubber bullets. Currently you would have to create every single rubber bullet magazine, 8 rounds, 15 rounds, 30 rounds, 50 rounds. Somebody created the 17 round magazine for the Glock that I mentioned, you may now create that variant two. Oh, did somebody create a 13 round magazine for the Browning? That would be another magazine that you have to create now. With my system, all you need to do, is to create one new ammoitem and add your ammoitem to the attachments list of the existing magazines and you are done.
The number of amm items currently grows with M*T, with M being the number of magazines and T the number of differenty ammo types. 5 different magazines and four ammotypes means 20 entries in items.xml and would grow exponentially with every further magazine or ammo type. My system would only need 9 entries (M+T) and would only grow linear.


To sum up the advantages of my idea:
-Allows for tactical reload
-Magazine capacity is defined by the magazine and not the gun anymore.
-Reduces the number of items needed in the game.
-Makes it easier for modders to create new magazine types
-Makes it easier for modders to create new ammotypes

-Allows individualized set of rounds in magazines. Fire armor piercing, hollow point, tracers and sub sonic from one magazine, if you want to. Drawback: would need new UI elements and functions to handle that in game.

The last point could be prohibited though. This way, we wouldn't need to worry about new UI elements for now
Re: [IDEA] New Ammunition System[message #280637] Tue, 24 May 2011 20:12 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
Careful there, you're making the same mistake I made originally. Current magazines are not attachments, and as per ChrisL, using the attachment infrastructure for a New Magazine System is not a good idea. See: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=268676#Post268676

Also, on reflection, a New Magazine System would increase items in items.xml as we would still need the old magazine items for that option to be retained.

Improved loose ammo handling on the other other hand could be applied to both new and old magazine systems. Meaning, this element, could be a mandatory change, and at the very least eliminate most of the shotgun shell sizes. Then again, we are talking about a reduction of a few dozen items, so it really it could be left optional as well and not really make a big difference either way.


Re: [IDEA] New Ammunition System[message #280638] Tue, 24 May 2011 20:14 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3804
Registered:July 2009
There's one problem with those nice calculations of how many items we could save:
Backwards compatibility. As I said, this feature is so OCD that we have to make it optional so that advantage only comes to bear when a mod abandons OMS in favor of NMS. For basic 1.13, we'll only increase the count.

Edit:
Maybe we should handle magazines similar but separate from attachments? There was this nice system of assigning a group of attachments to a slot and the slot to a weapon a while back ...

[Updated on: Tue, 24 May 2011 20:23] by Moderator



Re: [IDEA] New Ammunition System[message #280639] Tue, 24 May 2011 20:22 Go to previous messageGo to next message
Taro_M

 
Messages:296
Registered:November 2008
Ok se we would leave old magazines, thats ok. Maybe it should an alternative version, a submod, at start.
Re: [IDEA] New Ammunition System[message #280645] Tue, 24 May 2011 21:05 Go to previous messageGo to next message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
Interface requirements do suggest attachment-like handling of NMS magazines. This is already the case for launcher grenades, they are generally not defined in attachments.xml, but use the same attachment slot system. Also, under NMS, the eject ammo button on the interface could eject loose rounds, while removal of that NMS magazine from its attachment slot unloads the magazine (along with the ammo it contains).

Concept:

Common improved loose ammo system - for both Old Magazine System(OMS) and NMS. This would be just the current ammunition/magazine item system as now, but with the money-like drawing of amount of rounds from ammo crates, from non-magazine weapons, and from NMS magazines. The unload ammo button in existing interface on non-magazine fed weapons, unloads one round at a time into loose ammo items. EDIT: clarification, the current weapon interface, coloured bullet with counter, would be used by all ammo bearing items: weapons under both NMS and OMS, as well as NMS magazines, this way no new interface work needed.

Basic NMS - when active, all magazine fed weapons get their capacity reduced to 1 round, this is the weapon's chamber. NMS magazines act as containers for additional rounds up to a max size EDIT: using the magazine size bonus as the capacity for NMS magazine items. NMS magazines can be reloaded from ammo box or loose rounds. Common loose rounds mechanism unloads round one at a time (so you can share ammo in an emergency?) hot key unloads whole magazines not in inventory into ammo crates. Loose round allows 1 additional round to be added to weapon with loaded magazine. If magazine is removed, and number of rounds equals or is less than magazine size, all rounds removed with magazine. If weapon is in +1 round state, removal of magazine is removal of full magazine, leaving one in chamber (do we want chance of accidental discharge and casualty mechanism?)

Advance NMS - some mechanism to queue up multiple ammotypes to be the next round fed into chamber.

EDIT: I think it was suggested that multiple legal NMS magazine items be stored like multiple default attachments in either items.xml or weapons.xml.

EDIT2: could get away with a Basic NMS implementation with only a few new things for the XML's (and plenty of headache in the code)
- A boolean for whether or not a old magazine item is also a loose ammo item (similar to how ammo crates are flagged right now in items.xml)
- A new ItemClass for NMS Magazines, as noted above capacity would just be the mag size bonus
- multiple legal NMS magazine tags in weapons.xml, just list the NMS magazine item indexes

[Updated on: Tue, 24 May 2011 21:33] by Moderator



Re: [IDEA] New Ammunition System[message #280647] Tue, 24 May 2011 21:36 Go to previous messageGo to next message
ikaar

 
Messages:5
Registered:November 2010
Hello @all!

I

[Updated on: Tue, 24 May 2011 21:43] by Moderator

Re: [IDEA] New Ammunition System[message #280648] Tue, 24 May 2011 21:51 Go to previous messageGo to previous message
Wil473

 
Messages:2861
Registered:September 2004
Location: Canada
Ikaar, your idea is to treat empty magazines like a token that allows production of current magazine items, ie: if you empty a mag, and then reload, the produced empty magazine can be turned into a filled magazine by interaction with an ammo crate. You could only produce as many usable magazines as you have empties on hand. Definitely workable, and an expansion on the existing magazine system. Does your idea include defining multiple magazine sizes for a gun? Also, how about partial fills?

Something I forgot in my post, the need to store calibres somewhere, new tag in items.xml probably the simplest. Now my post from last year was mixed in with how to allow multiple (compatible) calibres in the same gun/magazine... so perhaps a list of multiple legal calibres (sorry, feature creep...)

EDIT: oh, wait you mentioned 0 round magazine items. Magazines are destroyed and created on loading and unloading (as well as when created when crates are clicked on with weapons). So there is no empty magazine item per sec to be ejected when a weapon runs out and is reloaded. An empty (0 round) magazine could be created and dumped into the map when reloading occurs though. The empty magazine in your system Ikaar would still be a token like device as it should be convertible into a same size and caliber magazine of any ammotype you have ammocrates available. Doubt you are suggesting a 0/30 round AP 5.56 magazine can only be refilled from AP 5.56mm.

[Updated on: Tue, 24 May 2011 22:02] by Moderator



Previous Topic: (New) Common Attachment Framework (new title; was The NAS Receiver)
Next Topic: Path finding problems in 1.13
Goto Forum:
  


Current Time: Wed Jun 19 20:08:25 EEST 2019

Total time taken to generate the page: 0.02088 seconds