Jump to content

[Release - Final] kOSPropMonitor - IVA kOS Monitor


dsonbill

Recommended Posts

For anyone that uses this, please let me know what you think.

The whole thing with the labels was more of a proof of concept, and I saw a few people complain about it being useless, so I made this the stock setup instead:

 

3b967d62179d42258fc338cb2c6bafe6.png

 

The label and flag panels are still there - they're just made for other things than a basic terminal (I.E. IVA makers who want to do something special). Since everyone thinks I programmed this in a way that the labels can't be removed, I'll just do it like this.

If you're an IVA developer, check out the old terminal templates if you want to use some of those fancy features. For now, I'll be working on a release of the above.
If anyone has any other complaints about this, please let me know. It will be taken into heavy consideration.

 

 

This is a half-width version. This will make the console effectively 80x19. Let me know what you guys think.

b9fd051ac3fde774abb01b3eca6d9997.png

 

Color support is a bit screwy. If you guys would rather have to do it all yourself, let me know - it'll make doing your own colors much easier. Also, let me know what you guys think the default color should be. Terminal green isn't bad, but white is easier to read.

e31b279853842fd3897cad797d09b36c.png

 

 

Here's the results:
10e553c497bcd43cbb173c72ac1250ce.png

Hopefully people feel this is a bit more of what they were expecting out of the default terminal. Again if anyone has any suggestions, it would be greatly appreciated.

 

 

Note: Released on SD.

Edited by dsonbill
Link to comment
Share on other sites

8 hours ago, Sebra said:

Hi!

So it actually works in 1.9? CKAN tell me it cannot.

Should look into...

I've honestly never really supported CKAN. I'll look into what's going on later tonight. Sorry about that.

Edit: You'll have to ask the CKAN guys. I have no idea why 1.5.1 is the latest version of the mod on there.

Edited by dsonbill
Link to comment
Share on other sites

  • 1 month later...
1 hour ago, Kontiko said:

I don't know why but on Linux your zip archive is broken it doesn't contain subfolders and the path of the single files are represented in their name. On Windows everything works just fine.

@dsonbill

Indeed unzip complains, it does create the directories, and seems to unpack the files to their relevant locations, but the files are horribly broken.

Spoiler

$ unzip kOSPropMonitor-1.7.1.38388.zip 
Archive:  kOSPropMonitor-1.7.1.38388.zip
warning:  kOSPropMonitor-1.7.1.38388.zip appears to use backslashes as path separators
   creating: kOSPropMonitor-1.7.1.38388/GameData/
   creating: kOSPropMonitor-1.7.1.38388/Optional/
  inflating: kOSPropMonitor-1.7.1.38388/JSONFX LICENSE  
  inflating: kOSPropMonitor-1.7.1.38388/LICENSE  
  inflating: kOSPropMonitor-1.7.1.38388/README.md  
   creating: kOSPropMonitor-1.7.1.38388/GameData/kPM/Library/
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/JsonFx.dll  
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/kOSPropMonitor.dll  
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/Library/Patches/kOS_home40x20.txt  
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/Library/Patches/Patch.cfg  
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/Library/Replacements/default.json  
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/Library/Terminals/OriginalTerminal.txt  
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/Library/Terminals/terminal40x20.txt  
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/Library/Textures/kPM40x20.dds  
  inflating: kOSPropMonitor-1.7.1.38388/GameData/kPM/Library/Textures/kPM40x20Alt.dds  
   creating: kOSPropMonitor-1.7.1.38388/Optional/No Colors/
   creating: kOSPropMonitor-1.7.1.38388/Optional/No Colors/GameData/
   creating: kOSPropMonitor-1.7.1.38388/Optional/No Colors/GameData/kPM/
   creating: kOSPropMonitor-1.7.1.38388/Optional/No Colors/GameData/kPM/Library/
  inflating: kOSPropMonitor-1.7.1.38388/Optional/No Colors/GameData/kPM/Library/Patches/Patch.cfg

 


$ unzip -v
UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 9.2.0 for Unix (Linux ELF).

 

Spoiler

