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

where to find where the ammo is associated to the weapon

jimyh

New member
Hi all, im browsing through the xml files and was thinking about making a rocket launcher turret (just for fun, and to see if i can do it). however i cannot find where the ammunition is associated to the weapon, any help would be appreciated. 

Im a noob just trying to learn how to modify xml files so please be kind.

 
Well for the Pistol (gunHandgunT1Pistol in items.xml) there is a tag "9mmGun". Then further below there is a property line "Magazine_items" with a list of all bullet types i.e. 9mm normal, AP and HP.

The tag may be mostly for proper attribution, i.e. if some code wants to do something depending on the ammo used. The "Magazine_items" seems to be the important line as it actually lists the ammo that is allowed to be loaded.

 
Last edited by a moderator:
thanks for that, i found the normal type of guns but cant find where the association of ammo and turrets are.

 
thanks for that, i found the normal type of guns but cant find where the association of ammo and turrets are.


Are you just explaining or still not sure?

If the latter: "Magazine_items" is the important line. Because the turret has no ammo tag but it has the "Magazine_items" line as well that lists the turret ammo. Just try it, find that line in your turret and add whatever ammo you want. Then test it

 
Are you just explaining or still not sure?

If the latter: "Magazine_items" is the important line. Because the turret has no ammo tag but it has the "Magazine_items" line as well that lists the turret ammo. Just try it, find that line in your turret and add whatever ammo you want. Then test it
Even though you were answering someone else, I am working on my Fallout based mod, and you just told me how to add a really nice touch to it.

THANK YOU!

 
Back
Top