X-Series (https://en.wikipedia.org/wiki/X3:_Reunion has an Scripting interface where everybody can write own scripts.
I don't know if one of you (especially Omni and Schema) know it. It is good!
The interface is hirachical
[*]Ship
[*]Station
[*]Adjacent Blocks
[*]possible +/- x/y/z block functions - require the THIS-input to not be null (filter the possiblity of null with other commands).
The code-line/variable-number navigation is done with up/down for lines and left/right for a selection field and tab for the next one.
Functions which may kill the game or allow cheating are not included and the editor tracks all possibilities.
[*]It is validated on script-saves that everything can handle all possible values given to it. There is a last-working (blueprint) and locally a last-edited save.
Although it might be a bit of work, it could help to create fail-safe functions.
Computer blocks may contain such a script to which is limited to
These codes could be provided by a server for custom blocks.
There could be bonus cpuTime-generation for more players on a ship and an inversive exponential one for NPC crew-members.
I don't know if one of you (especially Omni and Schema) know it. It is good!
The interface is hirachical
- Math
- Player
Give credits ("__INT__ = Give the player __INT__ credits.")
[*]Ship
create ("__OBJ_SHIP__ = Create a ship in sektor __SECTOR__ and position __POSITION__.")- move to ("__BOLEAN__ success = Let __OBJ_SHIP__ move to __SECTOR__ and position __POSITION__.")
- ...
[*]Station
create ("__OBJ_STATION__ = Create a ship in sektor __SECTOR__ and position __POSITION__.")- ...
[*]Adjacent Blocks
general
connected to ("__BOOLEAN__ = Is true, if __BLOCK__(default: __$THIS__) block is connected to __BLOCK_TYPE__ blocks on __SIDE__(default: __$ALL_SIDES__).")- count connected ("__INT__{1,2,3,4,5,6,0} = Is the number of __BLOCK_TYPE__ blocks connected to __BLOCK__(__$THIS__) block.")
- count connected ("__INT__{1,2,3,4,5,6,0} = The number of neighbours \"__THIS__(__$THIS__)\" has with type \"__BLOCK_TYPE__(__ALL_BLOCK_TYPES__)\".")
[*]possible +/- x/y/z block functions - require the THIS-input to not be null (filter the possiblity of null with other commands).
The code-line/variable-number navigation is done with up/down for lines and left/right for a selection field and tab for the next one.
Functions which may kill the game or allow cheating are not included and the editor tracks all possibilities.
- If you take a PlexStore/Inventar item, you get a variable. If you put it into the inventar/AnotherPlexStore, you lose this variable - it is not available anymore / has 0 items / a possible value of "null"/"undefined/etc.
- Possibilities?:
A returned integer can have values from {{-1 to 2}, {3 to 4}} (it's an example) and shows this to the user - It may ask for a filter (which enters it's own range of values and set a passed? boolean to true/false) - if it gets too complex or a function does not accept some possible values, ask for adding a filter too.
- If something is able to unset a variable or clear it's content, "null"/"undefined"/etc is added to the range of possible values of this variable. Maybe permanently if set from outside a class (use set/get filters to avoid this!)
[*]It is validated on script-saves that everything can handle all possible values given to it. There is a last-working (blueprint) and locally a last-edited save.
Although it might be a bit of work, it could help to create fail-safe functions.
Computer blocks may contain such a script to which is limited to
- allow access to some a number of variables with eventually pre-defined type
- certain functions/categories with limited usage
- certain execution speed (each function requires X cpuTime-units to prepare - which can be inversive recursive for ship or grid or both and is added to the docking spot's ship while active)
These codes could be provided by a server for custom blocks.
There could be bonus cpuTime-generation for more players on a ship and an inversive exponential one for NPC crew-members.