$ ls -lart kOSPropMonitor-1.7.1.38388/*
kOSPropMonitor-1.7.1.38388/Optional:
ls: cannot access 'kOSPropMonitor-1.7.1.38388/Optional/.': Permission denied
ls: cannot access 'kOSPropMonitor-1.7.1.38388/Optional/..': Permission denied
ls: cannot access 'kOSPropMonitor-1.7.1.38388/Optional/No Colors': Permission denied
total 0
d????????? ? ? ? ?                ? No Colors
d????????? ? ? ? ?                ? ..
d????????? ? ? ? ?                ? .

kOSPropMonitor-1.7.1.38388/GameData:
ls: cannot access 'kOSPropMonitor-1.7.1.38388/GameData/.': Permission denied
ls: cannot access 'kOSPropMonitor-1.7.1.38388/GameData/..': Permission denied
ls: cannot access 'kOSPropMonitor-1.7.1.38388/GameData/kPM': Permission denied
total 0
d????????? ? ? ? ?                ? kPM
d????????? ? ? ? ?                ? ..
d????????? ? ? ? ?                ? .

 

 

 

PS.:

@Kontiko and fellow Linux users:

I have yet to unlock parts to see if it actually works, but it seems as if CKAN managed to install it correctly. Probably using some internal/Mono/DotNet function...

Edited by Corax
ping
Link to comment
Share on other sites

On 2/27/2020 at 9:37 PM, dsonbill said:

Edit: You'll have to ask the CKAN guys. I have no idea why 1.5.1 is the latest version of the mod on there.

We've been getting an inflation error with the latest release because the file paths in the ZIP use backslashes, which the ZIP format specification doesn't allow (basically what @Kontiko and @Corax said):

http://status.ksp-ckan.space/

Quote

https://spacedock.info/mod/712/kOSPropMonitor/download/1.7.1.38388 is not a valid ZIP file: Error in step EntryHeader for kOSPropMonitor-1.7.1.38388/GameData/: Exception during test - 'Central header and local header file name mismatch'

udHKcCZ.png

https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT

Quote

       4.4.17.1 The name of the file, with optional relative path.
       The path stored MUST NOT contain a drive or
       device letter, or a leading slash.  All slashes
       MUST be forward slashes '/' as opposed to
       backwards slashes '\' for compatibility with Amiga
       and UNIX file systems etc.  If input came from standard
       input, there is no file name field.  

 

Edited by HebaruSan
Link to comment
Share on other sites

  • 3 months later...
  • 4 months later...

Hello!  Resolved

I find how use button!! 

Ex :

Set Button to addons:kpm:buttons. 

Function test

{print "hello" !}.

Button:setdelegate(0, test@)

Affect the function test to button 0 when it's pressed. (mfd button_a) 

Joined to label state and you have all you need to execute a task. 

I use the template with {button label..} in a modified basicmfd. Txt

added more colum and row to keep space, new starting page, mfd it's only for kos.  (next video soon) 

Steph. 

edit.

(the result)

 

Edited by stephm
Resolved
Link to comment
Share on other sites

  • 1 month later...

can't manage to make the keyboard work since ksp update 1.11. i try with a clean install took me many attempt but when i press "O"button near the mfd the KRBD lock normaly but no inputs go to the screen (can't type anything) it was working for the past few months tho...
Any ideas on a temporary fix ?

Link to comment
Share on other sites

9 hours ago, leoli6 said:

can't manage to make the keyboard work since ksp update 1.11. i try with a clean install took me many attempt but when i press "O"button near the mfd the KRBD lock normaly but no inputs go to the screen (can't type anything) it was working for the past few months tho...
Any ideas on a temporary fix ?

Use kos 1.2 for now: https://github.com/KSP-KOS/KOS/issues/2861

Link to comment
Share on other sites

On 2/4/2021 at 7:50 AM, JonnyOThan said:

it fixed the problem with the keyboard thanks again, but none of the script from vulkan i use often are working, seem to be comin from the color screen.. i was using the green one, i install the no colors patch but it only work with the colored one instead. i may have miss something ^^" any hints ?

Link to comment
Share on other sites

4 hours ago, leoli6 said:

it fixed the problem with the keyboard thanks again, but none of the script from vulkan i use often are working, seem to be comin from the color screen.. i was using the green one, i install the no colors patch but it only work with the colored one instead. i may have miss something ^^" any hints ?

This doesn't really have enough info to be able to help...

Can you post the scripts?  What is supposed to happen?  What actually happens?  Do you get any error messages?

Note, I'm mainly familiar with the older versions of KOSPropMonitor and I'm not at all familiar with the advanced MFD integration that it provides.

Link to comment
Share on other sites

On 2/9/2021 at 12:34 AM, JonnyOThan said:

This doesn't really have enough info to be able to help...

Can you post the scripts?  What is supposed to happen?  What actually happens?  Do you get any error messages?

Note, I'm mainly familiar with the older versions of KOSPropMonitor and I'm not at all familiar with the advanced MFD integration that it provides.

sorry, a gui is supposed to show up ^^ i get a error message on the syntax on weird things like a letter or what and everything should be fine cause it was working untill now .

here are the scripts and a video of what should happen ... as u can see the screen are green that why i was assuming that was generating the bug cause new version of kpm have colors integration so maybe a incompatibility  ? i should be able to get the green screen bck but somehow i must miss some infos ^^"

https://drive.google.com/file/d/1cS1fVbYEx9W3QA9uYnZD3Y2E9wUykwdR/view
 

Link to comment
Share on other sites

11 hours ago, leoli6 said:

sorry, a gui is supposed to show up ^^ i get a error message on the syntax on weird things like a letter or what and everything should be fine cause it was working untill now .

Posting the actual error messages would help.

Link to comment
Share on other sites

hi !

I think you forgot to create the button object!

the way to use buttons with kpm is :

set mybutton to addons:kpm:buttons

and now you asign a function to button :

mybutton:setdelegate(ID, my function) ID is the button number.

here's an example of script to manage Kpm :

see next post 

That's how it works:

1 create the object :     set mybutton to setKPMapi("B")

2 You can then define the function to be assigned to the button :     mybutton["dele"](0, myfunction@).

it's the same for  Flags and Labels.

for label :

set mylabel to setKPMapi("L") , and you have more options with label and flag

mylabel["setTXT"](2, my text here) set the text to label 2 etc.

Steph.

Edited by stephm
Link to comment
Share on other sites

edit  it's ok wrong variable declaration for object (global changed to local)

// ----------------------------------------------------------------------------------
// ----   Library addons:kpm  user Function for LABEL BUTON & FLAG   ----
// ----------------------------------------------------------------------------------
// Copyright © 2021 Masset Stephane 
// Lic. MIT
// file name : lib_KpmAddons.ks
@lazyGlobal off.

// Main function Constructor Object KPM (button, label or flag)
function setKPMapi
{
    parameter choice.
    local object is makeObj().    // object definition

    // =================   LABEL & FLAG   ==================
    // set text & state for LABEL or FLAGS 
    function setTXTFull 
    {
        parameter Text is "-----",
                  state is false.
        if choice <> "B" and (choice = "L" or "F")
        {
            from {local xx is 13.} until xx<0 step { set xx to xx-1.} do 
            {
                setl(xx, Text).
                setS(xx, state).
            } 
        } else throwException("BAD object KPM:ADDONS->", "kpm:labels or kpm:flags").
    }
    // set LABEL or FLAG text
    function setTxT
    {
        parameter ID,
                  Text is "".
        if choice <> "B" and (choice = "L" or "F")
        {
            if Text = "" set Text to getL(ID).	
            setL(ID, Text).
        } else throwException("BAD object KPM:ADDONS->", "kpm:labels or kpm:flags").
    }
    // get LABEL or FLAG txt
    function getTxT
    {
        parameter ID.
        if choice <> "B" and (choice = "L" or "F")
        {
            return getL(ID).
        } else throwException("BAD object KPM:ADDONS->", "kpm:labels or kpm:flags").
    } 
    // set LABEL or FLAG state
    function setSta
    {
        parameter ID is 0,
                  state is false.
        if choice <> "B" and (choice = "L" or "F")
        {
            setS(ID, state).
        } else throwException("BAD object KPM:ADDONS->", "kpm:labels or kpm:flags").
    }
    // get LABEL or FLAG state
    function getSta
    {
        parameter ID.
        if choice <> "B" and (choice = "L" or "F")
        {
            return getS(ID).
        } else throwException("BAD object KPM:ADDONS->", "kpm:labels or kpm:flags").
    }
    // starting sequence test cosmetique LABEL & FLAG (flag not tested)
    function initLab
    {
        if choice <> "B" and (choice = "L" or "F")
        {
            parameter tempos is 0.5.
            local test1 is "_____".
            local test2 is "[font(4)]"+char(175)+char(175)+char(175)+char(175)+char(175)+"[font(0)]".
            from {local xx is 13.} until xx<0 step { set xx to xx-1.} do
            {
                setTxT(xx, test1).
                wait tempos.
                setTxT(xx, test2).
                wait tempos.
                setSta(xx, true).
                wait tempos.
                setTxT(xx, "-----").
                setSta(xx, false).
            }
        } else throwException("BAD object KPM:ADDONS->", "kpm:labels or kpm:flags").
    }
    
    // =================   BUTTONS    ==================
    // button delegate affect function to button
    function dele
    {
        parameter ID,
                  funct.
        if choice = "B" { object:setdelegate(ID, funct).} else throwException("BAD object KPM:ADDONS->", "kpm:buttons ").
    }
    // ===========  global current monitor  ============
    function CurentMoni
    {
        return object:CURRENTMONITOR().
    }
    
    // ======= internal function ======
    // make object set by choice
    function makeObj
    {
	    if choice = "B" {return addons:kpm:buttons.}	  // setting labels object
	    if choice = "L" {return addons:kpm:labels.}	    	// setting labes object
	    if choice = "F" {return addons:kpm:flags.}	    	// setting flags object
        throwException("Bad choice. Option are :", " B (buttons) L (labels) F (flags)").
    }
    // set label
    function setL
    {
        parameter a,
                  b.
        return object:setlabel(a, b).
    }
    // get label
    function getL
    {
        parameter a.
        return object:getlabel(a).
    }
    // set state
    function setS
    {
        parameter a,
                  b.
        return object:setstate(a, b).
    }
    // get state
    function getS
    {
        parameter a.
        return object:getstate(a).
    }
    // object error Exception
    function throwException {
        parameter info, 
                  type.
        clearScreen.
        print info + type + " Needed !".
        print "CTRL+C Abort programme".
        wait 1000.
    }
    //
    // set & get & function delegate
    return lexicon(
        "Reset", setTXTFull@,
        "setTXT", setTxT@,
        "getTXT", getTxT@,
        "setSTA", setSta@,
        "getSTA", getSta@,
        "initLF", initLab@,
        "dele", dele@,
        "Monitor", CurentMoni@        
    ).
}
// END FILE

tested it's ok. (put in Script/library/ folder, and insert in script (runpath("/library/.....)

Steph

Edited by stephm
Link to comment
Share on other sites

  • 2 weeks later...

Hi !

Testing from every angle is perfect (apart from an error message in the console loading the ship, posted on GitHub).

On the other hand can I make a suggestion , Could there be a Meta-variable (JSI) returning the active page of the MFD (JSI) recoverable by KOS or KPM, it's still my problem by that I use a key of the MFD to switch from the presentation page to the KOS page, but I don't control it in the script (in boot), the scrip start that I activated the MFD kos page or not , the result is that if addons:kpm and loaded while the page MFD kos is not displayed, one loses the creation of the object.

I don't know if it's quite clear... 

I added a delay: wait 6. so under this delay if the page MFD kos and displayed everything works, past this deadline no buttons or labels, it is necessary to restart KPM via the button of the MFD.

It's not very practical.

In any case it's really great to access KOS via this MFD it opens up a lot of horizons and allows you to fly in cockpit mode with KOS without having to open the CONSOLE of KOS.

My regrets are that I only have a JAVA base in programming (1 years) that allows me to get by with KOS, I have some notions in C but it's really not enough for me to create modules for KSP

Steph.

Link to comment
Share on other sites

7 hours ago, stephm said:

Hi !

Testing from every angle is perfect (apart from an error message in the console loading the ship, posted on GitHub).

On the other hand can I make a suggestion , Could there be a Meta-variable (JSI) returning the active page of the MFD (JSI) recoverable by KOS or KPM, it's still my problem by that I use a key of the MFD to switch from the presentation page to the KOS page, but I don't control it in the script (in boot), the scrip start that I activated the MFD kos page or not , the result is that if addons:kpm and loaded while the page MFD kos is not displayed, one loses the creation of the object.

I don't know if it's quite clear... 

I added a delay: wait 6. so under this delay if the page MFD kos and displayed everything works, past this deadline no buttons or labels, it is necessary to restart KPM via the button of the MFD.

It's not very practical.

In any case it's really great to access KOS via this MFD it opens up a lot of horizons and allows you to fly in cockpit mode with KOS without having to open the CONSOLE of KOS.

My regrets are that I only have a JAVA base in programming (1 years) that allows me to get by with KOS, I have some notions in C but it's really not enough for me to create modules for KSP

Steph.

I'm currently researching a way to run kOS scripts from C#, which I think is what you're really after.  So you can run a script on start of the prop, or on button push.
Unfortunately this is going to be a bit more complex than I would have liked, but I think it's possible.

 

As for getting the active page, I'll look into it. The main issue is it would require a hard-link to RPM, which would break future MAS compatibility.

Edited by dsonbill
Link to comment
Share on other sites

hi ! @dsonbill  ( I'll look into it. The main issue is it would require a hard-link to RPM, which would break future MAS compatibility.)

Ok I understand, I have my afternoon on the wiki , I looked and tested a lot the options of the section: Page handlers

This variable especially: pageActiveMethod, I insert it on the default page of the CFG file of the MFD I thought for a moment that it worked but no.

I have 3 pages so (0 to 2) I tested pageActiveMethod - true or false, my pages from 0 to 2. everywhere lol.

sometimes I had the possibility to use KOS on the second config but in any case we lose the tips of the mfd.

this video example

I exceeded the delay of 6 seconds i placed before accessing the page containing kOSMonitor, the script started and started addons:KPM but it is not taken into account.

And here are my attempts to have several configs of pages with label without label etc.

I really would have liked to look at programming side, but it would take a long time to assimilate all aspects, I try to make some modifications with visual studio, I look a few times at the twich chain of @linuxgurugamer , there is so much to master that it would take me years to understand ...:valsad: and English makes me find it difficult to get some stuff.

But hey it's not too serious everything works I released some buttons of the MFD with the latest model of MFD, thus offering more choice to use the buttons with KOS.

Keep up the good work !!!

Steph.

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