This shows you the differences between two versions of the page.
— |
building:scripts:api [2019/03/24 17:31] (current) Mavrixio created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== API (Core Functions and Constants) ====== | ||
+ | |||
+ | The NWScript engine uses this file: [[https://nwn.sinfar.net/res_nss_edit.php?name=x_nwscript|x_nwscript.nss]] as reference to know: | ||
+ | - The internal engine structures (effect, event, location...) | ||
+ | - The internal functions (their implementation is hard-coded) | ||
+ | It also declares many constants and #include other scripts that do the same, they are all in this ERF: [[https://nwn.sinfar.net/res_list.php?erf_id=1]] | ||
+ | This x_nwscript.nss is loaded before compiling a script so everything that they contains | ||
+ | |||
+ | All base NWScript functions and constants are avaiable, their original documentation can be found here: [[https://nwnlexicon.com/]], but some of them have been changed (mostly extended) so you should first check if they are in the reference below. | ||
+ | |||
+ | Additionally, Sinfar has its own set of internal functions (and constants), they are in this those file: [[https://nwn.sinfar.net/res_nss_edit.php?name=x_sfscript|x_sfscript.nss]] and [[https://nwn.sinfar.net/res_nss_edit.php?name=x_sfscript_const|x_sfscript_const.nss]]. Feel free to try them, they should be crash-safe so at worst they will do nothing or cause a script error. | ||
+ | |||
+ | Here are the documented functions: | ||
+ | {{indexmenu>:building:scripts:api#10|nsort msort}} | ||
+ | |||