Hello guys, today I'm going to talk a little bit about some of the behind-the-scenes stuff for Just Friends that you guys can't see but I'm constantly, slowly working on, making sure you can't notice because I don't want to break the game after all.
First of all, thank you all for staying with me this year too, you guys are awesome. Now, let's talk a bit about how my Days are written.
I use a software called Scrivener to write the script of the game. This software also allows me to export said scrips to epub format, which means Tier 4 patrons can read the story of the game a bit earlier than the rest of you since I export the epubs before I start doing the conversion from text to JSON so the game can read the data and show you it to you through the game.

This is how my project looks from the software itself. You see, I usually write the script of the game detailing everything it needs:

This can and will include things such as the Speaker/Name of the person talking, Expression/Reaction/Animation it will show at that moment, such as shaking, jumping, etc. Sometimes I also add the sprite's position onscreen and other things, such as Background changes, music changes, etc.
Once all that is done, I need to convert the project to epub, but that means I can't just put it the same way, my tier 4 patrons do not need to read constantly what a character is doing, so I change things a bit to make the project look more like a book. I added some differences in text, and a bit more description too. Slowly, I copy every single text I've written, and I enhance it or add a few more things, to give the reader (in this case my Tier 4 members) more things to understand what is happening, after all, they don't have the visuals on a book.

I also make sure to export the epub in a way it would look good on any e-reader, with a cover and information like a professional book would have:

The file also includes the shortcut for chapters and so on, and I'm quite proud of myself for being able to do that. It looks good on a Kindle, and it works nicely on your PC too! But once that's done, and that takes mostly a day or two of re-editing the already existing text to the section for ebooks (inside Scrivener), I zip those files, release them on the Tier 4 telegram channel, and move on to converting the script into the JSON file the game will read.
You see, JSON is a very case-sensitive file, and any silly little mistake will make the file unreadable until you fix it. The problem is: There's no way to know where the mistake is, sometimes it's the lack of a comma or bracket.
So, I developed what I call, a JSON File Editor, tailored exactly to what I need to store in it. This was the result:

The editor itself is split into Seven sections:
Routes contain the main path of each route. You have to understand that every time you answer something, you may be on a new route already, a route is not the character you're talking to, a route is just a simple path that can lead you anywhere. So when you think: I'm gonna follow Johan's Route on Day 1, for you, that may be a simple choice with one singular path, but for me, that means at least seventy or eighty routes in just one single day.
I can't just write anything in the Routes either, all routes start from the main path, and every single day starts on the main route, that's why the first route listed in Routes will ALWAYS be: main.
After that, the other characters' routes will be added to that main, so Karnal should be: main/day1/karnal/1stAct, and so on, every time you get to the end of a route you will encounter a list of answers, each answer can take you to other routes.
Every time a route takes you to another route, that's called an Anchor.
Anchors are the equivalent of a hyperlink, anytime you have an anchor in a dialogue, you will be sent to the next route.
But let's go on to parts. Inside each route, we have Dialogs.
All dialogs contain the following information inside them:

And up to recently that's what we had. Also, a Dialog also contains a subclass called: Character.
Inside Dialog.Character, there's the following:
Note that, every time a character should appear, a toggle will be set in the Editor, so I can choose what I need.
Dialog is also very special, you see, that box down there has the exact same size as the dialog box ingame, and the font is also the exact same and the size of the font also matches. This ensures I will never paste a text there and let it go out of bounds. If the text has more than four lines, I will trim it to a maximum of four lines, then press OK and add the next dialog.
Now, you know there are other options I haven't mentioned and I will explain them soon! Let me go on with the other information about this whole process!

Now, in the image above you can see a few new things: What route is Selected, what dialog is selected,
and what information is shown. The Dialog Info is just a quick way for me to see the data without needingtoo click the edit button to check on everything.
Now let's go to the next section: Decisions, Anchors, and both info windows for these options:

You have to understand that there's a reason why Dialogs are on top, Decisions are below Dialog and Anchors are below Decisions, it's a hierarchy.
Think about it this way: Routes is the Father of Dialogs, grandfather of Decisions, and Great-grandfather of Anchors. All of them could not exist without Routes, and the same can be said for each one of them going forward. Decisions are part of the Route->Dialog, while Anchor is a part of Route->Dialog->Decisions[DecisionNumber]->Anchor.
Dialog may or may not have Decisions, but every decision WILL have an Anchor. Not only that, but each option inside Decisions is an object, and each of these objects can have one or multiple anchors!
That's why Decisions is plural, not singular, the same for Anchors.
So, every time I get to the end of the Route with the last dialog, I will add the Decisions, and each decision will have an anchor. In the case above, the first Decision, or Decision[0] has the anchor to send you to main/day1/mutt/2ndAct/Answer1B.
Have you noticed Wagner's name is mutt in the code? That's made to make it easier on me. However I won't lie that I need to change the karnal one to tiger, but either way, you get the gist.
Sometimes, an option can have multiple anchors though, like this:

