Jump to content

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


Zeenobit

Recommended Posts

This is very cool.

One thing that doesn't seem to be working for me is using the "Name = * " line in the .layout files - the in-game layout selector displays the name of the file for the three standard configs (although it lets me change everything else about them as usual), and leaves any custom configs (created by making an new text file and changing it to a *.layout) blank, though they're still usable.

Yes. Unfortunately, that's what happens when I'm coding late at night. :)

Originally, the plan was to give layouts custom names. I decided against that, and now the system just uses the file names. I just forgot to take out the Name field out. In the latest version, the ignored "Name" field has been removed.

Now regarding your custom layouts showing with blank names, that seems like a difference issue. If you're making a custom layout, the root node MUST be called KSEA_HISTORIAN_LAYOUT. Otherwise the layout would not (should not!?) load. So I'm not sure how you got it working with an empty text file renamed to a *.layout extension.

If you are still having the issue, can you upload your layout file and your KSP log?

For me, custom layouts show up fine in the layout selector. I have a few of them.

Link to comment
Share on other sites

Version 1.0.1 is up. Minor bug fixes:

  • <LandingZone> should no longer show up as an empty value when landing on actual biomes
  • <Altitude> and <Speed> now convert the value to the proper unit instead of always using meters and showing huge values. The unit will be displayed as part of the value.

Link to comment
Share on other sites

This is really cool! Any chance of a 'double fire' feature, one anotated, one clean? Even if it's slightly 'dumb' by just using two different frames?

I'm enjoying this already and I think it will inevitably drag me back into making custom badges for each mission. Also, I now probably should rethink my dry, systematic method of naming crafts. Yay?

MTojTfh.jpg

Link to comment
Share on other sites

This is really cool! Any chance of a 'double fire' feature, one anotated, one clean? Even if it's slightly 'dumb' by just using two different frames?

I'm enjoying this already and I think it will inevitably drag me back into making custom badges for each mission. Also, I now probably should rethink my dry, systematic method of naming crafts. Yay?

Glad to hear you're enjoying the mod. :)

For that particular problem, I was thinking of having it so that if you press Ctrl+F1, then the overlay would be suppressed for that one screenshot. That way you can just press Ctrl+F1 for those special shots. Or do a "double tap" manually by pressing F1 and then Ctrl+F1. Not sure if it's doable, but I've been floating the idea around my head.

It works great - except I have a white square in the toolbar - and yes, the png files that are the icons for the toolbar are in the folder.

That's strange. Is this for the stock toolbar or Blizzy's toolbar? Are you using ATM by any chance?

Link to comment
Share on other sites

Glad to hear you're enjoying the mod. :)

That's strange. Is this for the stock toolbar or Blizzy's toolbar? Are you using ATM by any chance?

Yes, as I am running the Astronomer's Visual stuff, so still need ATM.

Otherwise, your tutorial was great; I was able to customize the screen fairly easily. If you don't mind, how hard would it be to make one line of text a different color, like an orange or yellow, maybe? If you take a look at my KerbalX page, you can see your nifty mod in use... :D

Link to comment
Share on other sites

Yes, as I am running the Astronomer's Visual stuff, so still need ATM.

That's odd, cause I also have ATM + Astronomer's Visual pack (partial). I would suggest maybe try doing a clean re-install of Historian and clear your ATM cache. Or even add an exception for Historian for ATM.

Otherwise, your tutorial was great; I was able to customize the screen fairly easily. If you don't mind, how hard would it be to make one line of text a different color, like an orange or yellow, maybe? If you take a look at my KerbalX page, you can see your nifty mod in use... :D

You can change the text color using Unity's rich text formatting. For example, you can use:

<color=#ff0000>Hello</color><N><color=#00ff00>World!</color>

To get:

Hello

World

Check Unity's manual for details: http://docs.unity3d.com/Manual/StyledText.html

Also, it seems like you're trying to create story driven screenshots like I am. That's awesome! I'd really suggest you switch over to using the Situational layout as your base and modify that instead. SITUATION_TEXT let's you make the captions much more human-friendly, like this:

cZZumgc.jpg

Link to comment
Share on other sites

