• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Alpha 17 Generic Ammo Boxes

War3zuk

Refugee
In game if you loot Military Boxes or Gun Safes you have a chance at finding a Generic Ammo supply Box capable of being made into any of the base ammo's in game.. Boxes make a varied amount like 9mm Pistol ammo = 50 & so on.... (Also makes the Taza Axe craft-able but still only goes by your level of crafting)

Ammo Supply 9mm



Ammo Supply 44Mag



Ammo Supply 762mm



Ammo Supply Shotgun



Ammo Supply ShotgunSlug



https://mega.nz/#!KEEgTAZI!8KGczkuGJ0AByXNqt5JUW0ptDB9ynUdhKGk8Z71Z7Pg

Still getting my Head around the Xpath Stuff so double check it works in a new game, Tested myself with NO errors & all ammo works but well you know.. lol

Thanks to sphereii for putting me on the right path for the Loot table :)

 
Last edited by a moderator:
The ammo supply box is used to craft a bunch of ammo of your choice.

The sequence of events would be:

Find Generic Ammo Supply Box

Select it, go to Recipes

Choose which ammo type you want, and "craft."

It's basically a catchall to prevent bad luck on ammo drops.

 
You find a generic ammo box in the world, you click on it it gives you a choice of 5 recipes you can craft 9mm ammo or 762 & so on... My original code had loads more ammo types but I removed them so to stick with the game types.. WOTW had loads too my Fav being 32mm

 
Last edited by a moderator:
You find a generic ammo box in the world, you click on it it gives you a choice of 5 recipes you can craft 9mm ammo or 762 & so on... My original code had loads more ammo types but I removed them so to stick with the game types.. WOTW had loads too my Fav being 32mm
Oh nice that is cool.

 
If anyone uses this & it works without fault please let me know lol... Cant stand playing more than 5 mins of Alpha 17 before wanting to rip out my hair & shout at the screen....

 
If anyone uses this & it works without fault please let me know lol... Cant stand playing more than 5 mins of Alpha 17 before wanting to rip out my hair & shout at the screen....

Hello Tallon, i installed your mod, think works fine but you have to but out the XUI folder, because issues with other UI's. It's only a tip.

 
That wasnt meant to be in there sorry, I added that from another mod to add extra forge slots.... ive removed that & uploaded it again... cheers totally forgot i added that..

I take it youve found the boxes in the world ? I didnt have time to test it as i had help with the loot code but it was wrong so figured it out for myself but couldnt test it.... I just know I loads without errors....

 
That wasnt meant to be in there sorry, I added that from another mod to add extra forge slots.... ive removed that & uploaded it again... cheers totally forgot i added that..
I take it youve found the boxes in the world ? I didnt have time to test it as i had help with the loot code but it was wrong so figured it out for myself but couldnt test it.... I just know I loads without errors....
loading without erros, creative spawn works, test searching in world i do later.

 
Rule: Does the Mod have files other than XML, If YES then YES.... Servers ONLY push XML that im aware of matey :)

You upload all files to server, they download too you could separate the XML so they dont get it but thats pointless as they need files anyway...

 
tweak loot.xml

tweaked loot.xml

added 44MagBullet2 icon

