TypeScript is your answer. You write things in a statically typed programming language that gets compiled to raw JS
The language is not likely to change. One of the nice features is that the game can generate the tooltips for you automatically, since the lanugage is simple enough that each effect can be traced.
Doing this for an arbitrary language is a
difficult problem, to the point you'd need to compile all your scripts, which would probably result in much slower load times.
I don't hold out much hope that my feature requests will be answered in this sea of requests, but here's what I've come up with from my latest modding experiments:
- Can you allow the empire scope on empires? It'd cut the amount of code I have in my current mod down by ⅕ if I had that, as I wouldn't need to duplicate the logic for if your primary title is a Kingdom and if your primary title is an Empire.
- Can you allow is_title_active and activate_title to take a reference like PREV rather than the name of a title? I'd like to be able to disable some titles.
- Can we have drop-in directories for triggered_modifiers? If we had those I could make decisions conditional on a modifier and cut down the amount of code by ⅔.
- Can we have title_event? I could have also cut code down with that.
- How about title_decision? I wouldn't have to restrict some events to operating on the primary title if I had that.
On the other hand, I was happy to discover new_title existed, even though it wasn't documented anywhere (changelog, ckiiwki or existing scripts), which has made my mod work more reliably.