I wanted to create a mod that adds a modified variant of the open-top supply truck, where instead of 2/3 of supplies it carries a mortar in the back, with mortar ammunition inside of the truck itself
I need someone to validate whether my approach won't cause lag and is optimal
I created a custom supply truck and a custom truck bed, both inheriting from their base game equivalents
I've updated the custom truck's SlotManagerComponent to equip the custom truck bed
I've updated the custom truck bed's SlotManagerComponent by adding another slot for the mortar, then attached the base game mortar prefab and positioned it
I've updated the custom truck's SCR_UniversalInventoryStorageComponent by adding 3 new multi-lists for the different mortar ammo types, adding around 200 shells total
I overrode Vehicles_EntityCatalog_US.conf and Vehicles_EntityCatalog_USSR.conf by adding a new multi-list in each, containing the custom truck for the faction, added and configured SpawnerData and EditorData on both to enable spawning in-game
The mod works, the vehicle spawns, I can drive it, the mortar stays attached, shoots, shows the correct orientation in UI (azimuth and elevation). The truck does contain the ammunition.
Question is: Is this the correct, optimal approach, that other modders also follow?