Jump to content

kOSPropMonitor (Adopted) - [KSP 1.12]


JonnyOThan

Recommended Posts

I'm adopting another great IVA mod - @dsonbill's kOSPropMonitor.  This wonderful mod adds a kOS terminal to RasterPropMonitor screens.

There's no functional changes in this version, except that I'm going to fix the zip file issues that have prevented this from being updated on CKAN.

Download: https://spacedock.info/mod/3473/kOSPropMonitor-Adopted (coming soon to CKAN)
License: GPLv3
Source Code: https://github.com/jonnyothan/kospropmonitor

Original thread here: 

 

Link to comment
Share on other sites

I cannot capture button 12 (bottom row, second from the right).

I'm using the same process to define the button delegate functions, and to assign those delegate functions.  My delegate function is called correctly when I press each of the other buttons.  But pressing  button 12 behaves as if I had pressed that button from the top-level MFD page.

Files:

Here's a screenshot of the button 12 delegate function definition:
ycO2Hua.png

Here's a screenshot of the button 12 delegate assignment:
8Zg5GcL.png

Link to comment
Share on other sites

18 hours ago, Poppa Wheelie said:

I cannot capture button 12 (bottom row, second from the right).

Thanks for the report.  I submitted a fix here, just replace this file: https://raw.githubusercontent.com/JonnyOThan/kOSPropMonitor/7ee72a860c58c062f675f3fa73867a00d8d8ee6f/GameData/kPM/Library/Patches/Patch.cfg

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

How do I change terminal font and font size from within the script?  I can see many fonts when I do "list fonts" from the terminal, but I can't figure out how to use any of them. I also see in the kOS documentation on github that I should be able to set Terminal:HEIGHT, but I can't seem to get that working either (although it does work on a "regular" kOS terminal).

I want to be able to switch font and font size from within the script.  I was told at the r/kOS subreddit that adjusting Terminal:HEIGHT is the only method from within the script for regular kOS terminals.  It would be great if I could use the font used by the template to write the first line, with "CPU:   0  -", "KBRD", and "EXIT".  See how much smaller the text is in the printable part of the terminal.  And see how the top MFD is using several fonts and sizes (although programmatically, and not through the kOS script). 

R7UzXLi.png

4eNaHx0.png

Link to comment
Share on other sites

4 hours ago, Poppa Wheelie said:

How do I change terminal font and font size from within the script?  I can see many fonts when I do "list fonts" from the terminal, but I can't figure out how to use any of them. I also see in the kOS documentation on github that I should be able to set Terminal:HEIGHT, but I can't seem to get that working either (although it does work on a "regular" kOS terminal).

I want to be able to switch font and font size from within the script.  I was told at the r/kOS subreddit that adjusting Terminal:HEIGHT is the only method from within the script for regular kOS terminals.  It would be great if I could use the font used by the template to write the first line, with "CPU:   0  -", "KBRD", and "EXIT".  See how much smaller the text is in the printable part of the terminal.  And see how the top MFD is using several fonts and sizes (although programmatically, and not through the kOS script). 

R7UzXLi.png

4eNaHx0.png

Yeah all the font stuff in kos is only going to work in the normal terminal.  The text in the MFD is controlled by RPM and the text files referenced by the MFD page configs.  You can edit these to change it - the easiest thing to do (and I think what you want) is to remove the [hw] tag at the start of each line. That makes the characters half the normal width.

Link to comment
Share on other sites

14 hours ago, JonnyOThan said:

You can edit these to change it - the easiest thing to do (and I think what you want) is to remove the [hw] tag at the start of each line. That makes the characters half the normal width.

Thanks!  I'll give this a shot.

Update:

I removed the [hw] tags at the beginning of each line (I left the hw tags on the top [CPU ID] line).  I now have a 40 character width terminal (actually 41 characters), with much more readable font.  Terminal:WIDTH still reports 80, but I can work around that.

Thanks again!

PDgAOrs.png

Edited by Poppa Wheelie
Update with results from removing hw tags
Link to comment
Share on other sites

  • 3 weeks later...

I have another question, along the same lines.  Is it possible to set this mfd terminal width to something even greater than 80?

I've noticed that if I print a string (with kOS  'print') that is longer than 80 characters, then the string is split into two, and each is printed as if two print commands were used. Even if I specify the row to print on with "at" (such as "print myString at (myColumn, myRow)."), what I actually get is myStringPart1 on myRow and myStringPart2 on myRow+1.

I want to print 40 or fewer actual printable characters to the screen, but with color change codes embedded, my strings are often coming out larger than 80 characters.  Each color change requires 9 characters (eg, "[#rrggbb]").  If I want a string with 40 printable characters and 5 color changes (45 more characters), I'll bust the 80 character limit.

I tried the straightforward "set terminal:width to 160."  But then when I follow that with "print terminal:width." the response is "80".

Can this be done?

Link to comment
Share on other sites

Hm interesting...I haven't messed around much with that stuff, but KOS is designed to interface with actual telnet terminal hardware that has fixed dimensions - and I suspect the kos prop monitor is using those code pathways.  I'd *guess* that the terminal size is specified in the RPM page definition somewhere.

Link to comment
Share on other sites

Thanks. Any thoughts on where I would look for that?  In the patch file you sent me on 29 September in this thread, I see "consoleWidth" set at 80 on line 50 and on line 105.  I changed both of those and repeated the "set" and "print" test above.  No luck.

Link to comment
Share on other sites

7 minutes ago, Poppa Wheelie said:

Thanks. Any thoughts on where I would look for that?  In the patch file you sent me on 29 September in this thread, I see "consoleWidth" set at 80 on line 50 and on line 105.  I changed both of those and repeated the "set" and "print" test above.  No luck.

Seems like that should work. https://github.com/JonnyOThan/kOSPropMonitor/blob/7ee72a860c58c062f675f3fa73867a00d8d8ee6f/src/kOSPropMonitor/kOSMonitor.cs#L202

Link to comment
Share on other sites

10 minutes ago, Poppa Wheelie said:

Are you saying the changes I made to the patch file should have worked?  Or is there something I should do with the kOSMonitor.cs file you linked to?

Yeah id expect that to work. The code I linked is where it sends that value over to kos.

Edited by JonnyOThan
Link to comment
Share on other sites

Now the game freezes when I enter IVA (with 'C' key).

After I edited the Patch file earlier today, I restarted the game, but went to a vehicle in flight to try out the changes.  This time I started a new save, with no vehicles in flight, went into the VAB, loaded up a vehicle, launched it, and attempted the IVA.  Game froze.  Tried from scratch a second time - game also froze.

Logs:

Update 20231215:

All is well after I replace the modified Patch file with the original.  So, my game is fully functional.  I'll just work within the 80 total character limit for now.

Edited by Poppa Wheelie
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...