Dev Diary: The Sexy Side of Coding
So believe it or not, coding isn't all Hollywood parties and cocaine. It just looks like that sometimes.
With Fallout: London launching, I'm now in the process of going through my mods, figuring out what needs to be updated. Several smaller ones (Atomic Brahmin, for example) should be just plug and play. Others, like APC Home Update, can't be ported without essentially reconstructing half of the mod. Most of my mods fall somewhere in between.
Some are mostly lore updates. Insult To Injury, for example, uses a scripted version of the New Vegas chem Hydra, which regenerates all of your limbs over a period of time. The problem there is that Hydra doesn't exist at all in the location and time period of FOLON, which takes place on the other side of the world and in between the eras of Fallout 1 and 2.
New Vegas Hydra was a concoction made by Caesar's Legion from Nightstriker blood, and then used sporadically by the NCR. My take on that lore for ITI was that the Brotherhood improved the delivery system and brought a version of it with them east to the Commonwealth.
So again, it doesn't exist in Fallout: London, and wouldn't even exist in America for decades.
I finally just threw the question out to GG's lore debaters, and together we came up with a FOLON alternative: GRAIL, or General Restorative Aiding Injured Limbs, something that emerged from the London scientific faction. We figured the back story and everything.
Thing is, it's not really worth shipping a FOLON ITI patch just to change a couple of item names and some description text, so now I'm looking at a more general mod update, tacking ITI on my growing task list along with PANPC 2.1, PACE 1.6, and probably an update to Tuckered Out.
And that leads to the truly sexy work of mod coding: debug logs.
They're the things that happen when you flip the MCM switch and the mod suddenly is puking tons of indecipherable gibberish into an ever growing text file, telling a story that only really makes sense if you're the one who created and maintains the code (i.e., me).
When I did the PAST prototype, I gutted and completely redesigned the PANPC logging system to tell its story much more coherently and in a much less scattershot fashion. The logging system wasn't designed, didn't even really evolve. It just sort of accrued. Every time I needed to see if a piece of code was actually working right, I'd shove another log line into the code. And so, the log barely makes sense even to me.
Thing is, building a proper logging system in PAST had some interesting results. First, it forced me to restructure some of the code; in order to tell a coherent story, the code itself needs to work in a standardized and coherent fashion, and it doesn't always do that in PANPC. And so, I reviewed every function to make sure that they all started here and ended there and that their code flowed in a way that didn't force me to hack up a bad logging system. Good logging keeps me honest.
Once I realized that, and I finished the logging redesign and began testing PAST, the new logging immediately began revealing long-hidden optimization problems and obscure bugs that only because obvious once the backend code really began telling a story. And so I fixed the bugs, in turn improving the logging, in turn finding more bugs to fix, and so on.
It gradually sunk in that I should be treating backend logging as a primary design goal, not just as a literally tacked-on afterthought. Build the log, tell the story, code to the story. If it doesn't make sense in the log, it just plain doesn't make sense as code, and so the code needs to be rewritten.
And so that leads me to where I am this week. Everything is getting reviewed and most things are getting updated:
PACE 1.6. I finished the logging revamp last night and today I need to test and make sure I didn't break anything in the process. There's a dev version in closed test that includes native support for London companions, including an alternate Dogmeat personality for Churchill. This should be ready to ship sometime reasonably soon.
PANPC 2.1. A lot is happening here. Many of the backend upgrades for PAST are getting backported. I'm currently working on the log system. It's going to have some sort of native support for FOLON. And I've decided to remove a lot of old superfluous features from PANPC going forward, things that I added back in the early 2018 days that never really fit with PANPC's core design principles (such as the cloning system). Some are going to get spun off into independent mods, some are getting removed altogether. PANPC 2.1 is probably going to be closer to PAST in design.
(In the meantime, the latest PANPC patch for London now includes support for more enemy factions, as well as plugging FOLON's new weather systems into PANPC's visibility detection system.)
PAST. The Starfield version of PANPC is parked and currently no longer under development, and I don't anticipate picking it back up in the foreseeable future.
Insult To Injury. Logging update, lore fixes for London, and a general functionality update.
Tuckered Out. Logging update, bug fixes, and more testing.
Tunable Radios. The latest version on GG now has native support for London radio stations and a compatibility patch for the in game radios. We're now up to support for about 50 Fallout 4 radio stations.
I think that's more or less where I am at the moment. Most of this is grunt work and housekeeping, the grind efforts that make up 95% of any code project. But they have to get done and they lead to the ooh-ahh feature brags that come later. So they're getting done.
G.
