How can i place mines in mods?

I would like to know how to add mines that can kill both teams. Is it possible?

1 Like

this is what you are looking for.

additionally, you can also make explosives barrels ( or any rendinst that can be destroyed ) to shoot at

but you’ll need to tweak the bullets parameter force as you will need more than 4 bullets to destroy it.

entity{
  _template:t="game_rendinst_decor+it_antitank_mine+placeable_item_in_world"
  transform:m=[[-0.651184, 0, 0.75892] [0, 1, 0] [-0.75892, 0, -0.651184] [425.193, 5.11664, 169.383]]
  placeable_item_placeTm:m=[[-7.76272e-08, -1, 9.04703e-08] [0.75892, 3.55271e-15, 0.651184] [-0.651184, 1.19209e-07, 0.75892] [-77.4649, 5.01075, -165.979]]
  grid_obj__gridType:t="interactable"
  ri_extra__name:t="metal_barrel_a"
  ri_extra__overrideHitPoints:i=0
}

once again, let’s praise our lord and savior j- @Devenddar

9c4b86364f616c3d041208c4bf36d2da5b206f69_2_450x450

2 Likes

If you want a mine that affects both teams, use this code and replace the transform part with a reference coordinate you made.

code:

entity{
_template:t=“ger_antipersonnel_mine+controllable_hero_item+placeable_item_in_world”
transform:m=[[0.998558, -0.0492495, 0.021355] [0.0536801, 0.916141, -0.397247] [-0, 0.39782, 0.917463] [472.728, 9.2694, -820.729]]
}

1 Like


I tried placing the mine but it didnt appear. It only tells me that it has been created but i can see it anywhere

1 Like

It happened because that you didn’t set team. By default it always -1.

It’s because you didn’t added postfixs inside Template postfix. For spawn mine enough to write there +placeable_item_in_world.

To make it shootable you will need to write interactable in grid_obj__gridType and transform numbers in placeable_item_placeTm.

1 Like

Let me introduce two ways to do this

Option1. Place one by one by copy the existed mine in editor

this way you can place each mine one by one.

first you have to create a mine place by player from his character’s hand (which may finish some game code logic which can’t directly set in the properties panel)

  1. place a weapon and change this property to any mine you want

its just temptory, you pick it up then you get a mine on your hand. its default replace to the primary weap slot, but its okay. what ever you get a mine on your hand

  1. pickup it up and place it

then you can select it before the cooldown were done

change its team to 3

image

  1. shift and copy and move your mines everywhere you want.

Press shift+ (axis move) to copy things

remember to keep its team as 3

delete the temptory object you create in step1. they dont need to save to the scene.

then save the scene.

reload, drive a car on it, works~

image

done


Patch Option1.1

entity{
  _template:t="ussr_antitank_mine+disable_item_drop+placeable_item_in_world"
  // transform:m=[]
  placeable_item__ownerTeam:i=3
}

put anything some where then replace its _template and properties as this…

so simple!

its a ussr_antitank_mine

and you can add placeable_item_placeTm



Option2. Advanced, Define new entity

use entities.blk to define a new type of mine object.

similar to option1, we just define a new object which is placeable mine from entites list.

which can make you share you work by these blk code texts to orther players more easy

