Last update: 11.08.24.
Reason: Update mod to version: 07.08.24
This mod is a framework for modders to use to create vehicles. This mod does not include any vehicles on its own.
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.
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.
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 1x1 doors or sitting on top of your walls.
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.
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.
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.
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).
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.
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.
Multiplayer
RimThreaded
CAI5000
03.08.24 (1.4-1.5)
23.06.24 (1.4-1.5)
07.06.24 (1.4-1.5)
11.04.24 (1.4)
22.12.23 (1.4)
06.11.23 (1.4)
Notes
Hotfix for bugs related to last patch and fire mechanics.
02.11.23 (1.4)
19.09.23 (1.4)
07.09.23 (1.4)
24.08.23 (1.4)
v1.5.1356
Notes
This update comes with some critical bugfixes to pathfinding and regions. Your vehicles shouldn't have any problems going through garages, and they definitely won't be pathfinding over walls anymore.
Next update will be focusing on everything related to Vehicle Caravans. I understand they're not perfect right now, so next update should alleviate that.
Bug Fixes
- Fixed bug where vehicles weren't triggering path recalculation when moving
- Fixed bug where path grids were only updating for vehicle region owners, allowing some vehicles to path over walls.
- Fixed bug where even-width vehicles (eg. 2x4) would get stuck when stopped near a wall.
- Fixed thread safety issues related to pulling thing lists during region recaching and pathfinding.
- Fixed bug where defining a vehicle turret without a shaderType would throw an exception on startup.
- Fixed bug where path grids wouldn't update when setting terrain via devmode.
- Fixed bug where vehicle caravans wouldn't render fuel gizmos for multiple vehicles in a caravan.
- Fixed bug where loading an older save with a vehicle on the world map (with turrets) would throw an exception upon returning.
Performance Changes
- Async actions are now pooled
- ThingList snapshots are now pooled
Compatibility Fixes
- Roads of the Rim
- Dynamic Trade interface
Additional Changes
- Added default 'Vehicles' tab for modders. Use this instead of creating a dozen different designation categories.
- Changed even-width vehicles from rounding up for region padding. 2xN vehicles can now fit through 2-cell gaps, rather than requiring 3.
- DamageDefs that aren't meant to harm health no longer damage vehicles (EMP, Smoke, Extinguish, etc.)
19.08.23 (1.4)
10.08.23 (1.4)
07.08.23 (1.4)
04.08.23 (1.4)
File info