Home » MODDING HQ 1.13 » v1.13 Coding Talk » [IDEA] New Magazine System
Re: [IDEA] New Ammunition System[message #282017] Thu, 02 June 2011 20:50 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
I'm sure changes like that are possible to the xml editor. I simply don't know how to do them. I don't have alot of experience with VB.net. If there's someone out there with more experience with that language, who wants to take over maintaining the editor, great. But for the time being, we're limited by the lack of experienced VB.net programmers.
Also, dynamic size limits are really only useful at the modder level. At the player level, tweeking a size limit would potentially cause serious issues. I admit that if a player made a change like that, it's their own fault. But you open the door for lots of "bug reports" for what could potentially be simply mistakes. At least with all the other ini settings, if you change one, you don't automatically cause serious issues in an active game. As an example, imagine what would happen if a modder setup an xml file with 0-99 item sizes and a player accidentally used an ini file with 0-32 limits in place. The game would chug right along without concern but would "cut off" over half the item sizes. The player in question would only see that "large items" (assuming larger number = larger item) all seemed to fit into small pockets and would therefore report a bug.
Ultimately, if you want more item sizes, I really think they need to be hard coded values. Or you need a seperate ini file that holds dedicated, mod-related variables.

@DepressivesBrot: Yes, that's actually what I was already suggesting. I was simply suggesting using a "default pile size" instead of individual rounds. But either option will work.

I've started working on the test xml files I'll be using for the code work. I need those to be setup correctly in order to test out the code changes. Once I get the xml files preped, I'm going to begin work on the actual code. Figure a week or two and I'm hoping to have some rough preliminary work ready.

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282018] Thu, 02 June 2011 21:00 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
ChrisL
Ultimately, if you want more item sizes, I really think they need to be hard coded values. Or you need a seperate ini file that holds dedicated, mod-related variables.
That's why I'm lobbying for a new, small xml for them. Much less likely to be 'accidentally' changed but still definable by the modder.
ChrisL
I was simply suggesting using a "default pile size" instead of individual rounds. But either option will work.
Ah, then it only comes down to determining what is more intuitive to the player - Opinions?

Report message to a moderator

Captain

Re: [IDEA] New Ammunition System[message #282021] Thu, 02 June 2011 21:11 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Agreed, though at the risk of going off-topic (and introducing more feature creep) I would like to see the idea of separate externalization of size variables to expanded to include more settings a modder may want to keep away from the "average" player. For instance I was somewhat annoyed that the NCTH on/off was moved to the options screen instead of somewhat hidden away in the .ini, part of the reason why I moved NCTH integration up by one major version. It would be so much easier for modders if major game components, sizes, NCTH, NAS/OAS, NIV/OIV, etc... could be locked out by a mod limitation file. If a player changes that mod limitation file and gets a broken game, they would clearly deserve any grief heaped on them. Of course for v1.13 it would be empty.

[Updated on: Thu, 02 June 2011 21:11] by Moderator

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282024] Thu, 02 June 2011 21:44 Go to previous messageGo to next message
Taro_M is currently offline Taro_M

 
Messages:292
Registered:November 2008
I will keep this a bit of topic, I think that settings could use and external program that would allow easy viewing and editing of 1.13 options. If you use program for that then possibility of messing up settings by making a spelling error would be none. Also I think that options screen should be divided into normal and advanced settings.

Report message to a moderator

