Home » MODDING HQ 1.13 » v1.13 Coding Talk » Idea for Ammo Purchasing & Crates -- Feedback Requested
Idea for Ammo Purchasing & Crates -- Feedback Requested[message #302050]
|
Tue, 20 March 2012 18:19
|
|
Madd_Mugsy |
|
Messages:634
Registered:July 2005 Location: Canada |
|
|
I have an idea to streamline the way we purchase ammo via BR et al, and the way ammo crates work.
It came to me whilst checking out the various new items added in AIMNAS. As anyone who's played it knows, there are Ammo Box items, with anywhere from 15-200 rounds/box. These boxes are purchased at the shops instead of the magazines.
This struck me as a wonderful idea, because it means you no longer need to wade through page after page of various magazine sizes at BR's. It also means that we can set different coolness levels for when players can purchase ammo vs when enemies can start using it (box coolness != magazine coolness).
In AIMNAS, fake ammo items are used to allocate the boxes to the correct BR filter. However, this is very simple to work around in code, so we won't need these kinds of items.
What I propose is to change the "ammo crate" boolean flag into a byte field, and move it from the Item array to the Magazine array. This would make it a dropdown in the editor. Proposed values would be: Bullet(s), Magazine, Box, Crate.
This would allow us to differentiate between magazines, boxes and crates in the code easily. (The "Bullet(s)" item can be equivalent to "Magazine" for now; I'm sure we'll think of a reason to use it later.)
This would simplify the BR ammo filtering, allowing magazines to remain filterable correctly (for vanilla and mods), while allowing boxes to be filtered correctly as well.
In addition, if we differentiate between boxes and crates, we can refactor the ammo crate creation code to create boxes before crates. By this, I mean we can create a box item if the number of rounds is <= X boxes, and a crate if it's more. This would therefore avoid creating the massive ammo crates if there are only a few rounds of ammo. I've lol'd several times at the giant size 34 boxes that have been created for <30 rounds of ammo
Thoughts? Suggestions? Anyone have a good number for X?
Report message to a moderator
|
|
|
|
|
|
Re: Idea for Ammo Purchasing & Crates -- Feedback Requested[message #302055]
|
Tue, 20 March 2012 19:05
|
|
Madd_Mugsy |
|
Messages:634
Registered:July 2005 Location: Canada |
|
|
Quote:
- box sizes, they have to be portable, in order to transport them easily from Drassen to where needed
Size 20 is what's used across the board in AIMNAS, and it seems reasonable, but we might want to make them bigger.
Quote:
X = # of boxes that can be stacked into one single ssector inventory slot?
I guess that could work... Simply looking at the AIMNAS setup, some of the boxes hold 150-200 rounds, so you could end up with a lot of full boxes before getting a crate. Maybe that's ok?
Quote:
- difference in how they look, I'm pretty good in recognizing magazine shapes and colors now, I never use ammo crates for that reason - I'm just faster with magazine recognition
If we were to lift the graphics from AIMNAS, they're all different. Only thing we'd need is a green recolouring of the 9x18mm box for Glaser.
Quote:
- creating magazines from boxes has to be very simple, because there's no point in streamlining the shopping in order to make gun loading a pain
Agreed. They should have the same abilities of ammo crates in this area.
...
Going off topic a bit, but I've also written some code to make the Shift+R auto-reload also refill the magazines in everyone's inventories. So there will be less mucking around with making sure your squads are fully replenished.
Report message to a moderator
|
|
|
|
|
|
|
Re: Idea for Ammo Purchasing & Crates -- Feedback Requested[message #302065]
|
Tue, 20 March 2012 19:51
|
|
Wil473 |
|
Messages:2815
Registered:September 2004 Location: Canada |
|
|
Madd MugsyWhat I propose is to change the "ammo crate" boolean flag into a byte field, and move it from the Item array to the Magazine array. This would make it a dropdown in the editor. Proposed values would be: Bullet(s), Magazine, Box, Crate.
This would allow us to differentiate between magazines, boxes and crates in the code easily. (The "Bullet(s)" item can be equivalent to "Magazine" for now; I'm sure we'll think of a reason to use it later.)
Eh, New Magazine System rides again?
within the confines of the existing system, I've got something similar going. Ammo Crates are the only ammo that's available to buy, and I set the size to 500 rounds. Too lazy to go to the extent of creating a "retail" magazine size.
EDIT: 500 was a medium between the stock 5000 ammo crates, and actual retail sizes.
[Updated on: Tue, 20 March 2012 19:52] by Moderator Report message to a moderator
|
|
|
|
|
|
Re: Idea for Ammo Purchasing & Crates -- Feedback Requested[message #302102]
|
Wed, 21 March 2012 07:28
|
|
Madd_Mugsy |
|
Messages:634
Registered:July 2005 Location: Canada |
|
|
Ok, so I've been mucking around with this in the code a bit. I've added a new ubMagType variable to the MAGAZINE struct, and adjusted the code everywhere accordingly. I've also updated the XML editor to remove the AmmoCrate flag, add a dropdown for ubMagType, and set all the values in my test xmls.
However, I've come across a small design question... A decision needs to be made about when to create a crate with Ctrl+Shift+A vs creating a box. Here are some options; feel free to add more:
1. Merge everything into ammo boxes, and then if there are more than X ammo boxes in a slot, merge them into a crate. This is how I've coded it currently.
2. Merge everything into ammo boxes. Press Ctrl+Shift+A again to merge everything to crates.
3. Merge everything into ammo boxes. Press Ctrl+Shift+A again to merge to crates if there are more than X boxes in a slot.
After some testing, I'm thinking that X should be smaller than the number of boxes that can fit into a slot in the inventory pool. With my current pocket sizes xml, I can put 128 size 20s into a single slot... Even at 50 rounds/box, that's 6400 rounds, which is more than one crate can hold Perhaps X should be configurable in the ini file?
Edit: Or, we could do #1 and as Smeagol mentioned, somehow rig up a way for crates to be splittable into boxes... could be tricky though.
Edit: Nevermind -- I've figured out a way to do this without anything complicated
1. Ctrl+Shift+A creates crates
2. Shift+A creates boxes
Yes/No?
[Updated on: Wed, 21 March 2012 09:20] by Moderator Report message to a moderator
|
|
|
|
|
|
|
Re: Idea for Ammo Purchasing & Crates -- Feedback Requested[message #302118]
|
Wed, 21 March 2012 12:02
|
|
|
Where does the magical bag come from? What came first the chicken or the egg?
What happened to that proposed NMS anyways?
Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Idea for Ammo Purchasing & Crates -- Feedback Requested[message #302920]
|
Sat, 07 April 2012 11:29
|
|
Scouty |
|
Messages:76
Registered:April 2008 |
|
|
Ah, shift+A creates boxes... didn't know that, very useful! I'm loving the boxes sold by BR, especially since some ammo types are now available earlier (shotgun shells mostly). At the normal BR setting you had to wait for 20 progress before.
Intuitively, hotkeys with both ctrl+shift do more/larger actions compared to just shift ones, so the current setup seems logical.
Are you taking suggestions on general crate behaviour btw? I got a few:
What would actually make more sense in general: if those inventory hotkeys worked with the sector inventory open. Because that's where you do all the equipping and sorting.
I find it hard to figure out which ammo a crate holds, since the description text is so small (playing 1024x768 on a 1280x1024 monitor), and the ammo crate icons all look alike. And the maximum capacity is so large you don't really know if you have 30 or 100 bullets left, looking at the status bar.
The ammo boxes are much more distinct, but then you have to deal with partial created mags a lot more. Which are generally a nuisance since they appear at the bottom of the stack. For example, creating 30 round SMG mags from a 100 round box leaves you with 3 mags + 1 partial. It would help if the system would consume additional boxes (if available) to always create full mags, or create less mags.
I think that the crate -> mag mechanic could use a little improvement. The "5 mags" creation feels a bit clunky at times.
For example, why not hover your mouse over the gun when you have merc + sector inv open, then press shift+1/2/etc to create 1/2/etc mags for the selected gun? Or alternatively, when clicking on a gun with an ammo crate, pop up a box similar to the "detonator delay" one, asking you how many clips to create.
For me, the "optimal" system would be one where you designate certain spots in your LBE as "ammo pouches" for a certain caliber, then use a hotkey to reload all the guns, and fill those pouches to max capacity. But that's so very specific to my own OCD and neuroses that it's probably unfit for general implementation.
[Updated on: Sat, 07 April 2012 11:43] by Moderator Report message to a moderator
|
Corporal
|
|
|
Goto Forum:
Current Time: Wed Apr 17 23:49:30 GMT+3 2024
Total time taken to generate the page: 0.01553 seconds
|