Releases: KSP-KOS/KOS
v1.0.1 Let's take some input!
Why 1.1.3 and not 1.2?
We wanted to get the last bug fixes and new features into the hands of any users who might not update KSP to 1.2 right away. Traditionally there are some mods that take a while to update when KSP releases a new version, and many users choose to wait for all of their favorite mods to update before upgrading KSP. By releasing in conjunction with the update, we can ensure that as many users as possible have access to these latest updates. We will be releasing a version of kOS that is compatible with KSP 1.2 as soon as possible after the final build is released to the public.
BREAKING CHANGES
- As always, if you use the compiler feature to make KSM files, you should
recompile the KSM files when using a new release of kOS or results will
be unpredictable. - The
stage
command/function now implements the yield behavior, waiting until
the next frame to return. This ensures that all vessel stats are updated
together. (#1807)
NEW FEATURES
- Functions and opcodes can now tell the CPU to yield (wait) based on their own
arbitrary logic. This allows future functions to be "blocking" (preventing
further execution) without blocking KSP itself.
(#1805,
#1807, and
#1820) - New
timewarp
structure, available on thekuniverse
bound variable. This
structure provides additional information and control over time warp. The old
warp bound variables remain in place.
(#1790 and
#1820) - Introducing a new
terminalinput
structure for keyboard interaction from
within scripts! Currently support is only provided for getting single
characters.
(#1830)
Please check http://ksp-kos.github.io/KOS_DOC/changes.html for more detailed
explanations for the new features.
BUG FIXES
- Fix for formatting of
time:clock
to pad zeros
(#1771 and
#1772) - Fix for not being able to construct a
vessel("foo")
if "foo" is the name of
the current vessel (#1565 and
#1802) - RemoteTech steering should be fixed. At worst you may see a 1sec gap with
the controls, as we now refresh the steering callback about once per second.
(#1806 and
#1809) - Named functions defined within anonymous functions will no longer throw an
error (#1801 and
#1811) lock steering
no longer throws an exception inside of an anonymous functions
(#1784 and
#1811)- Compiled programs that include a large number of named functions should no
longer throw an error (#1796 and
#1812) - Fixed the first call to
wait
after the cpu boots
(#1785) - Various documentation fixes (#1810,
#1823, and
#1834)
Hey let's stop calling it Beta
About the name:
kOS has been around long enough that we figured it was long overdue
for us to stop calling it 0.something. Lots of people are using it,
and we're worried about backward compatibility enough that we're not
really treating it like a Beta anymore. This version contains mostly
a few things that we knew might break backward compatibility so we'd
been putting them off for a long time. A jump to 1.0 seems a good time
to add those changes.
Of course, it has lots of other changes for whatever else was being
worked on since the last release.
BREAKING CHANGES
- As always, if you use the compiler feature to make KSM files, you should
recompile the KSM files when using a new release of kOS or results will
be unpredictable. - New Subdirectories ability has deprecated several filename commands such
asdelete
,copy
, andrename
. They will still work, but will
complain with a message every time you use them, as we may be removing
them eventually. The new commandsdeletepath
,copypath
, and
movepath
described below are meant to replace them. - When using a RemoteTech antenna that requires directional aiming,
in the past you could aim it at mission control with
SETFIELD("target", "mission-control")
and now you have to
saySETFIELD("target", "Mission Control")
instead, due to
changes in RT's naming schemes. - Previously the Y and Z axes of SUN:VELOCITY:ORBIT were swapped.
(#1764)
This has been fixed so it is now the same as for any other body,
however scripts might exist that had previously been swapping them
back to compensate for this, and if there were they would now break
since that swapping is no longer needed.
NEW FEATURES
- Subdirectories: (http://ksp-kos.github.io/KOS_DOC/commands/files.html)
You are now able to store subdirectories ("folders") in your volumes,
both in the archive and in local volumes. To accomodate the new feature
new versions of the file manipulation commands had to be made (please
go over the documentation in the link given above). In the Archive,
which is really yourShips/Script/
directory on your computer,
these subdirectories are stored as actual directories in your computer
filesystem. (For example, the file0:/dir1/dir2/file.ks
would be
stored atKerbal Space Program/Shipts/Script/dir1/dir2.file.ks
on
your real computer.) In local volumes, they are stored in the persistence.sfs
savegame file like usual.
(Pull Request discussion record: #1567)- Boot subdirectory: (http://ksp-kos.github.io/KOS_DOC/general/volumes.html#special-handling-of-files-in-the-boot-directory)
To go with Subdirectories, now you make a subdirectory in your archive
calledboot/
, and put all the candidate boot files there. When
selecting a boot file in the VAB or SPH, the selections are taken from
there and need not contain the "boot_" prefix to the filename anymore.
Old boot files will be grandfathered in that are named the old way,
however. - CORE:BOOTFILENAME is now a full path. i.e.
boot/myfile.ks
. - PATH structure now allows you to get information about
the new full subdirectories system from your scripts.
(http://ksp-kos.github.io/KOS_DOC/structures/volumes_and_files/path.html) - New RUNPATH command now allows any arbitrary string expression to be
used as the name of the file to be run. i.e.
set basename to "prog". set num to 1. runpath(basename+num, arg1). // same as run prog1(arg1)
.
As part of the support for this, programs with a large number of RUN
commands (or RUNPATH commands) should now take up a bit less
of a memory footprint than they used to in their compiled form
(and thus in KSM files too).
(http://ksp-kos.github.io/KOS_DOC/commands/files.html#runpath-and-runoncepath)
- Boot subdirectory: (http://ksp-kos.github.io/KOS_DOC/general/volumes.html#special-handling-of-files-in-the-boot-directory)
- Communication between scripts on different CPUs of the same vessel or
between different vessels.
(http://ksp-kos.github.io/KOS_DOC/commands/communication.html)- A new structure, the
Message
, contains some arbitrary piece of
data you choose (a number, a string, a list collection, etc), and
some header information kOS will add to it that describes where it
came from, when it was sent, and so on. What you choose to do
with these arbitrary chunks of data is up to you. kOS only lets
you send them. You design your own protocol for what the data means. - If RemoteTech is installed, a connection is needed to send a message
to another vessel (but not to a CPU on the same vessel). And, the
message won't actually show up in the other vessel's queue until the
required lightspeed delay. - To handle KSP's inability to have different vessels far away from each
other both fully loaded and active, you do have to switch scenes back
and forth between distant vessels if you want them to have a conversation
back and forth. Messages that were meant to arrive on a vessel while
it wasn't within active loading range will wait in the recever's vessel
queue until you switch to it, so you don't have to hurry and switch
"in time" to get the message.
- A new structure, the
- Added anonymous functions :
(http://ksp-kos.github.io/KOS_DOC/language/anonymous.html)
By placing arbitrary braces containing the body of a function anywhere
within the script that an expression is expected, the compiler builds
the function code right there and then returns a delegate of it as the
value of the expression. - New 3rd-party addon framework (https://github.com/KSP-KOS/KOS/tree/develop/src/kOS/AddOns/Addon%20Readme.md)
allows authors of other KSP mods to add hooks into kOS so that kOS
scripts can interface with their mods more directly, without kOS
developers having to maintain that code themselves in the kOS
repository.
(Pull Request discussion record: #1667) - allow scripted vessel launches
KUNIVERSE:GETCRAFT()
,KUNIVERSE:LAUNCHCRAFT()
,KUNIVERSE:CRAFTLIST()
,
andKUNIVERSE:LAUNCHCRAFTFROM()
allow you to script the changing of scenes
and loading of vessels into those scenes. While this breaks the 4th wall
quite a bit (how would an autopilot choose to manufacture an instance of the
plane?), it's meant to help with script testing and scripts that try to
repeatedly run the same mission unattended.
(http://ksp-kos.github.io/KOS_DOC/structures/misc/kuniverse.html) - eta to SOI change:
Added SHIP:OBT:NEXTPATCHETA to get the time to the next orbit patch
transition (SOI change).
(http://ksp-kos.github.io/KOS_DOC/structures/orbits/orbit.html#attribute:ORBIT:NEXTPATCHETA) - get control-from:
AddedSHIP:CONTROLPART
to return thePart
of the vessel that is
currently set as its "control from here" part.
(http://ksp-kos.github.io/KOS_DOC/structures/vessels/vessel.html#attribute:VESSEL:CONTROLPART) - maneuver nodes as a list:(
NewALLNODES
bound variable that returns a list of all the currently
planned manuever nodes (the nodes you could iterate through with
NEXTNODE
, but rendered into one list structure).
(http://ksp-kos.github.io/KOS_DOC/bindings#allnodes) - Several new pseudo-action-groups (akin to "panels on", that aren't
action groups as far as stock KSP is concerned, but kOS treats them like
action groups) were added. (http://ksp-kos.github.io/KOS_DOC/commands/flight/systems#kos-pseudo-action-groups) - Ability to get/set the navball mode (surface, orbital, target) with
theNAVMODE
bound variable:
i.e.SET NAVMODE TO "SURFACE".
. - UniqueSet structure. (http://ksp-kos.github.io/KOS_DOC/structures/collections/uniqueset.html)
A collection intended for when all you care about is whether a equivalent
object exists or doesn't exist yet in the collection, and everything else
(order, etc) doesn't matter.
BUG FIXES
- In some cases (#1661) the program
wouldn't stop immediately when you execute akuniverse
command that
reloads a save or switches scenes. It would instead finish out the
remainder of the IPU instructions in the current physics tick.
After the fix, causing a scene change (or reload) automatically stops the
program right there since anything it does after that would be moot as
the game is about to remove everything it's talking about from memory. - If using "Start on archive", with Remote Tech, a misleading "power starved"
error was thrown when you reboot a probe that's out of antenna range.
(#1363) unchar("a")
was apparently broken for a few months and we hadn't noticed.
The root cause was that its implementation had to be edited to comply with
the change that enforced the VM to only use kOSStructure
types on the
stack. The need for that change had been missed.
(#1692)- Previously Infernal Robotics allowed you to move servos that weren't even
on your own vessel and you shouldn't have direct control over. This has
been fixed. (#1540) - Refactored previous non-working technique for quicksave/quickload to
turn it into something that works.
(#1372) - There were cases where using CTRL-C to abort a program would cause some
old cruft to still be leftover in the VM's stack. This made the system
fail to clear out the names of functions that were no longer loaded in
memory, making it act like they were still reachable and call-able.
(#1610) - Some types of
Resource
didn't...
v1.0.0 Release Candidate
v1.0.0-pre-1
This version will not be available on Curse, Spacedock, or CKAN. Please be sure to report any issues you find on the github issue tracker.
Documentation of pending changes may be found here.
WARNING:
This is a testing released based on the current develop branch. The release definitely contains bugs that have not yet been fixed, and may have bugs we are not yet aware of.
There is a small risk of loosing data both in game and in the script archive.
Please make sure to backup your save file and script files before installing
KSP 1.1.2 and bug repair
v0.20.1 KSP 1.1.2 and bug repair
The biggest reason for this release is to handle two game-breaking
problems caused by recent alterations in the API that kOS hadn't
adapted to correctly yet.
The "remit" of this release is purely to fix a few bugs, and patch up
a few things where KSP 1.1 had changes we didn't catch. Mostly,
that's cases where previously working code in kOS had now become a
bug, but it also includes a few other bug fixes not related to KSP 1.1.
But any new features (rather than bug fixes) in the pipeline not directly
related to that "remit" are not in this release.
BREAKING CHANGES
STEERINGMANAGER:SHOWRCSVECTORS
andSTEERINGMANAGER:SHOWENGINEVECTORS
are now obsolete and will throw an error.
BUG FIXES
- Infinitely growing mass: Realism Overhaul users could not use kOS anymore, because kOS was re-adding its small module mass to the part again and again each physics tick. Even though the mass of kOS is small, adding it to the part 25 times a second quickly made the vessel grow too massive to do anything with. The bug was not caught earlier because it only happened if kOS was added to parts other than the parts kOS ships with (i.e. by using ModuleManager), and those parts also had other mass-affecting modules on them. Although discovered in Realism Overhaul, the problem could have been affecting any users who used kOS in that same fashion. The cause was traced to an incorrect use of the new mass API by kOS and has been fixed. (#1644).
- "SET TARGET TO FOO." while the terminal is open was failing. Now it works. (The kOS terminal locks out all other inputs so your keypresses don't affect the ship, but as of KSP 1.1 the "all" input lock it was using to do so also includes the ability to set target, which it didn't before.) (#1636)
- Incorrect value for MeanAnomalyAtEpoch fixed. It was multiplying the value by the conversion factor for radians-to-degrees twice, rather than just once. (#1642)
- GeoCoordinates were not serializing properly. Now they are. (#1615).
- Finally fully obsoleted the years-old suffixes for trying to do antenna range the old way (before we just relied on Remote Tech to do antenna work for us). (#1607).
- Bug fixes for catching a few more cases where staging or decoupling part of the craft away was still confusing SteeringManager into trying to lock out, or take control of, the wrong half of the craft. (#1544).
NEW FEATURES
- KSP 1.1 now allows you to lock the gimbals for the three pitch/yaw/roll axes individually on engines, as 3 different settings, rather than just lock the whole gimbal for all directions. kOS now lets you access this ability (#1622).
KSP 1.1 Hype!
KSP 1.1 Pre-release 1
v0.20.0-pre-1
This should be functionally identical to v0.19.3. The only changes made were those required to compile and run with KSP v1.1.
If you have access to the KSP pre-release, please test as many of your existing scripts with this release as possible. Just like Squad is using the pre-release to track down some outstanding bugs, we need your help in tracking down hard to find things that may have broken with the move to 1.1.
PLEASE SUBMIT AN ISSUE FOR ANY BUGS YOU FIND. Add the prefix [KSP1.1]
in the bug title.
For the time being, our focus is on things that broke specifically with KSP 1.1. If you have old bugs, or if you want to see a new feature from 1.1 used, please don't tag it with the above prefix.
Last (intended) 1.0.5 update
v0.19.3
(This is the last planned update to work with KSP 1.0.5 unless
it breaks something big that requires an emergency patch.)
BREAKING CHANGES
- Triggers may now go beyond the limits of the IPU (#1542) but are no longer guaranteed to execute within a single update frame. See http://ksp-kos.github.io/KOS_DOC/general/cpu_hardware.html#triggers and http://ksp-kos.github.io/KOS_DOC/general/cpu_hardware.html#cpu-update-loop for more details.
NEW FEATURES
- Profiling output via
ProfileResult()
(#1534)
BUG FIXES
- Removed delay when enabling/disabling auto changeover for multi mode engines (#1451)
- Improve performance of various math functions (#1553 #1523 #1563)
on
logic now evaluates expressions and suffixes, instead of requiring a raw variable (#1376 #1542)- Documentation no longer inserts a space around highlighted search terms (#1548)
- You can now use lock objects with the same identifier from within compiled scripts, like
lock throttle...
(#691 #1253 #1557 #1561) - The script parsing logic has been updated to improve compile times by roughly 50% (#1566)
Doctor, I can see again!
v0.19.2
This release is here primarily to fix a problem that made
the new v0.19.1 terminal unusable for users who have to
use low resolution texture settings in the Unity graphics
configuration panel.
BREAKING
- Nothing new breaking in this version is known about.
NEW FEATURES
- New alias
KUNIVERSE:FORCEACTIVE()
can be used instead of the longer nameKUNIVERSE:FORCESETACTIVEVESSEL()
. - More robust use of the font_sml.png file allows for replacement of font_sml.png by the end-user.
(However this may only be useful for a limited time, as Unity5 might make us implement the font differently
anyway.)
BUG FIXES
- New terminal now works again at low texture resolution settings
(#1513). - New terminal shows grey color on power-off again
(#1525). - Terminal now shows a boot message that mentions the documentation URL
(#1527). - Fixed a situation that could make KSP itself crash if a script
attempted to perform an equality comparison on types that hadn't
had a meaningful implementation of equality defined. (Instead
of a proper error message about it from kOS, kOS got stuck in
recursion.)
Embiggen, Enlighten, and swat a few bugs
This release is a patch to v0.19.0, fixing some things
found by the user community in the two days shortly after
v0.19.0 released.
It also happens to contain a few terminal window features
that were being worked on before v0.19.0 but were not deemed
ready yet when 0.19.0 was released.
NEW FEATURES
- PIDLoop tutorial section in the docs edited to mention new PIDLoop()
function that did not exist back when that page was first written.
(http://ksp-kos.github.io/KOS_DOC/tutorials/pidloops.html) - New Terminal GUI doodads and widgets: A brightness slider,
and the ability to zoom the character width and height. Also
made the transparency and dimming of the 'non-active' terminals
a bit less severe so you can still read them when un-focused.
Also, these new features can be script controlled by new
suffixes, however it is unclear if that feature (doing it from
a script) will remain in the future so use it with care:
(http://ksp-kos.github.io/KOS_DOC/structures/misc/terminal.html)
BUG FIXES
- Fixed file rename bug on local hard disks:
(#1498) - Fixed boot files can be larger than the local disk
(#1094) - Fixed a bug where Infernal Robotics would break when switching vessels or
reverting. (#1501) - Fixes problems with using PartModule's SetField(), and infernal Robotics which
had been failing for all cases where the field was a "float".
(#1503).
There may have been other places this bug affected, but this is
where it was noticed. Hypothetically, anywhere the stock game's
library insists on only accepting a single-precision float and
not a double would have had the problem. - Improve steering when small control magnitudes are required.
(#1512)
Delegates! Delegates! Delegates!
BREAKING CHANGES
- As usual, you must recompile any KSM files when using the new version.
- Vecdraw :SCALE no longer applied to :START. Only applied to :VEC.
- Varying power consumption might make it so if you have high IPU settings some designs might run out of power when they didn't before. (in most cases it should draw less power for most people).
- !!!! Default extension of ".ks" is no longer applied to all new filenames created. But it still will be looked for when reading existing files if you leave the extension off !!!!
- FileInfo information now moved to Volume (http://ksp-kos.github.io/KOS_DOC/structures/volumes_and_files/volume.html).
- VOLUME:FILES was returning a LIST(), now it returns a LEXICON who's keys are the filename.
- String sort-order comparisons with "<" and ">" operators were implemented wrongly and just compared lengths. Now they do a character-by-character comparison (case-insensitively). On the off chance that anyone was actually trying to use the previous weird length-comparison behavior, that would break.
NEW FEATURES
- Art asset rework. The meshes and textures of the kOS CPU parts have recieved an update, and a new KAL9000 high-end computer part was included.
- Varying power consumption. Units of electric charge used now varies depending on CPU speed and how much the CPU is being actually used. If your IPU setting is low, or if your program isn't doing very much and is just stuck on a
wait
statement, it won't use as much power. (http://ksp-kos.github.io/KOS_DOC/general/cpu_hardware#electricdrain) - Ability to read and write whole files at a time as one big string. (http://ksp-kos.github.io/KOS_DOC/structures/volumes_and_files/volumefile.html)
- User Functions can now be referred to with function pointers, or "delegates". (http://ksp-kos.github.io/KOS_DOC/language/delegates.html)
- Automatic serialization system to save/load some kinds of data values to JSON-format files (http://ksp-kos.github.io/KOS_DOC/commands/files.html#writejson-object-filename)
- User Programs and Functions now allow trailing optional parameters with defaulted values. (http://ksp-kos.github.io/KOS_DOC/language/user_functions.html#optional-parameters-parameter-defaults).
- There are now some suffixes that work on all value types, even primitive scalars. To accomplish this, a new "encapsulation" system has wrapped all kOS structures and primitive types inside a generic base type. (http://ksp-kos.github.io/KOS_DOC/structures/reflection.html)
- ENGINE type now supports multi-mode cases and has its gimbal accessible through :GIMBAL suffix (http://ksp-kos.github.io/KOS_DOC/structures/vessels/engine.html)
- Added GIMBAL:LIMIT suffix. (http://ksp-kos.github.io/KOS_DOC/structures/vessels/gimbal.html)
- Better support for DMagic's Orbital Science mod (http://ksp-kos.github.io/KOS_DOC/addons/OrbitalScience.html)
- Char() and Unchar() functions for translating unicode numbers to characters and visa versa (http://ksp-kos.github.io/KOS_DOC/math/basic.html#function:CHAR)
- New Range type for iterating over hardcoded lists (http://ksp-kos.github.io/KOS_DOC/structures/collections/range.html).
- Ability to iterate over the characters in a string using a FOR loop, as if the string was a LIST() of chars.
- New higher level cpu part. (#1380)
- HASTARGET and HASNODE functions (http://ksp-kos.github.io/KOS_DOC/bindings.html?highlight=hastarget)
- :JOIN suffix for LIST to make a string of the elements (http://ksp-kos.github.io/KOS_DOC/structures/collections/list.html#method:LIST:JOIN)
- KUNIVERSE now lets you read hours per day setting (http://ksp-kos.github.io/KOS_DOC/structures/misc/kuniverse.html#attribute:KUNIVERSE:HOURSPERDAY)
- The reserved word ARCHIVE is now a first-class citizen with proper binding, so you can do SET FOO TO ARCHIVE and it will work like you'd expect.
- New Lexicon creation syntax to make a Lexicon and populate it all in one statement. (http://ksp-kos.github.io/KOS_DOC/structures/collections/lexicon.html?highlight=lexicon#constructing-a-lexicon)
BUG FIXES
- Numerous additional checks to prevent control of other vessels the kOS CPU isn't attached to.
- The error beep and keyboard click sounds now obey game's UI volume settings. (#1287)
- Fixed two bugs with obtaining waypoints by name. (#1313) (#1319)
- Removed unnecessary rounding of THRUSTLIMIT to nearest 0.5%, now it can be more precise. (#1329)
- Removed the ability to activate both modes on multi-mode engine simultaneously.
- LIST ENGINES now lists all engines and displays part names instead of module names. (https://github.com/KSP-KOS/issues/1251)
- Fixed bug that caused hitting ESC to crash the telnet server. (#1328)
- Some exceptions didn't cause beep, now they all do. (#1317)
- Vecdraw :SCALE no longer applied to :START. Only applied to :VEC. (#1200)
- Fixed bug that made up-arrow work incorrectly when the cursor is at the bottom of the terminal window. (#1289)
- A multitude of small documentation fixes (#1341)
- Fixed a bug when performing an undock (#1321)
- IR:AVAILABLE was reporting incorrectly ()
- Boot files now wait until the ship is fully unpacked and ready (#1280)
- The Vessel :HASBODY (aliases :HASOBT and :HASORBIT) suffix was in the documentation, but had been lost in a refactor last year. It is put back now.
- String sort-order comparisons with "<" and ">" operators were implemented wrongly and just compared lengths. Now they do a character-by-character comparison (case-insensitively)
- Small documentation edits and clarifications all over the place.
KNOWN issues
- Using
lock
variables in compiled scripts with a duplicate identifier (like "throttle") throws an error (#1347 and #1253). - Occasionally staging with a probe core or root part in the ejected stage will break cooked steering (#1492).
- The limitations of RemoteTech integration can be bypassed by storing a volume in a variable before the ship looses a connection to the KSC (#1464).
CONTRIBUTORS THIS RELEASE
(These are generated from records on Github of anyone who's Pull Requests are part of this release.)
(Names are simply listed here alphabetically, not by code contribution size. Anyone who even had so much as one line of change is mentioned.)
Stephan Andreev (ZiwKerman) https://github.com/ZiwKerman
Bert Cotton (BertCotton) https://github.com/BertCotton
Kevin Gisi (gisikw) https://github.com/gisikw
Peter Goddard (pgodd) https://github.com/pgodd
Steven Mading (Dunbaratu) https://github.com/Dunbaratu
Eric A. Meyer (meyerweb) https://github.com/meyerweb
Tomek Piotrowski (tomekpiotrowski) https://github.com/tomekpiotrowski
Brad White (hvacengi) https://github.com/hvacengi
Chris Woerz (erendrake) https://github.com/erendrake (repository owner)
(name not public in github profile) (alchemist_ch) https://github.com/AlchemistCH
(name not public in github profile) (tdw89) https://github.com/TDW89