big_action_base_mine_item_preset_in_world{
  _extends:t="placeable_item_in_world"
  _extends:t="melee_weapon"
  _extends:t="placeable_item"
  _extends:t="replicating"
  _extends:t="base_hitpoints"
  _extends:t="base_dm_parts"
  weap__sprintLerpFactor:r=1.0
  animchar__res:t="antitank_mine_char"
  collres__res:t="antitank_mine_collision"
  animchar_render__enabled:b=yes
  item__template:t="base_mine_item_gun"
  item__weapTemplate:t="base_mine_item_gun"
  item__name:t="items/antitank_mine"
  item__weapType:t="mine"
  item__weight:r=0.5
  melee_weapon__blk:t="content/enlisted/gamedata/weapons/building_tool_gun.blk"
  gun__locName:t="antitank_mine"
  gun__reloadable:b=no
  _tracked:t="gun__owner"
  _tracked:t="mine__activated"
  _tracked:t="mine__blockedToTime"
  _replicated:t="gun__owner"
  _replicated:t="mine__activated"
  _replicated:t="mine__blockedToTime"
  mineActivatorTemplate:t="antipersonnel_mine_activator"
  activationRadius:r=1.5
  // mine__installBlockTime:r=5.0
  mine__installBlockTime:r=16.0
  mine__blockedToTime:r=-1.0
  mine__activated:b=no
  nextCheckTriggerAtTime:r=-1.0
  checkTriggerInterval:r=0.1
  material:t="steel"
  needsBlood:b=no
  unit_indicator__noRadar:b=yes
  meleeSoundType:t=""
  grid_obj__gridType:t="interactable"
  grid_obj__fixedTmScale:r=-1.0
  hitpoints__hp:r=10.0
  hitpoints__maxHp:r=10.0
  hitpoints__hpRecoverySpd:r=0.0
  hitpoints__hpThreshold:r=0.0
  hitpoints__stoppingPower:r=0.0
  hitpoints__shellDmgMult:r=0.075
  hitpoints__shellSplashDmgMult:r=0.075

  grid_obj{
  }

  "item__weapSlots:array"{
    slot:t="special"
  }

  "itemInWeaponSlot:tag"{
  }

  collres{
  }

  "gun__owner:eid"{
  }

  "net__notInInitialScope:tag"{
  }

  "specialWeapItem:tag"{
  }

  "disableMelee:tag"{
  }

  "mine_activation_zone__initEids:list<eid>"{
  }

  "engeneer_mine:tag"{
  }

  "dm_parts__parts:object"{

    "mine_b_collision04:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }

    "mine_b_collision05:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }

    "mine_b_collision06:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }
  }

  "allow_friendly_damage:tag"{
  }

  "killer:eid"{
  }

  _group{
    ui__geom_node_idx:i=-1
    ui__node_pos:p3=0.0, 0.0, 0.0
    ui__geom_node_name:t="weaponRoot"
    _tags:t="ui"
  }
}

big_action_antitank_mine_preset_in_world{
  _extends:t="big_action_base_mine_item_preset_in_world"
  animchar__res:t="tellermine_35_char"
  collres__res:t="tellermine_35_collision"
  mineActivatorTemplate:t="antitank_mine_activator"
  melee_weapon__blk:t="content/enlisted/gamedata/weapons/mines/antitank_mine_item_gun.blk"
  gun__locName:t="antitank_mine"
  item__name:t="items/antitank_mine"
  item__template:t="antitank_mine_item_gun"
  item__weapTemplate:t="antitank_mine_item_gun"
  item__mineType:t="antitank_mine"
  item__weight:r=8.5
  item__iconScale:r=1.1
  item__iconRoll:r=30.0
  item__iconYaw:r=45.0
  shell_explosion_fx__infoTemplate:t="hit_effect_group_antitank_mine_explosion"
  shell__waterImpactFx:t="hit_water_medium_effect"

  "ui__placeableItemMarker:tag"{
    _tags:t="ui"
  }

  "mine_activation__delay:r"{
    _tags:t="server"
    value:r=0.1
  }

  "vehicleTriggerable:tag"{
  }

  "dm_parts__parts:object"{

    "colBox:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }
  }
}

big_action_antipersonnel_mine_preset_in_world{
  _extends:t="big_action_base_mine_item_preset_in_world"
  animchar__res:t="sprengmine_35_char"
  collres__res:t="sprengmine_35_collision"
  mineActivatorTemplate:t="antipersonnel_mine_activator"
  melee_weapon__blk:t="content/enlisted/gamedata/weapons/mines/antipersonnel_mine_item_gun.blk"
  gun__locName:t="antipersonnel_mine"
  item__name:t="items/antipersonnel_mine"
  item__template:t="antipersonnel_mine_item_gun"
  item__weapTemplate:t="antipersonnel_mine_item_gun"
  item__mineType:t="antipersonnel_mine"
  item__weight:r=4.0
  activationRadius:r=1.4
  shell_explosion_fx__infoTemplate:t="hit_effect_group_antipersonel_mine_explosion"
  shell__waterImpactFx:t="hit_water_medium_effect"

  "ui__placeableItemMarker:tag"{
    _tags:t="ui"
  }

  "mine_activation__delay:r"{
    _tags:t="server"
    value:r=0.5
  }

  "vehicleTriggerable:tag"{
  }

  "humanTriggerable:tag"{
  }

  "dm_parts__parts:object"{

    "volumeBox_1:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }

    "volumeBox_2:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }
  }
}