Master Sergeant
Re: [IDEA] New Ammunition System[message #282025] Thu, 02 June 2011 21:49 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
@Taro:
*cough* ini editor *cough*

@wil:
Interesting proposal ... you'd then have to cope with 'mimimi, I can't change setting X' though.

Report message to a moderator

Captain

Re: [IDEA] New Ammunition System[message #282033] Thu, 02 June 2011 22:06 Go to previous messageGo to next message
Taro_M is currently offline Taro_M

 
Messages:292
Registered:November 2008
DepressivesBrot
@Taro:
*cough* ini editor *cough*


LULZ! I missed that one!

Anyway I agree that you need to see what magazine and what bullet is actually in the chamber right now. Maybe make fake attachment slots for them? They would be just items glued beside gun that can be seen if you check gun window. They wouldnt need to be attached, just pretend they are.

Report message to a moderator

Master Sergeant
Re: [IDEA] New Ammunition System[message #282041] Thu, 02 June 2011 22:33 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
I had better start a new topic for this one, but for locked out option screen items how about a custom error message that goes along with the definition for a locked out feature: "This feature has been locked in the UC-1.13 v4.00 mod." or perhaps a custom error message per option: "OAS is unsupported in UC-1.13 v4.00, please see page 5 of the document 'UC-1.13v4.00 20120402 FAQ.PDF.'"

EDIT: alternatively, I suppose we could just modify the INI Editor to lockout some features, and add comments to warn off NotePad++ users. I know, it won't help anyone who edits the ini first with the INI Editor (erasing comments in the process), and then goes in with NotePad++.

[Updated on: Thu, 02 June 2011 23:29] by Moderator

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282524] Mon, 06 June 2011 21:57 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
As I've said, one of the major drawbacks of treating mags like attachments is that in OAS you have only 4 slots. Mags would suddenly have to take up one of those so pretty much every weapon would suddenly get only 3 slots. Most people complain that 4 wasn't enough to begin with (hence why NAS was created to give more control over slots) so lowering that to 3 is definitely not going to be liked. At least not by anyone that prefers OAS over NAS. And I don't think limiting NMS to NAS is a good option, either.

As for "locking" options, yeah, that needs to go in a new thread. That's not something I'm going to even consider tackling in this project.

BTW, I'm going to be a little behind my initial schedule. I was sick for a few days and now that I'm feeling better and actually looking at a computer again, I find that there are a plethora of bug reports related to the new release. I need to take a look at those before I continue with the NMS work.

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282532] Mon, 06 June 2011 22:47 Go to previous messageGo to next message
Slax is currently offline Slax

 
Messages:1411
Registered:July 2006
Location: People riding polar bears...
ChrisL
And I don't think limiting NMS to NAS is a good option, either.

How so? People who play it oldschool probably don't want a new magazine system messing things up anyway.

Report message to a moderator

Sergeant Major
Re: [IDEA] New Ammunition System[message #282534] Mon, 06 June 2011 22:52 Go to previous messageGo to next message
JMich is currently offline JMich

 
Messages:546
Registered:January 2011
Location: Greece
Slax
How so? People who play it oldschool probably don't want a new magazine system messing things up anyway.
NMS has been suggested as a replacement to the current system, and getting the old behaviour through "cheating" the game engine if OMS is choosed. However, it would not be so easy to change the magazine to attachment/non-attachment, so NMS will probably have to stay as a non-attachment item.

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282539] Mon, 06 June 2011 23:16 Go to previous messageGo to next message
wolf00 is currently offline wolf00

 
Messages:1148
Registered:September 2006
Location: Czech Republic

wil473: im maybe mised somehing,you have uc 1.13 already relased? latest is for me 3.09c
ps. sorry for ot ...

Report message to a moderator

Sergeant Major
Re: [IDEA] New Ammunition System[message #282558] Tue, 07 June 2011 07:35 Go to previous messageGo to next message
raycrasher is currently offline raycrasher

 
Messages:51
Registered:August 2010
Location: Philippines
Sandro

One thing I would still want to see: any visual representation of having mag loaded, and the chamber containing a round or not.


Like this?

http://i87.photobucket.com/albums/k128/raycrasher/nmsdisplay-1.png

From top to bottom:

  • AP round in chamber, 20-round mag loaded, showing next 10 rounds, which is a mixture of AP and tracer ammo (3 ap, 1 tracer,...)
  • AP round in chamber, 20-round mag empty.
  • No round in chamber, 30-round mag loaded with 8 bullets remaining.
  • Glaser round in chamber, no mag loaded
  • AP round and Buckshot(?) round in two-barrel shotgun.
  • AP round in chamber, Merc forgot. (Also, chamber round can also be black, Merc forgets again.)

Show this instead of the bullet graphic you see on the gun.
For shorter mags, the mag graphic is also shortened.
For longer mags, the mag graphic is lengthened, up to a specified INI limit (10, in this case)

UI:
Clicking the chamber will unload the chamber. For jammed guns, use jam skill check to determine success rate.
Same with the mag, clicking it will unload it.
Right-clicking the chamber with revolvers will rotate the bullets (1 in chamber, 5 in "mag").
Right-clicking the chamber with other weapons will remove the bullet from the chamber, and rechamber another one from magazine, if available.
Right-clicking the mag will bring up magazine info UI.
Poor condition mags will reduce weapon reliability.

Edit: Added more types.

[Updated on: Tue, 07 June 2011 08:48] by Moderator

Report message to a moderator

Corporal
Re: [IDEA] New Ammunition System[message #282564] Tue, 07 June 2011 09:02 Go to previous messageGo to next message
Requiem is currently offline Requiem

 
Messages:93
Registered:February 2007
That would be rather hard to see on some resolutions/monitors and for most mercs they would only see the full black "I forget" version anyway. Plus when you found a magazine, unless it was one of the clear plastic types, you shouldn't know what was loaded.

Since there's an ammo counter is there really a need for a graphic to show the gun is loaded? Just a symbol to show that the gun was unloaded without a magazine. Perhaps overlay the magazine outline from the pockets on the weapon when you eject the magazine.

As for showing a round chambered perhaps a graphic of a bolt/slide mechanism, bolt open no round chambered, bolt closed round chambered.

Report message to a moderator

Corporal 1st Class
Re: [IDEA] New Ammunition System[message #282567] Tue, 07 June 2011 09:06 Go to previous messageGo to next message
Taro_M is currently offline Taro_M

 
Messages:292
Registered:November 2008
Yeah, but how will you know what is in the chamber? I also disagree that player shouldnt be able to see what is inside mag, after all all mags will look the same so it will be impossible if its AP or HP mag. Personally I like idea of display that ran showed us.

Report message to a moderator

Master Sergeant
Re: [IDEA] New Ammunition System[message #282568] Tue, 07 June 2011 09:08 Go to previous messageGo to next message
Gorro der Grüne is currently offline Gorro der Grüne

 
Messages:1448
Registered:March 2009
Location: Broadwurschd-City
mouseover enlarging it?

Report message to a moderator

Sergeant Major
Re: [IDEA] New Ammunition System[message #282570] Tue, 07 June 2011 09:21 Go to previous messageGo to next message
Requiem is currently offline Requiem

 
Messages:93
Registered:February 2007
Taro
Yeah, but how will you know what is in the chamber? I also disagree that player shouldnt be able to see what is inside mag, after all all mags will look the same so it will be impossible if its AP or HP mag. Personally I like idea of display that ran showed us.
Same system as now with the colour changing based on the visible loaded bullet, any further information requires the character to unload and reload the magazine. If any situation calls for the fog of war it's remembering which magazine has what load out.

Report message to a moderator

Corporal 1st Class
Re: [IDEA] New Ammunition System[message #282579] Tue, 07 June 2011 10:23 Go to previous messageGo to next message
raycrasher is currently offline raycrasher

 
Messages:51
Registered:August 2010
Location: Philippines
T_Bolt
That would be rather hard to see on some resolutions/monitors and for most mercs they would only see the full black "I forget" version anyway.


You can scale it however you want, maybe two pixels width per bullet?

T_Bolt

Plus when you found a magazine, unless it was one of the clear plastic types, you shouldn't know what was loaded.


Agreed, if realism is the issue. For full usage of NMS, I have to disagree. I agree with Taro, since for a little realism you get to "know" what bullets are on the mag only when they're loaded in a gun. Also, you can set it which way you want using an INI option, so that satisfies everyone, I think?

T_Bolt

Since there's an ammo counter is there really a need for a graphic to show the gun is loaded? Just a symbol to show that the gun was unloaded without a magazine. Perhaps overlay the magazine outline from the pockets on the weapon when you eject the magazine.


The graphics are designed to show specifically what bullets are in the chamber and in the magazine, which are two separate things.

T_Bolt

Same system as now with the colour changing based on the visible loaded bullet, any further information requires the character to unload and reload the magazine. If any situation calls for the fog of war it's remembering which magazine has what load out.

But still, you cannot see what bullet is inside the gun, just like you cannot see what bullets are inside the mag.

------------
As to how to possibly implement this:

The chamber can be an sti, change colors when needed, but it is also easy to draw using pure code, I think.
The magazine can be just 1px (or 2px) width vertical lines, alternating between bullet color and black.

Report message to a moderator

Corporal
Re: [IDEA] New Ammunition System[message #282591] Tue, 07 June 2011 13:27 Go to previous messageGo to next message
Requiem is currently offline Requiem

 
Messages:93
Registered:February 2007
Ran
You can scale it however you want, maybe two pixels width per bullet?
How big do you need to scale it to show a 50round mag let alone a drum or Beta C-Mag? And what about colour blind gamers, how will they tell one round from another? Forget realism, this graphic is neither the best method for delivering the information to the player nor does the player need to see the contents of a magazine constantly. The best method is just to have a text list in the enhanced description box, which can also display the type of round chambered if need be.

What will be needed as we've only got a birds eye view is a symbol to show there is a magazine loaded and a symbol to show that a round is chambered. Purest and simplest method to do that would be a circle and a square next to the ammo count. The circle represents a round chambered and the square a magazine. If you want to get fancy you could use a bullet and magazine graphic but there is no need to display the contents of the magazine all the time.

Report message to a moderator

Corporal 1st Class
Re: [IDEA] New Ammunition System[message #282635] Tue, 07 June 2011 22:14 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
Displaying "2px per bullet" sounds nice in principle but it will have an impact on game preformance. We already see a limited performance hit because NAS displays valid attachments for each attachment slots tooltip (you notice it more with a debug build, but I see it even in release build with certain weapons). If every weapon had to generate the mag graphic by sifting through the mag, it would definitely have a speed impact.
I don't see an issue with displaying the type of round that's in the chamber, though. But that's only useful if we have a chamber. So maybe that could display the type of round that will be fired next, whether from the chamber or directly from the mag (depending on weapon). I do like the idea of "cutting" the existing bullet graphic, though. My only concern is space. I don't want to try redesigning the entire IDB so whatever I end up doing has to fit into existing spaces. Currently the current mag supply and capacity is displayed on top of the bullet graphic. I think I can still do that even if I split that into two seperate regions: One for the chamber and one for the mag (or a second chamber). This would limit us to 2 chamber weapons (with no mag), though, which is probably fine for existing weapons, but not good if anyone wanted to try and recreate something like a "4-shot Derringer" where each round is loaded into it's own, seperate chamber with it's own, seperate firing pin. Unfortunately, I can't think of a way to have the IDB deal with weapons like this without redesigning the IDB (which, again, I'm not interested in doing).

I've been thinking about the "types" of weapons that we need to be able to recreate and here's what I've come up with:
1) Internal mag with no chamber: Like a revolver. It would have a 6rnd internal mag but has no actual seperate chamber in which a bullet is loaded. Mag limit would equal the internal mag.
2a) Internal mag with a chamber: Like many bolt-action rifles. You'll have some kind of internal magazine (usually a non-removable box) where you load your rounds, and a seperate chamber that has to be loaded from the mag. Usually no way to load directly to the chamber without first loading the mag. And since loading the chamber requires closing the bolt (and thereby cutton off direct access to the mag), there's usually no way to "overload" the gun. Mag limit would equal the internal mag.
2b) Internal mag with a chamber: Like many pump and level action rifles. You'll have some kind of internal magazine (usually a "tube-mag" under the barrel) where you load your rounds, and a seperate chamber that has to be loaded from the mag. Since loading the internal mag is done from a seperate port instead of past the firing chamber, it's possible to load an extra round once a round is cycled into the chamber. Mag limit would equal the internal mag + chamber.
3) A chamber (or two) with no internal or external mag: Like a breach loading shotgun (double barrel). The rounds have to be loaded and unloaded directly from the chamber. Mag limit would be the number of chambers.
4) External mag with no chamber: These would be "open bolt" weapons like the Uzi. As I understand these weapons, the round is fired when the bolt slams closed so there is no way to fire the weapon if you manually close the bolt. Mag limit would be the size of the external mag.
5) External mag with a chamber: These would be "closed bolt" weapons like the M16 or Barretta M92. You can either manually load the chamber, or load the chamber from a loaded mag. Mag limit would be the size of the external mag + chamber.

Can anyone think of some weapon that wouldn't fit into one of those 6 categories?

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282639] Wed, 08 June 2011 00:20 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
I'm not even sure if the interface bullet button needs to cut up. Right Clicking on the bullet could overlay a menu of sorts with possible extended options for things like multi-ammotype set-up, or ejecting pre-set amounts of rounds.

Left clicking on the Bullet would simply:
Case 1, 2a, 2b), Internal mags with and without a chamber, or just chamber(s) - unload one bullet at a time based on firing queue
Case 4) External mag with no chamber - unload magazine, that's all
Case 5) External mag with a chamber - 1st click unloads magazine, 2nd unloads round from chamber
Case Magazine - unload one bullet at a time based on firing queue

