world-scripts.plist is
a list of (file) names of world scripts. Period. Nothing more. It's just a list of world scripts. It is therefore by definition
not a world script (or any kind of script) itself. It's a list. With a file name in each line.
What do you put on this list? The file names of any world scripts that you have put in your "Scripts"-folder. Nothing else. So, if you have written a world script that is named "myFunkyWorldscript.js", you put
in your world-scripts.plist. If you have written another worldscript and named it "myOtherFunkyWorldScript.js", you have to add that name to the list. Put a comma behind the first item on the list, and add the second item in the next line:
Code: Select all
(
"myFunkyWorldscript.js",
"myOtherFunkyWorldscript.js"
)
Do I have to go into greater detail about what a list of items is, and how it works?
Now, let's have a look at your world-scripts.plist:
Code: Select all
(
"escort-formations.js"
["Escort Formations Randomiser"].$setupEscortFormation(SolarWing-escort, planebox);
)
Is it a list? If yes, how many items does it have? And if it has more than one item, are all items file names of files that reside in your "Scripts"-folder?
It appears to have one item: "escort-formations.js". That looks indeed like the file-name of a JS-script.
Now, if you want to add another item, because you have written another script, you should first put a comma behind the first item. There is no comma, which means that the whole thing is rubbish as a plist.
But even if there was a comma behind "escort-formations.js", the next line doesn't look like the name of a file inside your "Scripts"-folder. "["Escort Formations Randomiser"].$setupEscortFormation(SolarWing-escort, planebox);" is obviously
not a file name. Therefore it's rubbish in a
list of file names.
What you have to learn is the difference between a
script and a
list of script file names.
If you want to write a world script (using the existing script commands with a correct syntax), then first write your script, then save it under a meaningful name inside the "Scripts"-folder of your OXP, and finally put its file name (again using the correct syntax) on the list that you have to save under the name "world-scripts.plist" in the "Config"-folder of your OXP.