[TOOL] (A15) Rimworld History Inspector

Started by aDogo, September 10, 2016, 07:12:41 AM

Previous topic - Next topic

aDogo

This is a tool to read save files and display a saves event history


How to use:

  • Extract "RimworldHistoryInspector.zip"
  • Run "RimworldHistoryInspector.exe"
  • Select your save from dropdown box
If you have any issues contact me and i will work on them

Download
Virus Scan
GitHub

Edit: Linux and possibly OS X support added on Github, thanks to mrwalsh


aDogo

Does anyone know how i could handle ticks as the tick counter appears to be starting at some point in the colony creation menu's.
This makes converting the tick value into a YEAR:SEASON:DAY:HOUR format somewhat difficult. Any suggestions welcome.

deathy


DragonLord

Quote from: aDogo on September 10, 2016, 07:57:26 AM
Does anyone know how i could handle ticks as the tick counter appears to be starting at some point in the colony creation menu's.
This makes converting the tick value into a YEAR:SEASON:DAY:HOUR format somewhat difficult. Any suggestions welcome.
This should help you (C#)

public static void TicksToPeriod(this long numTicks, out int years, out int seasons, out int days, out float hoursFloat)
{
years = (int)(numTicks / 3600000L);
long num = numTicks - (long)years * 3600000L;
seasons = (int)(num / 900000L);
num -= (long)seasons * 900000L;
days = (int)(num / 60000L);
num -= (long)days * 60000L;
hoursFloat = (float)num / 2500f;
}

milon


DariusWolfe

Dragonlord's code misses a critical thing:

Starting date.

After doing some math and screwing it up a few times, it looks like the base date is the 6th of Winter, at midnight. The value gameStartAbsTick adds to this to determine the actual starting date; For instance a test save started on the 1st of summer at 6h had a gameStartAbsTick value of 1515000, which equates to 25 days, 6 hours.

Source: I came here looking for the same answer, didn't find it, and figured it out myself while trying to type a response/question.

I'm working on an application which will do the same basic thing, but will output a more human-readable story.

aDrogo: When I load a save that's about 22 days in, I'm only getting 9 items in the list, with Events, Ticks, Temp/Loc and Weather being blank. See attached save.



[attachment deleted by admin - too old]

DragonLord

Quote from: DariusWolfe on September 21, 2016, 09:18:24 PM
Dragonlord's code misses a critical thing:

Starting date.
My code isn't missing a starting date.
It doesn't take any date into account, as it simply takes ticks and returns the in-game displayed values, based on the ticks provided.

Don't blame the tool if you don't know how to use it.

DariusWolfe

#7
I didn't blame anything, but aDogo was looking for a way to translate the numbers into a date. Your code only got him half-way there.

Don't blame me if you only provide half of the answer to the question.

Edit: Especially when his link already makes it clear that he's aware of the conversion rates for ticks to in-game time, and the fact that he's writing an application makes it clear that he knows how to write code.

Thundercraft

Nice tool! Thanks for this!

BTW: I assume the temperature is listed in Celsius. How difficult would it be to display Celsius and Fahrenheit side-by-side? After all, there is a simple formula to convert that.