New batch of questions

secene.blk cannot add tags

And many teamplates are already in some preset combinations, only new teamplates can reorganize them more flexibly

I made a supply half-track before, but that method was very difficult, I had to combine all the templates I didn’t want to make a giant stitched monster, and also caused all kinds of strange problems because the templates conflicted with each other . .

When I can now define new templates, all problems are gone


This is due to the collision problem caused by two entities with physical elements, animchar and rendinst_ri appearing in one item at the same time, and the destruction of rendinst_ri due to the collision will destroy the item

2 Likes

whether i’m glad for you, doesn’t… i mean, i still don’t understand how would that work.

2 Likes

This is due to the collision problem caused by two entities with physical elements, animchar and rendinst_ri appearing in one item at the same time, and the destruction of rendinst_ri due to the collision will destroy the item

1 Like

because right now, i can add templates ( or used to… since now doesn’t work ) that i know those do stuff.

because they are used for that.

yes, i know that was an issue that enginya was working on.

problem is, just like custom profiles of weapons and stuff, still doesn’t tell me anything.

like… i know those can be done, but… why… can’t we just get a program with UI that does just that. so it would be simpler

2 Likes

You have to carefully pick a ri that has no colliding entities

If you choose some ri that will be destroyed, they will disappear due to collision when moving or spawning, such as some chairs or boxes, and the car will also disappear when things happen, because they are the same item

I have carefully chosen ri_extra__name:t="barbedwire_a_dmg, this item has no collision volume

This is a skdkfz62 made with this theme, but he shakes when the server game moves, like in the video above, while it looks normal in the local game

Now I don’t need this, going through the new template will completely solve these problems

