assign or make a new turret for it use turret_control__turretInfo
or use turretsInitialComponents
to patch it
"turret_control__turretInfo:shared:array"{
"turret_control__turretInfo:object"{
turretName:t="turret_01"
gun:t="builded_sg_gun+tankgun_25mm_72k"
}
}
not formatted …
"turretsInitialComponents:array"{
"turretsInitialComponents:object"{
"gun__ammoSetsInfo:shared:array"{
"defaultSet:array"{
"shell:object"{
blk:t="gamedata/gen/weapons/shells/25mm_72k_defaultset_bullet_1.blk"
name:t="25mm_br_132"
type:t="ap_t"
}
"shell:object"{
blk:t="gamedata/gen/weapons/shells/25mm_72k_defaultset_bullet_2.blk"
name:t="25mm_ozr_132"
type:t="frag_i_t"
}
}
}
}
}
2 Likes
i guess you may have to make a new turret entity to get rid of this error maybe need some test
2 Likes
Yeah. Engineer tools just not visible in weapons /equipment /other items , but you can find it in all and add +item_in_world before creating it (need to use with _item in name).
Box with resources works fine if you add medkit paid loot. Here is scene code:
entity{
_template:t="base_fortification_build+tutorial_engineer_resource_box+paid_medkit_box_use+undestroyable_ri_extra+"
transform:m=[[-1, 0, -8.74228e-08] [0, 1, 0] [8.74228e-08, 0, -1] [-503.122, 48.3202, 2195.38]]
ri_extra__name:t="ammunition_box_piles_f"
useful_box__maxUseCount:i=999999
animchar_render__enabled:b=no
paid_box__ressuplyCost:i=125
useful_box__uiPrice:i=125
builder_info__team:i=1
buildingRadius:r=1
team:i=1
}
Or… Just write +tutorial_engineer_resource_box+paid_medkit_box_use+undestroyable_ri_extra in Template Postfix and create base_fortification_build .
Need to remove tag. In other words… Recreate entities. Here is code:
test_building_tool{
_use:t="melee_weapon"
builder__shootPressed:b=no
nextTryToSetObjectInTime:r=-1.0
autoTryBuildingObjectInterval:r=3.0
engineerBuildingSpeedMul:r=2.0
gun__reloadable:b=no
animchar__res:t="hammer_char"
item__iconYaw:r=145.0
item__name:t="items/building_tool"
meleeSoundType:t="buildingTool"
_tracked:t="previewEid"
"item__weapSlots:array"{
slot:t="secondary"
}
"buildingTool:tag"{
}
"itemInWeaponSlot:tag"{
}
"previewEid:eid"{
}
}
test_building_tool_gun{
_use:t="test_building_tool"
_use:t="replicating"
_tracked:t="gun__owner"
_replicated:t="gun__owner"
_replicated:t="currentPreviewId"
buildingInterval:r=0.0
nextBuildingAtTime:r=0.0
additionalBuildingTemplate:t="network_fortification_preview"
currentPreviewId:i=0
fortification__rayMatId:i=-1
fortification__rayMatName:t="engineerRay"
minBuildingRadius:r=1.5
animchar__res:t="hammer_char"
gun__blk:t="content/enlisted/gamedata/weapons/building_tool_gun.blk"
gun__canAim:b=no
item__template:t="test_building_tools_item"
animchar_render__enabled:b=yes
item__proto:t="content/enlisted/gamedata/weapons/building_tool_gun.blk"
item__weapTemplate:t="test_building_tool_gun"
item__iconRoll:r=43.0
item__iconYaw:r=0.0
item__iconPitch:r=83.0
item__name:t="items/hammer"
item__weapType:t="building_tool"
item__weight:r=0.5
melee_weapon__blk:t="content/enlisted/gamedata/weapons/building_tool_gun.blk"
gun__locName:t="Hammer"
gun__statName:t="melee"
gun__reloadable:b=no
weap__sprintLerpFactor:r=1.0
melee_weapon__attackAt:r=0.4
melee_weapon__attackTime:r=1.0
"item__id:i"{
value:i=0
_hide:b=yes
}
"gun__owner:eid"{
}
"net__notInInitialScope:tag"{
}
"previewTemplate:list<t>"{
template:t="ger_rallypoint_preview"
template:t="ammunition_box_a_preview"
template:t="czech_hedgehog_a_preview"
template:t="barbedwire_engineer_a_preview"
template:t="sandbags_wall_2_preview"
template:t="cannon_germ_20mm_flak38_preview"
template:t="cannon_ussr_towed_at_53k_preview"
template:t="cannon_germ_towed_at_pak38_preview"
template:t="sandbags_wall_mg_preview"
}
"buildingLimits:list<i>"{
limit:i=1
limit:i=3
limit:i=6
limit:i=10
limit:i=10
limit:i=2
limit:i=1
limit:i=1
limit:i=1
}
}
test_building_tools_item{
_use:t="item_melee"
_use:t="test_building_tool_gun"
collres__res:t="construction_hammer_collision"
item__userstats__pickupName:t="pickup_building_tool"
}
2 Likes
Thank you @Devenddar , the lord and savior of this community
1 Like
find_vehicle_obstacles: nav obstacle without tile cache enabled
This error still happens with @tommyZZM 's codes added
It happens when the builded_auto_turret tries to shoot zombies through a wall or floor
Also the turret always aim higher than the target after adding the code
Maybe need to ask @Devenddar how to fix both issues
1 Like
It blows my mind that this still works
If you want to unlock structures (anti-tank/anti-air cannon, machineguns and e.t.c.) for custom profile squad then you need to add "engineerUnlocks" : [ X ], or "engineerUnlocks" : [ X, X ] to squad (X is building slot that locked. IIRC it can be between 1 and 5) and engineer tool to any soldier in squad.
If you want to just give new structures for old squads and e.t.c. Then you will need to code it. Need to edit entities.blk file. Need to change …_tool_gun /…_tool_award_gun entities and buildi…
I changed _extends to _use as i have read before on other posts
1 Like
My code is here. It kind of works for my zombie map. (except the nav error that the moon turret throws)
// Engineer's hammer section
// Forum post: https://forum.enlisted.net/en/t/142979/ (Thank you! @Bazsi37 @tommyZZM @Devenddar)
test_building_tool{
_use:t="melee_weapon"
builder__shootPressed:b=no
nextTryToSetObjectInTime:r=-1.0
autoTryBuildingObjectInterval:r=3.0
engineerBuildingSpeedMul:r=2.0
gun__reloadable:b=no
animchar__res:t="hammer_char"
item__iconYaw:r=145.0
item__name:t="items/building_tool"
meleeSoundType:t="buildingTool"
_tracked:t="previewEid"
"item__weapSlots:array"{
slot:t="secondary"
}
"buildingTool:tag"{
}
"itemInWeaponSlot:tag"{
}
"previewEid:eid"{
}
}
test_building_tool_gun{
_use:t="test_building_tool"
_use:t="replicating"
_tracked:t="gun__owner"
_replicated:t="gun__owner"
_replicated:t="currentPreviewId"
buildingInterval:r=0.0
nextBuildingAtTime:r=0.0
additionalBuildingTemplate:t="network_fortification_preview"
currentPreviewId:i=0
fortification__rayMatId:i=-1
fortification__rayMatName:t="engineerRay"
minBuildingRadius:r=1.5
animchar__res:t="hammer_char"
gun__blk:t="content/enlisted/gamedata/weapons/building_tool_gun.blk"
gun__canAim:b=no
item__template:t="test_building_tools_item"
animchar_render__enabled:b=yes
item__proto:t="content/enlisted/gamedata/weapons/building_tool_gun.blk"
item__weapTemplate:t="test_building_tool_gun"
item__iconRoll:r=43.0
item__iconYaw:r=0.0
item__iconPitch:r=83.0
item__name:t="items/hammer"
item__weapType:t="building_tool"
item__weight:r=0.5
melee_weapon__blk:t="content/enlisted/gamedata/weapons/building_tool_gun.blk"
gun__locName:t="Hammer"
gun__statName:t="melee"
gun__reloadable:b=no
weap__sprintLerpFactor:r=1.0
melee_weapon__attackAt:r=0.4
melee_weapon__attackTime:r=1.0
"item__id:i"{
value:i=0
_hide:b=yes
}
"gun__owner:eid"{
}
"net__notInInitialScope:tag"{
}
"previewTemplate:list<t>"{
template:t="auto_mg42_preview"
template:t="builded_auto_turret_preview"
template:t="christmas_tree_preview"
//template:t="ammunition_box_a_preview"
//template:t="czech_hedgehog_a_preview"
//template:t="barbedwire_engineer_a_preview"
//template:t="sandbags_wall_2_preview"
//template:t="cannon_germ_20mm_flak38_preview"
//template:t="cannon_ussr_towed_at_53k_preview"
//template:t="cannon_germ_towed_at_pak38_preview"
//template:t="sandbags_wall_mg_preview"
}
"buildingLimits:list<i>"{
limit:i=1
limit:i=1
limit:i=3
}
}
test_building_tools_item{
_use:t="item_melee"
_use:t="test_building_tool_gun"
collres__res:t="construction_hammer_collision"
item__userstats__pickupName:t="pickup_building_tool"
}
auto_mg42{
_override:b=yes
team:i=1
auto_gun_controller__targetTeam:i=3
auto_gun_controller__targetOffset:p3=0, 0, 0
interactable:b=no
"ai_target__targetForAiGunner:tag"{
}
}
auto_mg42_preview{
_use:t="base_animchar_builder_preview"
animchar__res:t="mg42_char"
collres__res:t="mg42_collision"
instantiateTemplate:t="auto_mg42"
ri_preview__name:t="auto_mg42"
buildingSoundTag:t="fortification"
building_builder__maxTimeToBuild:r=20.0
building_menu__text:t="Sentry Gun 42"
building_menu__image:t="machine_gun"
}
auto_mg42{
_use:t="game_rendinst_decor"
ri_extra__name:t="auto_mg42"
}
builded_auto_turret_preview{
_override:b=yes
building_builder__maxTimeToBuild:r=20.0
building_menu__text:t="Sentry Gun 42"
building_menu__image:t="assault_rifle"
}
builded_sg_gun{
_override:b=yes
gun__kineticDamageMult:r=20.0
}
//
The following code fixes the moon turret’s 0 damage issue
builded_sg_gun{
_override:b=yes
gun__kineticDamageMult:r=20.0
}
1 Like
I don’t know. But I’ll recheck later.
1 Like
try add this to your turret and any vehicels entity (in entities.blk)
"moveable_obstacle:tag"{
}
2 Likes
It worked!!
Add the code there is fine enough (I had the code on all 3 entities at first which caused no error somehow)
1 Like
I tried using this to create a mine that you can build with the hammer but it disappears after build complete
custom_antipersonnel_mine_preview{
_use:t="base_animchar_builder_preview"
animchar__res:t="type_3_mine_char"
collres__res:t="type_3_mine_collision"
instantiateTemplate:t="jp_antipersonnel_mine"
ri_preview__name:t="jp_antipersonnel_mine"
buildingSoundTag:t="fortification"
building_builder__maxTimeToBuild:r=3.0
building_menu__text:t="Anti-personnel Mine"
building_menu__image:t="killlog/kill_explosion"
buildingCost:r=1.0
}
How do i properly add a anti-personnel mine (preferably the kill count towards the builder but its not necessary)
1 Like
maybe should be mine+placed item in world
template name not found
1 Like
I tried jp_antipersonnel_mine+placed_item_in_world
But it did not work and throws template incorrect error
1 Like
Yes yes, i am going to investigate now (after finishing the event for gold order ofc)
There no placed_item_in_world and it’s placeable_item_in_world . Any item_in_world postfix templates should work on mines.
It seems that you need to use unique entity with predefined teams.
1 Like
let me try
and is it possible to make the auto_mg42, autocannon and antipersonnel mine kills count towards the builder?
1 Like
Kind of worked but missing stuff…
1 Like
but if i do this then it only work for team 1
1 Like
bruh it even kills my teammate
1 Like
Doesn’t help with this.
How can i set owner eid to the builder
1 Like