Jump to content

[1.0.4] Historian (v1.1.1) - Dynamic Screenshot Captions [August 5th, 2015]


Zeenobit

Recommended Posts

The currently used month and day names:

KerbinMonthNames = { "Unnam", "Dosnam", "Trenam", "Cuatnam", "Cinqnam", "Seinam", "Sietnam", "Ocnam", "Nuevnam", "Diznam", "Oncnam", "Docenam" };
KerbinDayNames = { "Akant", "Brant", "Casant", "Dovant", "Esant", "Flant" };

Some example date format strings from my unit tests (KSP Utils returns a 5 number array for seconds, minutes, hours, days and year which is the first parameter shown in each test, followed by format and expected result):

        [TestCase(new int[] { 4, 3, 2, 77, 1 }, "y", "1")]
        [TestCase(new int[] { 4, 3, 2, 5, 1 }, "yyy", "001")]
        [TestCase(new int[] { 4, 3, 2, 5, 1 }, "d/M/y", "5/1/1")]
        [TestCase(new int[] { 4, 3, 2, 77, 1 }, "d/M/y", "6/3/1")]
        [TestCase(new int[] { 4, 3, 2, 77, 1 }, "dd/MM/yyy", "06/03/001")]
        [TestCase(new int[] { 4, 3, 2, 77, 1 }, "MM/dd/yyy", "03/06/001")]
        [TestCase(new int[] { 4, 3, 2, 77, 1 }, "dd MMMM yyy", "06 Trenam 001")]
        [TestCase(new int[] { 5, 4, 3, 2, 1 }, "h:m:s", "3:4:5")]
        [TestCase(new int[] { 5, 4, 3, 2, 1 }, "hh:mm:ss", "3:04:05")]
        [TestCase(new int[] { 5, 4, 3, 2, 1 }, "H:mm:ss", "3:04:05")]
        [TestCase(new int[] { 5, 4, 3, 77, 1 }, "h:mm:ss on dddd dd MMMM yyy", "3:04:05 on Esant 06 Trenam 001")]
        [TestCase(new int[] { 1, 1, 1, 1, 1 }, "MMM", "Unn")]
        [TestCase(new int[] { 1, 1, 1, 1, 1 }, "ddd", "Aka")]
        [TestCase(new int[] { 1, 1, 1, 7, 1 }, "dddd", "Akant")]

        public void DateFormatTests(int[] input, string format, string expected)
        {
            Assert.That(input.FormattedDate(format), Is.EqualTo(expected));
        }

 

Edited by Aelfhe1m
Link to comment
Share on other sites

3 hours ago, Aelfhe1m said:

Updated version on GitHub

Cool! At last I can finish and publish my personal layout :)

Spoiler

ZobrAzExtendedSituational.layout


