RimWorld

RimWorld

81 arvostelua
Ore Overlay
2
2
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
Mod, 1.3, 1.4, 1.5, 1.6
Tiedostokoko
Julkaistu
Päivitetty
1.043 MB
31.10.2022 klo 17.37
17.7. klo 6.30
15 muutosilmoitusta ( näytä )

Tilaa ladataksesi
Ore Overlay

Kuvaus
Description

This mod adds a new overlay into your Rimworld experience. The Ore Overlay will highlight unmined ores on the map to aid in spotting resources for gathering.

Steam Geysers will also be shown to aid planning your base expansions at a glance.

With a powered Ground-Penetrating scanner, the overlay will also show you ores inside of rock faces and mountains to help you gather all the available ores in your tile.

Using the ground overlay you can also see the underground deposits without needing to select a drill or the scanner.

Known Issues

This is my most complex mod to date, so please let me know if you have any issues and I will work on fixing them!

  • Investigating lag issue in some situations, Hopefully fixed!
  • Game must run for a few seconds before overlay shows on save game load.
  • Once a Ground-Penetrating scanner is built, something must be mined or found with the scanner before all ores show.
  • Mod setting window not closed caused by assumption that a game is in progress.

The issues marked above should be resolved now, please let me know if you see anything wrong!
Note: When digging ores there might be a second or two delay before the overlay updates to remove these ores.

Compatibility
The mod has been tested in a heavily modified save and I have not found any conflicts.
The deep drill overlay works with Colored Deep Resources

Future Updates
A few ideas I've had for changes in the future, none guaranteed but let me know if there are any changes you'd like to see.
  • Customisable highlight colors
  • Extra research to highlight in-mountain resources

About
This mod has been created by me, SpaceMoth! A mod I have been wanting personally for some time due to the amount of time I spend manually scanning rock faces looking for resources.

This mod is available on GitHub[github.com] with the GNU GPL v3 License[choosealicense.com] so please feel free to take a look to help develop your own mods!

I will aim to update my mods within a couple weeks of any major update!
Please feel free to suggest ideas of additional mods. New mod creation can take some time but I am welcome to ideas. Please note my skills are in scripting and coding, and I have very little ability when it comes to art and assets.

IDs
ID: 2882785661 Mod ID: Spacemoth.OreOverlay
Suositut keskustelut Näytä kaikki (2)
5
13.4.2024 klo 14.56
[bug] Can't close mod settings menu
Fridgemagnet
0
5.5.2024 klo 6.20
Severe lag with two maps/bases
anon ame
47 kommenttia
Gravenwitch 19.7. klo 22.37 
Lag seems to be significantly improved! I am still seeing very regular calls to regenerate mesh and am still seeing some outsized performance impact (like -20 fps on average) but it is nowhere near as debilitating to leave the overlay on compared to pre-patch
MrXarous 17.7. klo 16.21 
in Odyssey when going to a new map via gravship I get this NRE:

Exception in UIRootUpdate: System.NullReferenceException: Object reference not set to an instance of an object
[Ref 7EEB6D2]
at OreOverlay.HarmoneyPatchUpdate.Postfix (Verse.DeepResourceGrid __instance) [0x00005] in <b41d1804311846b99587e50f8ffc3cde>:0
at RimWorld.MapInterface.MapInterfaceUpdate () [0x00279] in <981a33edf24d499488b0f820d94638e1>:0
- POSTFIX Spacemoth.OreOverlay: Void OreOverlay.HarmoneyPatchUpdate:Postfix(DeepResourceGrid __instance)
at RimWorld.UIRoot_Play.UIRootUpdate () [0x00015] in <981a33edf24d499488b0f820d94638e1>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
RimWorld.UIRoot_Play:UIRootUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root.Update_Patch1 (Verse.Root)
Verse.Root_Play:Update ()
Space Moth  [tekijä] 17.7. klo 6.36 
I've just dropped an update that should hopefully vastly decrease the lag on maps.
Now on startup and after a major refresh the mod will make a list of all the known ores regardless if they are shown or not.
Each time the overlay refreshes only these known ores are checked for update instead of every cell on the map.

This should hopefully fix the issue. Only time it might not work right is if a meteor crashes with ore, but turning the overlay off and on again should prompt an update.

I am glad the mod helps! I always found it frustrating having to slowly check along the cliffsides or stripmine to find ores so a nice high contrast way to find them made sense to me.
Gravenwitch 16.7. klo 19.45 
I suggest you only update the overlay when mining has occurred recently, or other building destruction occurs. You can still update it manually when the overlay is opened, or every long time (> a few minutes) to catch edge cases of new ores appearing.

I am working on a more permanent fix, and can get back to you if I succeed. I can provide some (scuffed) ways to detect mining if you need one, but you are more experienced in Rimworld modding than I am and I was pushy enough already.

I greatly enjoy the mod! It really helps the mad mining rush when hitting a new map w/ the gravship start.
Space Moth  [tekijä] 15.7. klo 0.15 
@Gravenwitch Thank you for the information here, I admit I am a little at a loss on how best to fix it but I will work on it again soon. I have noticed keeping the game paused with the overlay active stops the lag and stutters, so the RegenerateMesh being the source makes sense.
Gravenwitch 14.7. klo 16.41 
I tested on a brand new save with only this mod and dub's performance analyzer. The issue is less serious but still present. At the beginning of the save there was no performance impact with the overlay on, but when constructing buildings (walls, benches, beds, etc) the mini-freezes return, though are much shorter on an equivalent number of walls. ~300 walls with heavily modded rimworld resulted in 600ms delays once a second, in vanilla it resulted in 150ms delays once a second. It specifically seems only affected by player made buildings, with walls affecting it much more than other buildings. Floors do not affect it at all. I did a second start on a crater map that was 80% mountain and performance was identical to open plains.

The specific source of the lag is RegenerateMesh from CellBoolDrawerUpdate in OreGridDraw, though your implementation doesn't look different from similar UI elements when I checked, so I am not sure why it is so heavily affected by this.
Gravenwitch 14.7. klo 14.41 
Heads up, I am experiencing microfreezes every second or two (framerate goes from 90 to ~30 and everything pauses for a 16th of a second, more serious when moving the camera) when the overlay is active. Dubs performance analyzer shows OreOverlay.HarmoneyPatchUpdate:Postfix as being responsible for ~600ms delays once a second.

This only occurs when the overlay is active. I am not using any mods that add new ores, but will try and test on an entirely clean save later and get back to you.
Raserball 23.4.2024 klo 15.39 
The log told me, that I need the Harmony Mod. Didn't had that one and there was no mentioning in the mod description. Maybe you can add that?
It's now running and working great! Thanks for the response!
Space Moth  [tekijä] 23.4.2024 klo 6.17 
@Raserball Can you send me the log? I tried enabling steam deck mode in debug but was not able to reproduce the issue.
Raserball 21.4.2024 klo 4.27 
I get an error message everytime I try to enable the mod in the mod manager. The game trys to restart and then I get this error message:

Recovered from incompatible or corrupted mods errors
It seems that some of the active mods were causing errors.
They were incompatible with each other, designed for a different version of RimWorld, or
corrupted.
All mods have been disabled and can be activated again in the mods dialog.

RimWorld Version 1.5.4069

I running the game on the SteamDeck, maybe that's the problem idk.