so…
i wanted to create a “new” types of grenade launchers through entities.
more precisely, make an m1 garand with HE rifle frag grenades ( opposed as the default AP ), and another M1 with smoke rifle grenades.
problem is, i don’t really know what to precisely do.
let alone changing even the type of the rifle grenade.
so, what i tried to do, was to copy the properties of the M7, and change them to accomodate the M1_grenade_launcher which it’s based on the M1903 USMC grenade launcher, which does have the HE rifle grenades. ( that is, correct and historical shape of what would have been largely used on the m1 for grenadiers of the us army )
code
m1_garand_with_grenade_launcher_gun_item{
_use:t="main_weap_slots"
_use:t="ironsights_open_semiauto"
animchar__res:t="m1_garand_grenade_launcher_m7_char"
gun__blk:t="content/enlisted/gamedata/weapons/m1_garand_grenade_launcher_m7.blk"
item__template:t="m1_garand_with_grenade_launcher_gun_item"
item__proto:t="content/enlisted/gamedata/weapons/m1_garand_grenade_launcher_m7.blk"
item__locDetails:t="7.62x33mm;"
item__id:i=0
item__weapTemplate:t="m1_garand_grenade_launcher_m7_gun"
item__name:t="items/m1_garand_grenade_launcher_m7"
item__weapType:t="semiauto"
item__weight:r=4.3
gun__locName:t="M1 Garand with grenade launcher M7"
gun__statName:t="semiauto"
gun__sightsDistance:r=0.05
gun__shotFreq:r=5.333
gun__automaticReload:b=no
gun_spread__maxDeltaAngle:r=0.28
gun_deviation__omegaRange:p2=30.0, 90.0
gun_deviation__omegaDevInc:p2=0.1, 0.6
gun_deviation__movementRange:p2=2.1, 4.0
gun_deviation__movementDevInc:p2=0.0, 15.0
gun_deviation__onShotDeviationChange:r=0.0
gun_deviation__shotTau:r=0.1
gun_deviation__extraDeviationTau:r=0.3
gun_deviation__maxDeviation:r=25.0
gun__reloadTime:r=2.9
gun__altReloadTime:r=3.4
gun__showChamberedAmmo:b=no
gun__boltFreq:r=7.0
gun__kineticDamageMult:r=1.06
"gun__ammoHolders:array"{
ammoHolders:t="m1_garand_magazine"
}
"gun__shells:array"{
shells:t="content/enlisted/gamedata/weapons/bullets/30_06_springfield_semiauto.blk"
}
"gun__firingModes:array"{
"mode:object"{
modeType:t="burst"
burstSize:i=1
}
}
"gun__firingModeNames:array"{
mode:t="semi_auto"
}
}
m1_garand_with_grenade_launcher_gun{
_use:t="equipable_gun"
_use:t="semiauto_ww2_preset"
_use:t="mgun_gun_shot_dry_sound"
_use:t="rifle_gun_aim_sound"
_use:t="m1_garand_grenade_launcher_m7"
_use:t="rifle_muzzle_preset"
_use:t="hit_effect_group_8_12mm"
gun_shell_ejection__timeMult:r=0.35
gun__standOffset:p3=0.2, 0.05, 0.15
gun__crouchOffset:p3=0.2, -0.07, 0.25
gun__length:r=0.4
gun__recoilAmount:r=0.138
gun__recoilDirAmount:r=0.76
gun__recoilDir:r=0.35
gun__visualRecoilMult:r=0.7
gun_attach__slot:t="weapon"
meleeSoundType:t="rifle"
"gun_sound__shotPath:shared:object"{
_tags:t="sound"
path:t="/weapon/rifle/m1"
}
"sound_irqs:shared:object"{
_tags:t="sound"
"reload1:object"{
path:t="/weapon/rifle/m1/reload1/change_ammo"
}
"reload2:object"{
path:t="/weapon/rifle/m1/reload2/change_ammo"
}
"reload3:object"{
path:t="/weapon/rifle/m1/reload3/change_ammo"
}
"boltAction:object"{
path:t="/weapon/rifle/m1/bolt_action"
}
"modActivate:object"{
path:t="/weapon/antivehicle/mortyr_grenade_launcher/mod_activate"
}
"modDeactivate:object"{
path:t="/weapon/antivehicle/mortyr_grenade_launcher/mod_deactivate"
}
"modReload:object"{
path:t="/weapon/antivehicle/mortyr_grenade_launcher/mod_reload"
}
}
"gun_mods__slots:object"{
"grenade_launcher:object"{
m1_grenade_launcher:t="m1_grenade_launcher"
}
}
"gun__mountPoints:shared:array"{
"point:object"{
type:t="rest"
recoil:r=0.65
offset:p3=0.68, 0.005, -0.005
}
}
}
garand_with_grenade_launcher_gun{
_use:t="m1_garand_with_grenade_launcher_gun"
_use:t="m1_garand_with_grenade_launcher_gun_item"
"gun_mods__slots:object"{
"grenade_launcher:object"{
m1_grenade_launcher:t="m1_grenade_launcher"
}
}
}
but… it doesn’t work.
it tells me that the m1_gr[…] is not allowed in the slot tags, only the m7.
but… how do i change that
as far as i’m aware, nor the proto or the actual referential blks or what have you contains those slots tags.
not even in the grenade it self for rifles
m1_garand_grenade_launcher_m7_gun.blkx code
stat_name:t="semiauto"
selWeaponVar:t="m1_garand_grenade_launcher_m7"
ownerAnimVars{
reye_offset_fwd0:r=-0.1
gun_offset_along:r=0.1
gun_offset_across:r=0.02
gun_offset_up:r=0.0
}
gunFlash{
gunFx_main{
fx:t="muzzle_flash"
scale:r=0.04
}
gunFx_add_1{
fx:t="side_muzzle_flash"
scale:r=0.02
}
gunFx_add_2{
fx:t="side_muzzle_flash"
scale:r=0.02
}
gunFx_add_3{
fx:t="side_muzzle_flash"
scale:r=0.02
}
gunFx_add_bolt{
fx:t="side_muzzle_flash"
scale:r=0.01
}
}
nor the actual grenades
m2
mass:r=0.59
momentOfInertia:p3=0.04, 0.008, 0.04
caliber:r=0.03
speed:r=65.0
speedPitch:r=1.5
maxDistance:r=6.0
physMat:t="grenadeRay"
useFutureContacts:b=yes
frictionGround:r=0.5
bullets:i=1
noSleepAtTheSlopeCos:r=0.766
logCCD:b=no
entityTemplate:t="m2_rifle_grenade_phys"
entityPhysTemplate:t="m2_rifle_grenade_phys"
explosiveType:t="tnt"
explosiveMass:r=0.031
visual{
template:t="m2_rifle_grenade_item+item_in_world"
}
collisionResource{
props{
volumeBox:t="box"
}
}
ccdSpheres{
ccd:p4=0.05, 0.0, 0.0, 0.015
ccd:p4=0.2, 0.0, 0.0, 0.015
ccd:p4=-0.05, 0.0, 0.0, 0.015
}
splashDamage{
radius:p2=1.0, 10.0
penetration:p2=15.0, 2.0
damage:r=20.0
dmgOffset:p3=0.0, 0.25, 0.0
}
explFx{
fxScale:p2=0.8, 0.9
effectTemplName:t="explosion_effect_small+disable_effect_sfx"
}
explSound{
explSoundPath:t="impact/grenade"
}
damage{
explosive{
strengthEquivalent:r=1.0
brisanceEquivalent:r=1.0
}
}
solver{
energyConservation:r=0.85
}
has anyone managed to find a solution or… suggests what i should do ?
if not, oh well. thanks anyway.