KSEA_HISTORIAN_LAYOUT
{
	RECTANGLE
	{
		Anchor = 0.0,0.0
		Size = 1.0,0.125
		Position = 0.0,0.875
		Color = 0.0,0.0,0.0,0.5
	}

	TEXT
	{
		Anchor = 0.0,0.0
		Size = 1.0,0.125
		Position = 0.025,0.892
		Color = 1.0,1.0,1.0,1.0
		TextAnchor = UpperLeft
		FontSize = 12
		FontStyle = Normal
		BaseYear = 1
		PilotColor = #bf1313
		EngineerColor = #29a629
		ScientistColor = #2985a6
		TouristColor = #bf8d30
		Text = <size=22><b><Vessel></b></size><N><size=8><N></size><size=13><b><UT></b>    <T+></size><N><size=8><N></size><Crew><N><size=8><N></size><size=14><color=silver><i><b><Custom></b></i></color></size>
	}

	SITUATION_TEXT
	{
		Anchor = 0.0,0.0
		Size = 0.25,0.125
		Position = 0.74,0.887
		Color = 1.0,1.0,1.0,1.0
		TextAnchor = UpperRight
		FontSize = 12
		FontStyle = Normal
		Default = //Default text
		Landed = <size=14><LandingZone> at <Body></size><N><size=8><N></size>Latitude: <Latitude>°<N>Longitude: <Longitude>°<N><size=8><N></size>Heading: <Heading>°<N>Speed: <Speed><N>ASL: <Altitude>
		Splashed = <size=14>Floating in <Body>'s Waters</size><N><size=8><N></size>Latitude: <Latitude>°<N>Longitude: <Longitude>°<N><size=8><N></size>Heading: <Heading>°<N>Speed: <Speed><N>ASL: <Altitude>
		Prelaunch = <size=14>Preparing for launch from <LandingZone></size><N><size=8><N></size>Latitude: <Latitude>°<N>Longitude: <Longitude>°
		Flying = <size=14>Flying at <Mach>M over <Body>'s <Biome></size><N><size=8><N></size>Speed: <Speed><N>ASL: <Altitude><N>Heading: <Heading>°<N><size=8><N></size>Latitude: <Latitude>°<N>Longitude: <Longitude>°
		SubOrbital = <size=12>Sub-orbital trajectory over <Body></size><N><size=8><N></size>Velocity: <Speed><N>Altitude: <Altitude><N><size=8><N></size>Apoapsis: <Ap><N>Inclination: <Inc>
		Orbiting = <size=12>Orbiting around <Body> at <Altitude></size><N><size=8><N></size>Orbit: <Orbit><N>Inclination: <Inc><N><size=8><N></size>Latitude: <Latitude>°<N>Longitude: <Longitude>°
		Escaping = <size=12>Escape trajectory inside SOI of <Body></size><N><size=8><N></size>Periapsis: <Pe><N>Inclination: <Inc><N>Eccentticity: <Ecc><size=8><N></size>Altitude: <Altitude>
		Docked = n<size=12>Docked at <Altitude> above <Body></size><N><size=8><N></size>Orbit: <Orbit><N>Inclination: <Inc><N><size=8><N></size>Latitude: <Latitude>°<N>Longitude: <Longitude>°
	}
}

 

EHugoPH.jpg

Edited by ZobrAA
Link to comment
Share on other sites

On 1/6/2016 at 1:01 PM, tg626 said:

No, I mean that the game UI (Nav ball, altimeter, etc) appear in the screenshots unless I manually toggle them off (F2).  I thought this mod toggled them off briefly when the screenshot was taken.

I see. So then the mode is not working as intended. Does the version @Aelfhe1m forked fix this issue for you? Also, are you using the Automated Screenshots to take the shots?

On 1/6/2016 at 2:05 PM, Aelfhe1m said:

@Zeenobit Nice to see you back again. I've been working with a fork of your Historian code (https://github.com/Aelfhe1m/Historian-Expanded) for my own game use that implements most of the features requested above (plus a couple of others) if you're interested. Details are in the readme.

Wow. That is kind of amazing. I would be happy to merge this into master branch if you're ok with it as well.

Link to comment
Share on other sites

2 hours ago, Zeenobit said:

Feel free! Do you have documentation for all the features you added?

That's the pull request created. The updated readme should have all the user documentation. The code should be straightforward enough but if you want anything clarified let me know. If you pull the whole thing you'll need to readjust the post build event and reset the KSP DLL references to be able to compile on your copy since we use different code paths but that's the only thing I can think of offhand.

Link to comment
Share on other sites

  • 2 months later...

New version (1.2) mostly working in 1.1: https://github.com/Aelfhe1m/Historian-Expanded/releases

Known issues:

  • Only tested with stock AppLauncher since Blizzy's toolbar not yet updated for 1.1.
  • Crew trait colouring not working currently but doesn't cause any errors.

If anyone finds any other problems please let me know.

Link to comment
Share on other sites

18 hours ago, Aelfhe1m said:

New version (1.2) mostly working in 1.1: https://github.com/Aelfhe1m/Historian-Expanded/releases

