Jump to content

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


Zeenobit

Recommended Posts

Take a look at AutomatedScreenshots for an idea on how to change things over time

It's not the implementation challenge that makes me not want it. To me, it'd be much cooler if you had a collection of texts, for example:

"<Crew> checking the consistency of <Body>'s dirt ..."

"<Crew> wondering what <Body>'s dirt tastes like ..."

"<Crew> landed on <Body> in the name of science ..."

"<Crew> pretending to be happy for the camera while landed on <Body> ..."

And then every time you take a screen shot while landed, it would pick one of those at random. To me, if it's on a cycle that keeps rotating, it would look very monotonous. I can't think of a situation where a rotating cycle would be more ideal than a random one. But ... if I can find a way to "describe" a collection of texts using the existing framework of Historian (working along other elements such as SITUATION_TEXT) that's easy to use, then deriving a random and rotating variation of it would be easy.

Link to comment
Share on other sites

Cool mod. I'm making my own config now.

I don't know if this has already been reported, but the <Crew> tag seems to also include the situation. I suspect this is a bug, but I'd prefer if it just gave the crew names.

Eg. I have a line in my config that reads <N><Crew><N> and it prints "Valentina Kerman Landed at LaunchPad".

Link to comment
Share on other sites

Cool mod. I'm making my own config now.

I don't know if this has already been reported, but the <Crew> tag seems to also include the situation. I suspect this is a bug, but I'd prefer if it just gave the crew names.

Eg. I have a line in my config that reads <N><Crew><N> and it prints "Valentina Kerman Landed at LaunchPad".

This has already been reported, in post http://forum.kerbalspaceprogram.com/threads/122062-1-0-4-Historian-%28v1-1-1%29-Dynamic-Screenshot-Captions-August-5th-2015?p=2076133&viewfull=1#post2076133

@zeenobit, if you don't have time, I could fix this and compile another "unofficial" version for you.

LGG

- - - Updated - - -

It's not the implementation challenge that makes me not want it. To me, it'd be much cooler if you had a collection of texts, for example:

"<Crew> checking the consistency of <Body>'s dirt ..."

"<Crew> wondering what <Body>'s dirt tastes like ..."

"<Crew> landed on <Body> in the name of science ..."

"<Crew> pretending to be happy for the camera while landed on <Body> ..."

And then every time you take a screen shot while landed, it would pick one of those at random. To me, if it's on a cycle that keeps rotating, it would look very monotonous. I can't think of a situation where a rotating cycle would be more ideal than a random one. But ... if I can find a way to "describe" a collection of texts using the existing framework of Historian (working along other elements such as SITUATION_TEXT) that's easy to use, then deriving a random and rotating variation of it would be easy.

How about this:

Your current defined values (BTW, i wasn't able to find any full documentation on this anywhere, you may want to update the initial post):

<N> - Newline

<UT> - Universal Time

<Year> - Year (not zero padded)

<Day> - Day (not zero padded)

<Hour> - Hour (not zero padded)

<Minute> - Minute (not zero padded)

<Second> - Seconds (not zero padded)

<T+> - Kerbin date (with zero padding)

<Vessel> - Vessel name

<Body> - Body vessel in in SOI of

<Situation> - Current vessel situation

<Biome> - Biome vessel is in/over

<Latitude> - Latitude of vessel

<Longitude> - Longitude of vessel

<Altitude> - Vessel altitude

<Mach> - Vessel speed, in mach number (ie: speed of sound)

<LandingZone> - Where you are landed.

<Speed> - Vessel speed

<Crew> - Crew members

<Custom> - custom text defined by user

why not create a syntax like this:

<situation>: [text] <definedvalue> ...

This would allow you to have many different values. First, create a list of all formats which match the current situation. Then, pick one, either at random or in rotation, and use that for your current format

You could even do this:

<situation>:<Biome>: [text] <definedvalue> ...

To have multiple requirements for a single format.

Personally, I would make it a random selection, modified by the last time that format was used. So, once a format is used, the chance of it being used again would be diminished until all the others have been used.

Link to comment
Share on other sites

@linuxgurugamer, That's a good suggestion, but I think I have a better idea to make it a lot more flexible. I'm currently re-writing the implementation of Historian. What I always wanted to do was to have placeholder values with parameters. Something like:

<Year format="yy">

Would give something like this for the 2nd year:

02

Or:

<Time format="hh:mm:ss">

Then I could extend this system a lot more easily to include very complex values. Building on top of this, you can then have text collections:

TEXT_COLLECTION

{

ID = MyAwesomeCollection

Values = { "Hello, World!",

"This is awesome!",

"I am on <Body>" }

}

<RandomText from="MyAwesomeCollection">

<SequentialText from="MyAwesomeCollection">

So on and so forth.

Also, regarding the <Crew> bug, feel free to release your DLL as a patch. :)

