Jump to content

[1.8.1] Historian Expanded


Aelfhe1m

Recommended Posts

This is a continuation of Zeenobit's original mod.

What it does:

Adds fully configurable and dynamic captions and overlay graphics to screenshots to better describe the context of screenshots and record your Kerbal adventures.

Features:

  • Adds a fully configurable overlay to your screenshots automatically when taking screenshots
  • Supports pre-defined value placeholders to record various statistics about your flight situation onto the screenshot
  • Supports formatted date/time display.
    • Auto-detects if Earth calendar is configured
    • Configurable day/month names for Kerbin calendar (12 months alternating between 35 and 36 days each. 71 weeks per year with 6 days per week).
  • Supports multiple layouts and the ability to switch between layouts while the game is running
  • Can be suppressed to not add overlay effects when desired (via menu or right clicking on Blizzy Toolbar button)
  • Can optionally automatically hide game UI while taking screenshot
  • Layouts can be modified while the game is running, allowing for instant preview of changes.
  • Supports (but does not require) Blizzy's Toolbar,  KSC Switcher, Kerbal Konstructs, RSS and Automated Screenshots and Saves
  • Layout inheritance - new in v.1.2.5
  • Localisation support - new in v.1.3.0

Upcoming features

  • Option to configure result of right clicking on Blizzy Toolbar button [partially implemented]. 
  • Configurable hot-keys for "Suppressed", "Always Active" and "Auto Hide UI" toggles.

Download: SpaceDock or GitHub

Documentation: GitHub

Upgrading from Historian version 1.2.8 or earlier

  1. Download the latest version of Historian from GitHub.
  2. Backup any custom layout files from your GameData/KSEA/Historian/Layouts folder (and optionally your GameData/Historian/Plugins/Plugindata/Historian.cfg settings file)
  3. Delete the GameData\KSEA folder
  4. Extract the archive and merge the GameData/Historian folder into your KSP installation's GameData folder.
  5. Copy your backed up custom layout files into the GameData/Historian/Layouts folder

Examples:

By Zeenobit:

http://imgur.com/a/w07sL

Some of my updates:

http://imgur.com/a/W4hAp

Inherited layouts:

Spoiler

inherit_A.layout:


KSEA_HISTORIAN_LAYOUT
{
	RECTANGLE
	{
		// lower panel
		Name = BackgroundPanel
		Anchor = 0.0,1.0
		Size = 0.8,0.05
		Position = 0.0,1.0
		Color = 0.0,0.0,0.0,0.5
	}

	FLAG
	{
		Name = SmallFlag
		Anchor = 0.0,1.0
		Position = 0.0,1.0
		Scale = 0.3,0.3
		DefaultTexture = Squad/Flags/default
		BackgroundTexture = Squad/Flags/minimalistic
	}
}

 

inherit_B.layout:


KSEA_HISTORIAN_LAYOUT
{
	INHERIT
	{
		LayoutName = inherit_A.layout
	}
	
	TEXT {
		Anchor = 0.0,1.0
		Size = 1.0,0.05
		Position = 0.1,1.0
		TextAnchor = UpperLeft
		FontSize = 12

		Text = Inherited layout.
	}
}

 

inherit_C.layout:


KSEA_HISTORIAN_LAYOUT
{
	INHERIT
	{
		LayoutName = inherit_A.layout
		
		EXCLUDE
		{
			Element = BackgroundPanel
			Element = SmallFlag
			Element = DoesNotExist
		}
	}
	
	TEXT {
		Anchor = 0.0,1.0
		Size = 1.0,0.05
		Position = 0.1,1.0
		TextAnchor = UpperLeft
		FontSize = 12

		Text = Pointless inherited layout with everything excluded.
	}
}

 

inherit_D.layout:


KSEA_HISTORIAN_LAYOUT
{
	INHERIT
	{
		LayoutName = inherit_B.layout
	}
	
	TEXT {
		Anchor = 0.0,1.0
		Size = 1.0,0.05
		Position = 0.1,1.0
		TextAnchor = LowerLeft
		FontSize = 14

		Text = Second message - two level inheritance.
	}
}

