Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
mattssheep4

Registered:
Posts: 32
Reply with quote  #1 
I can see situations in which it would be advantageous to have a mission script call another xml file that can be easily transferred or edited or switched out to provide variety or whatever. Specifically, for sandbox-type mission scripts like the TSN has, all the maps that are available could be put into its own xml file, and the mission script would reference them individually depending on the need. But, I haven't found a way to do that successfully. I've tried what was suggested here, but it doesn't seem to work based on the tests I've done. Is this even possible given the way artemis reads the mission scripts?
__________________
Lt. Matthew Vaj of the TSN Horizon in the TSN RP Community
MarkBell

Avatar / Picture

Administrator
Registered:
Posts: 1,648
Reply with quote  #2 
That is currently not possible - Artemis loads the entire mission script when launching the mission. You can change the xml between runs, since it'll reload when launching again, but it'll be oblivious to changes while playing.

The suggestions here, as far as I'm aware, are suggestions for potential future modifications to the game itself to accommodate it.

__________________
Note - this is in no way intended to be an official position of Thom or Artemis, as I am not an official representative of the creator or game.
mattssheep4

Registered:
Posts: 32
Reply with quote  #3 
To clarify a bit, I wasn't saying that it should change anything during a mission. These sites:

http://stackoverflow.com/questions/5121052/can-we-import-xml-file-into-another-xml-file
and
http://xmlwriter.net/xml_guide/entity_declaration.shtml

talk about importing data from another xml file while reading the mission script. Does artemis allow for this functionality? Artemis would read all of the imported files at the start of the mission, and contain all of the data from them just as if they were part of a single xml document, if it utilizes this aspect of xml files.

__________________
Lt. Matthew Vaj of the TSN Horizon in the TSN RP Community
ryleyra

Registered:
Posts: 2,459
Reply with quote  #4 
There is no command in Artemis's command list that allows a load or merge of another XML file. Since the only other way to load a file is at game start through the server select interface, no, this isn't possible.

This is an often discussed feature that mission authors would like to see for Artemis. There are two ways it could be implemented:

1) Load of a file replaces the current script. Presumably, mission variables would remain in memory, but the new script would interpret those variables, resulting in events that are different from the original script.

2) Load of a file appends to the current script. This could allow "subroutines" of a sort to be loaded. However, the script could rapidly grow to a point where it would take forever to loop through it. (Remember, EACH event in a script is executed for each cycle) Probably, this would have to include a method to remove events from the script, or maybe the merge of the file would be replaced if another file is merged. Another possibility is that a script could be run only once and then discarded.

A related but not exactly the same feature is the ability to load and save variables from a file. Variables could be loaded from a script, as above, by loading a script that sets those variables. However, writing variables to a file is far more complicated. This would allow scripts to make reference to previous scripts, by saving variables which would then be used when you started the second "episode". This could lead to a sort of persistence of the game world.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.