Also, it seems like you're trying to create story driven screenshots like I am. That's awesome! I'd really suggest you switch over to using the Situational layout as your base and modify that instead... http://i.imgur.com/cZZumgc.jpg

Thanks for the help with the colors. I was trying the RGBA values, such as 250.0, 250.0, 0.0, 1 (this would have given YELLOW text) and never thought about using #FFFF00. Guess I was over-reading your instructions! :blush:

Yes, but I have two story boards going on... one is for Kersplat Aerospace Industries, the main supplier for all ships for the Kerbals who dwell within my game. Right now, am playing a sandbox game with two objectives - to design craft that can perform certain roles AND to explore the Kerbol System. I decided with 1.0.X to start a fresh game and go back to the basics. Right now, while a lot of my craft are aircraft, the KSP is advancing in probe and orbital technology. :D

Originally I was only uploading unweaponized aircraft on KerbalX but had some requests to add an armed version of the aircraft I've thus far shared. Personally, while shooting missiles is a fun way to get rid of orbiting junk, it really has a minor/nonexistent role in my Kerbal universe.

In my storyline, all Kerbanauts must become "flight qualified" - meaning they must successfully demonstrate an ability to pilot fixed wing aircraft. They must do a day flight and a night flight, fly to the island airfield, land, exit the aircraft, then do a return flight. This includes one daytime and nighttime take-off and landing. I know for some of you that it may seem redundant, but it has sharpened my skills tremendously since .24 came out. Eventually I plan to blog the storyline and see where it takes me...

Edited by adsii1970
Link to comment
Share on other sites

Small feature request - Historian needs to subscribe to the GameEvents.onHideUI and GameEvents.onShowUI events to hide/show the UI window when the F2 key is pressed. That way I can set up the custom text in the window, hit F2, take the screenshot and then turn it right back on with F2 again.

Link to comment
Share on other sites

Small feature request - Historian needs to subscribe to the GameEvents.onHideUI and GameEvents.onShowUI events to hide/show the UI window when the F2 key is pressed. That way I can set up the custom text in the window, hit F2, take the screenshot and then turn it right back on with F2 again.

I specifically designed it such that the UI doesn't go away when game UI is hidden with the F2 button. The reasoning is to allow you to tweak stuff without the game UI cluttering your space. I think making this "feature" optional is the way to go.

But for your specific problem, you can just bring the UI, write your custom text, close the window, hide UI, take your screenshot, and bring UI back. The custom text is "saved" until the next screenshot command and you don't need to keep the UI window open to take the shot.

Link to comment
Share on other sites

I specifically designed it such that the UI doesn't go away when game UI is hidden with the F2 button. The reasoning is to allow you to tweak stuff without the game UI cluttering your space. I think making this "feature" optional is the way to go.

But for your specific problem, you can just bring the UI, write your custom text, close the window, hide UI, take your screenshot, and bring UI back. The custom text is "saved" until the next screenshot command and you don't need to keep the UI window open to take the shot.

Which is pretty much what I ended up doing.

Oh, and I'm not sure about others, but for my use case the option of clearing the custom text just doesn't make sense, as I was often taking two or three shots so I could choose the best one. The only time I had it unchecked was by accident (as the setting isn't persistent across restarts), and was somewhat annoyed that I had to re-type my text.

Anyway, despite my complaints, love the mod and it helped me put together a great gallery for Field Research:

Javascript is disabled. View full album
Link to comment
Share on other sites

... as the setting isn't persistent across restarts ...

Now that is a bug for sure. I'll look into fixing it ASAP. But yes, what I'll do is make the "Ignore F2" feature optional and persistent. :)

Glad you're enjoying the mod! Awesome screenshots!

Link to comment
Share on other sites

I'm hopeless at setting up the layouts:confused: can people please share theres? Thanks

They're pretty easy once you get the hand of them. Anything in particular you're having problems with? Maybe we can help. :)

If anyone has any layouts they might want to share, feel free to post them here and I'll link them in the front page.

With that being said, Version 1.0.2 is up!