http://imgur.com/a/7lknj

 

 

Please refer to the full documentation on how to modify existing layouts or add new ones.

License: GNU General Public License V3

Edited by Aelfhe1m
version update
Link to comment
Share on other sites

6 minutes ago, Three_Pounds said:

Awesome! I'll give it a go. Does this mod work in the VAB/SPH, too? I often like to take screen shots in there. :)

It will work in all screens although some layouts fit better with some screens than others and many of the placeholder tags only have content in flight/map.

Link to comment
Share on other sites

Thanks for taking up the mantle, @Aelfhe1m!  Downloaded.

I’m going to be That Guy™ and put in a request that you add this to Spacedock, CKAN, or some other mod-tracking mechanism, because I definitely don’t want to miss any updates.  If there’s a good way to get version updates via Github, I’m happy to do it that way, but could use a pointer to how to set it up.

Link to comment
Share on other sites

2 minutes ago, meyerweb said:

Thanks for taking up the mantle, @Aelfhe1m!  Downloaded.

I’m going to be That Guy™ and put in a request that you add this to Spacedock, CKAN, or some other mod-tracking mechanism, because I definitely don’t want to miss any updates.  If there’s a good way to get version updates via Github, I’m happy to do it that way, but could use a pointer to how to set it up.

Already added to CKAN.

Link to comment
Share on other sites

16 minutes ago, Three_Pounds said:

I'm trying the mod out right now and I am amazed. Do you want me to upload some screenshots along with custom layouts for other people to enjoy into this thread?

Feel free. The more example layouts we can give people the better.

This for example is one I use for documenting things while obscuring as little of the screen as possible:

Spoiler

KSEA_HISTORIAN_LAYOUT
{
	RECTANGLE
	{
		Anchor = 0.0,1.0
		Size = 1.0,0.03
		Position = 0.0,1.0
		Color = 0.0,0.0,0.0,0.8
	}

	TEXT
	{
		Anchor = 0.0,1.0
		Position = 0.015,0.986
		Size = 1.0,0.02
		Color = 1.0,1.0,1.0,1.0
		TextAnchor = LowerLeft
		FontSize = 11
		FontStyle = Normal
		Text = <b><Vessel></b>, <Crew>
		PilotsColor = red
		EngineersColor = yellow
		ScientistsColor = aqua
		TouristsColor = green
	}
	
	SITUATION_TEXT
	{
		Anchor = 0.0,1.0
		Position = 0.015,1.001
		Size = 1.0,0.02
		Color = 1.0,1.0,1.0,1.0
		TextAnchor = LowerLeft
		FontSize = 11
		FontStyle = Normal
		Default =
		Landed =
		Splashed =
		Prelaunch = Standing by to launch from <LaunchSite>
		Flying = Flying at Mach <Mach> (<Speed>) at altitude of <Altitude> bearing <Heading>
		SubOrbital = At <Altitude> on sub-orbital trajectory with maximum Ap: <Ap>, Inclination: <Inc>, Surface speed: <SrfSpeed>
		Orbiting = <Orbit> at <Inc>° inclination. Altitude: <Altitude>. Speed: <OrbSpeed>
		Escaping = Hyperbolic trajectory. Alt: <Altitude>, Pe: <Pe>, Inc: <Inc>, Speed: <OrbSpeed>
		Docked = Docked
		Text = [Ap:<Ap> Pe:<Pe> Inc:<Inc> Period:<Period> OrbSpeed:<OrbSpeed>] [Alt:<Altitude> Speed:<SrfSpeed> Mach:<Mach>]
	}

	TEXT
	{
		Anchor = 0.0,1.0
		Position = -0.015,0.986
		Size = 1.0,0.02
		Color = 1.0,1.0,1.0,1.0
		TextAnchor = LowerRight
		FontSize = 11
		Text = <Custom>
	}
	
	TEXT
	{
		Anchor = 0.0,1.0
		Position = -0.015,1.001
		Size = 1.0,0.02
		Color = 1.0,1.0,1.0,1.0
		TextAnchor = LowerRight
		FontSize = 11
		FontStyle = Normal
		DateFormat = dddd, dd MMMM yyyy HH:mm:ss
		BaseYear = 1951
		Text = <Body> : <Situation> : <Biome> <LandingZone> : <LatitudeDMS>, <LongitudeDMS> - <DateKAC> <T+>
	}
		
}

 

 

