Jump to content

[1.8.1] Historian Expanded


Aelfhe1m

Recommended Posts

@Aelfhe1m I have a suggestion: what if you add variable that can replace stock "KSC" name. In case if I want to move KSC (by Kopernicus for instance) in different location and rename it because of that. Like "ZobrAz Kosmodrome" :D

Link to comment
Share on other sites

19 hours ago, ZobrAA said:

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:

I've been thinking on an algorhithm to implement that, but it turns out to be as code heavy as MechJeb.

Link to comment
Share on other sites

2 hours ago, Enceos said:

I've been thinking on an algorhithm to implement that, but it turns out to be as code heavy as MechJeb.

In simplest way my thought on that is:

  1. choose random badge form: round, polygon (from triangle to octagon) or custom shapes from predefined templates
  2. pick а color of badge canvas and border (where the text goes) generated on basis of craft's name and launch date
  3. choose random planet background from predefined templates for each planet or moon based on user choice of mission's destination
  4. take craft name and implement it into badge border with kerbal date of mission start
  5. take a thumbnail of craft and put in front of canvas, background planet image and behind the badge border
  6. cut off (make transparent) all outside badge's shape

:blush:

Link to comment
Share on other sites

1 minute ago, ZobrAA said:

In simplest way my thought on that is:

  1. choose random badge form: round, polygon (from triangle to octagon) or custom shapes from predefined templates
  2. pick а color of badge canvas and border (where the text goes) generated on basis of craft's name and launch date
  3. choose random planet background from predefined templates for each planet or moon based on user choice of mission's destination
  4. take craft name and implement it into badge border with kerbal date of mission start
  5. take a thumbnail of craft and put in front of canvas, background planet image and behind the badge border
  6. cut off (make transparent) all outside badge's shape

:blush:

Yeah, but to work in the game it will require an asset reloader (I don't know if it is possible at all to reload a single file instead of the whole database), because the game compiles a list of resources during the loading stage + the picture generating engine with a macros which follows the steps from your post. The asset reloader and the picture generator will be a major headache to implement, at least from scratch.

Link to comment
Share on other sites

Version 1.2.1.9 released:

  • Add text node parameters:
    • <VesselType> - the type of vessel e.g. probe, debris, lander etc.
    • <RealDate> - the real world date and time formatted using the block level DateFormat setting
  • Support for Kerbal Konstructs and Kerbin Side
    • <LaunchSite> modified to detect most recently set KK launch site
    • <KK-SpaceCenter> - the closest detected "space center"
    • <KK-Distance> - the straight line distance from the closest detected "space center"
  • Setting added to main configuration dialog for "Default space center name". Will replace "KSC" in `LaunchSite` or `KK-SpaceCenter` parameter results. (suggested by @ZobrAA)
    NOTE: only replaces the value if "KSC" is the full return value. "KSC Launch pad", "Kerbal Space Center" or similar results will NOT be affected
  • `TEXT` and `SITUATION_TEXT` elements can now specify a `Font` property for the name of the OS font to use to display the element.
    NOTE: font name must EXACTLY match OS font name. A utility parameter `ListFonts` is supplied to list the names of all installed fonts.
  • "Historian.cfg" moved to `<KSP>/GameData/KSEA/Historian/Plugins` folder to avoid interfering with Module Manager caching.
  • Current version number displayed in settings window title bar
  • General code clean-up and refactoring
Link to comment
Share on other sites

6 minutes ago, ZobrAA said:

No more Historian.version for AVC? Just curious :)

It was only partially working so I've pulled it until I can get around to doing it properly - probably next release.
 

Link to comment
Share on other sites

58 minutes ago, ZobrAA said:

@Aelfhe1m Also seems like DateFormat not working ;.; Always return long date pattern "Monday, May 09, 2016" for now...

Thanks for spotting that @ZobrAA  This is the same issue that affected crew trait colouring in 1.1 pre-release.

Bug fix version 1.2.1.14 now released

  •  Regression fix for `DateFormat`
  • Added fixed(?) AVC version file