Known issues:

  • Only tested with stock AppLauncher since Blizzy's toolbar not yet updated for 1.1.
  • Crew trait colouring not working currently but doesn't cause any errors.

If anyone finds any other problems please let me know.

Thx for update! :D

And bugreport immediately:

  1. TextColor does't applyed
  2. <UT> return Earth's calendar date (I've enabled 24h option in game menu)
  3. User manual needs an update (not realy a bug, but :rolleyes:)

Some illustration:

X1c2z1Y.png

  TEXT

    {
        Anchor = 0.0,0.0
        Size = 1.0,0.125
        Position = 0.025,0.892
        Color = 1.0,1.0,1.0,1.0
        TextAnchor = UpperLeft
        FontSize = 12
        FontStyle = Normal
        BaseYear = 1
        PilotColor = #cc3314
        EngineerColor = #29a629
        ScientistColor = #2985a6
        TouristColor = #bf8d30

        Text = <size=22><b><Vessel></b></size><N><size=8><N></size><size=13><b><UT></b>    <MET></size><N><size=8><N></size><Crew><N><size=8><N></size><size=14><color=silver><i><b><Custom></b></i></color></size>
    }

 

Edited by ZobrAA
Link to comment
Share on other sites

v.1.2.0.37 - minor bug fixes : https://github.com/Aelfhe1m/Historian-Expanded/releases/tag/1.2.0.37

  • Fix: crew trait colours not showing correctly
  • Fix: <UT> incorrectly included base year now shows first year as Y1 etc.

Thanks @ZobrAA for the bug report. Readme and changelog have also been updated.

Edit: spotted lingering debug code

v.1.2.0.38 - quickfix: https://github.com/Aelfhe1m/Historian-Expanded/releases/tag/1.2.0.38

 

Edited by Aelfhe1m
Link to comment
Share on other sites

11 minutes ago, Aelfhe1m said:

v.1.2.0.37 - minor bug fixes : https://github.com/Aelfhe1m/Historian-Expanded/releases/tag/1.2.0.37

  • Fix: crew trait colours not showing correctly
  • Fix: <UT> incorrectly included base year now shows first year as Y1 etc.

Thanks @ZobrAA for the bug report. Readme and changelog have also been updated.

oh, great, I was wondering.

Is it ready for me to compile AutomatedScreenshots against?

Link to comment
Share on other sites

2 hours ago, linuxgurugamer said:

oh, great, I was wondering.

Is it ready for me to compile AutomatedScreenshots against?

I finally got around to investigating this today and I think I've tracked down the timing issue that was preventing the Historian overlay from appearing in AS screenshots. The updated 1.0.5 DLL with the fix in it is at: https://github.com/Aelfhe1m/Historian-Expanded/tree/Refectoring/Output 

I'll push a proper release and add the same fix to the 1.1 version later this evening.

Link to comment
Share on other sites

6 minutes ago, Aelfhe1m said:

I finally got around to investigating this today and I think I've tracked down the timing issue that was preventing the Historian overlay from appearing in AS screenshots. The updated 1.0.5 DLL with the fix in it is at: https://github.com/Aelfhe1m/Historian-Expanded/tree/Refectoring/Output 

I'll push a proper release and add the same fix to the 1.1 version later this evening.

OK, I'll wait until tomorrow evening to recompile and test.

Thanks

Link to comment
Share on other sites

Minor updates fixing timing issue with Automated Screenshots & Saves.

V.1.1.8 for KSP 1.0.5 and V.1.2.0.39 for KSP 1.1 Pre at: https://github.com/Aelfhe1m/Historian-Expanded/releases

 

Edit: The 1.1 release is speculative since it has not been tested against a 1.1 version of AS&S but contains the same fix as the 1.0.5 version which has been tested.  Now tested and confirmed fixed against AS&S 0.7.1.

Edited by Aelfhe1m
amended note
Link to comment
Share on other sites

2 hours ago, Aelfhe1m said:

Minor updates fixing timing issue with Automated Screenshots & Saves.