Code:
<configs>

 <set xpath="/lootcontainers/lootgroup[@name='ammo']" >
 <item name="Ammo Supply 9mm" count="1,12" prob="0.2"/>
   [color=#008000]<item name="Ammo Supply 44Mag" count="1,12" prob="0.2"/>[/color]
   <item name="Ammo Supply 762mm" count="1,12" prob="0.2"/>
   <item name="Ammo Supply Shotgun" count="1,12" prob="0.2"/>
   <item name="Ammo Supply ShotgunSlug" count="1,12" prob="0.2"/>
 [color=#ff0000]<!--   <item name="44Mag Bullet HP" count="1,12" prob="0.2"/> --> <!-- missed that is there, my bad. -->[/color]
   </set>


   <append xpath="/lootcontainers/lootcontainer[@id='40']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>

   </append> 

   <append xpath="/lootcontainers/lootcontainer[@id='42']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>

   </append> 

   <append xpath="/lootcontainers/lootcontainer[@id='50']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>

   </append>



 <!-- safes, weapon caches rare good loot -->
  <append xpath="/lootcontainers/lootcontainer[@id='11']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>
       <item name="44Mag Bullet HP" count="1,12" prob="0.1"/>
   </append> 
   <!-- cars-->
   <append xpath="/lootcontainers/lootcontainer[@id='19']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>
       <item name="44Mag Bullet HP" count="1,12" prob="0.1"/>
   </append> 
   <!-- Supply Crate General, the normal airdrop -->
   <append xpath="/lootcontainers/lootcontainer[@id='34']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>
       <item name="44Mag Bullet HP" count="1,12" prob="0.1"/>
   </append>
   <!-- cntLootChestHero, fancy chest -->
   <append xpath="/lootcontainers/lootcontainer[@id='41']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>
       <item name="44Mag Bullet HP" count="1,12" prob="0.1"/>
   </append> 
   <!-- Apache Artifact Chest -->
   <append xpath="/lootcontainers/lootcontainer[@id='56']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>
       <item name="44Mag Bullet HP" count="1,12" prob="0.1"/>
   </append> 
   <!-- Treasure chest -->
   <append xpath="/lootcontainers/lootcontainer[@id='61']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>
       <item name="44Mag Bullet HP" count="1,12" prob="0.1"/>
   </append>
   <!-- mountain man loot -->
   <append xpath="/lootcontainers/lootcontainer[@id='63']" >
       <item name="Generic Ammo Supply" count="1,2" prob="0.10"/>
       <item name="44Mag Bullet HP" count="1,12" prob="0.1"/>
   </append>
   <!-- EntityLootContainerRegular, rare random drop off regular zombies -->
   <append xpath="/lootcontainers/lootcontainer[@id='70']" >
       <item group="ammo" count="1,12" prob="0.2"/>
<!--    <item name="Ammo Supply 9mm" count="1,12" prob="0.2"/>
 <item name="Ammo Supply 44Mag" count="1,12" prob="0.2"/>
   <item name="Ammo Supply 762mm" count="1,12" prob="0.2"/>
   <item name="Ammo Supply Shotgun" count="1,12" prob="0.2"/>
   <item name="Ammo Supply ShotgunSlug" count="1,12" prob="0.2"/>
   <item name="44Mag Bullet HP" count="1,12" prob="0.2"/> -->  <!-- commended out, was for testing -->
   </append>
   <!-- EntityLootContainerStrong, rare random drop off strong zombies -->
   <append xpath="/lootcontainers/lootcontainer[@id='71']" >
       <item group="ammo" count="1,12" prob="0.2"/>
<!--    <item name="Ammo Supply 9mm" count="1,12" prob="0.2"/>
 <item name="Ammo Supply 44Mag" count="1,12" prob="0.2"/>
   <item name="Ammo Supply 762mm" count="1,12" prob="0.2"/>
   <item name="Ammo Supply Shotgun" count="1,12" prob="0.2"/>
   <item name="Ammo Supply ShotgunSlug" count="1,12" prob="0.2"/>
   <item name="44Mag Bullet HP" count="1,12" prob="0.2"/> -->  <!-- commended out, was for testing -->
   </append>
   <!-- EntityLootContainerBoss, rare random drop off bosses -->
   <append xpath="/lootcontainers/lootcontainer[@id='73']" >
       <item group="ammo" count="1,12" prob="0.2"/>
<!--    <item name="Ammo Supply 9mm" count="1,12" prob="0.2"/>
 <item name="Ammo Supply 44Mag" count="1,12" prob="0.2"/>
   <item name="Ammo Supply 762mm" count="1,12" prob="0.2"/>
   <item name="Ammo Supply Shotgun" count="1,12" prob="0.2"/>
   <item name="Ammo Supply ShotgunSlug" count="1,12" prob="0.2"/>
   <item name="44Mag Bullet HP" count="1,12" prob="0.2"/> -->  <!-- commended out, was for testing -->
   </append>


</configs>
View attachment 25960

What Do Ya Think ?

 
Last edited by a moderator:
I Had a full section of Incendiary & HP rounds for each ammo type but removed them due to the fact I thought it made the game far to easy Plus !! It also took away from the fact that those higher end ammos had to be made which kep the game play alive so they were left out on purpose :)

Heres a few of the ones I was using including those made by myself to fill gaps..

https://mega.nz/#!LFl0RQID!V60gMiiYfSDKVSo3ePIBj8es6-xuePBApfdS-fRZjPs

Feel free to modify the code how ever you see fit..... The more code modified is why we have such diverse mods, Icons & other files... Plus it will be the only thing that saves this game long term...

Were I got a few of the PNG files from...

http://pngimg.com/imgs/weapons/bullets/

 
Last edited by a moderator:
I Had a full section of Incendiary & HP rounds for each ammo type but removed them due to the fact I thought it made the game far to easy Plus !! It also took away from the fact that those higher end ammos had to be made which kep the game play alive so they were left out on purpose :)
Heres a few of the ones I was using including those made by myself to fill gaps..

