This mod is a framework that enables modders to create vehicles. This mod does not include any vehicles on its own. If you are a modder that wishes to use the framework I highly suggest you join the discord server.
Vehicle Framework Mod features
What are vehicles?
This framework treats all vehicles equally. This means there is no mechanical difference between land, sea, and aerial type vehicles other than certain configurations in the def.
Health mechanics
Vehicles have their own health system that is split up among components. These components make up the health of the entire vehicle and may link to specific behavior (eg. tires could affect movement speed if damaged). Components are split into 2 categories: External and Internal.
External components have physical hitboxes on the vehicle. This means vehicles can be strategically hit from certain sides to try and hit weaker parts of the vehicle, or hit the engine.
Internal components have no hitbox and will only be damaged if an external component with 0 health is hit and is “penetrated.” Pawns may also take damage if the vehicle is penetrated.
Pathfinding
Vehicles use their own pathfinding. This means you can configure custom pathfinding for any of your vehicles and they will not interfere with each other.
On top of this, vehicles also use multi-cell pathfinding meaning they will take their hitbox into account when calculating their path to a location. This means vehicles won’t be fitting through tiny 1×1 doors or sitting on top of your walls.
Patterns and skins
This framework comes with 3 shaders that allow vehicles to be masked with patterns and skins. These are handled automatically as long as you have the appropriate mask textures and have also assigned the shader type in the graphic data. Patterns and skins are also shared across all vehicles unless defined to only be usable by (or exclude) certain vehicles. This means you don’t have to create any patterns in order for people to paint the vehicles you create and any patterns / skins you do create will be usable by vehicles from other mods. This shared system adds a wide variety of customization for players without requiring extra work from modders. The framework itself includes more than a dozen that you can use for reference.
Turrets
Vehicles can be attached with turrets. These differ from vanilla and do not use the verb system, however they also do not have hardcoded positions meaning they can be offset to any point on the vehicle. Turrets can also be attached to other turrets, allowing them to rotate around the axis of rotation when the parent turret also rotates. A good example of this is a mounted machine gun atop a tank’s main turret. There are a few other options for modders as well, including but not limited to projectile offsetting for alternating barrels, overheating mechanics, recoil, custom projectile flags at runtime (eg. faster projectile speed that is separate from the projectile def such as high velocity mortar rounds), and more.
Animations
Aerial vehicles use a separate skyfaller launching system that gives a lot more freedom to how the animations and restrictions are handled. With this in mind, animations can be created per-vehicle and per-launch operation. If the default launch protocol classes aren’t enough for what you have in mind, you can expand on the ones I’ve created. Classes like these are always set up to be easily expanded upon. Launch protocols are split into ‘launching’ and ‘landing’ which allows you to create separate animations for both sequences. The ones provided with the framework are listed above.
All vehicle animations can be opened in-game within the animation editor that comes with the framework. The editor includes a line graph and preview window that allows you to tweak the animation without having to reboot the game over and over. Launch protocol animations can also throw flecks across the animation lifetime for visual effects.
Graphic overlays
Vehicles can overlay separate graphics on top of the vehicle texture that aren’t turrets. A good example would be a helicopter and its rotors. The graphic overlay system is also set up to be expanded upon, as the only ones the framework includes right now are Static and Rotating (which directly hooks up to the propeller takeoff class).
Mod settings
This framework includes a very intricate mod settings page which is designed to bridge the gap between modder and player. The general settings cover most vehicle-wide mechanics while the vehicle settings are generated at runtime for each vehicle def. Tweaking the balance of vehicles does not require xml patches as it can be done in the mod settings. Any vehicles created by modders will be picked up and given its own entry in the list. If you create your own ThingComp or even your own VehicleDef subclass you can use the PostToSettings attribute which will tell the framework to add it to the settings page and serialize it to the config file should it be modified.
Compatibility notes
There are going to be incompatibilities with a lot of mods due to how much has to be changed in order to incorporate vehicles. I don’t intend on leaving it this way and many incompatibilities have already been fixed so if you do run into a very obvious incompatibility please report it so I can fix it promptly.
Incompatible mods: Multiplayer and RimThreaded.
Compatible mods: Vanilla Expanded mods, RimNauts 2 and Geological Landforms.
Not yet compatible: CAI5000 and Combat Extended (SoonTM).
Translations
I have a community managed spreadsheet for translations. If you’d like to help translate, shoot me a message!
Supported Languages: Polish, Portuguese (Brazilian), Russian, Spanish.
Big thank you to Oskar Potocki for the UI artwork! This framework wouldn’t be nearly as pretty without it.