- - - Updated - - -

Cool mod. I'm making my own config now.

I don't know if this has already been reported, but the <Crew> tag seems to also include the situation. I suspect this is a bug, but I'd prefer if it just gave the crew names.

Eg. I have a line in my config that reads <N><Crew><N> and it prints "Valentina Kerman Landed at LaunchPad".

Thanks! Feel free to share your config when you make it! :)

As linuxgurugamer mentioned, this has been a oopsie on my side. Apologies for that. If linuxgurugamer is willing, he could release a quick patch to fix this (I can't thank him enough for helping me out with this mod while my hands are tied!), or simply wait till the next release of Historian, which I'm currently working on.

Link to comment
Share on other sites

Here is my config. I copied Zeenobit's situational texts from the KSEA layout, so writing credit goes to him. The icon is just the mission flag, and the planets come from the New Horizon's pack, FYI.


KSEA_HISTORIAN_LAYOUT
{
RECTANGLE
{
Anchor = 1.0,0.50
Size = 0.33,0.15
Position = 1.0,0.125
Color = 0.0,0.0,0.0,0.5
}

FLAG
{
Anchor = 0.5,0.5
Position = 0.93,0.125
Scale = 0.8,0.8
DefaultTexture = Squad/Flags/default
}

SITUATION_TEXT
{
Anchor = 0.0,0.5
Size = 0.3,0.15
Position = 0.70,0.125
Color = 1.0,1.0,1.0,1.0
TextAnchor = MiddleLeft
FontSize = 12
FontStyle = Normal
Default = <b><UT></b><N><T+><N><Custom>
Landed = <size=22><b><Vessel></b></size><N><size=16><Crew></size><N><size=8><N></size><b><UT></b> (<T+>)<N><size=12>Landed on <Body>'s <LandingZone><N>Position : <Latitude> , <Longitude><N><N></size><size=16><b><Custom></b></size>
Splashed = <size=22><b><Vessel></b></size><N><size=16><Crew></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Splashed in <Body>'s Waters<N>Position : <Latitude> , <Longitude><N><N></size><size=16><b><Custom></b></size>
Prelaunch = <size=22><b><Vessel></b></size><N><size=16><Crew></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Preparing for launch from <Body><N>Position : <Latitude> , <Longitude><N><N></size><size=16><b><Custom></b></size>
Flying = <size=22><b><Vessel></b></size><N><size=16><Crew></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Flying at Mach <Mach> (<Speed>) <Altitude> over <Body>'s <Biome><N>Position : <Latitude> , <Longitude><N><N></size><size=16><b><Custom></b></size>
SubOrbital = <size=22><b><Vessel></b></size><N><size=16><Crew></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Flying in a sub-orbital trajectory <Altitude> over <Body><N>Position : <Latitude> , <Longitude><N><N></size><size=16><b><Custom></b></size>
Orbiting = <size=22><b><Vessel></b></size><N><size=16><Crew></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Orbiting <Altitude> over <Body><N>Position : <Latitude> , <Longitude><N><N></size><size=16><b><Custom></b></size>
Escaping = <size=22><b><Vessel></b></size><N><size=16><Crew></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Escaping from <Body><N>Position : <Latitude> , <Longitude><N><N></size><size=16><b><Custom></b></size>
Docked = <size=22><b><Vessel></b></size><N><size=16><Crew></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Docked at <Body><N>Position : <Latitude> , <Longitude><N><N></size><size=16><b><Custom></b></size>
}
}

Sample:

CVOEVMz.png

Link to comment
Share on other sites

  • 4 weeks later...

Hi Zeenobit! I think I found some king of bug in the Historian.

Here is an example:

OddIoed.jpg

As we can see info on screenshot tells us this is a Y1 D33

But filename (made by Sensible Screenshot) is: ZobraScale Y001.D009.T004100 !mission Bugsteep-2 Kerbin (Shores) FLYING (KSPv1.0.4).jpg

And this is actually Day 9, because I switched game to 24h day. So it seems Historian time definition <UT> cannot convert to 24h day but only to default 6h day... :(

Can you fix that?

Link to comment
Share on other sites

  • 3 weeks later...

Hey Zeenobit. Not sure which of you to ask about this issue but I will start with you. I am not able to get Automated Screenshots to add the historian overlay. I have 1.1.1 of Historian and 0.60 of Automated Screenshots and Saves. Historian works with F1 key just fine.

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Hey all,

Sorry for the long absence. Unfortunately I haven't been paying much attention to KSP and this mod due to various circumstances. I do plan on picking KSP back up once 1.1 hits, and that's when I'll probably resume working on this mod. Minus the time bug @ZobrAA has found, it seems like it's fairly stable as-is. Either way, here's some answers to your questions:

On 18/09/2015 at 2:26 AM, ZobrAA said:

Hi Zeenobit! I think I found some king of bug in the Historian.

As we can see info on screenshot tells us this is a Y1 D33

But filename (made by Sensible Screenshot) is: ZobraScale Y001.D009.T004100 !mission Bugsteep-2 Kerbin (Shores) FLYING (KSPv1.0.4).jpg

And this is actually Day 9, because I switched game to 24h day. So it seems Historian time definition <UT> cannot convert to 24h day but only to default 6h day... :(

Can you fix that?

I'm not sure what could be causing this as the values I get for time are coming straight from KSP's API. It really depends on how Sensible Screenshot gets its values.

On 23/09/2015 at 11:21 AM, TheCardinal said:

Could you please add the heading as parameter?

Not sure what you mean by heading. Could you elaborate, please?

On 10/10/2015 at 11:18 PM, jedensuscg said:

Hey Zeenobit. Not sure which of you to ask about this issue but I will start with you. I am not able to get Automated Screenshots to add the historian overlay. I have 1.1.1 of Historian and 0.60 of Automated Screenshots and Saves. Historian works with F1 key just fine.

The two mods aren't really compatible with each other since the last time I checked this. The way Automated Screenshots works is that it uses a different mechanism to capture a screenshot than the standard KSP API's way. Historian listens to the standard KSP screenshot event. Unless we make a collaborate effort to make the two mods work with each other by firing and listening to custom screenshot events, this cannot be fixed. It's definitely something I can look into again once I resume work on this mod. :)

On 17/10/2015 at 3:53 PM, TheCardinal said:

Can you enable a reload of the layouts please. At the moment i have to restart KSP every time i make a modification to a layout and that's becoming a bit annoying.

This feature already exists. Just press "Load" in the Configuration Window. It loads all existing layouts back again from hard drive while the game is still running. :)

On 14/12/2015 at 1:53 PM, tg626 said:

Game UI doesn't seem to "flick" off for screenshots in 1.0.5 - unless I've got something set wrong.

Also, what does "Always display configuration widow" do?  I don't see it's effects.

1. I haven't really updated the mod for 1.0.5. Not sure what could be the cause of that. If the mod just works without the flicker, then I don't think there is a problem.

2. "Always display configuration window" allows you to always show the configuration window even if you have the game UI hidden. This is so that you can edit your layout in the background and keep UI off and still keeping the Configuration Window visible to press "Load".

On 01/01/2016 at 4:11 AM, ZobrAA said:

Once again about time numbers bug:

 

To be really honest with you, I have no idea. I'll have to investigate this issue further once I resume work on this mod.

Edited by Zeenobit
Link to comment
Share on other sites

23 hours ago, Zeenobit said:

1. I haven't really updated the mod for 1.0.5. Not sure what could be the cause of that. If the mod just works without the flicker, then I don't think there is a problem.

2. "Always display configuration window" allows you to always show the configuration window even if you have the game UI hidden. This is so that you can edit your layout in the background and keep UI off and still keeping the Configuration Window visible to press "Load".

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.

Link to comment
Share on other sites

@Zeenobit, the way to tell if KSP is working in 24-hour time is by calling GameSettings.KERBIN_TIME.  Unfortunately, I don't know if there's an API to convert that into a date.

What would be super-duper cool is if Historian would convert in-game time to a real date (i.e. starting in 1951) if the player is using Real Solar System; I know that Kerbal Alarm Clock is capable of doing this (it has some pretty intense internal structures for handling date/time stuff, for obvious reasons).

Link to comment
Share on other sites

1 hour ago, Kerbas_ad_astra said:

@Zeenobit, the way to tell if KSP is working in 24-hour time is by calling GameSettings.KERBIN_TIME.  Unfortunately, I don't know if there's an API to convert that into a date.

What would be super-duper cool is if Historian would convert in-game time to a real date (i.e. starting in 1951) if the player is using Real Solar System; I know that Kerbal Alarm Clock is capable of doing this (it has some pretty intense internal structures for handling date/time stuff, for obvious reasons).

Ah! So that's where that setting was hiding. I swear I checked GameSettings at least twice. I must be even blinder than I thought I was.

I've refactored my personal forked code to use that now. First screenshot below shows effect of changing game setting using layout of "<Date> <UT> (T+) " since shots were taken at space centre T+ is blank. Other screenshots in the album show some of the other settings I've implemented in action.

 

Edit: may want to view each image full resolution to see properly as embedded imgur is overlaying descriptions on the bottom of the images.

Edited by Aelfhe1m
comment about imgur
Link to comment
Share on other sites

1 hour ago, ZobrAA said:

@Aelfhe1m Wow! So many options! ^_^

Thanks, just things I wanted to add for my own use. Planned additions include:

  • Nearest waypoint - might be useful for surface contracts (e.g. science survey, air-sea rescue etc.)
  • Navigation node info and target vehicle/body info - for automating messages relating to transfer orbits/rendezvous etc. (probably would use a separate layout to load these messages when desired or could be auto-detected and enabled based on whether node/target was active - not decided yet)
  • Time zones based on longitude for RSS/RO alternate launch sites.
  • Possible fake day/month calendar for Kerbin times - anyone know if there's a fanon consensus or existing suggestions about this?
  • Try to figure out why Automated Screenshots isn't triggering the Historian overlay any longer - code looks OK at first pass.

 

@Zeenobit Sorry if it seems I'm hijacking your thread here. Feel free to tell me to butt out if this bothers you and I'll just keep my own version separate and private. Or if you want grab any of the changes that you like for inclusion in the official version then go right ahead.

Link to comment
Share on other sites

1 hour ago, Aelfhe1m said:

Possible fake day/month calendar for Kerbin times - anyone know if there's a fanon consensus or existing suggestions about this?

I know that @RoverDude is working on long-term habitation stuff that will work in units of "Kerbal-months" (e.g. a habitat is rated for so-many kerbal-months of habitation before the Kerbals start to get homesick), so let's see if we can summon him with "@" symbol to say what his idea of a month is.

Just going on my own intuition, though, 426 divides into 6 71-day-long periods.  71 days seems a little long for a month (though it's actually less time than a 30-Earth-day month, what with Kerbin having 6-hour days), so that could divide into 12 35- and 36-day months, with 6-day weeks. "Thirty-six days hath..."  For day and month names...well, I remember reading a story about tech support where the subject of the story thought that the "Y to K" bug meant that all of the months would become Januark, Februark, and so on (and Sondak, Mondak...)...that's probably too silly.

Sunday (Solday, to avoid confusion, or maybe TheSunDay?) and Munday are obvious parallels to Earth's calendar, and maybe the other bodies could provide more names (if we assume that the other celestial bodies are named for ancient gods who also lent their names to days and months, like those of our solar system are).  Also, the names of famous Kerbals could be used in the place of Roman emperors, e.g. Geneuary or Genuary -- though January is actually named after the god Janus, not an emperor, but the pun was too good to pass up.

Link to comment
Share on other sites

On 1/10/2016 at 5:11 AM, Kerbas_ad_astra said:

I know that @RoverDude is working on long-term habitation stuff that will work in units of "Kerbal-months" (e.g. a habitat is rated for so-many kerbal-months of habitation before the Kerbals start to get homesick), so let's see if we can summon him with "@" symbol to say what his idea of a month is.

Just going on my own intuition, though, 426 divides into 6 71-day-long periods.  71 days seems a little long for a month (though it's actually less time than a 30-Earth-day month, what with Kerbin having 6-hour days), so that could divide into 12 35- and 36-day months, with 6-day weeks. "Thirty-six days hath..."  For day and month names...well, I remember reading a story about tech support where the subject of the story thought that the "Y to K" bug meant that all of the months would become Januark, Februark, and so on (and Sondak, Mondak...)...that's probably too silly.

Sunday (Solday, to avoid confusion, or maybe TheSunDay?) and Munday are obvious parallels to Earth's calendar, and maybe the other bodies could provide more names (if we assume that the other celestial bodies are named for ancient gods who also lent their names to days and months, like those of our solar system are).  Also, the names of famous Kerbals could be used in the place of Roman emperors, e.g. Geneuary or Genuary -- though January is actually named after the god Janus, not an emperor, but the pun was too good to pass up.

12 months of alternating 35 and 36 days looks like a good fit - wouldn't even need the "days hath..." mnemonic to remember them just "is this month even or odd?". Would be really easy to code too.

6 day weeks tie in nicely with the Mun's orbital period so would make sense for Kerbals to have chosen that.

For month names I was kind of thinking of using some sort of mangled Spanish count (since spoken Kerbal is reversed Spanish) with a common suffix. e.g. Unnam, Dosnam, Cuatnam, .. Oncnam, Docnam (the "-nam" suffix is from Kerman). Kind of based off the way the last four month names in English use Latin number roots (although shifted because of moving the start of the year and inserting of extra months etc.). Hadn't even started thinking about day names yet.

Another option would be to just use numbers with no names.

Edited by Aelfhe1m
stray apostrophe
Link to comment
Share on other sites

@Aelfhe1m I have issue report for you:

xe4R4tl.jpg

So when you EVA, <Crew> element duplicates kerbal's name...

Is it possible to recognise situation when you control kerbal and force <Crew> element to return an empty string?

Edited by ZobrAA
Link to comment
Share on other sites

15 hours ago, ZobrAA said:

@Aelfhe1m I have issue report for you:

So when you EVA, <Crew> element duplicates kerbal's name...

Is it possible to recognise situation when you control kerbal and force <Crew> element to return an empty string?

Updated version on GitHub 

Change log:

  • Fix: Pe not substituted correctly
  • Added Kerbin date formatting (alternating 35 and 36 day months). Month and day names fixed currently but will be configurable in later version.
  • All crew related parameters will be empty string if Kerbal is on EVA. 
  • Added test.layout which is simple layout with all parameters in alphabetically ordered vertical list on right of screen.
Edited by Aelfhe1m
spelling
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...