Home » MODDING HQ 1.13 » v1.13 Coding Talk » [IDEA] New Magazine System
Re: [IDEA] New Ammunition System[message #282739] Wed, 08 June 2011 19:17 Go to previous messageGo to previous 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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 Jan 10 14:29:56 GMT+2 2025

Total time taken to generate the page: 0.10330 seconds