#Need Help With Vehicle Mods

1 messages · Page 1 of 1 (latest)

odd roost
#

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?

tall finch
#

Make an inheritant of the mortar that isnt an EditableEntity so that it cant be deleted off the back of the truck by a GM

odd roost
#

I'm mostly asking about the optimisation aspect of this mod, whether there's something I can do to make it better for FPS/console players

tall finch
#

It may cause issues with replication, and spawning AI crew

#

Otherwise, you did good, using the entity catalogs rather than overriding a Faction config or Gamemode

odd roost
#

Can I just remove the editor from EditorData? That should fix it while still being spawnable

tall finch
#

EditorData as in the spawn config? EditableEntities like vehicles and turrets have EditableEntity components, its where the Icons and Localization Strings are present, as well as setting up what Crew AI Budgets get spawned with the vehicle when doing so in GM. Id recommend disabling that component entirely on inherited mortars

tall finch
#

Id also recommend creating a localization string for your Mortar variants so they're searchable in GM

odd roost