I continued yesterday's work on encounter triggers today. The last encounter to receive this treatment was Allegan Fairgrounds. It turns out that there are a lot of exits to that particular encounter!
Once that one was setup, I began doing some testing, and discovered a bug in the way triggers interact with forbidden hexes. Namely, forbidden hexes were being erased when a new game was started/loaded without restarting the program. This probably added to the confusion about forbidden hexes, as some games they were reliable, and others not.
I got the override load order issue fixed today, and was able to rename the "punch" attack mode with an override xml file. I was also able to replace the existing Lockpicking skill image with an override copy. There were a few issues that popped up once I started testing encounters, but I think we're back to operational now.
With that feature running, there are a few things I want to tackle before getting a test build out to you guys.
Picking up where I left off on Friday, I finished making the override edits to the remaining data types in the parser. And for a moment, things seemed to be working...
However, as soon as I added a mod data for the override, things went south. By the looks of it, the base data loaded okay, then the test mod I created. But the transition from finishing the test mod loading and starting the override data was broken. Namely, it was skipping loading steps where it shouldn't.
I managed to get the mod list loader working today, after some pesky load order bugs.
As of this afternoon, I had a separate mod folder called "DanMod." Inside that folder, I had data for a new item, some new images, and the rest of the data pointed to base game data. I was able to load the base game data, and then load this mod from the separate folder, remapping IDs and linking as needed.
I also now have a getmods.php file that lists which mods should be loaded, in what order, and from where.
I was finally able to get the remapper functioning today. After the final two data types were refactored, I had to sort out a few index mismatches in the remapped data. (Some data types were 0-based indices, others 1-based). Once I got that sorted out, I was able to load the base game data again through the remapper.
Despite the power outage today, I managed to get a pretty solid workday in. The work laptop did it's job in the morning, and I had the afternoon on the home rig. And nearly every minute was down in the code, working on the remapper.
Not much of a course change from yesterday. Just following through with the plan I laid out then. Namely, I'm going through each of the data parsers, and getting them to remap mod IDs to new IDs that don't conflict with the base game data. And so far, I think this approach is still going to work.
As I crawled further down the rabbit hole that is data refactoring for mods, I reached another "am I insane?" point today.
As previously mentioned, this mod refactor goes to the heart of the data management code in NEO Scavenger, and changing simple ID refs into combo Mod:ID refs involves a lot of changes (maybe dozens of code rewrites in each of dozens of classes). Even though I was able to get data loaded into memory in a segregated way, changing all the game code to use the new data ID format was getting more complex the more I worked on it, and gave me pause.
Most of today was spent on phase two of the mod merging update: converting all internal data IDs from plain numbers to mod-specific numbers. This looks like:
Old -> New
5 -> DataRef("0:5")
12.7 -> DataRef("0:12.7")
Basically, every time I refer to something in the game, I need to update it from just the old ID to the new mod ID plus data ID. To do this, I've created a special class called DataRef. DataRef takes a string like "0:12.7" and figures out that:
Today was my first day digging into mod-merging, and it was pretty hardcore. Just about everything in the game relies on data IDs, so making it possible to load IDs from different sets of data means touching code in a lot of places. And one of the big places was the DataHandler class.
Since it has been relatively stable, I've just finished updating the default builds to 0.987b on all sites. The "test" links are no longer necessary, and have been removed for now. This updates the following builds:
I've just finished uploading new demo build 0.987d, which includes all of the fixes and non-content updates from the past five months. Highlights include AI improvements, options screen, GUI enhancements, equipment-based sprites, and NPC conversations.
I finished reviewing Harald's encounter spec today, and I think we've got a winner. It's a good-sized encounter, with some meaty things to explore, and some interesting twists. I'm excited to share it!
Recently, I spoke with Dan P, of Infinite Lives, about such topics as games we grew up with, influences for NEO Scavenger, school, work, and more. If you feel inclined to reminisce about days of yore with us for an hour, check out the podcast at Infinite Lives!
I also have some good news: the mobile dev box is finally up and running again!
Hey Folks! Hope everyone had a good weekend. We had some of the warmest days yet, and it was nice to get outside for a bit.
Today, I started work on getting Zom Zom's setup with the same trigger treatment that I mentioned last week. Namely, making it only trigger automatically on the first visit, and requiring the player to use a doorway item to enter afterward. I think I've got this mostly setup for Zom Zom's, and it just needs a bit more testing.
With the triage done, I started work on the issues in order of priority. First up: encounter triggers.
Many of you have run into cases where encounters will trigger accidentally. In places like Hatter's, Hidden Lake, and Zom Zom's, entering the hex, sleeping, or other actions can cause the encounters to trigger. And often times in rapid succession.