Features

  • <Crew> placeholder value
  • Option to turn off the persistent configuration window (You're welcome, @nightingale! :P)

Fixes

  • Fixed issue with empty configuration window shown when game was paused with it open
  • Potential fix for "Persistent Custom Text" option not being saved
  • Fixed problems with <LandingZone> not showing correct values in a few rare locations

Link to comment
Share on other sites

They're pretty easy once you get the hand of them. Anything in particular you're having problems with? Maybe we can help. :)

If anyone has any layouts they might want to share, feel free to post them here and I'll link them in the front page.

With that being said, Version 1.0.2 is up!

Features

  • <Crew> placeholder value
  • Option to turn off the persistent configuration window (You're welcome, @nightingale! :P)

Fixes

  • Fixed issue with empty configuration window shown when game was paused with it open
  • Potential fix for "Persistent Custom Text" option not being saved
  • Fixed problems with <LandingZone> not showing correct values in a few rare locations

Oh i think im beyond help as far as doing my own..the whole thing goes straight over my head at light speed lol

basically i was after your default layout but with all the situational text added Thanks

Link to comment
Share on other sites

Oh i think im beyond help as far as doing my own..the whole thing goes straight over my head at light speed lol

basically i was after your default layout but with all the situational text added Thanks

If you just want the Default layout with SITUATION_TEXT, you can do this:

1. Create a new layout, copy the everything from Default (duplicate the file)

2. Copy the SITUATION_TEXT element from Situational and paste it under TEXT in your new layout

3. Make sure the Size, Anchor, and Position parameters of SITUATION_TEXT match those found in TEXT

4. Delete the TEXT element (or keep it, or modify it so it only shows whatever you want it to show)

That should do it. But you might have to tweak the Anchor, Size, and Position values of SITUATION_TEXT because SITUATION_TEXT is usually bigger. To play around with these values:

1. Run the game

2. Open Historian configuration window, select your layout, and hit "Save" (to make sure your layout is selected as default)

3. Make sure "Always Active" is turned on

2. Open your desired layout in a text editor

3. Adjust the Size, Position, Anchor values and save

4. Go back to the game and press Load in Historian configuration to grab the changes. You should see the results immediately.

5. Repeat step 3-4 until you're happy.

6. Turn off "Always Active" and close the configuration window

7. Profit!

If you're still having issues, let me know and I'll make the layout for you. :)

Edited by Zeenobit
Link to comment
Share on other sites

Quick suggestion/question, is it possible to have this automatically fire during contract completions and display the specific contract's "completion message"? And perhaps even load a custom image (and layout) defined by the specific contract (maybe detect a special url/layout tag in the completion message).

I'm dabbling around with a story focused contract pack (using Contact Configurator) and it would be awesome if I could use Historian to help convey the much "finer" details about the story. Also, since Historian is good for those bragging moments, having contract completion messages displayed there would be quite natural eh? : 3

how the idea came about

Edited by kimiko
Link to comment
Share on other sites

Could someone be kind enough to simply make available an example or two of this "Situational" text instead of saying how it works?

I can read the conflicting documentation at least two different ways: There's supposed to be a layout file name for each situation, or there's supposed to be a chain of situation_text blocks in one layout. Except it's not clear to me how that works, since one of the how-to's says "A SITUATION_TEXT element behaves similar to the TEXT element. It has all of its properties except Text. Instead, it has the following additional properties, each corresponding to a different flight situation:"

Except there's no "Text" in a text element. There is a value, tho. Or does it mean that you have a block that just says "SITUATIONAL_TEXT" instead of "TEXT"? I find it confusing. Some examples would be very helpful to me, as I think I would really like this mod for my galleries.

TIA

Link to comment
Share on other sites

Quick suggestion/question, is it possible to have this automatically fire during contract completions and display the specific contract's "completion message"? And perhaps even load a custom image (and layout) defined by the specific contract (maybe detect a special url/layout tag in the completion message).

I'm dabbling around with a story focused contract pack (using Contact Configurator) and it would be awesome if I could use Historian to help convey the much "finer" details about the story. Also, since Historian is good for those bragging moments, having contract completion messages displayed there would be quite natural eh? : 3

how the idea came about

Sounds like an interesting challenge for me. I can't tell you if it's possible off hand, but it's something I can look into. It's an interesting suggestion!