Edited by Aelfhe1m
Link to comment
Share on other sites

Nice to see this continuing to be updated, so thank you for that.  If you're interested in expanding it further, I always thought MovieTime was a really nice complementary mod.  If it doesn't get updated for 1.1+, it's effects might be a nice additional option to bring over to this one.

 

Link to comment
Share on other sites

Found an issue with Module Manager and this mod.  B/c of way this mode makes a new .cfg in Gamedata each load, it causes MM to load fresh each time and not from Cache.  I run 227 mods currently, and the load time with this mode in none-cache is about 20-21mins.  Removing this mod and making a new load, and then MM loading from cache, cut my load times to right on 10mins.

I really like this mod, and I think you can save the .cfg in plugindata and have it not effect MM.  I'm not real sure how all that works.  But might want to look into it.  Until this is fixed, I would like to use this mod, but prefer to cut my loads in half.  

Doesn't make a big deal with only a few mods installed.  But with a lot, this is a pretty big difference.

Link to comment
Share on other sites

Version 1.2.2.11 released:

  • Change persistence model for configuration settings to use game save files rather than a config file in GameData.
    NOTE: Starting a new save will set configuration to default values. Reverting a flight or quickloading may load an older version of the configuration if you've made recent changes.

Apparently putting settings file into "Plugins" folder did not prevent it from interfering with Module Manager config caching. I've rewritten the settings code to save directly into the save game file instead.

Thanks @Lewtz for pointing out it wasn't working as intended. There will be a one off impact on Module Manager as it deletes the old configuration on first launch but subsequent launches should not affect Module Manager's cache.

Link to comment
Share on other sites

On 10.05.2016 at 10:37 PM, Aelfhe1m said:

Version 1.2.2.11 released:

  • Change persistence model for configuration settings to use game save files rather than a config file in GameData.
    NOTE: Starting a new save will set configuration to default values. Reverting a flight or quickloading may load an older version of the configuration if you've made recent changes.

Apparently putting settings file into "Plugins" folder did not prevent it from interfering with Module Manager config caching. I've rewritten the settings code to save directly into the save game file instead.

Thanks @Lewtz for pointing out it wasn't working as intended. There will be a one off impact on Module Manager as it deletes the old configuration on first launch but subsequent launches should not affect Module Manager's cache.

I'd say you've taken a strange turn there. Modders usually try to keep the persistence file clean of the settings and other garbage in case a player decides to delete the mod or move the save file to a new KSP version without breaking.

AFAIK to avoid MM cache you need to place your plugin .dll into the GameData/ModName/Plugins and the settings file into GameData/ModName/Plugins/PluginData folder.

 

 

Edited by Enceos
Link to comment
Share on other sites

7 minutes ago, Enceos said:

I'd say you've taken a strange turn there. Modders usually try to keep the persistence file clean of the settings and other garbage in case a player decides to delete the mod or move the save file to a new KSP version without breaking.

AFAIK to avoid MM cache you need to place your plugin .dll into the GameData/ModName/Plugins and the settings file into GameData/ModName/Plugins/PluginData folder.

There are a few instances where it is necessary to save data in the persistent.sfs file, but usually not.  One of them is what KRASH does, it is necessary to store a minimal amount of data in the sfs file in order to recover properly from a simulation which crashes.

interesting about the info re. the MM cache, I'll have to update some of my mods to use that layout

Link to comment
Share on other sites

Glad to see that this mod is still being maintained - thanks very much to everyone involved in keeping it alive.  I've just started using this again after quite some time and I'm getting a really weird issue I can't seem to figure out.  The existing layouts, new layouts - hell, clearing all the layouts and trying to leave only one in the /layouts directory always ends up with this happening.  Anyone got any idea why?

Spoiler

UtCQXnr.png

This really isn't all that complicated a thing to write layouts for so I'm at a loss as to why I can't get this to stop happening...help?

Link to comment
Share on other sites

Bug report for Historian v1.2.2.11

It seems like

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
    }