Unload and Consolidate Hot Key (sorry I forget the particulars): already unloaded magazines have ammo dumped to ammo crates, magazines inside weapons are unloaded but ammo left inside. A second use of the hot key needed to completely convert all ammo available in-map into ammo crates.


The colour of the bullet would indicate next round to be fired, and unless there are plans for simultaneously firing of multiple chambers in-game (right now we're getting by with burst for double barrels) that should do. Complex stuff like the bullet queue could be displayed when the bullet is right clicked.


EDIT: the only thing I can think of to add to the list of gun types are disposable guns that cannot be reloaded. The magazine is the gun, but as far as interface goes, it would be even simpler as the firing queue can only be interacted with by firing.

EDIT2: with the "Keep It Simple" principle in mind, I feel multi-ammotype set-up can be done without a specific interface and instead just a menu/sub-menu:

ammocrate(1) into empty magazine = fills magazine to capacity with ammotype 1
ammocrate(2) into magazine filled completely with ammotype 1 = menu pops up with multi-ammotype options to replace: "top round only," "every 2nd round, starting with 1st", "every 2nd round, starting with 2nd," "every 3nd round, starting with 1st," "every 3nd round, starting with 1st," "every 3nd round, starting with 2nd," "every 3nd round, starting with 3rd"
- removed rounds of ammotype(s) from the magazine are deposited into sector

The problem is that the list gets rather long the more ammotypes a player may want in the same magazine. Perhaps an interface is needed..., with two variables: Every X rounds, Starting with Y

For weapons with a chamber, or are just multiple chambers, clicking an ammo pile on the weapon would load one round at a time allowing the player to load the chamber(s) with a different ammotype than others that may already be in the firing queue.

[Updated on: Wed, 08 June 2011 01:09] by Moderator

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282641] Wed, 08 June 2011 01:49 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
We should probably get our terms in line as well. So we don't confuse people (ourselves included Smile ). NMS would convert existing "ammo items" into two seperate items:
1- The "ammo pile", or individual rounds of ammo
2- the "magazine" which hold "ammo pile" items and is insterted into approved weapons.