Could someone be kind enough to simply make available an example or two of this "Situational" text instead of saying how it works?

I can read the conflicting documentation at least two different ways: There's supposed to be a layout file name for each situation, or there's supposed to be a chain of situation_text blocks in one layout. Except it's not clear to me how that works, since one of the how-to's says "A SITUATION_TEXT element behaves similar to the TEXT element. It has all of its properties except Text. Instead, it has the following additional properties, each corresponding to a different flight situation:"

Except there's no "Text" in a text element. There is a value, tho. Or does it mean that you have a block that just says "SITUATIONAL_TEXT" instead of "TEXT"? I find it confusing. Some examples would be very helpful to me, as I think I would really like this mod for my galleries.

TIA

To me, it sounds like you're using an outdated version of Historian. The documentation is only relevant to the most recent version, in this case 1.0.2. Previously, "TEXT" had a "Value" property. That has been deprecated. It now has a "Text" property. Slightly confusing, I know, but I was aiming to make everything more consistent. Regardless, here's some more information to clear it up:

The documentation basically says:

A. "TEXT" is an element that displays whatever you put into its "Text" property.

B. "SITUATION_TEXT" is an element that selects whatever you put into its "Default", "Landed", "Splashed", "Prelaunch", "Flying", "SubOrbital", "Orbiting", "Escaping", or "Docked" properties based on the situation, and then displays it.

C. Both "TEXT" and "SITUATION_TEXT" have the following additional properties: "Anchor", "Size", "Position", "Color", "TextAnchor", "FontSize", and "FontStyle"

As an example, here's a "TEXT" element:


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
Text = <size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b> (<T+>)<N><size=12><Situation> @ <Body> (<Biome>)<N><Custom></size>
TextAnchor = MiddleLeft
FontSize = 12
FontStyle = Normal
}

Here's an example "SITUATION_TEXT" element:


SITUATION_TEXT
{
Anchor = 0.0,1.0
Size = 1.0,0.175
Position = 0.025,1.0
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=8><N></size><b><UT></b><N><T+><N><size=12>Landed on <Body>'s <LandingZone><N><Custom></size>
Splashed = <size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Splashed in <Body>'s Waters<N><Custom></size>
Prelaunch = <size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Preparing for launch from <Body><N><Custom></size>
Flying = <size=22><b><Vessel></b></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><Custom></size>
SubOrbital = <size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Flying in a sub-orbital trajectory <Altitude> over <Body><N><Custom></size>
Orbiting = <size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Orbiting around <Body><N><Custom></size>
Escaping = <size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Escaping from <Body><N><Custom></size>
Docked = <size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b><N><T+><N><size=12>Docked at <Body><N><Custom></size>
}

You can use any number of "SITUATION_TEXT" and "TEXT" elements inside a layout. But typically, you probably only need one "SITUATION_TEXT".

The idea is that you would use a "TEXT" element when you want to display a text regardless of situation. For instance, every screenshot should probably have a timestamp. So you would put the timestamp into a "TEXT" element. You would use a "SITUATION_TEXT" if you want to display a different string depending on the situation. Again, each element is modular and fully independent of all other elements inside a layout. You can use as many "SITUATION_TEXT" or "TEXT" elements or any combination of them inside a single layout as you desire.

In the example above, you notice that the "<size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b><N><T+><N>" portion of each of the situational strings used in "SITUATION_TEXT" is the same. You could simplify this by breaking up the "SITUATION_TEXT" into a "TEXT" element, which would contain "<size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b><N><T+><N>", and a "SITUATION_TEXT" element, which would contain the rest of the text. It depends on how you're designing your layout and the choice is yours. But the point I'm trying to make is that each element is fully independent.

Protip: If you have any experience with HTML, it might be easier to think of each element as an HTML tag and its properties as its attributes. Different syntax, same principles.

Edited by Zeenobit
Link to comment
Share on other sites

OK, thank you. I double checked and indeed did have the old version. <scratches head, wondering why I remember installing the new version>

In any case, thank you also for the example! Crystal clear now!

Link to comment
Share on other sites

Hi Zeenobit, first I'd like to ask if there's a way to change the mission flag of the vessel in flight? I know how it's done via save editing, but I never came across an easier option.

