RimWorld

RimWorld

345 ratings
Map Mode Framework
3
4
2
3
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5
File Size
Posted
Updated
4.430 MB
Jul 25, 2024 @ 11:27am
Aug 12, 2024 @ 8:51pm
10 Change Notes ( view )

Subscribe to download
Map Mode Framework

Description
Current Version: 1.1.2
This framework is continually being developed and optimized. Feel free to suggest features or report bugs below.

About
Adds switchable map modes to the world map as well as C# utilities for mod authors to create their own map modes. By default, this mod contains 9 map modes:
  • Default - Nothing drawn, i.e. the normal RimWorld world map.
  • Biome - Provides a dropdown of all naturally-occurring biomes. Tiles of that biome are colored green.
  • Temperature - Tiles are drawn by average temperature.
  • Elevation - Tiles are drawn by elevation.
  • Rainfall - Tiles are drawn by rainfall.
  • Growing Period - Tiles are drawn by growing period.
  • Animal Commonality - Tiles are drawn according to commonality of the selected animal.
  • Plant Commonality - Tiles are drawn according to commonality of the selected plant.
  • Features - Tiles are grouped by "world features" or landforms.

I made this since I was working on a "faction territory" mod and I wanted players to be able to switch between "territories" and the normal world map without cluttering the UI too much by adding buttons and WorldLayers all over. To my knowledge, there isn't any unified/organized "map mode" mod that I could take advantage of to achieve this, so I made this framework to serve as a base for me as well as any other mod author that may find this useful. Considering RimWorld used to have map modes in earlier versions of the game and the textures are still in the code, I went ahead and implemented them (particularly temperature, elevation, and rainfall).

Supported Languages
You are free to make translations of this mod through your own mod or by sending a pull request to the repository. Languages supported by the mod by default are the following:
Spanish - Translation by Ferchu

Compatibility
This should be compatible with any mod (in that it shouldn't really break anything). However, specific considerations and notes for select mods are listed below:
  • Geological Landforms
    - Patched so that landform textures are also toggled by the "Draw Hills" setting.
    - Planned: Map mode for finding specific landforms.

  • Save Our Ship 2
    - Map modes aren't seen from the ship, but otherwise work perfectly fine when in the world map screen.

  • Rimworld Exploration Mode
    - Patched so that textures, labels, and tooltips won't be drawn over unexplored tiles.

  • ReGrowth: Core
    - Patched so that World Beautification textures are also toggled by the "Draw Hills" setting.
    - Note: This includes trees/forests since they're rendered on the same WorldLayer as the hills/mountains.
Kindly report any bugs and incompatibilities with other mods and I'll see what I can do.

FAQ
  • Can I add/remove this on an existing save?
    - Yes, this can be safely added and removed mid-game.

  • Does this affect or change world/map generation?
    - No, map modes only render textures according to a tile's terrain/characteristics on top of the world terrain.

  • Why are there settings to toggle world objects and landform text when they can already be toggled using the buttons below the pause/play menu?
    - I honestly didn't see them until around 5 minutes before releasing this mod lol.

  • Can I see that territory mod you're making using this framework?
    - Okay, just a peek. Hope it also gives you an idea of what can be done using this.


Changelog
The mod does not save anything to your save file aside from the map mode handler itself (which should be safe to remove anytime) and map mode button sorting, so unless stated otherwise, all updates should be compatible in-between saves.

Version 1.1.2
- Added support for Spanish

Version 1.1.1
- Fixed compatibility patcher to load patches regardless of load order

Version 1.1.0
- Changed WorldLayer caching and regeneration to be handled asynchronously in a background thread. This should allow map modes requiring complex operations to load in the background instead of blocking the main thread and freezing the game while the map mode is loading. It will still stutter for a little bit on extremely large worlds since building meshes needs to be done on the main thread. This is expected.
- Added growing period, animal commonality, and plant commonality as new map modes.
- Map modes that take a long time to regenerate/switch to such as growing period and regions are now cached and start caching in the background upon loading/starting a game. These can be toggled in the mod settings.
- Added ability to sort map mode buttons by dragging. Sorting is saved.
- Made the map mode bar/UI draggable.

Version 1.0.0
- Initial release

Planned Features
In terms of basic functionality and tools, the framework should be pretty much complete. Simple quality of life features are planned for both users and mod authors, particularly:
- Changing the color palette of certain map modes
- Add text meshes for "region" map modes so they show the name of the region
- Add visibility conditions for mod authors to specify when certain map modes can be accessed

Source Code
GitHub[github.com]
76 Comments
Johnald P. Redham Jun 21 @ 10:37am 
Thank you for your service, this mod was very useful. Game changes may prevent an easy update, and I know there is little interest. But it was very appreciated, thank you. o/
Levelith_ Jun 12 @ 9:42am 
@Simbach Vazo In theory, it works normally, although I doubt very much that it will have constant updates again (considering that the last one was 10 months ago on github). And I also have no hope that it will be updated to 1.6 which is coming out soon.
Simbach Vazo Jun 7 @ 5:49pm 
Seeing as how old this is, is it safe to say it and the territorial map ideas are dead?
Safeway212 May 21 @ 5:17pm 
Can I change the map temperature With this mod?
DaniAngione May 18 @ 3:32am 
Is there some specific loading order for it? I see the mod's UI (and get no errors) but there's no modes to choose; the modes' bar is basically empty

I added it mid-save, by the way
Head May 17 @ 9:29am 
Please update!
jogado21 May 8 @ 11:00pm 
Rim of iron 4 when ?
Alavastar May 7 @ 6:46am 
oh yes, yes, one step closer to map painting in Rimworld :)
LumberingTroll Mar 19 @ 7:56am 
Would it be possible to add a feature to find a tile that fits filter criteria? like temperature, biome, distance to other factions, dist to toxic, dist to X biome, etc.?
Alison Mar 1 @ 10:41pm 
travel difficulty overlay?