Glassix 2 v0.13: Event Editor preview


Hi everybody,

I wanted to share what I've been working on this month: The Event Editor, which will allow players to add the own events to the game or modify existing ones.

In the game folder, mods are stored in "Glassix 2_Data/StreamingAssets/Mods". From there, you'll have one folder for each author, inside those, a folder for each authors' mod and inside those, various folders to store XML of various editors : Events, Furniture, Locations, Scenarios and so on... Since we are talking about the Event Editor, the files will be stored inside the Events folder. Then inside this Events folder, you'll have as many event file as you want to let author organize their events as they wish.

Let's start with the editor preview : Selecting the author, mod, file and event:

You'll first have to select a mod author or create your own if you want to start creating or overwriting events. Spectre is a player who designed the low poly villa 3D model currently used in the Newbit map. (Thanks again!)

Then select the mod you want. Mods are kind of categories for authors to organize their mods however they want. You can add as many as you want. You could create a seasonal mod with events related to christmas, halloween, spring, winter, whatever... or create a folder which would be specific to a full scenario you want and so on...

 Then you select the actual XML file you want to edit, or add a new one. For my own core mod, I've organized files by actions and scenarios which you can see here. You might notice if you select Spectre > Starter, the list is empty which is normal since his mod has no events, only an infrastructure and we are currently working on the event editor. In the future, we'll have more editors, hopefully the city infrastructure editor which would allow players to add their own low poly 3D models to the game with their own textures, or modify existing ones, and in this future editor, Spectre's list would not be empty.

Now, under the hood, the XML file has been loaded by the game and shows all the events in this file. In my example, I opened the Newbit file which contains all the current events I created for the Newbit scenario. Each event has a custom label so the author can easily recognize them. The current UI is quite blunt at the moment, I guess in the future, I'll try to make it more visual, like a board like UI showing events related to each others (once I add choices) with arrows linking them, that'll come later if possible.

Then you either create or add an event and you'll end up in the interface shown above. I've split this in 3 tabs: General, Conditions and Steps. General is like the name says, some general information about the current event. The Conditions tab will list all the required conditions for this event to be triggered. The Steps tab will list all the steps of the current event, be it dialogues or hidden game flag changes.

It starts with the General tab. You'll first have to select a trigger for this event. There are currently 4.

  • On city load: When the city map is loaded, either when you start a new game, load a saved game, or transition from a location to the city map.
  • On location load: When you enter a location
  • On action button: When you click on an action button from the slot bar. Actions is another game entity which will be moddable and allow players to add their own actions, triggering their own events. For example, we could add a cheat button to max out obedience level on all the citizen of the game... I won't even need to hard code cheats in Glassix 2, everything can be handled with events.
  • Off: Used when you want to merge several events to the same event or for choices for example and thus don't need to be triggered automatically by any game interface.

From there, you select a code and a sub code for your event to make them unique. The code is kinda like a category or family, however you prefer to name it, and the sub code gives variations. For example, the doll mode spell events all have the code "dollmode", and the sub code allows to have different events depending on conditions: if the girl is not in doll mode yet, she will go under doll mode, that's the default sub code. But if she's already under doll mode, a second event with the same "dollmode" code would trigger to cancel the doll mode. This will allow me to add a Search feature in the game to find event codes or labels among multiple authors, mods and files if some events have been overwritten or expanded with new options in additional mods.

For the action trigger, I've made it easier so that the code is actually changed to a select dropdown with the list of all possible actions in the game. And with the actions editor in the future, it'll be possible to add new actions like cheats and whatnot.

After that, we have the frequency of the event, meaning how often can we trigger it again. The names should be self explanatory:

  • Always
  • Once
  • Days (After X days): With this option, a new text field allows to select the number of days manually.
  • Minutes (After X minutes): With this option, a new text field allows to select the number of minutes manually.
  • Daily
  • Monthly
  • Yearly

Below that is the priority of the event. If several events can be triggered at the same time, the game will trigger the one with the highest priority. If several have the same priority, we trigger one randomly in the list of this priority. This way, daily life and unimportant event would have low priority while story events would have high priority.