In the case above, the fourth Decision, or Decision[3] has three anchors! Notice that the first Anchor is actually the highest value route you can go: You need 8 points to read through that route! If you don't have that, you need to have more than 4 points to get to the second, or you'll just be sent to the default route.
So, what are the data inside each Decision and Routes?
Route->Dialog->Decision[Number] has:
Once a Decision is added and highlighted, the Anchors's option will become available to add any number of values needed, so what does Anchor have?
Route->Dialog->Decision[Number]->Anchor has:

This are the information available in that answer for Johan on Day 1. JSON.
Now, a Dialog needs to have Anchors, but the anchor doesn't need to have anything else besides the Route it's referring to. Character Needed and Affinity needed are only for Affinity routes, those who are locked by those points. The last anchor will always be a free-pass anchor.
And what happens if you get to the final route with a character, will there be an anchor for the next day?
No. Because the next day is a new file, it's not inside the JSON Day1 file. My game is programmed to automatically switch to the next Day.JSON if it gets to the final dialog in a route and that dialog has no Decision->Anchor to go to.
With all this, I guess you understand a bit better how complex this whole system is right? I hope so because I'm not into making another huge post like this to explain. Either way, there's a reason why I'm here talking about this whole thing.
Route->Dialog now has two more options, do you remember seeing them?
That's right!
That's right! I have advanced the Sound Effects System in this last week while I was waiting for you guys to finish voting for this month's workload!

Ambiance and SFX are almost added to the game, these options are fully working now! They are, as you may know now, part of the Route->Dialog, so Dialog is the owner of the Music, Ambiance and SFX played into the game.



So far, the game has around 12 Ambiance sounds and 5 SFX sounds. As I find more, I may add them, but these should be enough to enhance the gameplay for you all. These options work, and they also save correctly the information inside the JSON.
Here, look how the information is shown inside the JSON file I created to test it:

Note that if there was any Options there they would be below Character, and inside them, there would also be the Anchors in the same organization, because yes I want the file for the game to look good in case I ever need to change stuff manually.
So, SFX and Ambiance can be added to the file, but does the game run it?
YES! Yes, it does! I tested it, and so far, it works like a Charm. So, the game already has part of its code working for Sound Effects so what's missing?
Saving that information and Option menu information.
Essentially the game can read and play the sound for you but if you save the game, it currently is NOT saving that information, so it won't play it when you restart, just the music. That's a whole can of worms that will take at LEAST a week for me to nail correctly. Especially because now Save Data is encrypted, and it's a headache to disable that. Either way, once the Save system is updated, all I will need is to add the final information on the Config window (which also has its own Save State situation that needs to be updated) and add the names of the owners of these awesome royalty free sound effects to the game. Not because I'm forced to, but because I want to. Without them uploading these sounds I would never be able to get this system working.
Once that's done, a new option will appear in the poll for Tier 3 patrons and in the Roadmap: Update Day1.JSON, Day2.JSON, Day3.JSON and so on, for Each character, with Sound Effects and Ambiance music. Ambiance is easy and fast to add I think, but Sound Effects are tricky. Just like with Animations long ago, I will need to look at every single dialog, read it slowly, and figure out if it needs the sound effect of Walking on leaves, wood, etc to be played there.
But so far what I can tell is that Ambiance works like music and needs to be saved in the Save Data and it's a whole can of worms to do, while SFX only needs to be loaded for that single dialog, and if you skip a dialog, the SFX stops, since it should play only once during that dialog in itself.
So yeah, in about three weeks 75-80% of the system, what still needs to be done will take a week of suffering because I HATE messing with Save Data, it could easily break the game and I don't want that! But after that, all I need is to slowly add all those sound effects into the game day by day! :D
And that will be it, for today. I hope that explaining how the Day system works in depth and talking a bit about the SFX System makes you guys a bit happy. Now however I shall go back to Day writing, Wagner won the poll and I will be writing his own route. But I believe that soon, having SFX in the game working properly will be a reality! :D