Monday, September 23, 2013

Swing and a Miss

Well, it's been a while, hasn't it?

I haven't been idle; but between real life messes and not wanting to incur any more "y ur mods r no 1 click insatl?????" I've defaulted back to my old habits of just modding things that I personally want in my game; and not based on whether I think something would be popular with 'the community'.

Expanded the Estate again; did some more work on the girls; perfected my process to use a quest to add items (weapons and mods, specifically) to game-wide leveled lists via script (conflict free) and then switch itself off to have hopefully zero impact on game performance past the first few seconds.

While the weapon-adding code was a smashing success, recent efforts were... not.

Over the weekend, I decided to explore a want I've had in Fallout since 3 was still the one we were all playing -- a zombie mod.

I know, there are a few around. Trouble is, they're all the "apocalypse" type -- stupid gauntlet type shit where a zombie spawns every square meter of the game, and respawns every twelve seconds; turning the entire thing into less of a sandbox game, and more a "how long can you stay alive?"

Useful for testing combat AIs; nigh worthless for a full game.

So, I started up something less... overbearing. The idea was fairly simple: ghouls would spawn in "packs" at the Nuclear Testing Site; and move across the Mojave at the more Romero-esque walking pace towards any sizable settlement; where they would then either roam through town, or try to enter some of the buildings looking for people.

The idea was that settlements would be under regular assault; but not overwhelmed -- slowly worn down as the zombies killed off a guard or townsperson or two each attack, until finally there was no one left. Military installations would of course weather better -- McCarran and Cottonwood Cove both have enough soldiers handy to repel the waves with minimal losses; but places like Novac and Goodsprings would have a lot more trouble.

Setup was easy enough -- one feral and one Glowing One copy for each place to be attacked; slap a travel package to some arbitrary point in or near enough to the target that they won't get lost; put some code into the packages' OnEnd block to remove the travel package and add the attack package when their target is reached; make sure low level processing is enabled so that the engine will still move them even when they're not loaded into the game; drop as many as you need into the game world; fire it up to test...

...and it doesn't fucking work. Of course.

Turns out that while low level processing will allow the zombies to follow their travel packages when the player isn't around to see it; the OnEnd block in the packages won't fire unless they're loaded into the game and active at the time. So what you get is a group of ten zombies standing idle at the travel package destination until the player shows up; at which point they go apeshit and attack you instead of the town.

That, by the by, is when Maeva and the custom Saiga 12 I gave her come in mighty handy. I generally carry long range, powerful, slow-firing weapons; which it turns out aren't good for dealing with runner-type zombies ten at a time. My poor, three shot Rhino just couldn't keep up.

Anyway; tested four different settlements, and all had the same issue, so I don't think it was a one-off where the engine just got its head up its ass again.

Not sure what to do. The theory is sound; but like so many of my other ideas the engine won't let it execute properly. Scripting the package changes via quest script would necessitate setting the zombies up as explicit references; and would add to the CPU load more than a bit, since it would have to monitor the location of and alter the packages of a hundred and forty creatures (assuming I never decided to expand it further). Slapping the attack packages directly onto the zombies would remove a lot of the randomness; since they'd no longer select an attack behavior at random once they reach the settlement. Making them a random spawn with pre-set attack packages won't work since spawns don't trigger until the player is in their cell... and both of those last ones assume that the zombies won't get lost between points A and B in the first place -- remember, even Beth copped out and made the vanilla companions move back home via script because their travel packages and/or the package hand-off to sandboxing were so unreliable.

Probably the safest bet would be to forgo the travel altogether and just set up the random spawns in the town... but that kills the possibility of running across the zombies in transit, out in the desert -- which was half the damned point of the entire thing.

I guess if I want this like I envisioned, I'm going to have to micromanage the shit out of it and not leave anything up to randomness.