BP Logo
Home » MODDING HQ 1.13 » v1.13 Coding Talk » [IDEA] New Magazine System
Re: [IDEA] New Ammunition System[message #286944] Mon, 18 July 2011 22:42 Go to previous messageGo to next message
Wil473

 
Messages:2826
Registered:September 2004
Location: Canada
Makes perfect sense, it actually sounds like what I've been trying to do with UC-1.13, items 0-350 are kept as they were for map compatibility, and then I tried to group all the new stuff afterwards, making exceptions for hard coded items like the default NIV items.

You may want to take a look at UC-1.13 v3.54 item ordering. Despite not being stock campaign items, that's next's months project for me, the mod is XML Editor compatible now.

EDIT: one thing I should note, I eliminated some of the empty space between item groups in an attempt to speed up the XML Editor.

[Updated on: Mon, 18 July 2011 22:56] by Moderator



Re: [IDEA] New Ammunition System[message #286946] Mon, 18 July 2011 23:32 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
One of the things that NMS includes (already have that part coded and working) is an item conversion system. I still have to work on having map items run through the converter, but save game items all convert correctly. The main perk here is that if I do make "Kevlar Leather Vest" item 40, and you've got a map with that item statically placed on it (using the old number 189) the code will automatically convert the item when the map is generated. This should also resolve the problem with multiple default attachments not automatically showing up when they should. I'm sure once the system is in place, someone could come along and expand on the conversion system I've written to make it possible for modders to change certain item numbers without hurting map items.

Re: [IDEA] New Ammunition System[message #286949] Tue, 19 July 2011 00:20 Go to previous messageGo to next message
Wil473

 
Messages:2826
Registered:September 2004
Location: Canada
That's what I've been hoping for. If you are able to clear indexes 0-350 for non-vanilla games at least, that should in theory allow me to get way with a single common items.xml for UC-1.13, DL-1.13, and Alrulco Folding Stock. Just have a different conversion filter for each mod. Odd, how I'm at this moment probably more excited about the supporting capabilities that have fallen out of NMS than about NMS itself.

[Updated on: Tue, 19 July 2011 00:34] by Moderator



Re: [IDEA] New Ammunition System[message #287062] Wed, 20 July 2011 01:38 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
I managed to get the first part of the xml redesign completed; the first 335 items have been restored to the same 335 items that you'd find in the Data\Tabledata\Items.xml file. After resorting these 335 items so all item classes are together, I removed all the "ammo items" and added back in just the Ammo and Magazine items that are used by the weapons in this small block of items. Because of a coding concern, I have to leave two blank items dedicated for Key 9 & 10 (which aren't actually used but are referenced by the code). Other then those two blanks (and the #70 blank which I haven't bothered to look into), there are 18 blank indecies remaining. Now I'm not sure what to do with them.

I could remove them and just have the "Data only" setup us only the first 317 items. Trouble is, I don't know if that 335 item limit is required for "Data only" to work properly.
I could just move these blank items to indecies 318-335 and just make at notation that these items are for "Data only" compatibility. These items could be used for "data-1.13" version of the xml file but would remain blank for the "data" version.
Or I could move some existing "data-1.13" items (probably money and misc class items) into those 18 indecies so that the first 335 items in both Data-1.13 and Data are identical.

I don't really see an issue with any of these options. Just not sure which to go with. Suggestions or opinions would be welcome.

Re: [IDEA] New Ammunition System[message #287065] Wed, 20 July 2011 02:01 Go to previous messageGo to next message
Wil473

 
Messages:2826
Registered:September 2004
Location: Canada
I'd just leave them blank where they are (as close to vanilla item indexes) if possible. Sounds to be the easiest solution. I always tried to maintain the original 350 item ordering, and new stuff from 351 onward, not a big fan of getting rid of empty indexes for the sake of empty indexes (though that may explain the slow open for the XML Editor).

Something I forgot though I don't think this is an issue anymore (since you had to restore the majority of the vanilla items), Item 63 appears to be hard coded for the flame thrower firing animation (flame trail), is that one of the code referenced items like the vest that you've already accounted for (externalized)?


Re: [IDEA] New Ammunition System[message #287066] Wed, 20 July 2011 02:26 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
There are something like 145 hard coded items but they are coded using a standard Enumeration. And part of NMS is rebuilding that enum so that it matches with the new xml layout. So even though the flamethrower is now item 23, the animation shouldn't have any problems.

And I already resorted the first 335 items. The conversion xml will have to run whether you're playing "vanilla" or not because we no longer have ammo/mag combination items. So I saw no problem with resorting those indecies. This way guns are all found in items 1-57 followed by knives, throwing knives and all the rest of the items (in itemclass order). The code won't care about the actual order so long as I have the hardcoded enum lined up correctly. The important point is that the the 335 items (with the exception of ammo items) that appear in "vanilla" are still in the first 335 indecies in the new xml file.

Something I noticed. Those 18 blanks have apparently always been there. Actually, there were 19 but I ended up having to use one. Turns out that the "vanilla" items file actually needs more items for NMS to work correctly. There are 61 OMS ammo items required for the "vanilla" guns to work but NMS needs 37 ammo and 25 magazine (or 62 total) items to do the same job. It's only going to be 1.13 and any mods built on that which will benefit from NMS. Doesn't change anything. Just found it interesting. Smile

Re: [IDEA] New Ammunition System[message #287204] Thu, 21 July 2011 02:04 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
Well, I think I have the xml files sorted out again. Data has it's own set of files with only 335 available items (though only 318 are actually populated) and Data-1.13 has a seperate set of files with 1191 items (the first 317 being identical to the items in Data). The only difference in Data is item 318 which is a "7.62x51mm Mag, 5" specific to the Automag III in this mode only. The same weapon n Data-1.13 uses .50 Beowulf and has it's own 4rnd mag, but in "Data only", we don't have .50beo ammo so it uses the original 7.62 ammo. But since NMS requires this gun to have a magazine, I had to create one special for it. Now I just have to update my conversion file and adjust the static item enumerations in the code. Then I can finally get back to coding.

Re: [IDEA] New Ammunition System[message #287479] Sun, 24 July 2011 09:43 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3698
Registered:July 2009
It's half the point of the whole project, can't be that hard to notice, right? (The other half being mixed loads)


Re: [IDEA] New Ammunition System[message #287534] Mon, 25 July 2011 02:06 Go to previous messageGo to next message
Gorro der GrĂ¼ne

 
Messages:1469
Registered:March 2009
Location: Broadwurschd-City
and the third half an extra shot (overloading)
Re: [IDEA] New Ammunition System[message #287585] Mon, 25 July 2011 19:13 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
Yes, you'll be able to specify which mags can fit into which weapons. So if the Minimi should be able to support a 10rnd, 30rnd, 42rnd, 100rnd and 200rnd "mag" option, you just tell the maglink.xml the "connect" those mags with that weapon.

Ammo caliber works the same way but you'll link ammo to both weapons and magazines via the ammolink.xml file. That way if a .357 magnum revolver is supposed to support .357mag and .38spc, it'll be able to simply by "connecting" both calibers to that weapon.

Yes, mixed loads with be available (in NMS-mode only). So tracer, hp, ap, and any others can all be put into the same mag in whatever order you want. The same goes for caliber assuming the mag is setup to support multiple calibers. In other words, if the .357 Desert Eagle can fire .357mag and .38spc (I don't know that it actually can, I'm just using this as an example) then you could setup the .357mag Magazine and the .357 Desert Eagle so that they both support .357 and .38 ammo. Then you could load both into the magazine at one time.
The code will verify that every round in a magazine is compatible with the weapon you're trying to load. So if you make the .357mag Magazine compatible with both .357mag and .38spc, but only make the .357 Desert Eagle compatible with .357mag, the code will not let you load a mag that contained both calibers. This is a failsafe so that I don't have to try and code something to deal with forced jams and such.

And yes, you'll be able to load rounds into the chamber which will, in essence, allow you to "overload" a weapon. However, to keep from having to create all sorts of new interfaces to handle loading a weapon, you will not be able to load directly to a chamber except under certain circumstances. For instance, you can load directly to the chamber of a clip fed weapon if the weapon has a chamber that can be loaded AND there is currently no magazine (empty or otherwise) in the weapon. The code handles the reload process based on the item you're reloading with (mag or "loose" ammo), the feed type of the weapon (external mag, bolt, tub, cylinder, etc) and how the weapon is currently loaded.
Unloading a weapon that has a chamber, however, will not automatically unload the chamber. For instance, if the weapon is mag fed and you eject the mag while there is a round in the chamber, the round in the chamber remains. You'll actually have to unload this type of weapon twice if you want to unload it completely.

I'm also coding it so that weapons loaded with a belt will not take as long to reload if there is part of the belt remaining. In those cases, you're assumed to be adding onto the end of the belt so the process shouldn't take as much time. Obviously, if you completely unload the weapon (i.e., remove the belt) and then install a new one, you have to spend all the normal APs. This will only apply if you're simply adding one belt to another.

Re: [IDEA] New Ammunition System[message #287595] Mon, 25 July 2011 20:22 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3698
Registered:July 2009
ChrisL
I'm also coding it so that weapons loaded with a belt will not take as long to reload if there is part of the belt remaining. In those cases, you're assumed to be adding onto the end of the belt so the process shouldn't take as much time. Obviously, if you completely unload the weapon (i.e., remove the belt) and then install a new one, you have to spend all the normal APs. This will only apply if you're simply adding one belt to another.
How is capacity handled in this case? If you have an MG3 feeding from 100rd belts with 9 rounds remaining and reload with a full 100rd belt, do you keep a 9rd piece in your inventory when you're done or do you have an 'overloaded' 109rd belt in your MG3?


Re: [IDEA] New Ammunition System[message #287627] Tue, 26 July 2011 00:11 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
You'll end up just "topping off" the belt and have a 9rnd belt left over. Otherwise there is a risk of having hugely unmanagable belts. While it's possible to load a 1000rnd belt into a gun, it's not really feasible to load then, then get up and run around even if you could carry it. So to keep from having to add even more checks to the code, belts (and their capacity) are handled just like magazines: a "100rnd belt" can only hold 100 rounds of ammunition at a time.

The main difference between belts and other fead devices (as far as the code is concerned) is the ability to load ammo to the end of the current feed queue. All other external feed devices add to the top of the queue or completely replace the existing queue.

Re: [IDEA] New Ammunition System[message #287630] Tue, 26 July 2011 00:25 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3698
Registered:July 2009
I see. Guess every arbitrary limit (like 10% over capacity) would produce the same 'why doesn't that one round fit anymore' effect so it doesn't really matter.


Re: [IDEA] New Ammunition System[message #287649] Tue, 26 July 2011 02:32 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
Plus, if you want a larger possible belt, it will be a simple matter to add one. So if you really want that 1000rnd 7.62x51mm belt for your M60, you can have it without too much difficulty. Smile

Re: [IDEA] New Ammunition System[message #288737] Tue, 09 August 2011 22:03 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
Been a couple weeks since my last update. RL has been getting in the way of my coding time so I haven't had a chance to make much progress but I'm still working on this as my time allows me. I'll hopefully have an update with some positive news in the next week or so.

Re: [IDEA] New Ammunition System[message #289730] Tue, 23 August 2011 23:23 Go to previous messageGo to next message
Headhunter

 
Messages:265
Registered:November 2009
Location: Sweden
ChrisL
Plus, if you want a larger possible belt, it will be a simple matter to add one. So if you really want that 1000rnd 7.62x51mm belt for your M60, you can have it without too much difficulty. Smile


Imagine the weight on that baby...
Re: [IDEA] New Ammunition System[message #290569] Sun, 11 September 2011 15:51 Go to previous messageGo to next message
ironmonger

 
Messages:56
Registered:February 2005
Location: Germany
Any news? Development still going on?
Re: [IDEA] New Ammunition System[message #290572] Sun, 11 September 2011 16:10 Go to previous messageGo to next message
wolf00

 
Messages:1147
Registered:September 2006
Location: Czech Republic

is posible in near future make apt rounds? for some oldies weapons....
Re: [IDEA] New Ammunition System[message #290578] Sun, 11 September 2011 17:53 Go to previous messageGo to next message
Wil473

 
Messages:2826
Registered:September 2004
Location: Canada
Armour Piercing Tracer? 1) I thought the current tracer rounds had AP stats associated. 2) If not 1) and presuming I got the acronym correct, then current ammunition definitions can handle APT.


Re: [IDEA] New Ammunition System[message #290614] Mon, 12 September 2011 17:50 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
Life has simply been getting in my way so development has been slow going. I'm still working on it, though.

I'm pretty sure that tracer rounds have AP stats but you can always add whatever rounds you want. The main issue is, as always, creating the graphics.

Re: [IDEA] New Ammunition System[message #290623] Mon, 12 September 2011 22:34 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
Come across a couple items that I'm not sure how they should be handled. SPAS-15 has 7rnd capacity just like the Remington M870, so in the current game they both use the same ammo items. But looking at the image we have of the SPAS-15, it appears to be a clip fed weapon. So we probably want a 7rnd 12ga mag, correct?

For the Rocket Rifle and Auto Rocket Rifle, would these weapons have removable 5rnd box mags? Or would they have 5rnd internal mags?

Re: [IDEA] New Ammunition System[message #290624] Mon, 12 September 2011 22:57 Go to previous messageGo to next message
Wil473

 
Messages:2826
Registered:September 2004
Location: Canada
SPAS-15 actually uses a 6 round magazine (it doesn't get more authoritative than the Manual ), though I am not sure if it is capable of 6+1 or if Sir-Tech was just fudging the numbers to minimize magazine items. EDIT: few more minutes of searching, and it looks like it can block feeding from the magazine to have one more round loaded (ie. special round like tear gas or the like), I must go back to being productive now.

[Updated on: Mon, 12 September 2011 23:09] by Moderator



Re: [IDEA] New Ammunition System[message #290626] Mon, 12 September 2011 23:43 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
wil473
SPAS-15 actually uses a 6 round magazine (it doesn't get more authoritative than the Manual ), though I am not sure if it is capable of 6+1 or if Sir-Tech was just fudging the numbers to minimize magazine items. EDIT: few more minutes of searching, and it looks like it can block feeding from the magazine to have one more round loaded (ie. special round like tear gas or the like), I must go back to being productive now.
So that's a yes? We need a 12ga mag for the SPAS-15? Ok. What about the rocket rifles? If I need to add more mags, I'd rather do it now then wait since every time I do it takes a few hours to get everything cleaned up afterwards.

Re: [IDEA] New Ammunition System[message #290627] Tue, 13 September 2011 00:08 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3698
Registered:July 2009
The Rocket Rifles being a 100% JA2 invention, there's no 'right' way to do it. However, the pics of the weapon and ammo suggest some kind of clip that holds the rockets together (those gray rings) and stays with them when they are inserted into the gun, kinda like the en-bloc clips of the M1 Garand.


Re: [IDEA] New Ammunition System[message #290628] Tue, 13 September 2011 00:31 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
Yes. Some kind of "stipper clip" that loads an internal mag similar to how the M1 Garand works would make sense based on the graphics. I just wanted some additional opinions before I added the new items. Thanks DepressivesBrot

Re: [IDEA] New Ammunition System[message #290709] Wed, 14 September 2011 21:22 Go to previous messageGo to next message
ironmonger

 
Messages:56
Registered:February 2005
Location: Germany
Might also suggest some sort of disposable cylinder or drum clip that is hooked into the weapon and rotates as each rocket is fired, much like the preloaded "casettes" intended for the Pancor Jackhammer...
Re: [IDEA] New Ammunition System[message #290949] Wed, 21 September 2011 21:59 Go to previous messageGo to next message
wolf00

 
Messages:1147
Registered:September 2006
Location: Czech Republic

fn baruda have optional ammo drum[9x19] nms system can be solution for this feature ...
Re: [IDEA] New Ammunition System[message #296531] Tue, 10 January 2012 21:41 Go to previous messageGo to next message
ctiberious

 
Messages:605
Registered:March 2007
Well, as you all can probably tell, life as taken a turn for the busy. It's been a few months since I last posted and just about as long since I was last able to work on coding. And I can't honestly say when that will be changing. If there are any coders out there willing and interested in taking over this project, feel free to send me a mail (ctiberious (at) aol.com) and I will be happy to package up what I've done so far and send it to you. At least that way any coder that wants to take over doesn't also have to start from scratch.

Re: [IDEA] New Ammunition System[message #296553] Wed, 11 January 2012 12:33 Go to previous messageGo to next message
ironmonger

 
Messages:56
Registered:February 2005
Location: Germany
Well, that's sad news... really looked forward to this. Wish I could help, but my computer skills are rather weak...
Re: [IDEA] New Ammunition System[message #297213] Wed, 25 January 2012 03:47 Go to previous messageGo to next message
MrFlibble

 
Messages:16
Registered:November 2011
I could probably have a look at it and why not, see what can be done... Although I need to have an overview on how mods are written in JA2. I know I can handle scripting languages with some ease since I did it in the past, as I do have pretty fair knowledge about firearms and ballistics. This project is really interesting.
Re: [IDEA] New Ammunition System[message #303003] Sun, 08 April 2012 06:10 Go to previous messageGo to next message
TClaymore

 
Messages:35
Registered:July 2011
Not sure if this thing is still active, but if it is, I do have a question (admittedly one that might have already been answered, but if so, I missed it).

Namely, what would this add to the gameplay, other than another layer of micromanagement?

Now, I was wary of the overheating system, which I figured would be more make-work that would distract from the battle, but after understanding its effects on weapon balance, I saw its value and now I'm eagerly awaiting it. I still can't find a similar good thing about NMS, though. From my point of view right now, it just seems like all it would add is extra stuff you need to buy or find, more stuff you need to carry in more pockets, and more things you need to do in between fights without helping balance the weapons or make combat more fun in any significant fashion.

So, I'm sure the proponents of the system have their thoughts on why it's worth it, so I'd like to know what they are. Anyone?
Re: [IDEA] New Ammunition System[message #303005] Sun, 08 April 2012 10:39 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3698
Registered:July 2009
I guess you just need the appropriate mindset to find this idea appealing. It simply adds more customization and another possibility for (small) alterations in balance.


Re: [IDEA] New Ammunition System[message #303086] Mon, 09 April 2012 12:41 Go to previous messageGo to next message
usrbid

 
Messages:1522
Registered:December 2008
In Arulco Revisited I had Fox run with two mini Uzis one with hollow point the other with glaser ammo. The way the game code handles these ammo types against armor, there is a wierd effect where 1 out of 3 (or so) shots a bullet will make it through and outright kill the enemy.

Until the enemies started showing up with sniper rifles and battle scopes, Fox totally dominated the battle field. She could kill 3-4 enemies every round. With only (what is it) 20 or so enemies allowed in the sector, she cleaned up pretty good.

This could affect how assault rifles with mixed ammo work in game. Of course I haven't tried this, but just something to keep in mind. Mix HP and G ammo in a 30 round mag may produce insta kills with 3 round bursts.


Re: [IDEA] New Ammunition System[message #303469] Sun, 15 April 2012 20:32 Go to previous messageGo to next message
Taro_M

 
Messages:293
Registered:November 2008
Hey, war's not fair. I dont like the idea of limiting player possibilites in matching ammo due to balance issues.

BTW: I would throw in tracer at the start for extra imbalance Razz.

[Updated on: Sun, 15 April 2012 20:33] by Moderator

Re: [IDEA] New Ammunition System[message #303471] Sun, 15 April 2012 21:36 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3698
Registered:July 2009
If you want early tracers, just think what HP:G:T in 2:2:1 will do to the early, unarmored opposition :pitchfork:
And if armor is handed out earlier than expected, you can still strip out the tracers and use a more conservative AP:T in 4:1 or AP:HP:T in 3:1:1 instead.


Re: [IDEA] New Ammunition System[message #309210] Fri, 17 August 2012 20:14 Go to previous messageGo to next message
Faalagorn

 
Messages:154
Registered:February 2012
Location: Poland
Bumping this thread a bit for it to not fall in abyss ^^. So, is anyone still working on this feature anymore? Since it's honestly probably the last feature I'd love to see in JA2 that isn't still implemented Smile.
Re: [IDEA] New Ammunition System[message #313001] Thu, 13 December 2012 11:58 Go to previous messageGo to next message
sardonic_wrath

 
Messages:48
Registered:June 2011
Faalagorn
Since it's honestly probably the last feature I'd love to see in JA2 that isn't still implemented Smile.
My thoughts exactly!
I'm still puzzled that this hasn't been done yet... we have LMGs beltfed by other mercs, but not this? (not that I don't love that feature Wink )

Loved how it was done in 7.62. Personally, I don't care too much about different ammo types, and I certainly don't need to mix different ones in a specific order. The only thing that matters to me - no more infinite magazines.
I think it could add a lot to gameplay... Magazines cost money, they have weight, take up inventory space, and aren't necessarily easy to come by, and they are mostly weapon specific.
Re: [IDEA] New Ammunition System[message #313002] Thu, 13 December 2012 12:02 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3698
Registered:July 2009
Mainly because implementing an assistant gunner is trivial compared to rewriting the complete ammunition system.
But yes, having a kickass gun, tons of ammo but only 3 magazines added interesting considerations.


Re: [IDEA] New Ammunition System[message #313018] Thu, 13 December 2012 22:54 Go to previous messageGo to next message
Sandro

 
Messages:421
Registered:November 2008
Location: Mars
I also see this as one of the most awesome features to be yet made. Just pray silently Flugente will pick it up.. Smile


Re: [IDEA] New Ammunition System[message #313075] Sat, 15 December 2012 01:21 Go to previous messageGo to previous message
The_Bob

 
Messages:415
Registered:May 2009
Location: Behind you.
IIRC there's just a lot of problems with this, on many levels.

1 - UI to support this feature. Probably most work with this one.
2 - New items to make this happen. Mags, bullets, clips, belt-links, speed-loaders, all of that.
3 - IIRC there's even a problem with JA2 calculating weight at 100g increments, which makes assigning weight to loose rounds hard
4 - Coding the core features might be the easiest part, but still is lot of work. Where there were numbers, now we get items.
5 - The additional complexity may bring about unforeseen issues, performance or gameplay -wise we may hit a wall.

Also, is ChrisL still around, or did he leave his work at his SVN branch? I asked about getting the latest version of the code but didn't hear back.

Anyway, I think if someone starts chipping away at either of these tasks, there's a chance this project will start moving again.

Personally, when I consider taking on this project, I feel intimidated by having to come up with all the above points. Designing a sensible UI can be as bad as having to code it, if someone make mock-ups it would make the task seem less overwhelming. Same with items, a clear write-up of how to divide them and how should they work in NMS would make it easier to start coding (making actual items/graphics comes later). Then there's also the weight issue - zero-weight rounds are not an option. This could be done with a hack of some sort (item_type = loose_rounds -> weight is per 10pcs, calculated differently), but still adds to the task.

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


Current Time: Fri Jun 25 00:40:51 EEST 2021

Total time taken to generate the page: 0.03198 seconds