So im trying to make the 2 inch mortar be a mini nuke, yet is hard coded to be a 2 inch mortar obv

so yeah, and no, i didnt make a mistake, i literally only changed a couple of things, the first, make the 2 inch mortar have 5k ammo and no recoil, the second, make the HE shell of the 2 inch mortar be a mini nuke, obv only the ammo and recoil change worked, here is the codes for both the changes:

entities.blk:

two_inch_mortar_gun{
_override:b=yes
gun__reloadTime:r=0.1
gun__altReloadTime:r=0.1
weap__sprintLerpFactor:r=1.0
gun__recoilAmount:r=0.0
gun__recoilDirAmount:r=0.0
gun__recoilDir:r=0.0
gun__visualRecoilMult:r=0.0
gun__recoilControlMult:r=0.0
gun__recoilOffsMult:r=0.0
}

two_inch_mortar_magazine{
_override:b=yes
_use:t=“infinite_magazine”
ammo_holder__templateName:t=“two_inch_mortar_magazine”
ammo_holder__ammoCount:i=5000
}

two_inch_he_shell.blk:

mass:r=0.95
caliber:r=0.05
bullets:i=1
bullets:i=1
speed:r=500.0
speedDispersion:r=0.0
momentOfInertia:p3=0.04, 0.008, 0.04
physMat:t=“walkRay”
useFutureContacts:b=yes
logCCD:b=no
explosiveType:t=“tnt”
explosiveMass:r=50000
entityTemplate:t=“two_inch_he_shell_phys”
reloadTime:r=3.6

collisionResource{

props{
volumeBox_1:b=yes
}
}

ccdSpheres{
ccd:p4=0.0, 0.0, 0.0, 0.015
}

splashDamage{
radius:p2=5000.0, 5000.0
penetration:p2=15.0, 2.0
damage:r=10000.0
dmgOffset:p3=0.0, 0.0, 0.0
}

explFx{
fxScale:p2=1.8, 1.9
effectTemplName:t=“mine_explosion_effect_medium+disable_effect_sfx”
}

shellSound{
explosionPath:t=“impact/mine”
}

visual{
template:t=“two_inch_he_shell_item+item_in_world”
}

stuff i did to try to fix the issue:
put the HE shell code into entites.blk file, so i obv did it in the entities.blk file format:

two_inch_he_shell{
_override:b=yes
[rest of the code]
}

it didnt work, than i tried to put the code in the scene.blk file, same thing in entities.blk format, just, in the scene.blk file instead of entities.blk file, this also didnt work

@Devenddar @Bazsi37 do you know what to do to fix this issue??

I mean you can use the code from the Joe Chamberlain gun that I made, based on the BM-41

qf_105mm_naval_gun{
  _use:t="bm_41_mortar_gun"
  item__weapTemplate:t="qf_105mm_naval_gun"
  item__template:t="qf_105mm_naval_gun_item"
  gun__shotFreq:r=1.0
  animchar__res:t="mortar_bm_41_char"
  item__name:t="QF 4.7 in Mk I – IV Naval Gun 'Joseph Chamberlain'"
  gun__locName:t="QF 4.7 in Mk I – IV Naval Gun 'Joseph Chamberlain'"
  gun__blk:t="%ugm/qf_105mm_naval.blk"
  item__proto:t="%ugm/qf_105mm_naval.blk"
  collres__res:t="bm_41_mortar_collision"
  gun__kineticDamageMult:r=2.0  
  
  "gun__ammoHolders:array"{
    gun__ammoHolders:t="105_shell_item"
  }
  "gun__shells:array"{
    shells:t="%ugm/qf12shell.blk"
  }
  
}

qf_105mm_naval_gun_item{
  _use:t="mortar_gun_base"
  _use:t="bm_41_mortar_gun"
  _use:t="mortar_muzzle_preset"
  _use:t="antivehicle_gun_aim_sound"
  animchar__res:t="mortar_bm_41_char"
  item__weapTemplate:t="qf_105mm_naval_gun"
  item__template:t="qf_105mm_naval_gun_item"
  collres__res:t="bm_41_mortar_collision"
  item__name:t="QF 4.7 in Mk I – IV Naval Gun 'Joseph Chamberlain'"
  gun__locName:t="QF 4.7 in Mk I – IV Naval Gun 'Joseph Chamberlain'"
  
  
  "gun__ammoHolders:array"{
    gun__ammoHolders:t="105_shell_item"
  }
  "gun__shells:array"{
    shells:t="%ugm/qf12shell.blk"
  }
}


105_shell_item{
  _use:t="mine_o832_item_base"
  item__template:t="mine_o832_item"
  item__proto:t="content/enlisted/gamedata/weapons/shells/mine_o832.blk"
  item__shell:t="%ugm/qf12shell.blk"
  ammo_holder__iconName:t="ui/skin#mortar_he.svg"
  ammo_holder__templateName:t="mine_o832_item"
}


105_shell_phys{
  _use:t="mine_o832_phys_base"
  phys_obj_net_phys__blk:t="content/enlisted/gamedata/weapons/shells/mine_o832.blk"
  shell_explosion_fx__infoTemplate:t="hit_effect_group_ampula_explosion"

  "shell__concussionMaxRadius:r"{
    value:r=3.6
    _tags:t="server"
  }
}
1 Like

i cant spawn the mortar, how do i spawn it, also give me qf_105mm_naval.blk and also MAKE UR MOD WORK!