How do i adjust the amount of ammunition and reloadspeed of placed anti tank guns?

Hello comrades!

As the title says. I am working on a new map and would really need to adjust these things…
(for the 53k at least)

2 Likes

Try edit turrets. Maybe some changes may work even in multiplayer.

Find entity turretsInitialComponents.


Click to + near it. And then select object.

After that write properties that you want edit.


(UPD: gun__reloadTime with two _).
It’s like custom_props that in weapons.

Turrets properties are in turret entity. You can find em by using find entity tool.


If no turrets then do restart.

About ammo.
Tank weapons usually use several types ammo. As result maybe better to not touch gun__ammo.
But you still can edit ammo amount. Just need…
Add gun__shellsAmmo as array.


And then click to another plus and select integer.

Results:


Original stug have only 19 and 18 ammo.

2 Likes

that is so cool.

i have tried it, and it’s very useful ( like, to give bikes additional ammo since 5 mags aren’t that much. imo )

but my question is, i don’t understand the numbers.

like, to what each and single slot is attached to.

because for example, i wanted to make a tank with only HE.

but if i put 0 to the first one, and for example, 30 on the second slots, the tank will ending up with 15 ap and 15 HE.

even if i switch the numbers with the first and / or second slot, the same happens. adding more slots seems not solving my " issue ".

so the question is,
is it possible to straight up remove HE or AP ?

if yes, how?

( i know(ish) that entities can do that. but i was wondering if it possible to do it without using entities. as my pves primarely relies in the use of HE. which i would like to remove AP so players will not have to worries about that. )

2 Likes

I too dont know yet.

In theory you can remove shell.
Not ammo. Another shell. Projectile. Damn not at home so cant to tell what property I mean.

3 Likes
"turrets__initAmmoDistribution:array"{
    "ammo:object"{
      slot:i=0
      fill:b=yes
    }

    "ammo:object"{
      slot:i=1
      count:i=60
    }
  }

The slot is the position order of the type of shells, which comes from the original template configuration

for example

tanks.vromfs.bin_u/gamedata/gen/templates/weapons/76mm_17pdr_qf.blkx

base_76mm_17pdr_qf{
  item__name:t="guns/76mm_17pdr_qf"
  gun__blk:t="gamedata/gen/weapons/76mm_17pdr_qf.blk"
  gun__shotFreq:r=0.17
  gun__locName:t="76mm_17pdr_qf"

  "gun__ammoSetsInfo:shared:array"{

    "defaultSet:array"{

      "shell:object"{
        blk:t="gamedata/gen/weapons/shells/76mm_17pdr_qf_defaultset.blk"
        name:t="76mm_shot_mk6_ap"
        type:t="ap_tank"
      }
    }

    "76mm_britain_17pdr_HE:array"{

      "shell:object"{
        blk:t="gamedata/gen/weapons/shells/76mm_17pdr_qf_76mm_britain_17pdr_he.blk"
        name:t="76mm_shell_mk1_he"
        type:t="he_frag_tank"
      }
    }

    "76mm_britain_17pdr_APC:array"{

      "shell:object"{
        blk:t="gamedata/gen/weapons/shells/76mm_17pdr_qf_76mm_britain_17pdr_apc.blk"
        name:t="76mm_shot_mk4_apc"
        type:t="apc_solid_medium_caliber_tank"
      }
    }

    "76mm_britain_17pdr_APCBC:array"{

      "shell:object"{
        blk:t="gamedata/gen/weapons/shells/76mm_17pdr_qf_76mm_britain_17pdr_apcbc.blk"
        name:t="76mm_shot_mk8_apcbc"
        type:t="apcbc_solid_medium_caliber_tank"
      }
    }

    "76mm_britain_17pdr_APDS:array"{

      "shell:object"{
        blk:t="gamedata/gen/weapons/shells/76mm_17pdr_qf_76mm_britain_17pdr_apds.blk"
        name:t="76mm_shot_sv_mk1_apds"
        type:t="apds_tank"
      }
    }

    "76mm_britain_Smoke:array"{

      "shell:object"{
        blk:t="gamedata/gen/weapons/shells/76mm_17pdr_qf_76mm_britain_smoke.blk"
        name:t="76mm_shell_ss_mk1"
        type:t="smoke_tank"
      }
    }
  }
}

tankgun_76mm_17pdr_qf{
  _extends:t="tankgun"
  _extends:t="base_tankgun_cannon"
  _extends:t="base_76mm_17pdr_qf"
  _extends:t="gunsound_76mm_17pdr_qf"
  turret__triggerGroup:i=0
}

In the blk file there is all the information you need

4 Likes

Thank you all for the Help! :slight_smile:

3 Likes

my heros.

thank you both @Devenddar @tommyZZM

( and @Scav_Sergei for the interesting question above as well :+1: )

3 Likes

May i ask another thing? there is this cool rain drops on camera effect if you look up while its raining.
How can i make this effect stay all the time, not just when you look up? it is a template so i tried adding it to the level properties, and it now appears also if you look straight down, but not when you look up or straight…

Did you set any properties for Rain?
And yeah… I not very know how to make this effect stay all the time.

1 Like

I found a bigger problem anyways. I want to angle the 53k downwards, so it can shoot down from a higher position… but the stupid physics ruin it. everytime the gun shoots, it pushes the gun back so it looses its placement…

can i make the 53k not moving? so it stays as i angled it and it does not move when it shoots?

You should be able to edit turret pitch and yaw limits same like ammo/reload.

In theory yes. But i didnt test it. Try edit mods properties (At guns May dont have them).
Else… Idk. Use phys from other entities.
Ill later check it.

1 Like

Example: the gun is placed down like this, how could i make it aim lower than currently poissible? or maybe angle it without the physics automatically letting the cannon fall down



Well… No reload or pitch/yaw limits. And only this. This property is not possible to select in editor, becuase its p4.
As result you will need edit scene.blk. Find:

entity{
  _template:t="builded_ussr_towed_at_53k"
  transform:m=[[...][...][...][...]]
}

And put this:

  "turretsInitialComponents:array"{
    "turretsInitialComponents:object"{
      turret__limit:p4=-30,30,-10,30
    }
  }

After transform:m[[...]]. And should be:

entity{
  _template:t="builded_ussr_towed_at_53k"
  transform:m=[[...][...][...][...]]
  "turretsInitialComponents:array"{
    "turretsInitialComponents:object"{
      turret__limit:p4=-30,30,-10,30
    }
  }
}

(Don’t touch numbers inside matrix boxes that in transform).
And yeah. I just tested. Limits works. But I still don’t know about kickback. And how to fix it.

hi,
And how about this guy cannon_germ_20mm_flak38_flakvierling_green_camo
seems gun__shellsAmmo doesnt work here… how to adjust initial ammo here? Thanks

You will need to edit turretsInitialComponents property. Click on + next to property name and add 4 object. After that in each object property need to add gun__shellsAmmo as array and inside need to add integer. Default ammo amount is 60.


Better to edit it for all turrets.

1 Like