Friday, March 29, 2013

Unnamed Post Series: Companions

It shouldn't come as any surprise that the bulk of my recent modding time has gone into companions, and further expanding their already considerable capabilities.

Firstly, I've made oblique references on several occasions now to a system for creature companions that I was working on. Well, after logging fifty odd hours of play without him getting lost once or having to have his follow status forcibly reset; I'm about ready to call it a working framework.

Everyone, this is Cid:













Cid is a slightly mutated Gray Wolf; who stands about 30" at the shoulder and tips the scales up near a hundred and eighty pounds. He sports the standard NosCo companion features: follow, stay here, go home, inventory; as well as a tracking plugin with summoning and reset functions. The system I ended up using is slightly different on the back end than what I normally use; in that Cid's packages aren't added and removed on the fly -- they start on him, as his behavior is controlled by variable settings in his script. While not yet implemented, I am considering adding hardcore needs to him, as well.

As usual, I overdid it a bit on Cid. In the past, creature companions (Dogmeat, Rex) haven't been terribly useful for me -- they tend to get their furry asses handed to them on a regular basis. I didn't want this to happen to Cid, so I set up a few actor effects for him.

...I created a monster. In early testing, we were out at that travel trailer south of the Wolfhorn Ranch; the one where you get ambushed by Vipers. I let Cid run off to do his thing while I picked off gunmen where I could. Soon, I heard the telltale explosion of that one asshole with the grenade launcher. He wasn't shooting at me, so that narrowed it down. I kept working, expecting any second to see a message pop up that my pooch was unconscious. The message never came. What I saw instead, several seconds later, was the Viper come hauling ass out across the field; a giant (extremely pissed off) gray wolf hot on his heels, snarling and trying to bite him in the ass. ...You ever have one of those gameplay moments when you'd have given a great deal to have had FRAPS running to catch something? This was one of those. Sadly, it was over before I could aim and screenshot... but what a .gif it would have made. Afterwards, when I went to loot the Vipers, I found the one with the grenade launcher (missing half a leg). He still had grenades; his AI had just decided that a full rout was the proper response, apparently. Which to be fair, is usually the best idea if you shoot something in the face with a grenade launcher and it only gets mad.

He tanked the giant roboscorpion in OWB. The poor robot couldn't even get 20% of his health down; and Cid had beat the roboscorpion back several paces in the time it took me to get up the stairs to find a firing position with some cover. He wasn't doing any significant damage; but neither was the robot.

Obviously, I overdid the DT increase effect a tish. Going to have to scale that back, somewhat.

Cid, you may notice, is not made up of a vanilla game model. I had originally tried to use the wolf model from the monster mod; and almost immediately remembered how horrible the author of that mess is at modding. Decided to do it myself, instead. Took the Legion mongrel model, edited it to remove the shagginess, and then reworked the texture to make it gray, white, black, and some light blue. Sadly the finer details don't show up in the game; even with large textures and full anisotropic filtering. And yes: he has blue eyes in those last couple screenshots. He was originally supposed to have blue eyes. I changed it because I couldn't get the shade of blue I wanted; and I saw a photo of a wolf with pale yellow eyes that I thought looked fairly good. It didn't render correctly in-game either... but it's less bad than the pastel blue.

I gotta say, while I still don't like anyone else's creature companions, I like Cid. He screws up my sneaking on a regular basis, and much like a real dog he's constantly too close and trying to get underfoot... but he reminds me of the pets I had when I was playing WoW: a big furry ball of hate and damage absorption that jumps between me and enemies and holds their attention while I shoot them in the face.

Plus, I think it would make for a hilarious first entry into the Prospector Saloon...

"Cheyenne, stay. Don't worry, she doesn't bi-OH MY GOD what is that?!"

"Yeah... he does bite; so I'd keep my distance."


Of course, I haven't been neglecting the humanoid companions, either.

One thing I've wanted for a while that I finally got added was a sort of affection stat. Now, most companion makers want an affection-tracker stat so that when the player has completed enough bullshit fetch quests, the companion will decide they want to spend the rest of their lives with this particular pushover and et cetera et cetera. My girls are established characters, and don't do romance quests. Nonetheless, I wanted a means of tracking how they feel about the player on a per-game basis; to delay some dialogues or behaviors from kicking in until later (whether via cumulative niceness or by meeting specific requirements), so I added what I called "regard". This pulled double duty of giving me a way to control when the aforementioned dialogue and behavior would start and stop from a new game; as well as letting me test out the system and figure out how it works, for eventual inclusion in the mega-companion that will blow all others out of the water but you should totally forget I mentioned all the same.

