Page 1 of 2
Questions About Event Namespaces
Posted: Mon Jan 21, 2013 10:14 am
by Vhati
Is there any hierarchy to events, or are all event/eventList names available in every context?
For instance, if I add a quest, can I attach anything from a flat list of every top-level name in all events*.xml files?
Are those xml files essentially concatenated together, or are some files ignored based on circumstance?
And eventLists are completely interchangeable with events and vice versa, right?
I'm pondering an interface for event manipulation in the
Profile/SavedGame Editor (v12's officially out btw)...
...
Hmm more weirdly, could a normally anonymous event within a choice tag be given a name and referenced from elsewhere? (seems unlikely)
Re: Questions About Event Namespaces
Posted: Mon Jan 21, 2013 10:58 am
by Kieve
I'm not 100% clear on what you're asking, but as I understand it, Events.xml is shared across all sectors and instances. Events_ships.xml is likewise universal, but tied to ship (defeat) events - escape, deadcrew, destroyed, and the like. Any calls to an eventlist from those instances should point towards events.xml.
Events_[sector].xml are called only within that sector, IE rock/mantis/engi/... specific events and aren't loaded until you hit that particular sector.
Also, while it's my understanding that event and eventlist names are independent and won't cause naming conflicts with each other, it's probably best to differentiate them by name anyway.
Re: Questions About Event Namespaces
Posted: Mon Jan 21, 2013 11:38 am
by Vhati
Kieve wrote:I'm not 100% clear on what you're asking, but as I understand it, Events.xml is shared across all sectors and instances. Events_ships.xml is likewise universal, but tied to ship (defeat) events - escape, deadcrew, destroyed, and the like. Any calls to an eventlist from those instances should point towards events.xml.
Events_[sector].xml are called only within that sector, IE rock/mantis/engi/... specific events and aren't loaded until you hit that particular sector.
I'm trying to distinguish mod convention from what is technically possible.
For instance, are names in events_rock.xml inaccessible when you're not currently in a rock sector (preventing a custom engi sector event from spawning a quest beacon with "ROCK_LOOTING")?
If they're all universal, the xml files are essentially concatenated together within the engine, and I won't have to add code to hide illegal names in my interface. The separate xml files would only have amounted to an organizational convenience in that case.
Kieve wrote:Vhati wrote:And eventLists are completely interchangeable with events and vice versa, right?
Also, while it's my understanding that event and eventlist names are independent and won't cause naming conflicts with each other, it's probably best to differentiate them by name anyway.
What I meant there was "Can an eventList reference be substituted wherever an event is required, and vice versa?"
Can eventLists be nested within eventLists, etc?
It's good to know events' and lists' names don't collide though. I forgot to ask that.
Re: Questions About Event Namespaces
Posted: Mon Jan 21, 2013 12:16 pm
by Kieve
Vhati wrote:I'm trying to distinguish mod convention from what is technically possible.
For instance, are names in events_rock.xml inaccessible when you're not currently in a rock sector (preventing a custom engi sector event from spawning a quest beacon with "ROCK_LOOTING")?
For that, you'd want to turn your attention to sector_data.xml
Seems that's the one controlling which events appear in which sectors. What I can't find in that file is anything that connects "Mantis Sector" exclusively with "events_Mantis" - or anything to that effect - which leads me to believe the event files are all loaded up at the same time, and only divided up / named for the sake of convenience and organization, not out of a specific need on the game engine's part.
Vhati wrote:What I meant there was "Can an eventList reference be substituted wherever an event is required, and vice versa?"
Can eventLists be nested within eventLists, etc?
You can definitely load a second eventList from within the first. I
don't know if you can directly nest them.
Code: Select all
<eventList name="meep">
<event> <!--Definitely works-->
<text>Meep?</text>
<choice>
<text>Meep!</text>
<event load="No_Meep"/>
</choice>
</event>
<event load="Maybe_Meep"/> <!--Not sure -->
</eventList>
It might even be possible to create a loop that way, though I'm not certain if it could be infinite or not. "Sell 1 Missile for 2 Scrap" - "Would you like to sell more? Y/N"
There's a lot of possibility there I haven't explored or experimented with yet.
It's good to know events' and lists' names don't collide though. I forgot to ask that.
I was mistaken. I just double-checked and <event load=""> will call whatever name you give it, event or eventList. Haven't tested it fully but just from that I'd say definitely keep them separated name-wise.
Re: Questions About Event Namespaces
Posted: Wed Jan 23, 2013 3:54 am
by thashepherd
Kieve wrote:I'm not 100% clear on what you're asking, but as I understand it, Events.xml is shared across all sectors and instances. Events_ships.xml is likewise universal, but tied to ship (defeat) events - escape, deadcrew, destroyed, and the like. Any calls to an eventlist from those instances should point towards events.xml.
Events_[sector].xml are called only within that sector, IE rock/mantis/engi/... specific events and aren't loaded until you hit that particular sector.
Also, while it's my understanding that event and eventlist names are independent and won't cause naming conflicts with each other, it's probably best to differentiate them by name anyway.
Kieve - the default sectorData.xml muddies this argument a little bit.
Most of the events in sectorData.xml actually aren't referenced from events.xml - they mainly reference eventLists in newEvents.xml. And newEvents.xml DEFINITELY calls events across sectors - for example, a sector may include "HOSTILE1", which references an eventsList in newEvents.xml, which references "AUTO_ASTEROID" in events.xml as well as "PIRATE_CHOICE" in events_pirate.xml.
It's possible that newEvents is treated specially and can cross-load, but I think it's way more likely that you can cross-load events from pretty much wherever you want.
Re: Questions About Event Namespaces
Posted: Wed Jan 23, 2013 5:45 am
by Kieve
Yeah, I'm finding myself mistaken about a number of things regarding events. Shows how much I really work with them, eh?
Guess I'll stick to the shipbuilding for now.

Re: Questions About Event Namespaces
Posted: Wed Jan 23, 2013 5:53 am
by thashepherd
Kieve wrote:Yeah, I'm finding myself mistaken about a number of things regarding events. Shows how much I really work with them, eh?
Guess I'll stick to the shipbuilding for now.

Events are hilarious because there are a bunch of red herrings, and not everything in vanilla works. One file only exists because Justin was dicking around with some stuff that doesn't work yet, and another was probably developed specifically for a trade show or something. SectorData calls event lists from events and newEvents pretty indiscriminately.
All that's true and yet I love them because this is the area where the most is possible!
Re: Questions About Event Namespaces
Posted: Sat Jan 26, 2013 4:43 pm
by Vhati
thashepherd wrote:I think it's way more likely that you can cross-load events from pretty much wherever you want.
Confirmed.
I just edited a saved game at sector 1, to add a quest that triggered "CRYSTAL_FIGHT" from events_crystal.xml, which spawned a Crystal Bomber in civilian space. ^_^
Re: Questions About Event Namespaces
Posted: Wed Jan 30, 2013 10:55 pm
by Vhati
The Profile/SavedGame Editor (v13) can add/edit Quests now.
You can plant arbitrary events anywhere on the sector map.
It only shows event names (no <text> excerpts),
so if you're unsure what a given event does, have the xml open in a text editor.
Re: Questions About Event Namespaces
Posted: Fri Feb 01, 2013 5:48 pm
by DrkTemplar
Sry if this was already answered, but yes they are all concatenated together in data.dat. You can reference eventList in "another eventList", as they are just lists of events. You can call an event in any of the files for any of the sectors.