entity{
  _template:t="human_hidden_ui_battle_area+base_fortification_build+ammunition_box_base+resource_box_base+ammunition_box_grenade_resupply+undestroyable_building+vw_kubelwagen+base_sdkfz_251_10+flak_36_sdkfz_6_2_ammo_stowages+resupply_for_ground_vehicle_zone"
  transform:m=[[-0.596454, 0.00931413, -0.802594] [0.015548, 0.999879, 4.9049e-05] [0.802497, -0.0124494, -0.596526] [-1652.97, 0.695873, -889.011]]
  killLogName:t="germ_sdkfz_6_2_flak36"
  animchar__res:t="flak_36_sdkfz_6_2_char"
  collres__res:t="flak_36_sdkfz_6_2_collision"
  vehicle_net_phys__blk:t="gamedata/gen/units/tanks/flak_36_sdkfz_6_2.blk:VehiclePhys"
  particle_phys__blk:t="gamedata/suspension/empty.blk"
  dmg_animchar__res:t="flak_36_sdkfz_6_2_dmg_char"
  xray_resource__modelName:t="flak_36_sdkfz_6_2"
  cockpit__zoomOutFov:r=2.7475
  cockpit__zoomInFov:r=5.3955
  cockpit__sightName:t="sight_model/default_tank_spg"
  cockpit__sightFov:r=20.0
  drowningHeight:r=2.24
  damage_model__blk:t="gamedata/gen/units/tanks/flak_36_sdkfz_6_2.blk"
  item__name:t="items/germ_sdkfz_6_2_flak36"
  skin__template:t="flak_36_sdkfz_6_2_skins"
  team:i=2
  resupply_zone__team:i=2
  vehicle_seats__autoDetectRestrictToTeam:b=no
  vehicle_seats__restrictToTeam:i=2
  sphere_zone__radius:r=12
  vehicle__mapIcon:t="map_icon_train"
  user_point__icon:t="map_icon_train"
  useful_box__hintFull:t="SdKfz6 Resupply Base For Attack Team;Vehicle+Infantry+Engineer;可以补给载具和步兵武器弹药以及工兵材料"
  builder_info__team:i=2
  battle_area__team:i=2
  team:i=2
  vehicle_seats__autoDetectRestrictToTeam:b=no
  vehicle_seats__restrictToTeam:i=2
  buildingRadius:r=5
  useful_box__maxUseCount:i=9999999
  building_menu__image:t="map_icon_train"
  grenadeResupplyItem:t="type_91_incendiary_grenade_item"
  ri_extra__name:t="barbedwire_a_dmg"

  "turret_gun_flash_fx__flashFx:shared:array"{
    turret_gun_flash_fx__flashFx:t="muzzle_ground_20mm"
  }

  "turretsInitialComponents:array"{
    "turretsInitialComponents:object"{
      gun__reloadTime:r=1.05
    }
  }

  "turret_control__turretInfo:shared:array"{
    "turret_control__turretInfo:object"{
      salt:i=1
      gun:t="as_42_metropolitana_turret_01_20mm_breda_20_65_m35+base_37mm_flak36+turret_with_several_types_of_shells+main_turret"
      barrelDm:t="gun_barrel"
      breechDm:t="cannon_breech"
      turretName:t="turret_01"
      verDriveDm:t="drive_turret_v"
      horDriveDm:t="drive_turret_h"
    }
  }

  "vehicle_seats__seats:shared:array"{
    "vehicle_seats__seats:object"{
      receiveDamageFromDMPart:t="gunner"
      attachTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0.25, -0.5, 0]]
      cameraOffset:p3=-2.2, 0.6, 0
      name:t="main_gunner"
      seatComponent:t="isGunner"
      cameraNodeName:t="bone_camera_gunner"
      cameraType:t="machinegunner_cockpit"
      attachNode:t="gunner"
      nextSeat:t="commander"
      locName:t="vehicle_seats/gunner"
      ignoreAttachNodeRotation:b=yes
      shouldHideOwner:b=no

      "turretNames:array"{
        turretNames:t="turret_01"
      }
    }

    "vehicle_seats__seats:object"{
      receiveDamageFromDMPart:t="commander"
      attachTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0, 0.1, 0.1]]
      cameraOffset:p3=-3.6, 0.16, 0
      name:t="commander"
      seatComponent:t="isDriver"
      cameraType:t="machinegunner_cockpit"
      attachNode:t="commander"
      nextSeat:t="main_gunner"
      locName:t="vehicle_seats/commander"
      ignoreAttachNodeRotation:b=yes
      maxPosWithOpenHatch:r=0.4
      shouldHideOwner:b=no
      seatOwnsEntityControl:b=yes
    }

    "vehicle_seats__seats:object"{
      receiveDamageFromDMPart:t="driver"
      attachTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0.25, -0.25, 0]]
      name:t="passenger"
      seatComponent:t="isDriver"
      attachNode:t="char_driver_pivot"
      entranceNode:t="char_driver_landing"
      seatOwnsEntityControl:b=yes
      locName:t="vehicle_seats/driver"
      ignoreAttachNodeRotation:b=yes
      shouldHideOwner:b=no
    }

    "vehicle_seats__seats:object"{
      receiveDamageFromDMPart:t="loader"
      attachTm:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [-0, -0, 0]]
      seatComponent:t="isPassenger"
      cameraNodeName:t="bone_camera_driver"
      attachNode:t="loader"
      locName:t="vehicle_seats/loader"
      ignoreAttachNodeRotation:b=yes
      shouldHideOwner:b=no

      "loaderTurretNames:array"{
        loaderTurretNames:t="turret_01"
      }
    }
  }

  "disableDMParts:list<t>"{
    item:t="ammo_body_01"
    item:t="ammo_body_02"
    item:t="ammo_body_03"
    item:t="ammo_body_04"
    item:t="ammo_body_05"
    item:t="ammo_body_06"
    item:t="ammo_body_07"
    item:t="ammo_body_08"
    item:t="ammo_body_09"
    item:t="ammo_body_10"
    item:t="ammo_body_11"
    item:t="ammo_body_12"
    item:t="ammo_body_13"
    item:t="ammo_turret_01"
    item:t="ammo_turret_02"
    item:t="fuel_tank"
    item:t="fuel_tank_r_01"
    item:t="fuel_tank_l_01"
    item:t="engine"
    item:t="transmission"
  }
}
1 Like