big_action_ussr_antipersonnel_mine_pomz2_item{
  _extends:t="big_action_antipersonnel_mine_preset_in_world"
  animchar__res:t="pomz_2_mine_char"
  collres__res:t="pomz_2_mine_collision"
  melee_weapon__blk:t="content/enlisted/gamedata/weapons/mines/ussr_antipersonnel_mine.blk"
  item__template:t="ussr_antipersonnel_mine"
  item__weapTemplate:t="ussr_antipersonnel_mine"
  item__weight:r=4.0
  placeable_item__additionalHeight:r=-0.04
  additiveUp:p3=0.0, 1.0, 0.0
  additiveTm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 0.0]]
  placeable_item__ownerTeam:i=3

  "dm_parts__parts:object"{

    "volumeBox_1:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }

    "volumeBox_2:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }
  }
}

big_action_ussr_antitank_mine_tm_41_item{
  _extends:t="big_action_antitank_mine_preset_in_world"
  animchar__res:t="tm_41_char"
  collres__res:t="tm_41_collision"
  melee_weapon__blk:t="content/enlisted/gamedata/weapons/mines/ussr_antitank_mine.blk"
  item__template:t="ussr_antitank_mine"
  item__weapTemplate:t="ussr_antitank_mine"
  item__weight:r=8.5
  placeable_item__additionalHeight:r=0.07
  additiveUp:p3=0.0, 1.0, 0.0
  additiveTm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 0.0]]
  placeable_item__ownerTeam:i=3

  "dm_parts__parts:object"{

    "volumeBox_01:object"{
      dmgMult:r=1.0
      armor:r=0.0
    }
  }
}

and you can make a buildable minefield too

some codes~

big_action_ussr_antipersonnel_mine_field{
  _extends:t="base_ri_building"
  ri_extra__name:t="graveyard_cross_wood_c"
  team:i=-1
  building_destroy__maxTimeToDestroy:r=36.0
  building_menu__text:t="Mine Field"
  building_menu__image:t="item_antitank_mine"
  minimap__visibleRadius:r=600.0
  minimap__visibleForAll:b=yes
  // user_point__icon:t="item_antitank_mine"

  "additiveBuildingEid:eid"{
  }

  "additiveBuildings:array"{

    "item:object"{
      template:t="big_action_ussr_antipersonnel_mine_marker_depends"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.01, 6.3]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

    "item:object"{
      template:t="big_action_ussr_antitank_mine_tm_41_item_depends_team1"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.1, 3.6]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

    "item:object"{
      template:t="big_action_ussr_antipersonnel_mine_pomz2_item_depends_immediately"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [0.0, 0.0, 3.36]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

    "item:object"{
      template:t="big_action_ussr_antipersonnel_mine_pomz2_item_depends"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [-2.6, -0.01, 2.0]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

    "item:object"{
      template:t="big_action_ussr_antipersonnel_mine_pomz2_item_depends_team1"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [-1.7, -0.01, 3.39]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

    "item:object"{
      template:t="big_action_ussr_antipersonnel_mine_pomz2_item_depends"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [2.6, 0.01, 2.0]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

    "item:object"{
      template:t="big_action_ussr_antipersonnel_mine_pomz2_item_depends_team1"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [1.66, -0.01, 3.41]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

    "item:object"{
      template:t="big_action_ussr_antipersonnel_mine_pomz2_item_depends"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [-1.66, 0.0, 5.0]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

    "item:object"{
      template:t="big_action_ussr_antipersonnel_mine_pomz2_item_depends"
      tm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [1.66, 0.0, 5.0]]
      additiveUp:p3=0.0, 1.0, 0.0
    }

  }
}


Oh I forgot to read replies detaily, I think pervious responder above already included all the information

3 Likes