Question about mods

how can i add decorators and decals for tanks that i spawn? Also how can i spawn an tank that only one team can use?

Well… It’s will be a bit hard to do, but not impossible. For add decals you will need to edit animcharDecalsData property. And you can do it only using scene.blk (map code, file inside your mod folder), because it should have many p4 data type properties.

There is code for ju_87d_3:

  "animcharDecalsData:array"{
    "animcharDecalsData:object"{
      textureName:t="simple_09"
      slot:i=0
      scale:r=0.0
      rotation:r=6.0
      twoSided:b=true
      oppositeMirrored:b=false
      mirrored:b=false
      dProj0:p4=0.1910, 0.7140, 2.76, -1.657
      dProj1:p4=0, 0, 0, 0
      uProj0:p4=-0.968, 0.251, 0.002, 2.037
      uProj1:p4=0, 0, 0, 0
      vProj0:p4=-0.241, -0.935, 0.259, 1.048
      vProj1:p4=0, 0, 0, 0
      locNorm0:p3=0.067, 0.25, 0.966
      locNorm1:p3=0, 0, 0
      locPos0:p3=1.659, 0273, 0.415
      locPos1:p3=0, 0, 0
    }
  }

You need put this code to any vehicle entity after transform property and edit then numbers. Changes will be only after map restart or clone entity (you can do it by hold [Shift] button and using Move tool).

Full entity code example.
entity{
  _template:t="ju_87d_3+destroy_inactive_vehicle+plane_spawn_in_air+aircraft_spawn_validation+vehicle_spawn_restriction+requires_trans_render+still_obstacle+dead_entity"
  transform:m=[[0.999926, -0.00754965, 0.00947962] [0.00764164, 0.999923, -0.00970502] [-0.00940563, 0.00977675, 0.999908] [469.072, 103.571, -4.82829]]

  "animcharDecalsData:array"{
    "animcharDecalsData:object"{
      textureName:t="simple_09"
      slot:i=0
      scale:r=0.0
      rotation:r=6.0
      twoSided:b=true
      oppositeMirrored:b=false
      mirrored:b=false
      dProj0:p4=0.1910, 0.7140, 2.76, -1.657
      dProj1:p4=0, 0, 0, 0
      uProj0:p4=-0.968, 0.251, 0.002, 2.037
      uProj1:p4=0, 0, 0, 0
      vProj0:p4=-0.241, -0.935, 0.259, 1.048
      vProj1:p4=0, 0, 0, 0
      locNorm0:p3=0.067, 0.25, 0.966
      locNorm1:p3=0, 0, 0
      locPos0:p3=1.659, 0273, 0.415
      locPos1:p3=0, 0, 0
    }
  }
}

To be honest I don’t know very much, but it seems that you can remove almost all properies and left only them:

  "animcharDecalsData:array"{
    "animcharDecalsData:object"{
      slot:i=0
      textureName:t="simple_09"
      dProj0:p4=0, 1, 1, -1
      vProj0:p4=-0, -1, 1, 0
      uProj0:p4=-1, 0, 0, 1
    }
  }

(Code for JU_188).

Last number in uProj0 let you move decal a bit left/right. Third in vProj0 let you move a bit upper/lower.

3 Likes

And how do i make the tanks only usable by one side? For an example if i want to spawn an m4a2 that only allied side can use

1 Like

in order to lock vehicle’s seats, type team in the vehicle’s panel, and change those two parameters:

to either 0 ( if you want no one uses the vehicle )
to 1 ( for team 1 )
or 2 ( for team 2 )

the -1s allows anyone to use that said vehicle.

2 Likes

also, regarding decorators:

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [-1, 0, 1] [0, 1, 0] [0.8, 1.3, 1]]
      template:t="vgt_palm_c"
      nodeName:t="root"
      ri_extra__name:t="tractor_stz_5_tent_a"
      ri_extra__hasCollision:b=no
    }

template are the decorations them selves ( such as Ammo_box / grenades / sleighs / trees ) and generally you can find all decorations in the Others Items Inside the entities tab.

