[Map] ZOMBİE BUNKER RAİD

code:

Spoiler
entity{
  _template:t="tutorial_placed_medic_box_item+placeable_item_in_world+base_ri_building+paid_medkit_box_use+undestroyable_ri_extra"
  transform:m=[[-0.310965, 0, 0.950421] [0, 1, 0] [-0.950421, 0, -0.310965] [52.3266, 4.93185, 782.337]]
  ri_extra__name:t="dummy_wooden_box_a"
  team:i=1
  medic_box__isOpen:b=yes
  useful_box__maxUseCount:i=99999
  builder_info__team:i=1
  placeable_item__ownerTeam:i=1
  paid_box__ressuplyCost:i=35
  useful_box__uiPrice:i=35
  useful_box__giveItem:t="ger_tnt_block"
  hud_icon__image:t="tnt_charge_icon"
  animchar__res:t="satchel_charge_char"
  useful_box__hintFull:t="items/tnt_block"
}

entity{
  _template:t="tutorial_placed_medic_box_item+placeable_item_in_world+base_ri_building+paid_medkit_box_use+undestroyable_ri_extra"
  transform:m=[[-0.310965, 0, 0.950421] [0, 1, 0] [-0.950421, 0, -0.310965] [53.1602, 5.03099, 779.697]]
  ri_extra__name:t="dummy_wooden_box_a"
  team:i=1
  medic_box__isOpen:b=yes
  useful_box__maxUseCount:i=99999
  builder_info__team:i=1
  placeable_item__ownerTeam:i=1
  paid_box__ressuplyCost:i=10
  useful_box__uiPrice:i=35
  useful_box__giveItem:t="tnt_block_exploder"
  hud_icon__image:t="tnt_charge_icon"
  animchar__res:t="sov_pm_2_char"
  useful_box__hintFull:t="items/tnt_block_exploder"
}

The last thing I want to ask is how can I add a fully automatic mode to a semi-automatic weapon? I can have both, I only need to add a fully automatic mode.
I have to do this without changing the animchar

1 Like

Config about it in gun__firingModes property and gun__firingModeNames contains names for each modes. Probably code for you weapon entity will looks like:

  "gun__firingModes:array"{

    "mode:object"{
      modeType:t="automatic"
    }

    "mode:object"{
      modeType:t="burst"
      burstSize:i=1
    }
  }

  "gun__firingModeNames:array"{
    mode:t="full_auto"
    mode:t="semi_auto"
  }
1 Like

I did it like this but it didn’t work
I will try the code you gave now.

Spoiler
entity{
  _template:t="blaster_germany_gun_item+item_in_world+visibility_traceable_item"
  transform:m=[[0.258819, -0.965925, 0] [0.965926, 0.258819, 0] [-0, 0, 1] [52.8383, 5.10904, 780.411]]
  useful_box__hintFull:t="Valken-38E"
  item__name:t="Valken-38E"
  gun__locName:t="Valken-38E"
  animchar__res:t="fg_42_with_grenade_launcher_char"
  gun__firingModeName:t="semi_auto_4_shots"
  gun__overheatPerShot:r=0.01
  gun__overheatReduce:r=0.012
  gun__overheatReduceOnOverheat:r=0.15

  "customProps:object"{
    "initialComponents:object"{
      gun__overheatReduceOnOverheat:r=0.15
      gun__shotFreq:r=9.6
      item__name:t="Valken-38E"
      gun__kineticDamageMult:r=10.8
      gun__altReloadTime:r=3.25
      gun__reloadTime:r=3.8
      animchar__res:t="fg_42_with_grenade_launcher_char"
      item__userstats__pickupName:t="Valken-38E"
      gun__overheatReduce:r=0.012
      gun__overheatPerShot:r=0.01
    }
  }

  "gun__firingModes:array"{
    "gun__firingModes:object"{
      burstSize:i=4
      modeType:t="burst"
    }

    "gun__firingModes:object"{
      modeType:t="automatic"
    }
  }

  "gun__firingModeNames:array"{
    gun__firingModeNames:t="semi_auto_4_shots"
    gun__firingModeNames:t="automatic"
  }
}

You add it in scene, but not in entities. IIRC it works only in entities else will crash. Also you need all changes inside customProps (except gun__locName and item__name).

Probably it will be muuuch better if you create seperate entity instead do changes in scene, because these changes make scene a bit more heavier.

1 Like

I didn’t know this, so how do I do it?
Should I make it like I did the zombie guns?

Here is guide: [Guide] Entity Modding (Entites.BLK)

1 Like

thank you man, i will try to do this

I can give you my M16A4 code that is a modified M4A1 gun

1 Like

that would be great

If you want use blaster weapon then probably code will be looks like:

valken_38e_gun{
  _use:t="blaster_germany_gun"

  animchar__res:t="fg_42_with_grenade_launcher_char"

  gun__shotFreq:r=9.6
  gun__reloadTime:r=3.8
  gun__altReloadTime:r=3.25
  gun__kineticDamageMult:r=10.8
  gun__overheatPerShot:r=0.01
  gun__overheatReduce:r=0.012
  gun__overheatReduceOnOverheat:r=0.15
  gun__firingModeName:t="semi_auto_4_shots"
  gun__locName:t="Valken-38E"
  item__name:t="Valken-38E"

  item__template:t="valken_38e_gun_item"

  "gun__firingModes:array"{
    "gun__firingModes:object"{
      burstSize:i=4
      modeType:t="burst"
    }

    "gun__firingModes:object"{
      modeType:t="automatic"
    }
  }

  "gun__firingModeNames:array"{
    gun__firingModeNames:t="semi_auto_4_shots"
    gun__firingModeNames:t="automatic"
  }
}

valken_38e_gun_item{
  _use:t="blaster_germany_gun_item"

  animchar__res:t="fg_42_with_grenade_launcher_char"
  item__weapTemplate:t="valken_38e_gun"
  item__name:t="Valken-38E"
}

Probably. All weapons changes inside new entities.

1 Like

Here

m16a4_zombie_gun{
_use:t=“m4_gun”
_use:t=“gun_with_initial_ammo”
_use:t=“paid_loot_ressuply”
item__template:t=“m16a4_zombie_gun_item”
item__weapTemplate:t=“m16a4_zombie_gun”
paid_loot__ressuplyCost:i=150
“gun__firingModes:array”{

“mode:object”{
modeType:t=“burst”
burstSize:i=3
}
“mode:object”{
modeType:t=“burst”
burstSize:i=1
}
}
“gun__firingModeNames:array”{
mode:t=“semi_auto_3_shots”
mode:t=“semi_auto”
}
gun__locName:t=“M16A4”
item__name:t=“M16A4”
}

m16a4_zombie_gun_item{
_use:t=“item_gun”
_use:t=“m16a4_zombie_gun”
collres__res:t=“m4_collision”
_group{
_tags:t=“server”

"gun__initialAmmoHoldersCount:list<i>"{
  item:i=6

}

}

}

1 Like

dude, you are incredible, thank you very much.
I will try now

Dude, publish your code as preformatted text if you want, otherwise it looks confusing.
by the way thank you for the code

1 Like

Sorry, my mobile device just doesn’t type the normal ‘’’
So it doesn’t work.

1 Like

No problem buddy, you can share the code whenever you want.

You are welcome, all the codes on my 3 maps are open-sourced and you can download, modify, and reuse freely. You can find the link to my google drive at one of my post of my maps at forum and sandbox

1 Like

I added an automatic fire mode option to the m16a4 code you made. If you want, you can add this weapon to your own mod, it will be much better.

code:

Spoiler
m16a4_zombie_gun{
  _use:t="m4_gun"
  _use:t="gun_with_initial_ammo"
  _use:t="paid_loot_ressuply"
  item__template:t="m16a4_zombie_gun_item"
  item__weapTemplate:t="m16a4_zombie_gun"
  gun__kineticDamageMult:r=1.25
  gun__reloadTime:r=2.57
  paid_loot__ressuplyCost:i=270
  "gun__firingModes:array"{
    
	"mode:object"{
	  modeType:t="burst"
	  burstSize:i=3
	}
	"mode:object"{
	  modeType:t="burst"
	  burstSize:i=1
	}
        "mode:object"{
	  modeType:t="automatic"
	}
	}
    "gun__firingModeNames:array"{
	  mode:t="semi_auto_3_shots"
	  mode:t="semi_auto"
          mode:t="automatic"
    }
	gun__locName:t="M16A4"
	item__name:t="M16A4"
}

m16a4_zombie_gun_item{
  _use:t="item_gun"
  _use:t="m16a4_zombie_gun"
  collres__res:t="m4_collision"
  _group{
    _tags:t="server"

    "gun__initialAmmoHoldersCount:list<i>"{
      item:i=10
	
    }
  }
}

I know how to do that but i thought m16A4 only has 3 round burst in real life?
Or just another call of duty inaccuracy

1 Like

The m16a2 actually has 3 different modes. The code I made looks similar to the m16a2 weapon, but I have no information about the m16a4 weapon, I have never held it in my hand and examined it.
I looked at the m16a4 gun on the internet and it does not have a full automatic mode.

Some of the weapons I made for Random Box can be used by modders.

Spoiler

random box and wall guns.txt (51.6 KB)

1 Like