gets darker and darker with every screenshot (or maybe with every scene change) until it becomes total black...

 

 

Edited by ZobrAA
Link to comment
Share on other sites

Version 1.2.3.1 released:

  • Revert persistence model to config file format and set save path to GameData\KSEA\Historian\Plugins\PluginData
  • Fix: BUG - multiple layouts overlaying each other
  • Fix: BUG - semi-transparent rectangle elements becoming increasingly opaque over multiple screenshots
  • Fix: potential problem with configuration window id clashing with window ids from other mods.

Thanks to @Enceos for pointing me to the correct path to get Module Manager to ignore config files (I'd done some failed testing with PluginsData but that extra 's' was falsifying my results.)

Thanks to @ZobrAA and @rasta013 for the bug reports.

The leftover scenario module in persistent.sfs will cause a few extra debug messages to appear in the log file but these are harmless as far as I can tell. If you wish to "clean" your save file to remove this look for and carefully remove the section:

Spoiler

SCENARIO
{
	name = HistorianSettings
	scene = 5, 7, 6, 8
	... // extra lines here
}
Link to comment
Share on other sites

One more thought bothers my mind for couple of days. :blush:

What if mod can detect action groups toggling? Than maybe user can define some custom text, that can be inserted into layout if desired action group fired. It's like custom situational designator but more advanced than landed/orbiting/flying/etc.

For example, something goes wrong on ascend, user pushes abort button and Historian adds "Mission Abort!" custom text on screenshot. Or pushing stage action automatically adds number to some custom text like "Stage Sequence ##" and clear text when Ap and Pe goes above atmosphere.

It would be cool to have a way to define a parameters for each time point to have additional info on screenshot like "MECO", "Prepare for Boosters detach" and such. But it's too complicated I think... :)

Edited by ZobrAA
Link to comment
Share on other sites

5 hours ago, ZobrAA said:

One more thought bothers my mind for couple of days. :blush:

What if mod can detect action groups toggling? Than maybe user can define some custom text, that can be inserted into layout if desired action group fired. It's like custom situational designator but more advanced than landed/orbiting/flying/etc.

For example, something goes wrong on ascend, user pushes abort button and Historian adds "Mission Abort!" custom text on screenshot. Or pushing stage action automatically adds number to some custom text like "Stage Sequence ##" and clear text when Ap and Pe goes above atmosphere.

It would be cool to have a way to define a parameters for each time point to have additional info on screenshot like "MECO", "Prepare for Boosters detach" and such. But it's too complicated I think... :)

After some experimenting, I've added a <StageNumber> parameter and two new top level elements to my dev build.

1) ACTION_TEXT:

Spoiler

ACTION_TEXT
{
	// position, size, anchor, colour etc.

    Abort = Mission Aborted at <MET>!
    Stage = Stage Sequence <StangeNumber>
    
    AG1 = Reducing thrust on main engines
    AG2 = Shutdown of outer engines
    AG3 = Let's science the #### out of it!
}

 

The message would be displayed on every screenshot after the action key was pressed until a configurable time-out elapsed. Pressing the key would not take a screenshot itself (that's more Automated Screenshots and Saves' territory) just queue up the appropriate message to be displayed. Like SITUATION_TEXT each message would be richtext and support all the parameters of a standard text entry.

2) TEXT_LIST:

Spoiler

TEXT_LIST
{
	// position, size, anchor, colour etc.

	Random = false
	ResetOnLaunch = true

	Text = Message one
	Text = Message two
	Text = Message three at <RealDate>
	...
	Text = Message four hundred and fifty seven!
}

 

An arbitrary long list of messages (same format as TEXT again) that will display in sequence or randomly. Optional parameter to reset to start of list for each new vessel launched.

Example:

Spoiler

 

Layout:


KSEA_HISTORIAN_LAYOUT
{
    ACTION_TEXT
	{
		Anchor = 0.0,0.0
		Position = 0.3,0.3
		Size = 0.6,0.24
		Color = 1.0,0.0,0.0,1.0
		TextAnchor = UpperLeft
		FontSize = 30
		FontStyle = Bold
		
		Abort = Flight Aborted!
		Stage = Stage <StageNumber>
	}
	
	TEXT_LIST
	{
		Anchor = 0.0,0.0
		Position = 0.3,0.4
		Size = 0.6,0.24
		Color = 1.0,1.0,0.0,1.0
		TextAnchor = UpperLeft
		FontSize = 20
		FontStyle = Italic
		Font = Comic Sans MS
		Random = false
		ResetOnLaunch = true
		
		Text = First message
		Text = Message number two
		Text = Message three
		Text = Fourth
    }
}

 

 

I'm not sure about the timed message list. It would certainly be do-able with a list of MET, message pairs but even with some sort of fudge factor around the time it would likely take several practice flights to pin down the correct timing of the messages. Perhaps instead a variant of TEXT_LIST where the message advances when a given key is pressed?

Link to comment
Share on other sites

@Aelfhe1m, omg you'r quick! :)

I dont even think of this! At the moment I cannot find an interesting way to use it with regular craft, but in case if craft is a kerbal, than we can use this for some random funny message from mission specialist or from mission control! :D

Can you make a separate text lists for every SITUATION_TEXT? So, for instance, Jeb can say "One small step for Kerman..." only when Landed, "Poyekhali!" when Prelaunch, "And yet it spins!" when suborbital, and "It's full of stars!" when Escaping... Possible quotes are endless! :rolleyes:

6 hours ago, Aelfhe1m said:

I'm not sure about the timed message list. It would certainly be do-able with a list of MET, message pairs but even with some sort of fudge factor around the time it would likely take several practice flights to pin down the correct timing of the messages. Perhaps instead a variant of TEXT_LIST where the message advances when a given key is pressed?

Yea, not really an elegant simplicity... Especially keeping in mind that this is make sense only for some specific craft and not relevant for anoter...

Link to comment
Share on other sites

15 hours ago, ZobrAA said:

Can you make a separate text lists for every SITUATION_TEXT? So, for instance, Jeb can say "One small step for Kerman..." only when Landed, "Poyekhali!" when Prelaunch, "And yet it spins!" when suborbital, and "It's full of stars!" when Escaping... Possible quotes are endless! :rolleyes:

Not quite ready for release yet, but I modified TEXT_LIST to allow lists to be specified for each situation. If no matching list is found it uses the "Default" list (and if that's blank then no message is displayed).

I also extended both TEXT_LIST and SITUATION_TEXT to have and EvaOnly option (values: true, false, either (default)) and special EVA situations of "RagDolled" and "Climbing".

Example:

Spoiler

    TEXT_LIST
    {
        Anchor = 0.0,0.05
        Position = 0.2,0.1
        Size = 0.6,0.24
        Color = 1.0,1.0,0.0,1.0
        TextAnchor = MiddleCenter
        FontSize = 20
        FontStyle = Italic
        Font = Comic Sans MS
        Random = false
        ResetOnLaunch = true
        EvaOnly = Either
        
        Default 
        {
            Text = Boring!
            Text = Nothing to see here
            Text = Drei
            Text = Δ
            Text = 5
            Text = Seis
            Text = Sieben
            Text = 八 (はち)
            Text = Neuf
        }
        
        Prelaunch
        {
            Text = Поехали!
            Text = Let's go!
        }
        
        Landed 
        {
            Text = The Eagle has landed
            Text = Is it safe now?
        }
        
        Flying 
        {
            Text = ♬Up, up and away in my beautiful, my beautiful rocket ship!♬
            Text = Wheeee!
            Text = Tower, this is Ghost rider requesting a flyby.
        }
        
        RagDolled
        {
            Text = I think I broke something
            Text = Is that meant to bend like that?
            Text = Ouch!
            Text = 痛い!
        }
        
        Climbing
        {
            Text = Ever upward
            Text = I think I'm slipping
            Text = This ladder's a bit slippery!
        }
    }

 

 

For the moment climbing only works with ladders but I'm trying to find how to detect clambering as well.

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