Home » MODDING HQ 1.13 » v1.13 Coding Talk » [IDEA] New Magazine System
Re: [IDEA] New Magazine System[message #335498] Fri, 05 September 2014 10:51 Go to previous messageGo to previous message
Deleted.

 
Messages:2656
Registered:December 2012
Location: Russian Federation
How I see it - raw implementation plan.

XML changes
For every magazine - define it's type.
Now there are types: normal magazine, ammo box, ammo crate.
Add new type "ammo clip" - it's the magazine that does not go into the gun after loading, but instead it becomes 'empty' and can be put back to inventory.
For every gun - define it's feeding type - list of possible magazine items it can accept and if it can accept ammo firectly from ammo boxes.

Item status data
Gun:
current chamber state - need to chamber before firing
current loaded magazine item id
Magazine:
should be possible to store zero ammo, or add a flag "empty" that allows magazines with zero ammo (do not destroy this magazine, instead keep it 'empty', just like with canteens)

Coding part
-Allow empty magazines (like empty canteens)
-When loading magazine into the gun check if this item is allowed
-When loading ammo box check if this gun accepts direct loading, check for RT/turnbased
-Adding ammo to the same type of magazines works as usual
-Add button to "extract" ammo from the magazine/clip
-When the gun is empty, add possibility to "extract" empty magazine of the stored type
-When the magazine loaded into the gun, set the internal "magazine" var to the Id of the loaded magazine
-When the clip loaded into the gun, keep empty clip as a separate item
If the magazine id is already stored in the gun, then "swap" magazines after loading
-Teach AI to chamber rounds before firing (similar to "raising" guns) and maybe more tricks, but generally it should work as usual, as it always starts with loaded magazines. The main difference is that there will be empty magazines in the inventory and some guns require ammo boxes for reloading
-More optional checks and coding tricks

Conclusion
This system should be doable and doesn't seem to be epic work (if compared to other systems like NCTH or NAS/NIV).
I also think this could be made optional and should not break existing things.

Note: this text is mostly guessing, I don't have plans to do such system in near future, and there could be some deep problems I am not aware of.

Note2: this system is limited, it does not support storing (additonal or of different type) round in chamber or things like paired magazines but it should be fine for the most players.

Report message to a moderator

Lieutenant

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
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: Sat Jan 25 13:27:46 GMT+2 2025

Total time taken to generate the page: 0.07344 seconds