Historian is becoming mainstream :) I see more and more Historian screenshots around the forum. And I love your mod personally a lot! )

Would you please consider making an option to change the mission flag during flight? Setting the mission flag is something players always forget to do before launches. Plus in the process of dockings and orbital assemblies/disassemblies it get's changed numerous times, and often players repurpose their active vehicles to different missions.

Mission flag is kinda the core of this mod and the main decoration of the screenshot, it would be awesome if we had control over it rather than being forced to use what the vessel has in the end.

Edited by Enceos
Link to comment
Share on other sites

Thanks to the good explanation in GitHub it's not too hard to get a nice layout. I do have one question though: how can i add special characters in the text? For instance the degree sign for longtitude and lattitude.

screenshot3.png


KSEA_HISTORIAN_LAYOUT
{
RECTANGLE
{
Anchor = 0.0,0.5
Size = 1.0,0.14
Position = 0.0,0.91
Color = 0.0,0.0,0.0,0.5
}

FLAG
{
Anchor = 0.5,0.5
Position = 0.1,0.91
Scale =0.8,0.8
DefaultTexture = Squad/Flags/default
}

TEXT
{
Anchor = 0.0,0.5
Position = 0.20,0.91
Size = 0.5,0.125
Color = 1.0,1.0,1.0,1.0
Text = <size=22><b><Vessel></b></size><N><size=8><N></size><b><UT></b> (<T+>)<N><size=12><Situation> @ <Body> (<Biome>)<N>Position : <Latitude> , <Longitude></size>
TextAnchor = MiddleLeft
FontSize = 12
FontStyle = Normal
}

TEXT
{
Anchor = 0.0,0.5
Position = 0.6,0.96
Size = 0.5,0.125
Color = 1.0,1.0,1.0,1.0
Text = <b><i><Custom></i></b>
TextAnchor = LowerRight
FontSize = 12
FontStyle = Normal
}

PICTURE
{
Anchor = 0.5,0.5
Position = 0.92,0.88
Scale =0.5,0.5
Texture = Squad/Flags/default
}
}

Edited by TheCardinal
Link to comment
Share on other sites

TextAnchor = EndRight

Hi Zeenobit, first I'd like to ask if there's a way to change the mission flag of the vessel in flight? I know how it's done via save editing, but I never came across an easier option.

Historian is becoming mainstream :) I see more and more Historian screenshots around the forum. And I love your mod personally a lot! )

Would you please consider making an option to change the mission flag during flight? Setting the mission flag is something players always forget to do before launches. Plus in the process of dockings and orbital assemblies/disassemblies it get's changed numerous times, and often players repurpose their active vehicles to different missions.

Mission flag is kinda the core of this mod and the main decoration of the screenshot, it would be awesome if we had control over it rather than being forced to use what the vessel has in the end.

Happy to see you're having fun with the mod! :D

Regarding being able to update mission flags in flight, it's something I've always wanted to be able to do in KSP as well. Especially because I always tend to forget to switch it. It may be possible to do this in a very brute force way. But actually showing the flag selection UI in flight is a whole different story. Regardless, this seems like a solid enough idea to warrant its own mod. When I was looking for a solution to this issue, I was really surprised that no one's already made a mod for this.

Thanks to the good explanation in GitHub it's not too hard to get a nice layout. I do have one question though: how can i add special characters in the text? For instance the degree sign for longtitude and lattitude.

Special characters is a touchy subject. I managed to get it to work by copy-pasting the degree symbol character from a random website (just Google "degree sign"). The problem is, since the character is most likely encoded in UTF-8, depending on which text editor you use and its configuration, the editor may or may not convert that character into ASCII. I wish I had a better solution for this, but it has a lot to do with how KSP reads configuration files, and how Unity treats rich text and different string formats that load from those files. That's why I had to use "<N>" for the new line character.

Maybe I'll just add a "<DegreeSymbol>". :P

Also, I think there is a typo in your layout: "TextAnchor = EndRight" should be "TextAnchor = LowerRight". It probably doesn't affect the layout all that much, but you'll prevent an exception from being thrown. I'll post a link to your layout on the front page! :)

Edited by Zeenobit
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...