This shouldn’t happen in the first place, with the new template you don’t need to bind ri to the car at all

This is a twisted stitching monster which is inherently inelegant that I forced to made it, when i dont know how to define the new template

1 Like

feel like we need to start with basics if i have a chance of understanding,

so…

for template you mean… for example, a truck’s properties ?

like, when you create one, it has it’s own template, right?

what do you mean by new template.

2 Likes

Add a file called entities.blk in the new project folder

You have to edit it through a text editor, you can use vscode, he has a highlight plugin for blk

Now you can define new templates in this file

Note that previously only entities were generated in scene.blk, and entities were made by templates.

In scene.blk, we can only stitch different templates by +

But in entities.blk we can define new templates directly

For example making an ambulance

WIP.

2 Likes

well, as long comes with documentation in order for normies like to me understand, sounds good to me.

( although, at this point… maybe would be simpler to just fix the stuff that we have so it will be easier to be used. i still… don’t understand why we can’t attach a machinegun on a vehicle. or simple stuff on top of other things. like, i swear, in garry’s mod ( that it has been made at least almost 16 years ago )

2 Likes

put in entities.blk

I made two types, way1 is much similar to the upper previous ways, but without rendinst_ri any more

way2 is much better

Way1

You also need to set placeable_item__ownerTeam and team in the scene in this way

// Way1. combile med box stuffx with car willys_mb
// similar to the previous ways, but it is not easy to expand, so it is not possible to put a real or more kinds of boxes on the car
// now you can get a willys_mb without the ghost rendinst_ri
willys_mb{
  _override:b=true // override all willys_mb
  _extends:t="fortification_builder_info"
  // _extends:t="medik_box_base"
  // _extends:t="placeable_item_in_world"
  // _extends:t="item"
  vehicle_seats__exitTime:r=0.66
  vehicle_seats__enterTime:r=2.3 // longer time to prevent player get in to the car quickly

  // copy from medik_box_base
  building_menu__image:t="med_box"
  useful_box__hintEmpty:t="resupply/medkit_box_empty"
  useful_box__hintFull:t="resupply/medkit_box_refill"
  useful_box__hintItemFull:t="resupply/medkit_box_item_is_full"
  useful_box__hintEnemy:t="resupply/medkit_box_enemy"
  useful_box__useCount:i=-1
  useful_box__maxUseCount:i=999
  useful_box__successUse:b=no
  useful_box__giveItem:t="medkit_item" // seems most important things is here
  useful_box__itemExistTag:t="item__medkit"
  object__useDist:r=3.0
  buildingRadius:r=2.3
  building_destroy__maxTimeToDestroy:r=9.0
  minimap__visibleRadius:r=5000.0
  minimap__visibleForAll:b=yes

  _group{
    _tags:t="ui"
    hud_icon__image:t="med_box"
    hud_icon__offsetY:r=0.1
    hud_icon__maxDistance:r=23.0
    hud_icon__opacityRangeX:p2=0.5, 0.8
    hud_icon__opacityRangeY:p2=0.5, 0.8
    hud_icon__opacityCenterMinMult:r=1.0
  }

  "engineer_building__isUsable:tag"{
  }

  "useful_box__requiredUseCount:i"{
    _tags:t="server"
    value:i=0
  }

  "useful_box__fillMode:tag"{
    _tags:t="server"
  }

  "buildByPlayer:eid"{
  }

  "engineer_building__isUsable:tag"{
  }

  "useful_box__requiredUseCount:i"{
    _tags:t="server"
    value:i=0
  }

  "customAnimcharVars:array"{

    "param:object"{
      varName:t="ammunition_box_hatch_1"
      value:r=100.0
    }

    "param:object"{
      varName:t="ammunition_box_hatch_2"
      value:r=100.0
    }
  }

  "customAnimcharVarIds:list<i>"{
  }

  "customAnimcharVarValues:list<r>"{
  }

  "vehicleTriggerable:tag"{
  }
}

Way2, much clear and better

But required bug fix i describe here, to work in the multiplayer games.

// Way2. 
// define your own new named template, 
// you can find it in the entities list in the editor
// how ever this still not yet working in the multiplayer games in the client side.
// but i found find some signs that shows this works in the server side! 
for_erikaKalkbrenners_gaz_67_medic_box_for_team2{
  _extends:t="base_ri_building"
  _extends:t="placeable_item_in_world"
  _extends:t="placed_medic_box_item"
  ri_extra__name:t="dummy_wooden_box_a"

  useful_box__useCount:i=-1
  useful_box__maxUseCount:i=999999
  placeable_item__ownerTeam:i=2
  team:i=2
}

for_erikaKalkbrenners_gaz_67{
  _extends:t="gaz_67"

  "attach_decorators__entities:list<eid>"{
  }

  // you can also do this by attach_decorators__templates
  "attach_decorators__templates:array"{
    "templates:object"{
      relativeTm:m=[[1.0, 0.0, 0.0] [0.0, 1.0, 0.0] [0.0, 0.0, 1.0] [1.6, 0.0, 0.0]]
      // template:t="placed_medic_box_item+placeable_item_in_world+base_ri_building"
      template:t="for_erikaKalkbrenners_gaz_67_medic_box_for_team2"
      nodeName:t="emtr_fire_engine" 
      // emtr_fire_engine, This is a better node that I found without initial rotation, which is easy to adjust the position of various decorations
    }
  }
}

You may need to read the specific details of defining templates in the official blk, and even some code, so that you can snoop and guess how these template attributes or tags work

Most of the time you just need to combine them

2 Likes

Hmmm… It fine works for me.
They’re in battle area, not in gray zone.
Have changed ri_extra__name and some team properties.





Also WTH. Why bots walking to x0 y0 z0 area 0.o

for me, as soon i stick the actual medical box or ammo ( template ) one, the entire thing auto delete it self.

not allowing me then to put a vehicle

1 Like

Oh… Yeah.
It’s because of ri_extra__name.
Well… When I put these vehicle. And click exit from spawn entities menu I also click binds ctrl+t (stop time).
After that I change ri_extra__name to undestroyable.

1 Like

The reason i stopped messing around with templates. You try to edit them and they switch back to default (looking at you 5000 RoF mp43)
The full potential of the editor will never be available to us. Server limitations…

1 Like

Can you guys use this successfully? Remember to put in entities.blk not scene.blk

- dir_of_your_mod
 | -- entities.blk // <--- put templeates here
 | -- scene.blk

or add placeable_item__ownerTeam and team to your template

1 Like

The server does not restrict the custom template. This is an exciting news. I tried the radio plane using the custom template. Although the client did not appear the plane, the bomb and explosion did appear, or using the item_spawner as the test chain, it can be found that The entity of the custom template does exist in the server.

Everything says that the server is running these things correctly, the only problem is that the client is not syncing this information

2 Likes

so…

it works for you, yet if i apply it, save it, after a restart, they disappear.

( despite being inside the action area and not in the gray one )

care to share the code?

maybe i’m doing something wrong.

cheers.

1 Like

Editor after some update got one feature.
Its automatically turn on time to default when RI object was destroyed.

So… Just press [ctrl] + [t] in keyboard (this combo like to click timer; turn on time to default or stop it) before when RI object fully destroyed and disappeared.

Then change RI to undestroyable object. And save.

no…

maybe i’m not explaining my self clearly.

right… so, i go through the normal way of creating a fortification build template, then i’ll add on top either the ammonutions or medical stuff, set the teams, set the indestructible ri object ( such as bardwire dmg a or any bunker ), and lastly, apply a vehicle.

then i duplicate the whole thing in order to right away get the truck i need ( or car with the stuff. so that either the bardwire or bunker disappears without messing with collisions and stuff ) but as soon i save the finished thingy, and i restart, they all disappear.

1 Like

Он strange.
Ill check it later (today) your way how to do it.
Well… I just write postfixs and then create object with postfixs.
(In spawn entities menu, lowest line have +placed_medic_box+gaz_67 and spawn this fortification).