Mod «Vehicle Framework» for Rimworld (v1.4 - 1.5)

+22
22:33
22.26K
Vehicle Framework

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

22.12.23 (1.4)

DOWNLOAD


06.11.23 (1.4)

  • v1.5.1429

    Notes
    Hotfix for bugs related to last patch and fire mechanics.

DOWNLOAD


02.11.23 (1.4)

  • v1.5.1425

DOWNLOAD


19.09.23 (1.4)

  • v1.5.1356
    Notes
    The first of many updates where I will be reworking / improving vehicles on the world map. If you have feedback for caravan / aerial vehicle UI, please let me know. Thanks!

    Bug Fixes
    - Fixed bug where Assign Seat dialog would show colonists assigned to another vehicle.

    - Fixed bug where Assign Seat pawn list would not scroll all the way to the bottom of the list.

    - Fixed bug where pawn inventory would get counted for mass usage in vehicle caravans, despite them being inside a vehicle. Cargo Capacities do not include pawn mass, gear, and inventory. They should only count things inside the vehicle inventory.

    - Fixed bug where vehicle caravans would be unable to form on maps surrounded by vanilla-impassable biomes such as single tile islands, despite the vehicles being able to traverse those biomes.

    - Fixed bug where hitbox hits would over-rotate for non-instigator damage such as from explosions, resulting in mirrored damage.

    - Fixed edge case where regions would fail to update on edges for vehicles with padding (width > 2), resulting in areas that should be reachable still not registering as such.

    - Fixed bug where fuel leaks would continue to spawn filth even after the fuel tank is empty.

    - Fixed bug where vehicle caravans were able to traverse impassable vanilla biomes like Oceans despite not being defined with custom biome costs.

    - Fixed bug where aerial vehicles with runway restrictions would still be able to takeoff over impassable terrain.

    - Removed vehicles from Spawn Pawn debug menu, as spawning them through that would result in partial generation, bugging out the vehicle completely.

    Performance Changes
    - Optimized path cost recalculation, which should significantly decrease the amount of time it takes to generate maps.

    - Various minor optimizations for region dirtying.

    Compatibility Fixes
    - RimHUD after their most recent update.

    Additional Changes
    - Changed chargePerAmmoCount to float type, allowing 1 ammo to refill multiple shots.

    - Added curve for reload times of VehicleTurrets based on pawn counts inside the relevant vehicle roles.

    - Added additional support for CE shotgun mechanics.
  •  

DOWNLOAD


07.09.23 (1.4)

  • Fixes

DOWNLOAD


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.)

DOWNLOAD


19.08.23 (1.4)

  • Hotfix for missing tag in turret auto-refuel job driver

DOWNLOAD


10.08.23 (1.4)

  • Many different fixes

DOWNLOAD


07.08.23 (1.4)

DOWNLOAD


04.08.23 (1.4)

DOWNLOAD

File info

Download links will be available via s

You can log in to your account or register on the site to download mods without waiting.

RSS
No comments yet. Be the first to add a comment!
Loading...