An "ammo crate" and an "ammo box" would now be special "magazines", each with a higher then normal capacity (3000 and 50 respectively, for example) but which have no "approved weapon". In other words, we'd have an "ammo crate" and/or "ammo box" in items.xml that was setup almost exactly the same as any other "magazine". And both would have entries in magazines.xml just like any other "magazine".
The benefits of these types of special "magazines" would be the ability to carry more ammo in less space. The only other special circumstances for these types of special "magazines" would be that they couldn't be used to reload a "normal magazine" in combat. Instead you'd have to remove X number of rounds and manually reload your "normal magazine" using the loose round rules (or whatever system we ultimately work out). But that can all be handled with the existing AmmoCrate tag. We simply tell the code that any "magazine" item with the AmmoCrate tag set can only "directly" reload a mag when no enemies are present. This has the added advantage of allowing a single "ammo crate" and/or "ammo box" item to hold any kind of ammo (or every kind if that's what you want). Though if you want to have different capacity limits for different calibers, you would have to include multiple items.

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282644] Wed, 08 June 2011 02:10 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Sorry, my usage of "Ammo Crate" was for the "Ammo Pile" in your last post.

Actually, I thought you were still planning on using the "Ammo Pile" in different sizes to cover the retail, and mass in-sector storage purposes.

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282646] Wed, 08 June 2011 02:45 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
I'm planning on including a new tag for "default quantity" or something similar to deal with weight, item size and purchasing, but the "ammo crate" and "ammo box" options are still relevant.

