How can you build a rendinst with the engineer?
thanks for the answer
How can you build a rendinst with the engineer?
thanks for the answer
You already can do some rendinsts…
There some ways how you can change rendinst/engineer building…
You can edit customProps in engineer tools that placed around map. But you can edit it only by changing scene.blk file (In your mod folder that inside userGameMods). Why? Because entity contains unique data types that you can’t set in editor (item<i>
or item<t>
). They’re array, but data type can be only integer/text.
There is example code that you can put in scene.blk file:
entity{
_template:t="ger_building_tools_item+item_in_world"
transform:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [111.1, 164.567, 98.97]]
"customProps:object"{
"initialComponents:object"{
"buildingLimits:list<i>"{
item:i=100
item:i=300
item:i=600
item:i=100
item:i=100
item:i=200
item:i=100
item:i=100
item:i=100
item:i=100
item:i=100
}
"previewTemplate:list<t>"{
item:t="ger_rallypoint_preview"
item:t="ammunition_box_a_preview"
item:t="czech_hedgehog_a_preview"
item:t="sandbags_wall_1_preview"
item:t="sandbags_wall_3_preview"
item:t="cannon_germ_20mm_flak38_preview"
item:t="cannon_germ_towed_at_pak38_no_camo_preview"
item:t="sandbags_wall_mg_34_preview"
item:t="sandbags_wall_mg_131_preview"
item:t="sandbags_wall_ampulomet_preview"
item:t="czech_hedgehog_a_preview"
}
}
}
}
After that in editor use Find Entity and move object to closer to you/to area where you want.
Keep in mind that you can only write preview entities. You can find all their names in Create Entity tool:
But not all works fine. And some may have missing icons.
Another problem: If you already have engineer in squad then some structures will be locked and limits will be default.
If you don’t have engineer then everything will be fine.
For that you need to have entities.blk file. You can copy and paste scene.blk, open it by any text editors and then clean code in new file (Ctrl+A in keyboard for select all code).
Unlike previously way… Here engineers will spawn with new limits. And they may have new structures, but you will not able increase structures amount and in multiplayer you will see fake icons if change structures. Still not possible to use any rendinst.
There example code for one of engineer tools (in entities.blk file):
ussr_moon_building_tool_gun{
_override:b=yes
"buildingLimits:list<i>"{
item:i=100
item:i=300
item:i=600
}
"previewTemplate:list<t>"{
item:t="ger_rallypoint_preview"
item:t="sandbags_wall_1_preview"
item:t="sandbags_wall_3_preview"
}
}
Yeah. It looks a bit same, but without customProps and initialComponents. Also starts with entity name (for example ussr_moon_building_tool_gun). You can find all engineer tools entities names in Create Entity. Just select all section and write building_tool in filter:
You will need to edit engineer tools with _gun versions (probably editing building_tool_gun will be useless, because code replaced by others engineer tools).
Like previously way, but you edit preview entities. It allows you to use a bit other rendinsts. Even if they don’t have preview version. But still can’t use any, only these that you can find in Create Entity.
For that you edit instantiateTemplate in preview entities. Entities.blk code example:
sandbags_wall_2_preview{
_override:b=yes
instantiateTemplate:t="sandbags_wall_1"
ri_preview__name:t="sandbags_wall_high_rounded_a"
}
As result in game you will build bigger sandbag walls then usually. You can use any entity that can find in Create Entity. If you want to use some other rendinsts… Then try to find then in Create Entity. There some example rendinsts that you now can use:
Problems: Icon and model will be old.
You can add any rendinsts. For that you need to add new entity. As result it will not work in multiplayer.
There entities.blk code example that contains new entity for instantiateTemplate:
myNewRendinst{
_extends:t="game_rendinst"
ri_extra__name:t="normandy_bunker_a102_walls"
}
And in game you will able build bunkers.
Would be good to add or edit preview.
myNewRendinst_preview{
_extends:t="base_rendinst_builder_preview"
instantiateTemplate:t="myNewRendinst"
ri_preview__name:t="normandy_bunker_a102_walls"
buildingSoundTag:t="fortification"
building_builder__maxTimeToBuild:r=10.0
building_menu__text:t="building_tool/sandbags"
building_menu__image:t="building_wall"
}
Use _override:b=yes if you need to override/update old entity code.
Use _extends:t=“EntityName” if you want to add info from another entity. In latest example myNewRendinst becomes rendinst not because of Rendinst in name. It becomes rendinst because of adding _extends:t=“game_rendinst”. Same for preview.
After _extends or/and _override you can add any entity properties. You can find them in editor. Just select any object and check Properties Panel.
Any of them you can add in entities.blk and change. Text or visual properties can’t be changed in multiplayer game. Others may cause desync in multiplayer. But all changes works fine for local game.
you have to edit a bulding_tool_gun by adding myNewRendinst_preview with the other previews?
I edit ussr_moon_building_tool.
ussr_moon_building_tool_gun{
_override:b=yes
"buildingLimits:list<i>"{
item:i=100
item:i=300
item:i=600
item:i=100
item:i=100
item:i=200
item:i=100
item:i=100
item:i=100
item:i=100
item:i=100
}
"previewTemplate:list<t>"{
item:t="myNewRendinst_preview"
item:t="ammunition_box_a_preview"
item:t="czech_hedgehog_a_preview"
item:t="sandbags_wall_1_preview"
item:t="sandbags_wall_3_preview"
item:t="cannon_germ_20mm_flak38_preview"
item:t="cannon_germ_towed_at_pak38_no_camo_preview"
item:t="sandbags_wall_mg_34_preview"
item:t="sandbags_wall_mg_131_preview"
item:t="sandbags_wall_ampulomet_preview"
item:t="czech_hedgehog_a_preview"
}
}
Because moon event soldiers have only this hammer.
In your case probably will need to edit another hammers. Not sure that editing bulding_tool_gun will change previewTemplate for ger_building_tool_gun, usa_building_tool_gun and e.t.c.