This plugin enables support for kOS KerboScript in IntelliJ IDEA IDE.
Current kOS version supported: 1.1.2
- Install Intellij IDEA
- Install KerboScript(kOS)
- Download IntelliJ and install the plugins recommended in the prerequisites steps (no need to check out community source files or create a project)
- Run
./gradlew buildPlugin(orgradlew.baton Windows) to build the plugin - Either install the plugin from
build/distributions/KerboScript(kOS).zipor run./gradlew runIdeto start up a sandboxed copy of the IDE with the plugin installed in it
Note that Gradle tasks such as buildPlugin or runIde can also be run from within the Gradle tab in IntelliJ.
Variable usage
local b to a^2.
local c to sqrt(|b).
local d to b - 1.
will become
local b to a^2.
local c to sqrt((a^2)).
local d to b - 1.
Variable declaration
local |b to a^2.
local c to sqrt(b).
local d to b - 1.
will become
local c to sqrt((a^2)).
local d to (a^2) - 1.
Simple function
function f {
parameter x.
parameter y.
return x^2 + y.
}
local a to f(b, c).
will become
local a to ((b)^2 + (c)).
Variable
local y to x^2.
will become
local y_ to 2*x_*x.
Function
function f {
parameter x.
parameter y.
return x^2 + y.
}
will become
function f_ {
parameter x.
parameter x_.
parameter y_.
return 2*x_*x + y_.
}
Please note that all derivative functions are created in separate file
local x to (a/b) + c + c + a*a + b/b.
will become
local x to a/b + 2*c + a^2 + 1.
local x to (a/b) + c + c + a*a + b/b.
will become
local x to (a + 2*c*b + a^2*b + b)/b.