Examples:
Let's assume we determine that the "default quantity" for .45ACP is 10 rounds, and that it has a itemsize=12
You can only hold 20 rounds (10rnd default quantity X 2 hands) in a mercs hands since a hand can only hold a single item, regardless of item size. And those 20 rounds (or at least 10 per hand) would have to be all the same type. So up to 10 AP rnds per hand, for instance.
But if you get an "ammo crate" (which in this form would have to be purchased just like any other "magazine"), you could stuff 3000 .45ACP rounds into it, of varrying types, and carry the crate in your mercs hands. For that matter, depending on how the xml files were setup, you could put 3000 rounds of mixed type and caliber into the crate and still be able to carry them all in a mercs hands. No more lugging 6 different "200rnd stacks" of ammo from one sector to another.
The "ammo box" option is just as relevant, but on a smaller scale. Again, a pocket can only hold a single stack, though you might be able to fit multiple "items" into a single stack. For instance, a "Small General" pocket can have 3 itemsize=12 items or 2 itemsize=15 items in a single stack. So you could fit up to 30 rounds of .45ACP into a "Small General" pocket, but all 30 rounds would be of identicaly type (AP, HP, AET, etc).
But if we have an "ammo box" that's ItemSize=15 and can hold 30 rnds, then that same "Small General" pocket can actually hold up to 60 rounds of any type and/or caliber ammo, again depending on how the xml files were setup.
Even at their most restrictive (just a single caliber per box/crate) both of these special "magazines" would have the advantage of letting you consolidate lots of small "ammo piles" into a single stack. Need to move 50rnds of .45ACP, 20rnds of .45ACP AP, and 100rnds of .45ACP HP? Buy a couple "ammo boxes" and potentially fit all 170rnds into a single pocket (obviously depending on pocket stacking limits and box capacity) instead of needing a minimum of 3 seperate pockets. The only real disadvantage to these is the same as the disadvantage all "magazines" are going to face; you have to remove ammo in the opposite order from the way it was put into the mag. If you want to reach the 2 AET rounds you put into the "magazine" before you put 200 other rounds "on top", you'll have to first remove the 200 "top" rounds to get down to the AET. Hopefully that makes sense.

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282647] Wed, 08 June 2011 03:16 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Ok, the "ammo crate" and "ammo box" are just NMS magazine items that are used to carry moderate amounts of ammo. Are these things that just fall out of the NMS implementation (ie. create a magazine that does not fit a gun), or are they specifically coded features?

Just to make sure we're all on the same page here, I thought the following would be these two new item types under NMS:

1) the NMS magazines - contain the information on calibre and ammotype queues, able to modify the stats of the gun, probably not an attachment, probably destroyed/created on loading/unloading

2) universal ammo item - covers loose ammo, item for retail purchase, mass in-game storage. Single calibre and ammo type. Also can modify the stats of a gun. Money-like in that it can be split off into various increments. To be determined: how size/mass/price would be defined (as item can be split apart)

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282674] Wed, 08 June 2011 11:29 Go to previous messageGo to next message
Sandro is currently offline Sandro

 
Messages:420
Registered:November 2008
Location: Mars
I am gonna love this! You have my spiritual support.

Report message to a moderator

Master Sergeant

Re: [IDEA] New Ammunition System[message #282739] Wed, 08 June 2011 19:17 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
Wil, I'm not sure what you're asking there. When you remove ammo from mag/gun or purchase ammo from a shoppkeeper, it would all be the specific Item (from items.xml) for that specific caliber and type (i.e. .45ACP HP). You'd be able to pile that "item" into a single OBJECT which (in sector inventory) would have an unlimited size. So if you bought 10,000 rounds, you could create an "ammo pile" with 10,000 rounds in it. Sector inventory will be coded so that the ItemSize tag is ignored, which will allow a single Object (i.e., a single sector inventory slot) to hold all the ammo of a specific type/caliber.
Soldier/Vehicle invetory slots will have stack limits just like normal, and those limits will be based on a new "default quantity" tag that I'll be adding to Items.xml. So you might be able to create a pile of ammo in sector inventory with 10,000 rounds, but a soldier's pocket may only be able to carry 20 round "piles".
In either of these cases, the "ammo pile" is just an Object pointing to a particular Items.xml entry.

You'll also have to find/buy empty magazines as they will no longer magically appear. Though we should probably have each weapon come with a single, default mag. This will probably be done using the existing default attachment tags.
Anyway, just like the "ammo piles" above, each mag will be an Object that points to a specific entry in Items.xml. The catch is, modders will be able to decide how specific they want mags to be. By default I'll probably create one mag item for each size and caliber, so there will be a specific item for a "30rnd 5.56 mag". Modders will have the ability to make more generic mags if they want, though mag capacity has to be consistant. In other words, if a modder doesn't want players to have to worry about getting seperate 5.56 and 7.62WP mags, you could just create a single "30rnd mag" item and have both weapons use them. I'll have to code things so that when loading a mag into a gun, we only allow the mag to load if there's only approved ammo, but that's a code-side issue.
On the other hand, modders could decide to be extrememly specific. You might want to have the M16 use one 30rnd mag but have the Steyr Aug use another. In that case, you'd have to create two seperate items.xml entries.

For all this to work I'm going to create a new Ammo.xml which will have a similar layout to attachments.xml. You'll use this new xml file to "link" ammo with mags and guns. This will allow you to create mags and/or guns that can hold different calibers (like .357mag and .38special).

I will redesign the existing Magazines.xml so we give specific, magazine related data. This will link back to the Items.xml entries the same way we link other xml files together. Ultimately we'll be able to add tags to Magazines.xml that will allow mags to modify guns. But I'll worry about that capability when I've got the rest of this working.

Finally, I'll have an xml file that will link mags to guns. Right now I haven't decided if I should create a new xml file just for this purpose, or if I should just use the attachments.xml for this. Either option will work, but if I add to attachments.xml, it'll probably double the size of that file.

BTW, I should make it clear that I'm not a graphics person. I have applications that will let me edit the existing sti files, but I can't really draw my own graphics. So to start with, I'm just going to take the existing images and tweek them. But somone may want to create all new graphics to represent the various mags and ammo items.

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282740] Wed, 08 June 2011 19:36 Go to previous messageGo to next message
Gorro der Grüne is currently offline Gorro der Grüne

 
Messages:1448
Registered:March 2009
Location: Broadwurschd-City
would it be possible to have guns (eh Mini14) without mags attached?