additionally, you can create custom decorations based on the rendinsts ( only through entities.blk ).

for example:

myRendinst{
  _extends:t="game_rendinst_decor"
  _extends:t="base_vehicle_decor"
  ri_extra__name:t="ammunition_box_d"
  ri_extra__hasCollision:b=no
  animchar__res:t="sandbag_single_decor_c_char"
  collres__res:t="sandbag_single_decor_c_collision"
  animchar_render__enabled:b=no
}

change ri_extra__name:t=“ammunition_box_d” to anything that you want.
but this code, will allow you to create custom templates to use anywhere when making decorators etc.

here is an example that i made ( incomplete, but gives you a good idea )

Calliope
entity{
  _template:t="us_m4_sherman_calliope_normandy_premium"
  transform:m=[[0.999839, 0, 0.0179416] [-0, 1, 0] [-0.0179416, -0, 0.999839] [499.587, 0.985016, -588.463]]

  "animchar__objTexReplace:object"{
    "us_camo_olive*":t="us_camo_desert_pink_dark_khaki*"
  }

  "attach_decorators__templates:array"{
    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [-1, 0, 1] [0, 1, 0] [0.8, 1.3, 1]]
      template:t="vgt_palm_c"
      nodeName:t="root"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 1, -0] [0, 0, 1] [2.7, 0, 0.5]]
      template:t="sherman_hedgerow_02_decor"
      nodeName:t="root"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[0.00857714, -0.345033, 0.00313096] [0.422798, 0.0104993, -0.000459924] [0.000405684, 0.00384313, 0.42254] [-1, 0.55, -0.65]]
      template:t="jerrycan"
      nodeName:t="bone_turret"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[0.00857714, -0.345033, 0.00313096] [0.422798, 0.0104993, -0.000459924] [0.000405684, 0.00384313, 0.42254] [-1, 0.35, -0.65]]
      template:t="jerrycan"
      nodeName:t="bone_turret"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[0.00857714, -0.345033, 0.00313096] [0.422798, 0.0104993, -0.000459924] [0.000405684, 0.00384313, 0.42254] [-1.75, 0.65, 1.7]]
      template:t="wooden_plank_b_decor"
      nodeName:t="root"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[0.00857714, -0.345033, 0.00313096] [0.422798, 0.0104993, -0.000459924] [0.000405684, 0.00384313, 0.42254] [-1.75, -0.65, 1.7]]
      template:t="wooden_plank_c_decor"
      nodeName:t="root"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[-1, 0, 0] [1, 0, 1] [0, 1, 0] [-1, 1.3, 1]]
      template:t="vgt_palm_c"
      nodeName:t="root"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 0, 1] [0, 1, 0] [-0.14, 0.75, 0]]
      template:t="vgt_palm_a"
      nodeName:t="bone_turret"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 0, 1] [0, 1, 0] [-0, 1.35, 1]]
      template:t="vgt_palm_c"
      nodeName:t="root"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[1, 0, 0] [0, 1, -0] [0, 0, 1] [-1.7, -0, 1.65]]
      template:t="vgt_palm_c"
      nodeName:t="root"
    }

    "attach_decorators__templates:object"{
      relativeTm:m=[[0, -0, 0] [0, 0, -0] [0, 0, 0] [-1.75, -0.65, 1.7]]
      template:t="tank_decor_box_01_decor"
      nodeName:t="emtr_fire_engine"
    }

    "attach_decorators__templates:object"{}
    "attach_decorators__templates:object"{}
    "attach_decorators__templates:object"{}
  }
}

and following the previous code, change “vgt_palm_c” to “myRendinst” or however you called that inside the entities.blk

regarding the coordinates, good luck. it’s one of the most tideous parts and will sunk you ( no joke ) half an hour just to get the right position. all i can say, last 3 digits are: [0, 0, 0] = [offset from left to right, forward and backwar, top from bottom ] = [X,Z,Y]

for more info in general, i suggest you to read the guide made on the RU forum.
you can use any translator, but it will get you more infos.

2 Likes

Thank you very much!

1 Like