Edited by Aelfhe1m
why's the code font so large?
Link to comment
Share on other sites

Hi,

There is a small api function which is used by AutomatedScreenshots, I think it is something like "set_m_....", I'm at work and can't check.

Can you please be sure to keep it?  I'll get an update for AutomatedScreenshots this evening using your new release

Thanks

Link to comment
Share on other sites

8 minutes ago, Three_Pounds said:

I see. Rich Text doesn't offer using a specific font? I can't see a way to specify a certain font within the mod either. Do I have to resort to using pictures for logo text?

I should be able to add that as a per-block option (like FontSize and FontStyle) for the next version. Just need to go read up on how Unity handles dynamic font loading through script. For the moment though any custom fonts will have to be picture based.

2 minutes ago, linuxgurugamer said:

Hi,

There is a small api function which is used by AutomatedScreenshots, I think it is something like "set_m_....", I'm at work and can't check.

Can you please be sure to keep it?  I'll get an update for AutomatedScreenshots this evening using your new release

Thanks

"set_m_Active()" has been kept. I tested the current build against ASS 0.7.1.2 and works fine on my machine at least.

Link to comment
Share on other sites

5 minutes ago, Aelfhe1m said:

I should be able to add that as a per-block option (like FontSize and FontStyle) for the next version. Just need to go read up on how Unity handles dynamic font loading through script. For the moment though any custom fonts will have to be picture based.

"set_m_Active()" has been kept. I tested the current build against ASS 0.7.1.2 and works fine on my machine at least.

great, thanks.

If you want to come up with a better way, let me know.

Link to comment
Share on other sites

@Three_Pounds I've done some testing and specifying a custom font for a block of text is doable. I can't find a way to inline it and it requires that the font is installed in your OS and is referenced by the EXACT name it has in the OS.

Example: http://imgur.com/6dSMKuh

KSEA_HISTORIAN_LAYOUT
{
	RECTANGLE
	{
		Anchor = 0.0,0.0
		Size = 1.0,1.0
		Position = 0.8,0.0
		Color = 0.0,0.0,0.0,0.6
	}

	TEXT
	{
		Anchor = 0.0,0.0
		Position = 0.81,0.05
		Size = 0.9,1.0
		Color = 1.0,1.0,1.0,1.0
		
		Font = Bodoni MT
		Text = Font 1<N>The quick brown fox
		TextAnchor = UpperLeft
		FontSize = 30
		FontStyle = Normal
	}
	
	TEXT
	{
		Anchor = 0.0,0.0
		Position = 0.81,0.15
		Size = 0.9,0.2
		Color = 1.0,1.0,1.0,1.0
		
		Font = Algerian
		Text = Font 2<N>The quick brown fox
		TextAnchor = UpperLeft
		FontSize = 30
		FontStyle = Normal
	}
	
	TEXT
	{
		Anchor = 0.0,0.0
		Position = 0.81,0.25
		Size = 0.9,0.2
		Color = 1.0,1.0,1.0,1.0
		
		Font = Comic Sans MS
		Text = Font 3<N>The quick brown fox
		TextAnchor = UpperLeft
		FontSize = 30
		FontStyle = Normal
	}
	
	TEXT
	{
		Anchor = 0.0,0.0
		Position = 0.81,0.35
		Size = 0.9,0.2
		Color = 1.0,1.0,1.0,1.0
		
		Font = Cooper Black
		Text = Font 4<N>The quick brown fox
		TextAnchor = UpperLeft
		FontSize = 30
		FontStyle = Normal
	}
	
	TEXT
	{
		Anchor = 0.0,0.0
		Position = 0.3,0.45
		Size = 0.6,1.0
		Color = 1.0,1.0,1.0,1.0
		
		Font = Arial
		Text = ListFonts: <ListFonts>
		TextAnchor = UpperLeft
		FontSize = 14
		FontStyle = Normal
	}
	
}

 