Report message to a moderator

Sergeant Major
Re: [IDEA] New Ammunition System[message #282742] Wed, 08 June 2011 19:54 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Ok, I think we're on the same page. I just got confused with your post yesterday, specifically the line:

Quote:
An "ammo crate" and an "ammo box" would now be special "magazines"


From here on in I'll try to use your term "Ammo Pile" instead of "loose ammo," and "universal ammo item," as they are all the same thing.

Good to see that what I called "New Calibre System" (compatible calibre's for magazines and guns) in the old thread is likely to be a by product of New Magazine System.

EDIT: A thought on graphics - all the ball ammotype magazines (no stripe) should do for now. It is those magazines without ball that will be a problem. As far as graphics for the Ammo Piles, Smeagol's retail ammo boxes are very impressive looking, and last I checked seemed to cover all stock v1.13 calibre/ammotype combinations.

[Updated on: Wed, 08 June 2011 20:10] by Moderator

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282779] Thu, 09 June 2011 01:38 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
Gorro der Gr

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282780] Thu, 09 June 2011 02:20 Go to previous messageGo to next message
Gorro der Grüne is currently offline Gorro der Grüne

 
Messages:1448
Registered:March 2009
Location: Broadwurschd-City
My idea was to have in the early game a standard AR (eg AK47) but without a mag.

As I understand Your answer it couldn't be a standard AR
It must be a special AR (even if it would be identical to get rit of the mag.

Is this correct?

Report message to a moderator

Sergeant Major
Re: [IDEA] New Ammunition System[message #282782] Thu, 09 June 2011 02:27 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
If you are wanting an occurrence of the AK-47 placed in a map without a magazine, the effect could be achieved in 3 steps:
1) XML editing to clear the default magazine
2) Map Editor to place the AK-47
3) XML editing to put the default magazine back in.

The Map Editor/game itself won't fill in/change attachments on its own. One minor concern with NMS is that all weapons found in existing maps won't have magazines pre-loaded. Related to this is my long standing gripe with the Map Editor missing default attachments for occasional items indexes, which under NMS may include the default magazine.

[Updated on: Thu, 09 June 2011 02:30] by Moderator

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282791] Thu, 09 June 2011 05:48 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
@Gorro: Yeah. I can't think of a way to have the code determine when an item should and shouldn't be given a default magazine. And I really wouldn't suggest creating two identical weapons, one with the default mag and one without.

Of course, what would be the point of having a standard AR appear early in the game without a mag? You'd have a weapon you pretty much couldn't use.

@wil473: Yes, that may well be an issue with NMS as well. I've looked at the map editor code in the past, but I'm not as familiar with it as I am with other parts of the code. Once I'm a bit further along on the NMS coding (I'm still working on xml and sti updates since I need those in place to test the code with), I'll see if maybe there is an easy way to "re-generate" editor placed items. But no promises.

I've come across a concern while organizing things to build and update the xml files. In the current "official release" there are 461 "ammo" items with 461 associated images in all three locations (big items, interface and tilesets). Based on what I've done so far, NMS will only have 208 to start with. And that includes 3 "ammo crate" and 3 "ammo case/box" items. One for "high power" rounds (7.62x51 and up), one for "rifle" rounds (smaller them 7.62x51mm) and one for "pistol" rounds. These are just defaults that I'm working with at the moment and can certainly be expended/altered as the project progresses. But I'm wondering what I should do about the remaining 253 items. I hate leaving big "NADA" gaps in the xml and sti files, but if I don't it would mess up editor placed items.
Also, while I know I can write the code to keep savegame compatibility, the xml files will wreck savegames no matter what. No matter how I write things, you'd be "losing" ammo if you tried loading a "pre-NMS" savegame. For that matter, even if I do leave the "NADA" gaps, ammo that has been placed via the map editor will get screwed up because the index numbers won't match to the new ammo and mag items. And I'm almost positive I won't be able to come up with a solution for that. At least not one that doesn't leave 461 "dead" items in the system.

