Monday, August 8, 2011

FNV - New Companion Features

Since I've been playing FNV again (as some of you have no doubt expected) I've also been tinkering with my companions; trying to fix holes in their functionality, and generally make the game suck less.

It's also fun to fuck over the devs' careful railroading and micromanaging, but that's a rant for another day.

Of the most recent batch, I fixed two flaws, and missed a third.

Though I never officially announced it, a few months ago there was an NCCS v0.75. It got shit-canned in mid-development after the denizens of the Nexus were stupid in my general direction one too many times in a week. This version featured portable campfires (for survival crafting) and bedrolls -- accessible via the companions' dialogue interface.

The campfire mostly worked, but the bedroll didn't at all. Since I deleted the working version of the NCCS 0.75 beta, I never bothered debugging it any further.

Since playing a hardcore game, I've found many needs for food and drink crafting; and found that campfires can be hard to come by in the wasteland. This in mind, I revisited the idea, and added both options to my personal companions.

I'm happy to say that I got the campfire issues worked out, and as far as I can tell it now works 100% as intended -- save that I need to adjust the position a bit (had it set up too far from the player). The campfire will stay set up and ready to use until you leave the cell it's in; at which point it will be whisked back to the holding cell, to await being set up again when and where needed.

The bedroll is being obstinate. Previously, it refused to be moved to the player's location at all. This still holds true. The motherfucker will not appear no matter how I script it. I'll try a different mesh; see if that helps, but at this point I'm thinking NCCS will not be getting sleeping bags.

The second feature that worked was to rectify something that's bothered me about the game from the start, but that I'd never taken the time to fix. That being that NPCs don't spawn spent casings and empty batteries as they fight, like the player does. NPCs come with some casings, yes -- they're part of the leveled list that spawns the weapon and ammo -- however, they are not generated on the fly, so once those few are gone, the NPC gets no more.

Keeping companions in ammo in the early game is extremely difficult without cheating. About the only way to manage it is to reload. This is hard to do when your companions never turn in casings from the wad of ammo they just shot.

So, I did a bit of rewriting of the companion scripts (only two hundred lines and change) and wrote in a script that identifies the weapon they're using; and when combat ends, adds an appropriate amount of spent cases/batteries, based on how long combat ran.

Since there's no way to track when/how many times an NPC fires, I had to go with total time combat runs.

I just got done play-testing this, and it works beautifully. My girls now police up their brass like good little shooters.

I need to adjust it a bit, too. My original formula turns in too many cases in lower-intensity combat.

Originally, I had set it as one casing per two seconds for the slower firing weapons (shotguns, levers, revolvers, AMR), one casing per second for the middle-road (autoloading pistols, marksman carbine, subguns), and two per second for the 5mm assault carbine and minigun. This turned out to be too much. Natasha recovered sixteen casings in the Goodsprings schoolhouse from her cowboy repeater, despite having only fired a half dozen times (and not even having had sixteen rounds to fire).

I'm thinking I need to scale back the numbers. Say... one case per five seconds for the slow-firers, one per two for the middle, and one for one on the 5mms.

I haven't written in the energy weapons yet, since I wanted to see if the mess of a script actually worked before adding a couple hundred more lines to it. When I do, they'll likely end up with pretty slow recovery, too; since most energy weapons have a low rate of fire. The RCW and Gatling laser can be bumped up, of course.

This may end in my adopting NVSE, as well. In the base scripting engine, I have to base all of this around the companion's equipped weapon, by name. So, it won't work for mod-added weapons.

Conversely, NVSE has functions to allow a script to check their equipped weapon's ammo type, and then simply spawn some spent cases from whatever it shoots. It wouldn't significantly reduce the number of lines in the script, but it would as I said at least work for mod weapons, as well as vanilla ones. I can't decide whether it's worth slaving NCCS to NVSE just for this one feature, though.

And speaking of weapon mods: I've created one. I modified the "unique" form of the 357 revolver to produce a custom piece in 44. Haven't decided what I want to do with it yet, though. It'll be staying in my game, obviously, but it doesn't really seem like the sort of thing many people would want to download. Assuming I do decide to share it, how would everyone prefer new weapons be implemented? Crate in Goodsprings? Sold by vendors?

3 comments:

  1. Sold by vendors, definitely. Anybody (including myself) can do the obvious crate in the Doc's house (or refrigerator behind his house) but being on a vendor's list would make it feel more seamlessly like part of the game.

    ReplyDelete
  2. Distribution of said weapon would, in my opinion, depend upon how common it is. If you are only adding in one copy of the weapon, give it to a NPC or place it someplace not readily accessible, so as to make the player work for it. If there are several examples of the weapon about, then I think that adding it to the vendors lists would be a better solution.

    In regards to your issue with the portable bed roll, I noticed that llamaRCA's (Nexus) Willow companion has one. She will drop it on the ground when you tell her she should get some sleep, and it disappears after the player is finished with it. I have only used that feature once myself. Willow went off to use a nearby bed roll, leaving the one she dropped for my use.

    ReplyDelete
  3. I know the porta-bed is possible. For some reason, the one I'm using just doesn't want to work. I haven't tried alternates to figure out why, yet. No reason it shouldn't work, but with this stupid game you never know...

    ReplyDelete

Note: Only a member of this blog may post a comment.