Sorry that this is taking longer than I wanted. I was lucky enough to get some contracts, but that also means very little free time.
While a decompiler is an all-or-nothing program (hence the reason there won't be a beta), I can show off some sample output:
It's not much, but you can see following:
It identifies the NCS as a Kotor2 file, which is reliant on the code including K2 engine functions
There are six subroutines
_start(), which is automatically included by the compiler
void main()
void DamagingExplosion( object oCreature, int nDelay, int nDamage )
int GR_GetGrenadeDC(object oTarget)
void NonDamagingExplosion(object oCreature, int nDelay)
void KillCreature(object oCreature, int nDelay )
The types of return values are found by examining the called subroutine
The types of parameters must be found by examining caller subroutines (strange as it may seem, there's no guarantee a parameter is used)
The local variables are listed in the order in which they are created
As simple as this may seem, it's been hell trying to figure out how NCS works due to limited documentation, time, and mental capacity (🤪). That said, I think I now know everything there is to know about NCS. Even how to deal with recursion (it took less than an hour), identifying vectors and structs (they do disappear in the bytecode, but there are code patterns to look out for), and handling certain errors in the game's code.
So, the two major tasks left are:
Including block scopes, e.g. if-else and while statements (I can identify them, I just haven't put them in among the locals)
Handling expressions, commonly known as operator precedence and associativity, e.g. int d = (a + b) * c