Jump to content

SMG Auto Turret needs more ammo


Recommended Posts

 Hey all. Long time player, first time poster.

 

 Can anyone point me to a way/mod/whatever to allow the SMG Auto Turret to hold more ammo? I have played on servers in the past where the 300 round/slot ammo limit is far higher. I believe as much as 10 to 15 thousand rounds per slot. Is this even a thing anymore? Any help would be greatly appreciated.

 

Thanx in advance,

 

FuBard

Link to comment
Share on other sites

I'm not aware of any mods, but you should be able to easily find it in the XMLs. I'm not at my gaming PC right now so can't check out the exact file you'd want, but when you open the game files, just look at the list of XMLs. They're titled relatively clearly. Open the XML you think it might be in and do a Ctrl-F for "smgautoturret". There should be a line in the code to change the ammo stack size.

 

The only problem with this method? You'd have to do this after any game update, and it only works for solo playthroughs, so if you can find a mod for it, that would be preferable. There's a small list of changes I typically make on my own computer since there are no modlets for them (or there are larger mods that changes too much).

 

Anyway, hope that helps.

Link to comment
Share on other sites

The correct name in the file is autoTurret (I easily know this because I got a copy of the config files on my work computer so I can search them when I have a break)

 

The turret object is in the blocks file, but I don't think that changes the stack size.  I think the stack size for the ammo is directly pulled from the stack size of the ammo in the items.xml file.

 

Right now, it is set to 300.  If you were to change that to (say 600), I believe it changes the stack size to what you can carry and what is in the auto turret.  Code below is from items.xml and the ammo used by the turret.

 

<item name="ammo9mmBulletBall">
    <property name="Tags" value="ammo"/>
    <property name="DisplayType" value="ammoBullet"/>
    <property name="HoldType" value="45"/>
    <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
    <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
    <property name="Material" value="Mbrass"/>
    <property name="MeltTimePerUnit" value=".4"/>
    <property name="Stacknumber" value="300"/> <!-- STK ammo high -->
    <property name="EconomicValue" value="9"/>
    <property name="Group" value="Ammo/Weapons,Ammo,Ranged Weapons"/>
    <effect_group name="ammo9mmBulletBall" tiered="false">
        <passive_effect name="EntityDamage" operation="base_set" value="32" tags="perkGunslinger,9mmGun"/>
        <passive_effect name="BlockDamage" operation="base_set" value="6" tags="perkGunslinger"/>
        <passive_effect name="DamageModifier" operation="perc_add" value="-.8" tags="earth"/>
        <passive_effect name="DamageModifier" operation="perc_add" value="2" tags="wood"/>
    </effect_group>
</item>

 

Edited by BFT2020 (see edit history)
Link to comment
Share on other sites

2 hours ago, FuBard said:

Well,

 

I did it.  I was able to adjust the ammo stacks for the guns and they work.

 

Thanx again guys,

 

FuBard

 

Did you just edit the existing files?  If so, I can get you a small modlet done in about a day or so that will keep the changes for you should we go to A20.5 or later.

Link to comment
Share on other sites

On 5/5/2022 at 10:19 AM, BFT2020 said:

The correct name in the file is autoTurret (I easily know this because I got a copy of the config files on my work computer so I can search them when I have a break)

 

The turret object is in the blocks file, but I don't think that changes the stack size.  I think the stack size for the ammo is directly pulled from the stack size of the ammo in the items.xml file.

 

Right now, it is set to 300.  If you were to change that to (say 600), I believe it changes the stack size to what you can carry and what is in the auto turret.  Code below is from items.xml and the ammo used by the turret.

 

<item name="ammo9mmBulletBall">
    <property name="Tags" value="ammo"/>
    <property name="DisplayType" value="ammoBullet"/>
    <property name="HoldType" value="45"/>
    <property name="Meshfile" value="#Other/Items?Misc/sackPrefab.prefab"/>
    <property name="DropMeshfile" value="#Other/Items?Misc/sack_droppedPrefab.prefab"/>
    <property name="Material" value="Mbrass"/>
    <property name="MeltTimePerUnit" value=".4"/>
    <property name="Stacknumber" value="300"/> <!-- STK ammo high -->
    <property name="EconomicValue" value="9"/>
    <property name="Group" value="Ammo/Weapons,Ammo,Ranged Weapons"/>
    <effect_group name="ammo9mmBulletBall" tiered="false">
        <passive_effect name="EntityDamage" operation="base_set" value="32" tags="perkGunslinger,9mmGun"/>
        <passive_effect name="BlockDamage" operation="base_set" value="6" tags="perkGunslinger"/>
        <passive_effect name="DamageModifier" operation="perc_add" value="-.8" tags="earth"/>
        <passive_effect name="DamageModifier" operation="perc_add" value="2" tags="wood"/>
    </effect_group>
</item>

 

Thanks for the clarification. I wanted to be helpful, but knew I was mostly guessing. It is interesting that it pulls from the general stack size and can't be modified separately.

Link to comment
Share on other sites

2 hours ago, Syphon583 said:

Thanks for the clarification. I wanted to be helpful, but knew I was mostly guessing. It is interesting that it pulls from the general stack size and can't be modified separately.

 

It's because of what it defines as the ammo for it:

 

    <property name="AmmoItem" value="ammo9mmBulletBall"/>

 

After helping the OP out, I got to thinking about it and now working on some code to make it an unique stack number compared to what you carry in your inventory.  I think if you were to make a new item, say

 

    <property name="AmmoItem" value="ammoTurretMagazine"/>

 

and create a recipe for it also, you can have an unique item for the turret that takes a little of effort to do.

 

This is the code I got so far, but haven't tested yet


 

    <insertAfter xpath="/items/item[@name='ammoBundleCrossbowBoltExploding']">
        <item name="ammoTurretMagazine">
            <property name="Extends" value="ammo9mmBulletBall"/>
            <property name="ItemTypeIcon" value="bundle"/>
            <property name="Material" value="Mbrass"/>
            <property name="Weight" value="0"/>
            <property name="Stacknumber" value="1000"/> <!-- STK ammo high -->
            <property name="EconomicValue" value="0"/>
        </item>
    </insertAfter>



    <insertAfter xpath="/items/item[@name='ammoBundleCrossbowBoltStone']">
        <recipe name="ammoTurretMagazine" count="1" craft_time="1000" craft_area="workbench" tags="workbenchCrafting">
            <ingredient name="ammo9mmBulletBall" count="1000"/>
            <ingredient name="modGunDrumMagazineExtender" count="1">
        </recipe>
    </insertAfter>

This is what I whipped up last week, but I want to make some other changes (like have the Int tree affect the damage output and crafting times).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...