Oh! I did not tryed 1.2.0.39 build yet, but on 0.38 for some reason Flying Situational text did not displayed...

Look for screenshots after launch and on reentry:

    SITUATION_TEXT
    {
        Anchor = 0.0,0.0
        Size = 0.25,0.125
        Position = 0.74,0.887
        Color = 1.0,1.0,1.0,1.0
        TextAnchor = UpperRight
        FontSize = 12
        FontStyle = Normal
        Default = //Default text
        Landed = <size=14><LandingZone> at <Body></size><N><size=8><N></size>Latitude: <LatitudeDMS><N>Longitude: <LongitudeDMS><N><size=8><N></size>Heading: <Heading>°<N>Speed: <SrfSpeed><N>ASL: <Altitude>
        Splashed = <size=14>Floating in <Body>'s Waters</size><N><size=8><N></size>Latitude: <LatitudeDMS><N>Longitude: <LongitudeDMS><N><size=8><N></size>Heading: <Heading>°<N>Speed: <SrfSpeed><N>ASL: <Altitude>
        Prelaunch = <size=14>Preparing for launch from <LandingZone></size><N><size=8><N></size>Latitude: <LatitudeDMS><N>Longitude: <LongitudeDMS>
        Flying = <size=14>Flying at <Mach>M over <Body>'s <Biome></size><N><size=8><N></size>Speed: <SrfSpeed><N>ASL: <Altitude><N>Heading: <Heading>°<N><size=8><N></size>Latitude: <LatitudeDMS><N>Longitude: <LongitudeDMS>
        SubOrbital = <size=12>Sub-orbital trajectory over <Body></size><N><size=8><N></size>Velocity: <OrbSpeed><N>Altitude: <Altitude><N><size=8><N></size>Apoapsis: <Ap><N>Inclination: <Inc>
        Orbiting = <size=12>Orbiting around <Body> at <Altitude></size><N><size=8><N></size>Orbit: <Orbit><N>Inclination: <Inc><N>Orbital Velocity: <OrbSpeed><N><size=8><N></size>Latitude: <LatitudeDMS><N>Longitude: <LongitudeDMS>
        Escaping = <size=12>Escape trajectory inside SOI of <Body></size><N><size=8><N></size>Periapsis: <Pe><N>Inclination: <Inc><N>Eccentticity: <Ecc><size=8><N></size>Altitude: <Altitude><N>Orbital Velocity: <OrbSpeed>
        Docked = n<size=12>Docked at <Altitude> above <Body></size><N><size=8><N></size>Orbit: <Orbit><N>Inclination: <Inc><N>Orbital Velocity: <OrbSpeed><N><size=8><N></size>Latitude: <LatitudeDMS><N>Longitude: <LongitudeDMS>
    }

Edited by ZobrAA
Link to comment
Share on other sites

2 hours ago, ZobrAA said:

Oh! I did not tryed 1.2.0.39 build yet, but on 0.38 for some reason Flying Situational text did not displayed...

Well caught. Seems I missed the flying situation when I was re-factoring that part of the code a couple of months ago and somehow hadn't noticed since. (Maybe I need more unit tests).

Fixed now for both 1.0.5 and 1.1 Pre: https://github.com/Aelfhe1m/Historian-Expanded/releases

Link to comment
Share on other sites

@Aelfhe1m Thanks! I wil try it in a few hours :)

6 hours ago, Enceos said:

@Aelfhe1m Simple thanks aren't enough to express our gratitude for maintaining this mod 

Absolutely agree! :) Also, maybe it is time to start a new topic especially for Historian Expanded, as Zeenobit did not show up fot a long time...

Link to comment
Share on other sites

@Aelfhe1m I think you should make a new topic for Historian, the GNU V3 license permits redistribution and modification of content. I tried to trace Zeenobit, but it looks like he hasn't used internet since january. His Reddit, youtube and other accounts have no activity ever since. He was last seen playing Fallout 4. Hope he's alive.

Edited by Enceos
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 months later...
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...