https://mega.nz/#!LFl0RQID!V60gMiiYfSDKVSo3ePIBj8es6-xuePBApfdS-fRZjPs

Feel free to modify the code how ever you see fit..... The more code modified is why we have such diverse mods, Icons & other files... Plus it will be the only thing that saves this game long term...

Were I got a few of the PNG files from...

http://pngimg.com/imgs/weapons/bullets/
True, just such a thought




 
Now i have a new project. Make Icons for 7days thx Tallon for that. Don't give me links,lol. :strawberry: :strawberry: :strawberry: :strawberry:

 
Im sure once the game is stable proper mods will come out that incorporate all the best modlets.. I cant bare playing Alpha 17 cos it just looks bad even in full settings I cant get it to feel right when running....

 
Thanks for putting this together, it's one of those things i didn't know i HAD to have. However, i did make some adjustments. I'm sorry to say the quest method isn't for me, so i made some recipes to turn the generic box directly into rounds, without the intermediary steps:

Code:
<append xpath="/recipes">
       <recipe name="ammo9mmBullet" count="50">
           <ingredient name="Generic Ammo Supply" count="1"/>
       </recipe>
   </append>

   <append xpath="/recipes">
       <recipe name="ammo44MagnumBullet" count="25">
           <ingredient name="Generic Ammo Supply" count="1"/>
       </recipe>
   </append>

   <append xpath="/recipes">
       <recipe name="ammo762mmBulletFMJ" count="20">
           <ingredient name="Generic Ammo Supply" count="1"/>
       </recipe>
   </append>

   <append xpath="/recipes">
       <recipe name="ammoShotgunShell" count="25">
           <ingredient name="Generic Ammo Supply" count="1"/>
       </recipe>
   </append>

   <append xpath="/recipes">
       <recipe name="ammoShotgunSlug" count="25">
           <ingredient name="Generic Ammo Supply" count="1"/>
       </recipe>        
   </append>
Feel free to incorporate this into the mod if you want (unless you already have, and I'm just working off an older version). I hope this doesn't step on any toes, and apologies if it does.

I also adjusted the quantity received to more closely match the quantities you'd get in a real box of rounds, based on the relative power of the round, as well (9mm takes about 2 full magazines to get their attention, so it stayed 50).

new recipes.xml -- https://pastebin.com/fPjarYk4 (didn't change any other files)

(edit: changed some of the wording to make me seem like slightly less of a jerk)

 
Last edited by a moderator:
is it me or if i craft more than 1 box, 2-3-5-10boxes and i have them in my inventory and press "read them" i get the ammo only from 1 box? not from all 5 or 10?

 
Back
Top