EDIT: Actually, I just thought of one possible solutions. Not sure how doable it would be yet. Just brainstorming right now. I could create an "OldItems.xml" file that would contain 2 tags: uiIndex & newIndex. Then I could edit the existing "CreateXXXX" functions (CreateItem, CreateAmmo, etc) to accept an additional parameter to tell the code whether we need to translate from the old index to the new. if the paramter is set, the code would look up the index number in the "OldItems.xml" and create the new item based on the newIndex it finds. This might also let me "pre-load" mags that are placed via the map editor. I.E., if a "5.56mm Mag 30" is on the map, the code could be told to create a 30-round 5.56 mag filled with 30 AP rounds. The only thing I would need to figure out is how to tell the code when we needed to translate the old index to the new. This is easy during the loadgame process. Not sure about the map editor placed items, though.

[Updated on: Thu, 09 June 2011 05:58] by Moderator

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282794] Thu, 09 June 2011 08:57 Go to previous messageGo to next message
Logisteric

 
Messages:3199
Registered:December 2008
Location: B
chrisl, i can - have a gun (m14) with some loose ammo to be found in a sector - the player needs to use it as a single-loader unless he finds some mags in another sector

the gun could be in drassen airport (mailorder - the other closed box) whereas the mags are in a farm-sector (the farmer got 'spare' mags from his time as a concscript - so he ordered the m14 you found

chrisl, try to look at it from a modder's pov - annoying players is fun :devilaugh: it also gives you a chance to at least ballance that m14 to some extend early on - makes it an early 'poor man's'-sniperrifle if the farmer also ordered a scope (no problem with the farmer as players tend to steal their stuff anyway

would it be a problem to sell guns without mags (just browse the mag-section at br's or tony's) and drop them from the redshirts with a mag

and please stack stuff at mercheants' inventories (same as br's) - if i sell 25 glock18s (100%) to tony i can see no reason why eachone needs a slot in his inventory (there are people who don' sell to the mob)

Report message to a moderator

Captain
Re: [IDEA] New Ammunition System[message #282844] Thu, 09 June 2011 18:28 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
Ok, I can see your point Logisteric. But it doesn't change the fact that I can't have the same item produce two seperate results. And if my item conversion system works as I hope it will, wil473's suggestion would no longer work, either, because the code would be re-generating the map editor placed item. If you don't want weapons to come with a default mag, you simply don't include a mag as a default attachment. But that means when you buy said gun from a shopkeeper or BRs, it won't come with an empty mag.

Item drops won't be an issue. Redshirts would be using the faux OMS system just like they use OIV even if you're playing NIV. In other words, they'll simply be issued loaded mags. When they drop items, they'll drop the loaded mags they are carrying. How many mags they actually drop, though, would be dependent on the item drop system you're using.

As for stacking merchant inventories, that's a nice feature request but it has nothing to do with NMS. I'd suggest you create a new thread for that. NMS is going to require enough code modifications all on it's own so I have no intentions of messing around with code that isn't directly related to this project. Smile

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282849] Thu, 09 June 2011 19:07 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Is it possible to produce an external program, or a command line to the Map Editor that automatically, removes and replaces all items in a map based on a conversion chart? This way Mods can be quickly converted but only as needed; and someone can run this to produce a copy of stock maps needed for any release.

EDIT: might as well float this idea while NMS is still in a fluid state - "pseudo taped/linked magazines"

Basically it is a pause in firing where an AP price based on the reload cost for the weapon/magazine combo must be spent to continue. As there are no graphics for reloading, this is all portraying the swapping of a clipped/clamped/taped together magazines would entail in-games.

Two variables:
1) magazine multiplier
2) increment percent reload cost

ie. taped double 30 round 9x19mm SMG magazine
- standard capacity tag in XML = 30
- magazine multiplier = 2
- increment percent reload cost = 0.75
- in-game reloading would treat NMS magazine item as a 60 round magazine
- firing would continue as per normal till 30 rounds expended, then firing cannot proceed until 0.75 x reload AP's expended (so if you're caught with 10AP left, and reload is 20AP, you have to wait till next turn to expend 15AP to continue firing)

ie. double barrel shotgun with shell holder
- standard capacity tag in XML = 2
- magazine multiplier = 5 (two in chamber + 8 external)
- increment percent reload cost = 0.8
- in-game reloading would treat weapon as having a 10 round internal magazine
- firing would continue as per normal till 2 rounds expended, then firing cannot proceed until 0.8 x reload AP's expended (so if you're caught with 10AP left, and reload per shell is 20AP, you have to wait till next turn to expend 16AP to continue firing)
- not-sure how to handle choice between reloading one chamber and firing once, and reloading both chambers before firing again; perhaps this idea isn't applicable to chamber only weapons.

There got that out of the system.

[Updated on: Thu, 09 June 2011 20:49] by Moderator

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282860] Thu, 09 June 2011 21:25 Go to previous messageGo to next message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
No idea about the external program. I'm just not familiar enough with the map editor system. That said, depending on how staticly placed items are actually "created" during a game, the conversion setup I'm considering should work. My assumption is that when you come across a statically placed map item, the code uses one of the existing CreateItem functions to convert a stored index number into an OBJECTTYPE. If that's the case, then it's a simple matter of having the code run the conversion at that time.
Even if statically placed map items aren't simply stored on the map as index numbers, it still may be possible to force these items to be "re-generated" when the map is initially loaded. This would only take place once during any particular game since we only read a particular map file the first time we enter a sector. So the overhead should be minimal (unless you statically placed a few thousand items). I just have to look in the code and figure out how map items are handled.