LOOK! A BLIMP!

Anyway.

Part of this system was gifts. Mostly standard stuff -- ammo, food, drinks. Hard liquor for the demon. Natasha gave me a bit of an avenue for trying something different, however, as she's more a normal girl than the others. She likes stuffed animals. Rather than just pull the standard cop-out where you give the NPC the item and it poofs away; I instead set up some shelves in an unused corner of the bedroom in the Estate. When I give Natasha a teddy bear, she puts it on the shelf to display.



The shelves hold fourteen bears total, in various sizes; and all placed using the Havok engine so that they sit on the shelves normally, instead of hanging stiffly as though suspended by wires.

It was a fun if minor piece of combined scripting and cell design; and I think it turned out well.

I also added a new method whereby the cell we're in will be tracked and categorized. Originally I had planned it to go indoors and out; and be used to trigger all sorts of neat dialogue... but I forgot that Bethsoft are fucking slackers. The GECK will allow you to put cells into a formlist... but it will not allow that formlist to be read by GetInCell -- requiring that rather than just having a formlist for each category of location, you have to name them explicitly and check one cell at a time. Worse yet, the script function that drives such code does not function on any cell except those in the Interiors worldspace -- not only will it not work outdoors, but it won't even work in places like the Lucky 38 penthouse or lounge; the Gomorrah courtyard; the legion camp in general. This severely cut back the number of cells I was able to work with; and all but destroyed most of the outdoor dialogue I had been planning.

Still, I managed to get some dialogue implemented; and the girls can now use alternate greetings and other dialogue based on where they are:











The three categories of cell I've set up are: safe, might-be-safe, unsafe. Only a few new dialogues are actually added right now because I hate to write a hundred lines of dialogue only to find out the script that decides whether they're valid or not doesn't work.

As well, I added some code that causes the girls to comment on entering a cell for the first time:




To keep it from being the same every game, the script is set up to choose one of them at random to comment. Since it only happens once per game, this combined with some random dialogue will hopefully keep the idea from ending up tedious and annoying; and rather give them some extra personality.

If the companion chosen to speak isn't in the party at the time, the script resets and tries again until it either gets a valid choice, or you're no longer in the cell in question. Probably not the most elegant of scripting; but in a half dozen tests now, it's proven perfectly reliable.

I also created a replacement for my long-serving Pip-Boy Plugin icon, that I've been using since RR days.



The new one is an icon-o-fied section of screenshot showing the Pip-Boy open to the world map tab. The original displayed a quest marker and the cursor to indicate you were finding something... but it ended up having to be reduced in size so much that those tiny details were lost.

There was probably more... but I've been typing at this stuff no one reads for like five hours off and on. I've long since lost my train of thought; so I think I'll end it here for now.

Unnamed Post Series: The Estate

Haven't been idle on the Estate, either; though I don't really mention it much anymore.

I recently redid the arboretum a bit -- setting it up so that when it "rains" every night (the irrigation system runs), it also plays rain sounds. Now, I could have slapped one big ambient on the cell with a fuckhueg radius; but that would be boring. Instead I took two different rain loops of different intensities, set them up to adjust their sound level up or down by ten percent at random, and put out a dozen plus sound emitters all around the cell; so that it will sound different both from day to day, and depending on where you stand in the room. Still fine tuning the exact attenuation so that it's loud enough to be distinct but not overpowering.

And then, I went and did this:





Since I couldn't get an exterior cell to work right; I laid in panels textured to look like the night sky, and scripted them to enable at sunset, and revert to the normal copper roof at sunrise.

The idea worked out so well that I'm going to end up doing two more sets -- one of a blue sky for the day, and one overcast for when it "rains" every night.

So set up, it should look like the center of the ceiling is open at any given time. I figure something like that would help keep people from going insane during long-terms of being stuck in the Estate. It is a survival bunker, after all. Combined with the proper ventilation, sun lamps, and a little air freshening and dehumidifying, it would probably go a long way towards tricking your subconscious into thinking you had access to the outdoors.

Unnamed Post Series: Weapons

