Ludeon Forums

Ludeon Forums

  • April 21, 2021, 07:15:32 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Mod Request] show colony wealth  (Read 518 times)


  • Muffalo
  • *
  • Posts: 1
  • Refugee
    • View Profile
[Mod Request] show colony wealth
« on: January 21, 2021, 05:16:56 AM »

I would like a mod that shows the total colony wealth permanently in the overlay.
Maybe in the overview at the bottom right where temperature, time, season and so on are displayed.
« Last Edit: January 21, 2021, 08:47:35 AM by Purzi »


  • Super Tester
  • Planetologist
  • ***
  • Posts: 1777
  • Refugee
    • View Profile
Re: [Mod Request] show colony wealth
« Reply #1 on: January 24, 2021, 03:38:58 AM »

this is  how game render "real time" if feature is enabled

Code: [Select]
public static void DoRealtimeClock(float leftX, float width, ref float curBaseY)
Rect clockRect = new Rect(leftX - 20f, curBaseY - 26f, width + 20f - 7f, 26f);
Text.Anchor = TextAnchor.MiddleRight;
Widgets.Label(clockRect, DateTime.Now.ToString("HH:mm"));
Text.Anchor = TextAnchor.UpperLeft;
curBaseY -= 26f;

adding new rendering does not require code injection, you can add GameComponent subclass as XML def and custom class with GameComponentOnGUI that will render whatever you want on screen.

just make sure to cache results and implement your rendering as fast as possible, because your method will fire 60 times per second and will consume global tick time.

request is interesting but low effort, it's literally 10 minutes to make including "original research" time.