Jump to content

[1.8.1] Historian Expanded


Aelfhe1m

Recommended Posts

2 hours ago, tg626 said:

I think you've got an issue with your date calculations, namely:

Y1, D350

By Historian, it's Diznam 31, 0002 (IE 10/31/0002)

By my math, it's Nuevnam 31, 0001 (IE 09/31/0001)

I'm no math genius, so if I'm missing something, please let me know.  I'd like to start using your dates in my AAR website.

Umm, we're both wrong. It should be Diznam 31, 0001 (10/31/0001). The change in date handling in 1.2 has introduced an out by one error in my year calculation code (will be fixed in next release - probably this weekend).

The month is correct however:

  • Month 1 (days 1 - 35),
  • Month 2 (36 - 71),
  • Month 3 (72 - 106),
  • Month 4 (107 - 142),
  • Month 5 (143 - 177),
  • Month 6 (178 - 213),
  • Month 7 (214 - 248),
  • Month 8 (249 - 284),
  • Month 9 (285 - 319),
  • Month 10 (320 - 355),  <----
  • Month 11 (356 - 390),
  • Month 12 (391 - 426)

or programatically MonthNumber = Floor((DayNumber - 0.0001) / 35.5 + 1)

See this spreadsheet for full year calendar (It's not prettily formatted. It was just intended for my use when deciding how to split months, days and days of week and writing the test cases for my code).

 

Link to comment
Share on other sites

Version 1.2.7 Released

  • Fix issue #10 where configuration dialog would not show correctly if Historian.cfg file had to be created during start-up (e.g. after first installing mod and add action to Visual Studio build sequence to automatically delete Historian.cfg so I don't overlook this breaking in the future (thanks @razark)
  • Add configuration option to allow setting text to be shown for empty crew slots i.e. in pilot, scientist, engineer (and short or list variants) tags when no crew of that type are present in vessel per @razark  Default = None (same as previous version)
  • Add configuration option to allow setting text to be shown in Crew, CrewShort or CrewList tags for a vessel with no crew. Default = unmanned (same as previous version).
  • Fix #13 Out by one error when displaying Kerbin formatted dates (thanks @tg626).
  • Modify text parsing routines to remove many temporary strings and to use cached stringbuilder if available. Should reduce garbage collection footprint.
Edited by Aelfhe1m
spotted filename error in changelog
Link to comment
Share on other sites

  • 1 month later...

Hi there! I'm facing an issue. The mod windows doens't show another layout than fond test, inherit b to d and minimal and only the minimal layout is correctly displayed the inherit layouts just add "inherit" in the bottom left of the screenshot. font test, well, it shows fonts.

I have updated game and mods. When I look to the debug console I can see the mod finds but fails to load some layouts (the one that aren't displayed in the window).

I uninstalled and reainstalled the mod using CKAN and manually but this doesn't change anything.

Link to comment
Share on other sites

17 hours ago, Vahal said:

Hi there! I'm facing an issue. The mod windows doens't show another layout than fond test, inherit b to d and minimal and only the minimal layout is correctly displayed the inherit layouts just add "inherit" in the bottom left of the screenshot. font test, well, it shows fonts.

I have updated game and mods. When I look to the debug console I can see the mod finds but fails to load some layouts (the one that aren't displayed in the window).

I uninstalled and reainstalled the mod using CKAN and manually but this doesn't change anything.

I'm going to need more details. I just tested both a CKAN and manual install into a clean copy of KSP 1.2.2 with no problems.

Can you post your logs as described in the following post?

By the way the inherit, font and test layouts are not intended for actual game use but are included as syntax examples or for testing purposes.

Link to comment
Share on other sites

Sorry for the delay a bit of work during the work. I just tried to use Historian on a fresh clean install and it works flawlessly so I must conclude my dear modded (to the teeth) install is crippled and my previous "clean install"  was also botched... Damned kraken.

Thank for your time.

Link to comment
Share on other sites

  • 1 month later...

Just an update on 1.3 progress. 

The most recent 1.2.2 release version (Historian v.1.2.7) is also compatible with 1.3.

A recompiled and partially updated 1.3 specific beta version is available in the dev branch on GitHub. This includes work on localising all generated text coming from Historian:

7TzT89Y.png

I've still got more work to do on updating the documentation and properly testing some of the new features but I expect to do a proper release later this week.

Link to comment
Share on other sites

  • 2 months later...

This is kind of a vague bug report as I'm still trying to figure things out.

I am using your mod quite extensively! It's an awesome tool to get nice looking screen shots easily and doubles as documentation of my career games! Lately, I started playing with Galileo's Planet Pack and I noticed that the <biome> field doesn't seem to be working. It's just coming up blank! I looked into the Kopernicus definitions and I noticed that the biome names are localized. Could this be the cause? Have you tried using Koperinicus and Historian together in the past?

If this is an unknown issue, let me know and I'll try to get as much data about the problem as possible.

Again, sorry for the vagueness.

Link to comment
Share on other sites

18 hours ago, Three_Pounds said:

This is kind of a vague bug report as I'm still trying to figure things out.

I am using your mod quite extensively! It's an awesome tool to get nice looking screen shots easily and doubles as documentation of my career games! Lately, I started playing with Galileo's Planet Pack and I noticed that the <biome> field doesn't seem to be working. It's just coming up blank! I looked into the Kopernicus definitions and I noticed that the biome names are localized. Could this be the cause? Have you tried using Koperinicus and Historian together in the past?

If this is an unknown issue, let me know and I'll try to get as much data about the problem as possible.

Again, sorry for the vagueness.

Which version of Kopernicus and GPP are you using?

I think there may be something odd with the way Kopernicus is handling localized names. My current career is stock + OPM and the stock planet biomes are all localized fine but the OPM planets are just coming up blanks.

I'll have to investigate further. (Issue #15 created).

 

Link to comment
Share on other sites

  • 1 month later...

New Version 1.3.1 for KSP 1.3.1 (SpaceDock, GitHub)

  • Recompiled for KSP 1.3.1
  • Add text tags:
    • <Mass> - total mass of active vessel in kg
    • <Cost> - total cost of active vessel
    • <PartCount> - number of parts in active vessel

Includes changes from unreleased dev build v.1.3

  • Localisation support

    • where stock game provides localised values these will be displayed by TEXT tags. e.g. planet names, biomes, vessel types etc.
    • the file GameData/Historian/Localisation.cfg contains all the non-stock text strings used by Historian. This can be used to localise these values also (I don't know any of the other languages well enough to attempt this myself)
    • Date and Time formatting is delegated to the ingame default dateTimeFormatter allowing standard localised Kerbin and Earth calendar dates (as well as UT and MET) to be displayed
  • Parsing of TEXT (and associated) blocks occurs only once when the layout is loaded rather than on every draw event as in previous versions. A parsed expression tree is cached and executed on each draw instead. This should improve both memory usage and performance in all but trivial layouts.

  • Improvements to tag parser and evaluator to allow tags to accept parameters

    • <Date(format)> override the default dateTimeFormatter using a standard .NET date/time formatting string e.g. <Date(dd/MM/yyyy)>. See documentation for more details.
    • <Crew(isList, isShort, showSuffix, traits)> replaces the existing <Crew>, <CrewShort>, <CrewList>, <Pilots>, <PilotsShort> etc. with a single configurable tag (previous tags are retained for backwards compatibility but are now deprecated and support may be dropped in a future version).
      • isList - if true displays crew names in a verticle bulleted list. If false names are displayed inline separated by commas
      • isShort - if true the surname (Kerman or localised equivalent) is displayed only once at end of list. This setting is ignored if isList=true.
      • showSuffix - if true then a trait abbreviation will be shown after each name e.g. *Jebediah Kerman (P), Bill Kerman (E). The abbreviations can be defined in the new TRAIT block orTRAITDEFINITIONS file.
      • traits - a comma separated list of which types of crew should be listed or ALL to list everyone
      • Example: <Crew(false, true, true, Pilots, Scouts)> will be a comma separated list of the first names of all piots or scouts on the current vessel. See the documentation for full details and more examples.
  • The TEXT element property DateFormat is now deprecated in favour of the parameterised <Date>tag described above

  • The TEXT element properties PilotColor, ScientistColor, EngineerColor and TouristColor are now deprecated in favour of using TRAIT or TRAITDEFINITIONS. See documentation for details.

  • Fix: -ve values were always displayed in base units instead of most appropriate unit (i.e. -99999m instead of -99.999km)

  • Revised and reformatted documentation

BREAKING CHANGE

  • Move Historian install folder from GameData/KSEA/Historian to GameData/Historian. If upgrading from Historian version 1.2.8 or earlier then any custom layouts must be copied to the new location and the old folder deleted.

Edited by Aelfhe1m
fix links
Link to comment
Share on other sites

  • 3 months later...

@Aelfhe1m

  1. How combine EVA-situations with usual situations ? OnLadder while Orbiting vs OnLadder while Landed
  2. Somehow variable in the .layout?
  3. string longstring1 = ..........
    string longstring2 = ..........
    string nn8 = <N><size=8><N></size>
    
    SITUATION_TEXT
    	{
            ...
    		Landed =    <longstring1> string1 <nn8><longstring2>
    		Splashed =  <longstring1> string2 <nn8><longstring2>
    		Prelaunch = <longstring1> string3 <nn8><longstring2>
    		Flying =    <longstring1> string4 <nn8><longstring2>
    
            ...
    	}

    Changing suffixes for TRAIT doesn't work
    coloured.traitsconfig:

    Spoiler
    
    TRAIT
    {
    	Name = Pilot
    	DisplayName = #autoLOC_500101
    	Suffix = (П)
    	Color = red
    }
    
    TRAIT
    {
    	Name = Engineer
    	DisplayName = #autoLOC_500103
    	Suffix = (И)
    	Color = yellow
    }
    
    TRAIT
    {
    	Name = Scientist
    	DisplayName = #autoLOC_500105
    	Suffix = (У)
    	Color = aqua
    }
    
    TRAIT
    {
    	Name = Tourist
    	DisplayName = #autoLOC_500107
    	Suffix = (Т)
    	//Color = green
    }

     

     

  4. How to get the day of year in <Date(format)>  ?

  5. Is <T+(format)> supported ? (I want "T+01y:045d:05:59:59")

  6. CrewCounter, if-else, concatenation ?
    Example:

    	TEXT
    	{
            .....
            Text = "<Crew(false, false, true, Pilot, Scientist, Engineer)>" 
            if (CrewCounter("Tourist") > 0)
                Text += ", <Crew(false, true, false, Tourist)>"
            .....
    	}

     

 

Edited by flart
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 4 weeks later...
  • 3 months later...
On 4/27/2018 at 4:22 PM, JetJaguar said:

I just tried Historian in 1.4.3 and while I haven't thoroughly tested it, it seems to still work.

Hmmm...should work in 1.4.5 then.  I'll give it a try.

Edit 1: Manual install.  No luck.  The Historian icon appears in the stock toolbar in the KSC and VAB scenes but does not respond to either a left or right click to get the configuration dialog.  More investigation required.

Edit 2: Same install, but after a KSP restart, I get the config dialog.

Edited by Brigadier
Update
Link to comment
Share on other sites

I've started reading the documentation on GitHub on the .layout file structure.  The first thing I noticed a .layout is supposed to start with "name = <unique_identifier>" that is supposed to be mandatory but none of the example configs contain that line.  For example,

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
	}
}

So, is it mandatory or not?

Edited by Brigadier
Link to comment
Share on other sites

On 8/27/2018 at 8:47 AM, Brigadier said:

So, is it mandatory or not?

test.layout has:

	RECTANGLE
	{
		// left panel
		Anchor = 0.0,0.0
		Size = 1.0,1.0
		Position = 0.8,0.0
		Color = 0.0,0.0,0.0,0.6
	}

So, no need to name it... A lot of layout files are old examples.

Here is my custom ZobrAzExtendedSituational.layout:

Spoiler

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.01,0.892
		Color = 1.0,1.0,1.0,1.0
		TextAnchor = UpperLeft
		FontSize = 12
		FontStyle = Normal
		BaseYear = 1
		DateFormat = yyyy-MM-dd
		PilotColor = #fa3f19 
		EngineerColor = #29a629
		ScientistColor = #2985a6
		TouristColor = #bf8d30
		TRAIT
		{
			Name = Colonist
			DisplayName = Colonist
			Suffix = (C)
			Color = #DDA0DD
		}
		Text = <size=22><b><Vessel></b></size><N><size=8><N></size><size=13><b><UT></b>    T+<MET></size><N><size=8><N></size><Crew(false, true, false, Pilot, Engineer, Scientist, Tourist)>   <Crew(false, false, false, Colonist)><N><size=8><N></size><size=14><color=silver><i><b><RealDate>   <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: <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>Orbital 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>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>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

6 hours ago, ZobrAA said:

test.layout has:


	RECTANGLE
	{
		// left panel
		Anchor = 0.0,0.0
		Size = 1.0,1.0
		Position = 0.8,0.0
		Color = 0.0,0.0,0.0,0.6
	}

So, no need to name it... A lot of layout files are old examples.

Here is my custom ZobrAzExtendedSituational.layout:

<snip>

Ok, thanks.  Are names only required for inheriting?

This may seem like a really noob question, but where do I find the explanation syntax for the text field tags?  Some are self-explanatory for me, such as <b>...</b>, but others, such as <N> aren't.  Are these just HTML tags?

Link to comment
Share on other sites

6 hours ago, Brigadier said:

Are names only required for inheriting? 

I actually dont know, Aelfhe1m take care of this mod after original author so...

6 hours ago, Brigadier said:

This may seem like a really noob question, but where do I find the explanation syntax for the text field tags?  Some are self-explanatory for me, such as <b>...</b>, but others, such as <N> aren't.  Are these just HTML tags?

Hm, good question. <N> is new line, but this is not from HTML syntax... <b></b> is for bold font.

Maybe this is general XML?

Edited by ZobrAA
Link to comment
Share on other sites

  • 5 months later...
  • 1 month 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...