Seriously, it's been so long; and my to-post list is so backed up and convoluted that I got nothing as far as concise titles go.

I've been quiet the past couple months; but far from idle. Personal issues have just conspired to leave me in no mood to post for the most part. But, no one gives a flying fuck; so I'll get to the game stuff.

While I don't have the modeling skill to unfuck the sight alignment (seriously, do the modeling people at Bethsoft get paid? 'Cause they screwed up the sights on so many NV weapons that I think some days it was the 3d Studio Max equivalent of open mic night over there...), I've nonetheless kept tinkering with my .44 single action revolver -- including creating totally new normals from scratch. This is the latest draft:





















The base texture I'm mostly happy with (it still needs a touch-up or two around the front of the cylinder flutes); but the normals continue to be annoying. Gamebryo is really, really touchy with normalmaps. I can get it looking good under low light; or bright light -- not both. It's either too shiny in the sun, or not shiny at all indoors. I continue to tinker, but am not expecting to get it perfect at this point.


Still working on the 1911, as well:



























As you can see, the normal has issues; on the side under full sunlight. I've tried cleaning it up on numerous occasions, and it just will not cooperate. On the bottom where the texture wraps also annoys the hell out of me -- the line where the wrap meets makes it look like a fucking airsoft gun. Haven't had much luck getting the seam to disappear; but I'll confess I haven't worked at it real hard.


I've all but abandoned the Ranger Sequoia retexture. The base texture is absolute shit, no one's done a decent high-res replacement, and I don't have the dds skillz to do one up from scratch.

To satisfy my need for an overpowered revolver, I ended up picking up the Rhino. A quick glance over the comments thread will tell you the mod as downloadable is mostly fucked. Sadly, the Rhino has fallen victim to the same status as so many others -- the author uploaded a partially working version; patched it with something that works less well, and then disappeared from the Nexus. Version 2 has mis-aligned parts that result in the revolver not displaying or aiming correctly in game; version three fixed the alignment... but now it crashes the game of more than half the people who use it. Probably most annoying, is that the recolor texture packs for V2 don't work for V3; so even if you don't crashy crashy, you're stuck with that gaudy industrial orange thing.

Well, I've never let a little thing like a b0rked plugin or needing a texture recolor stop me...







Ignoring the uploaded plugin, I took the meshes and textures and reused them in my personal plugin, on a new weapon. I based it on the Ranger Sequoia; with the capacity cut to three rounds. I decided to asspull that the massive barrel was not a useless weight or empty housing, but was instead an integral (non-removable) suppressor. What? You can too suppress a 45-70. It's a reflex-type suppressor, okay? That big barrel housing provides plenty of space for expansion chambers.

Didn't bother with the red-dot or night vision models at all; nor any of the "pieces" from the assembly quest.

I can't speak for the other recolors from V2, but when I decided to recreate the green scheme it turned out to be almost obscenely simple: take the basic orange textures, apply a hue or color balance filter (depending on your editing utility); change the orange and red channels to green, scale the saturation back until you hit the shade of green you think is nondescript enough; save with DXT1 compression. Viola. Just monkeying with the color balance got the resulting texture so close to the original author's recolor that I suspect that's how he did it. I left the safety red; but recolored the Rhino logo to green to match the rest of the gun.

The Weapon Mod Menu allows for adding and removing the scope at any time, which lets you configure the weapon for in close or medium range, as needed.

I also did away with the custom scope reticle, and instead used the three-post design from the vanilla hunting rifle's scope:



Recolored the front sight red, and the rear sights green; amped up the glow by around 50% so that it would glow noticeably.







In all, I haven't had any trouble with it. It uses the normal Ranger Sequoia reload animation perfectly. The speedloader doesn't disappear like it's supposed to (half the revolvers in the game have that problem, though; so it's hardly unique to this weapon), but the author skillfully worked the speedloader into the cylinder; so that you have to look really close to even tell it's there -- it isn't at all like the vanilla 44 with its glaring loader clipping through the rear of the frame.

There's sometimes a bit of lag when the weapon is equipped (it's fairly high-poly; with a high-res texture), but I've yet to have it crash in open sighted or scoped variants -- whether equipped via menu or hot key. I'm tempted to try to recreate a couple of the other color schemes, but in practice I like the green so much that I'm not sure I'd ever use them.