Hovering over the labels will also give some information to help authors know what the row is for.

Then we can move on to the Conditions tab

Events will trigger based on conditions which come in 3 flavors:

  • Actor: This condition will check variables for a citizen involved in the event. Most of the time, it'll be the player obviously. When the player interacts with another citizen, this other citizen becomes a second actor. You can have as many actors as you want. For example, this condition is used for the talk action. Depending on the target's gender, we have different text. Then we can create whatever flavor of text we want with additional events: A young citizen might have a different talk topic compared to an old citizen. The target relationship or obedience level would also change the speech by using the priority feature and so on.
  • Global: This condition will check global variables, like the time, weather, current scenario and so on. For example, all events for the Newbit scenario would need a global condition checking that the player is currently playing in the Newbit scenario and not another one or Free mode.
  • Flag: If you're familiar with Visual Novels game, you should know this term. It's basically some event variable to keep track of what the player did.

For each of those 3 condition categories, I've added entities which can be added and edited easily and the game will display a dropdown with all the possible choices for this category.

For example, global conditions will list the various time checks. But let's say we want to add a new global condition. Let's call it "City Safety" which would be used to track if a city is safe to live in or not. With the Variables Editor (added in the future), it'll be possible to add it easily which would make it appear in this list and useable to have dangerous events trigger when the city safety is low. Those variables/conditions can have different types : String, Integer, List which allows the game to know what it needs to display and what values to expect and clamp in case of integers with a min/max value (For example, the hour variable needs to be between 0 and 23, Day of week would be a list with the 7 days of the week as values (Monday first btw)) All this process is automatically handled by the game and when you change the condition, the operator and value fields will change based on the type of the variable. integer would have additional comparison operators such as "Greater than X", "Lesser than X" while Lists would change the text input to a dropdown with all the possible values of the current variable. Such as this one below:

For the Newbit scenario, I created a flag to keep track of the Welcome party status. Before the dean announces the welcome party at the end of Day 1, the flag doesn't exist (save memories since in the future, we'll have many flags). Then at the end of Day 1, the dean talks about the party to the player, the Flag changes to "Dean announcement" (maybe I should have named it implying it's a past event, labels are editable anyway).

Then when the secretary gives the actual time to the player, it changes to Secretary reminder.

From there, we have two cases: Either the player misses the party or he completes it. This flag will allow players action to have consequences, same as choices. If you miss it, the dean, your colleagues and the secretary might have different talk interactions with you for the following days saying they missed you or blaming you, losing some relationship with them...

And if you've noticed, the operator dropdown in the picture above (the second one, with the "In" value) was another tricky part to code because it allows the author to select multiple values in the list which Unity doesn't handle by default and took me a while to expand their base dropdown to a multi select dropdown. But the process is seamless now, changing the operator from Equal to In will allow the players to select several options at once and vice versa without changes in the dropdown so the experience is as smooth as possible for the creator.

Anyway, I think this post should give you a better insight of what you can expect with this editor. I already got some comments aiming at the classic "You expect your players to create content for you?" which was expected. I'd love players to create content with the tools I created but most of all, this editor forces me to codify my XML and organize it properly, something I didn't to in Glassix which makes it very hard to go back to Glassix's code because there are so many nodes with possible specific values which I don't remember anymore... Unity makes it much easier. And I'll also be using the Event Editor myself to add events which will much faster than manually writing XML code myself like I've been doing so far. So I'll be both the developer and the user of the editor.

This editor will give complete control over the game contents, even overwriting my mods with the priority system if you want to change how much gains you get from spells for example. I'll add a quick duplicate event button too so that this is easy to overwrite content. Anyway, I think this editor has a lot of potential and I hope that matches your expectations so far. Glassix 2 will be both a game and game content creator. I won't forget to improve the visuals too which need lots of work and optimization, this is not forgotten too. But gameplay is and will always be my priority.

If you have some feedback or ideas about the current interface, don't hesitate to drop me a message. Since this is currently in coding phase, that's actually the best moment to add or modify something to make it smoother, something I wish I could do with Glassix being quite outdated but unfortunately, too complex now that the code is done.

Have a nice day!

Get Glassix 2

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.