As for tapped ammo, I'm not sure there's a way to make this work. Firstly, it would be confusing because the mag/weapon would display 30 rounds as the capacity. You'd have no easy way to figure out what was in the "other" mag. Also, I'm not sure what would stop you from paying the reduced reload ap cost when loading a mag from a pocket. About the only way this could possible become a reality is if we instituted mandatory AP costs to access pockets (which I really don't like). Then you could seperate the APs to reload and the APs to "grab/put away mag from pocket". But thats a bit beyond the NMS project.
You could, however, introduce a new "60-rnd" mag that could simulate all but the reload time. You'd just create a new mag item with a higher capacity. Could take it a step further by making it a merge process (merge two 30 round mags and a unit of duct tape, get a single 60 round mag) to "create" the new 60 round mag. Because of the current merge limitations, I don't know if you could reverse the process ("merge" a 60 round mag with a knife and get 2 30 round mags and a knife), though.

The "shell holder" is actually feasible. It would simply be an attachment that would increase the weapons ubMagSize (i.e., internal mag) while reducing the weapon's APsToReload or APsToReloadManually tags.

Report message to a moderator

First Sergeant
Re: [IDEA] New Ammunition System[message #282863] Thu, 09 June 2011 22:05 Go to previous messageGo to next message
Wil473

 
Messages:2815
Registered:September 2004
Location: Canada
Yeah the interface for indicating this capability would be problematic (especially as I was advocating just a few days ago not modifying the interface).

Its called "pseudo tapped/clipped together magazines" in that:
- The weapon doesn't actually reload at the increment for one magazine. It just pauses firing until an AP cost can be charged.
- The AP cost itself being a fraction of reload cost (which I'm leaving vague as I'm not sure how or even if you are planning on changing reload variables under NMS). So as long as the fraction < 1 the AP cost to proceed to the "next" attached magazine will be less than reloading***
- it does not have any allowances for different ammotypes in each magazine (reloading treats it as one big magazine). So despite one of the influences being Die Hard 2, this system could not actually portray that particular usage.

***Semi-related, will there be an AP cost to remove a spent magazine before loading a fresh one? Or is the removal cost just going to be included in one reload cost?

EDIT: Odd, the shell holder is potentially more feasible than tapped mags, fair enough. Like I said, this is just something I wanted to get out of the way before someone else did.

[Updated on: Thu, 09 June 2011 22:10] by Moderator

Report message to a moderator

Lieutenant

Re: [IDEA] New Ammunition System[message #282864] Thu, 09 June 2011 22:19 Go to previous messageGo to next message
DepressivesBrot is currently offline DepressivesBrot

 
Messages:3658
Registered:July 2009
Personally, I never was a big fan of taped/clamped magazines. We'll still get the quarterly request for them, but we get regular requests for other stuff as well. So unless someone has a really cool idea how to do them properly, it should be way down on the list.

Report message to a moderator

Captain

Re: [IDEA] New Ammunition System[message #282874] Thu, 09 June 2011 22:43 Go to previous messageGo to next message
Slax is currently offline Slax

 
Messages:1411
Registered:July 2006
Location: People riding polar bears...
Clamped magazines would be pretty specialized. Faster reload speed (once), a bit more AP cost on the readying (or not) and pretty clunky for the old LBE.

Report message to a moderator

Sergeant Major
Re: [IDEA] New Ammunition System[message #282882] Fri, 10 June 2011 00:06 Go to previous messageGo to previous message
ctiberious is currently offline ctiberious

 
Messages:605
Registered:March 2007
The trouble with the "tapped" mag option wil suggests is you have to keep track of which bullet you're at in the mag for auto/burst fire operations. Fire off 28 rounds of your 30x2 mag and the code would have to know that your next burst/autofire shot is going to stop at 2 rounds. Then you'd have to pay the extra AP cost before you could fire again. The extra ap cost isn't such an issue since we could just flag the gun the same way we do for bolt action weapons, thus requiring you to pay the APsToReloadManually cost. And LBE isn't so much a concern as you could conceivable just increase the size of the tapped mag. It's all the rest of it that makes this less then feasible.

And no, I'm not planning on messing around with the APsToReload costs that currently exist. They already assume you're ejecting the spent mag and putting it away, extracting a new mag from a pocket, inserting the new mag into the weapon and (in most cases), chambering the first round. I know you could reduce the reload time if you simply ejected the spent mag while, at the same time, reaching for a fresh mag with your off-hand but the only way you could represent that would be to seperate the various "parts" of the APsToReload cost. And while I'm not saying that wouldn't be an interesting project, it's beyond what I am looking at for NMS. I'm already going to be drastically messing with the order of items in both Items.xml and the various sti files, which is going to equate to some extra work for modders to get their mods ready for NMS. Plus adding new xml files and tags to make NMS function which will also take time for modders to prepare for their mods. In other words, I'm anticipating you modders getting upset about all the work you have to do to make your mods compatible with NMS. So I'd like to keep the number of required adjustments to a minimum. Smile

Report message to a moderator

First Sergeant
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 Mar 29 07:08:14 GMT+2 2024

Total time taken to generate the page: 0.02709 seconds