I'll roll this into the next update - probably this weekend.

Link to comment
Share on other sites

This is a great mod and I've missed it, so thanks for picking up the torch!

2 items.  

Once upon a time, hitting F1 with historian installed would "flip" the regular UI for the Historian overlay - essentially, it made it so you didn't have to F2 to get all the game UI stuff off the screen for your shots.  I for one would love to see that return.

With Kerbal Constructs, I opened KSC2 and called it Whallop Test Range:

TehBaHr.png

You can see here that it shows Whallop as the "landing zone" but the launch site is KSC...  is that an error, or is it because of the same thing that makes crash reports say KSC if you crash here?

TehBaHr.png

Link to comment
Share on other sites

Here’s a layout I’ve used since original Historian that’s a bit heavy on the flag, but has a lot of information for the different states.  I’m looking forward to revisiting it with the new text strings and formatting options!

KSEA_HISTORIAN_LAYOUT
{
	RECTANGLE
	{
		Anchor = 0.0,0.5
		Size = 1.0,0.15
		Position = 0.0,0.85
		Color = 0.0,0.0,0.0,0.5
	}

	FLAG
	{
		Anchor = 0.5,0.5
		Position = 0.15,0.85
		Scale = 1,1
		DefaultTexture = Meyerweb/Flags/USCM
	}

	SITUATION_TEXT
	{
		Anchor = 0.0,0.5
		Position = 0.25,0.85
		Size = 0.5,0.125
		Color = 1.0,1.0,1.0,1.0
		TextAnchor = MiddleLeft
		FontSize = 14
		FontStyle = Normal
		Default = <b><UT></b><N><T+><N><Custom>
		Landed = <size=21><b><Vessel></b></size><N>Landed on <Body>’s <LandingZone> at <Latitude>ºN, <Longitude>ºW<N><size=12>ME<T+> </size><size=10>(<UT>)</size><N><Custom>
		Splashed = <size=21><b><Vessel></b></size><N>Splashed down in <Body>’s waters at <Latitude>ºN, <Longitude>ºW<N><size=12>ME<T+> </size><size=10>(<UT>)</size><N><Custom>
		Prelaunch = <size=21><b><Vessel></b></size><N>Preparing for launch from <Body> at <Latitude>ºN, <Longitude>ºW<N><size=12>ME<T+> </size><size=10>(<UT>)</size><N><Custom>
		Flying = <size=21><b><Vessel></b></size><N>Flying Mach <Mach> (<Speed>) <Altitude> over <Body>’s <Biome> at <Latitude>ºN, <Longitude>ºW<N><size=12>ME<T+> </size><size=10>(<UT>)</size><N><Custom>
		SubOrbital = <size=21><b><Vessel></b></size><N>On a sub-orbital trajectory <Altitude> over <Body>’s <Biome><N><size=12>ME<T+> </size><size=10>(<UT>)</size><N><Custom>
		Orbiting = <size=21><b><Vessel></b></size><N>Orbiting <Altitude> above <Body><N><size=12>ME<T+> </size><size=10>(<UT>)</size><N><Custom>
		Escaping = <size=21><b><Vessel></b></size><N>Escaping from <Body> at <Speed><N><size=12>ME<T+> </size><size=10>(<UT>)</size><N><Custom>
		Docked = <size=21><b><Vessel></b></size><N>Docked <Altitude> above <Body>’s <Biome><N><size=12>ME<T+> </size><size=10>(<UT>)</size><N><Custom>
	}
}

(Note: I know the default texture will fail on any machine other than mine, but I figured I’d share in the raw, so to speak.)

Edited by meyerweb
Forgot to add a note about the default texture
Link to comment
Share on other sites

2 hours ago, Three_Pounds said:

Awesome! Is there a way to get the vessel Type (Ship, Lander, Station, Probe, Rover, Base, Debris)? It would be nice to have alongside the vessel name perhaps. What do you think? :)

