RimWorld
Ocen: 41
TerrainMovementKit
   
Przyznaj nagrodę
Ulubione
Ulubione
Usuń z ulubionych
Mod, 1.1, 1.2, 1.3, 1.4
Rozmiar pliku
Zamieszczono
Zaktualizowano
850.200 KB
4 kwietnia 2020 o 17:36
29 października 2022 o 17:08
Listy zmian: 30 ( zobacz )

Zasubskrybuj, aby pobrać
TerrainMovementKit

Opis
Terrain Movement Kit (TMK)

A mod for other mods to add terrain specific movement options and restrictions

Description

This mod is for other mods to use, it has no direct benefit to players without writing additional rules for terrain / pawns based.

What the mod provides is a toolkit for adding rules and statistics for managing movement on various terrain types to the game. It makes pawns respect new Speed baseStats for both moving through a type of terrain and for planning pathing through that terrain. It also allows you to specify new pathCost stats to pair with Speed stats in order for pawns with the stat to move at a different speed than pawns without the stat. And finally it adds rules such that pawns can be restricted to certain terrain, or not able to enter other terrain.

What's an example of using this mod?

The SwimmingKit mod uses this mod to enable SwimSpeed to affect movement in water. It also add the aquatic tag in a mod extension to make pawns only able to traverse water tiles. This is being used in the Biomes! to support Sharks, Turtles, and other semi-aquatic or fully aquatic animals.

For modded tile types you could also add movement rules. Say you have a lava tile. You can add a Lava Monster who can only move on lava. Then add some special tech armor that lets your pawns walk on lava to go battle it.

Compatibility Warning

I have not run into compatibility issues in testing, but I believe there are some incompatibilities with some existing mods. The Swimming Kit mod has been using this mod for quite some time without reported issues. But anything that modifies pathing has a high likelihood of failure in combination with this mod. There's additional work needed to improve the code to reduce these potential incompatibilities. See FAQ[github.com] for more details.

How to Use

See the TMK wiki[github.com] for details on how to add these rules to your mod.

How to Add to your Mod

The mod can be used as a mod dependency OR as a direct DLL[github.com] in your mod assemblies. If you use the second option, be advised that you should add the following to your About.xml to help ensure multiple mods using the same kit will load the latest version.
<ModMetaData> ... <loadAfter> <li>pyrce.terrain.movement.modkit</li> <li>BiomesTeam.BiomesCore</li> </loadAfter> ...
If the mods above are not present it will still check for mod load orders of this library DLL and emit an error message (but still load) if it detects a later version lower in the users mod list.

Credits

The mod Logo above used the following free assets:

Lava: "LuminousDragonGames"[opengameart.org]
Rock: "Para"[opengameart.org]
Sand: "txturs"[opengameart.org]
Water: "Aswin Vos"[opengameart.org]
Komentarzy: 25
Ender Wiggin 2 sierpnia 2023 o 23:54 
This mod replaces some pathfinding methods instead of patching them, which breaks other mods that try to patch those methods.
Hoddrock 22 maja 2023 o 10:19 
Does this mod make lava dangerous because I don’t have this mod and pawns can walk on lava naked with not even a debuff or a tick of damage
ShauaPuta 23 stycznia 2023 o 6:40 
Ah, sad to hear
I was hoping to make some wheeled animals move faster on smooth terrains like concrete
pyrce  [autor] 17 stycznia 2023 o 17:44 
@shauaputa It's probably that the underlying terrain has a floor layer ontop. So it's finding the original terrain under rather than the built planks or concrete. I think the mod would need to be updated / modified some to identify built terrain.
ShauaPuta 9 stycznia 2023 o 18:45 
Excuse me mod author sir dude fella
I have been trying to add terrain costs for my mod, but I have been unable to even after following the wiki and using biomes islands as a base
For some reason, I can patch my custom stats to sand, soil, and other natural terrains just fine, but artificial terrains like planks and concrete ignore my stat and use the default move instead
Could you gib me any tips on what I've been doing wrong?
pyrce  [autor] 29 października 2022 o 16:47 
Updated to 1.4
Tec 16 sierpnia 2022 o 5:38 
@pyrce darn was hoping to avoid c# XD
pyrce  [autor] 15 sierpnia 2022 o 20:05 
@Tec Yes you can still patch those. You have to do it from C# though. You need to add an instance of `TerrainMovementStatDef` to the `modExtensions` of the terrain that's generated by code. You run this after the other mod is done generating terrain, usually by making your mod load after and running your code inside a `StaticConstructorOnStartup` block
Tec 9 sierpnia 2022 o 6:58 
thought you should know. if you disable normal movement and try and set the speed for each TerrainDef. You cant actually seem to xpath patch the #RockBaseType#_Rough/_RoughHewn/-Smooth terrains as they are generated via code and dont produce a patchable def to add extensions or stat bases to. If there is a way to do this, i would like to know.
pyrce  [autor] 18 lipca 2021 o 11:32 
Ok yeah, doesn't look like this mod, but I'll try to reproduce to make sure. Thanks for checking on the fix working!