Good suggestion and easily added. It will be in the next update.

16 minutes ago, tg626 said:

This is a great mod and I've missed it, so thanks for picking up the torch!

2 items.  

Once upon a time, hitting F1 with historian installed would "flip" the regular UI for the Historian overlay - essentially, it made it so you didn't have to F2 to get all the game UI stuff off the screen for your shots.  I for one would love to see that return.

With Kerbal Constructs, I opened KSC2 and called it Whallop Test Range:

[SNIP]

You can see here that it shows Whallop as the "landing zone" but the launch site is KSC...  is that an error, or is it because of the same thing that makes crash reports say KSC if you crash here?

[SNIP]

As far as I know Historian has never auto-hidden the UI (it's in the original mod's OP as a "future enhancement"). However since I know it's done by Automated Screenshots & Saves it should be easy to find out how to do it and add it as an option. Maybe not for the next update though.

The LaunchSite parameter is currently only for KSC Switcher launch sites (I added it to support my Realistic Progression Zero play through). I can look at Kerbal Konstructs and see if/how it exposes the site information. Based on your screenshots it seems to be modifying the Vessel.LandedAt property. I'll look into this further and if it's consistent then I'll update LaunchSite to use that info when KK is installed.

Edit: based on the way that Historian evaluates LandingZone it might also be a custom biome so I'll check for that as well.

Edited by Aelfhe1m
Link to comment
Share on other sites

Awesome, thanks for looking into it.

(Now I wonder where I got this memory that it used to suppress the game UI - not that this is the first time I've had a "memory" that never happened...)

Link to comment
Share on other sites

On 04.05.2016 at 8:32 AM, Enceos said:

@ZobrAA You're amazing at writing layout configs for Historian. Would you please share what you've got? :3

Also I vote your configs to be included in this mod :)

Of course I'll share my personal layout. Glad to know that someone like it. :) So...

Download: ZobrAzExtendedSituational.layout

PS: Note, that there is no flag in layot, because I found it too annoying, aspecially if you make so many (hundreds and thousands)  screenshoots as I do :D

Edited by ZobrAA
Link to comment
Share on other sites

22 hours ago, ZobrAA said:

PS: Note, that there is no flag in layot, because I found it too annoying, aspecially if you make so many (hundreds and thousands)  screenshoots as I do :D

Actually flags are good if they're different. I love round and hexagonal simple mission patches, take a look at the ones in my thread.

Edited by Enceos
Link to comment
Share on other sites

@tg626 Initial testing for Kerbal Konstructs and Kerbin Side. Album here: http://imgur.com/a/EIw4v

Initial finding: my laptop hates the current version of Kerbin Side. The lag is awful. I don't remember it being this bad last time I used Kerbin Side in a career game back in 1.0.4.

More seriously. There are various different values that I've been able to extract from the Kerbal Konstructs mod relating to location. The three main "useful" ones I narrowed down to:

  • Launch Site - the last launch site set via the KK button in the SPH or VAB prior to launching a vehicle
  • Nearest Space Center - detects the closest "marker" denoting a launch/landing location (usually a helipad or runway. Launchpads don't seem to be marked for some reason)
  • Distance - the straight line distance to the closest "marker"

Note: the "markers" are point locations which means that one end of a runway may be at the marker but the other end may be closer to another marker (e.g. helipad).

Note 2: switching vessels using [ and ] may give unexpected results (see images).

Barring any huge problems found on additional testing I'll roll this into an official release in the next few days.

Edit: if this does get rolled into the next release then KK-LaunchSite (shown in the test images) will be merged with the existing LaunchSite parameter but KK-SpaceCenter and KK-Distance will be kept (although I'm open to suggestions for better parameter names)

Edited by Aelfhe1m
Link to comment
Share on other sites

7 hours ago, Enceos said:

Actually flags are good if they're different. I love round and hexagonal simple mission patches, take a look at the ones in my thread.

Yes, I agree! Individual mission flags (or bages) are awesome! :)

If only we had a mod, that could generate an unique emblems on the fly! :blush:

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...