Friday, April 8, 2011

New FO3 Companion Developments

As I alluded to in the previous, mostly-joke post (which I had entirely too much fun writing, by the way), there have been some interesting new developments in my... "independent" companions.

Of course, these companions have all the latest revisions; all the cutting-edge details I've been toying with off and on - revising and improving since I first decided to attempt improvements to ttomwv's original companion scripts, nearly two years ago. As well, they have the latest revisions of my "OH GOD WHAT IN THE HELL ARE THEY?! WHO WOULD UNLEASH THIS UPON US?!" combat styles.

Two combat styles, actually. Maeva and Natasha run the latest version of the "Operator" style I've mentioned before - the one I developed based on the techniques of several special forces organizations from around the world, with a hefty dose of three-gun champion thrown in just for wow factor.

She-who-will-hurt-me-for-publishing-her-name uses another style; one that is similar to the Operator style - using lateral movement, aimed semi-automatic fire, and firing from cover when possible - but this one is special; developed just for her, and her own personal tactics. I call it a Sniper style; though in truth Designated Marksman would be more accurate. The style is optimized for long(er) range combat; and heavily favors powerful weapons. She's an unholy terror with one of 20th Century Weapons' Gepard 12.7mm rifles.

Truth be told, when I eventually do get around to releasing some of this, I'm going to have to turn the combat styles down a couple of notches. Why? They're too good; putting out three to five rounds a second with a revolver; speed-reloading, and doing it again. These girls give Jerry Miculek a run for his money.

(and on that note; even if you're not a "gun person", I highly recommend watching Jerry in action at least once - it's amazing stuff)

In any event, the styles need to be scaled back, as they're unbalancing to the game right now. It shouldn't be hard to do; up the dwell time between shots by one to two hundred percent; and make them more likely to seek cover, rather than simply stand and kill whatever was unfortunate enough to cross their path.

I like the movement; the cover seeking behavior, and the extended ranges they're willing to engage at. I just think they shouldn't be able to slaughter everything in sight quite so quickly.

Which does bring me to their most recent performance; last night as I was testing the latest revisions to the code before taking those screenshots for the other post.

I wish I had a video of it. We moved into the Super Duper mart (note: this is not the same savegame that Nos' Adventures takes place in - I started a new game to avoid possibly breaking that game; now that I know my "new" companions work, I can see about converting those saves to the new characters) at level three. In the past, just to accentuate how skilled they are, my girls were traditionally set to be over player level. In the course of setting up this plugin, I reset them to match my level, so no more cheating on that front.

Of course, FWE + low level = player can't kill shit. Weapons have laughable accuracy, and one hit won't kill even a dog; so all I managed to do was stir up the hornet's nest. Once one of the raiders strayed near enough to trip my cadre's radar, it was officially on.

What was really interesting was how they did it. Being FWE and low level, weapons and ammunition were fairly sparse. I don't think we had more than a couple dozen rounds for anything.

They cut down the enemies directly ahead of us with pistols, and advanced into the main room; cutting to their left, and taking cover behind the checkout counters while taking all comers.

As they moved, they also looted. Ignoring melee weapons totally, they nonetheless swiped every ranged weapon and round of ammo they found on corpses. As one weapon ran dry, they'd transition and keep going. It was... impressive to watch.

Eventually, we were down to the ones back behind the counter, who had foolishly come to see what was going on. They advanced up between the shelves towards us... and Maeva put away her gun. She took out a grenade, and threw it into the choke point; blowing both into a viscous stain on the tile.

I... don't think I've ever seen a companion do that before.

Later, after clearing the back room of anything not nailed down when the second wave moved in; they waited for the 'bot to get killed, and then went hunting. Each one took a third of the store, and they mercilessly slaughtered everything that wasn't us.

This one was more interesting for me; as aside from taking out the couple of raiders who were on top of the shelves, I wasn't actually involved in the combat. Didn't see a thing. As I came out from the pharmacy, three proud little redheads returned to me. They actually did sweep the entire store. Natasha took it upon herself to go get the guy that spawns in the restrooms - an enemy that hadn't even shown up on my radar yet.

Again, I'm thinking I may have overdone the combat abilities and aggression just a little bit.

Who'da ever thought an FO3 companion could be too good? I remember when we used to lament how bad they all sucked...

Interestingly, they didn't loot anything but ranged weapons and ammo. From what I know of the AI, this tells me that they didn't like the weapons they had. When a companion "likes" a weapon, they tend to equip it over anything else, regardless of damage value. No-Name likes the .500 S&W Magnum revolvers, for instance. Even if I give her an auto-shotgun or an anti-material rifle - both of which have higher base damage and DPS values - she'll still use the .500 until out of ammo; and then almost grudgingly switch.

Maeva was sticking primarily to handguns; despite having a stack of grenades that were far and away more powerful. Given total selection, she tends to prefer automatic shotguns over everything else.

Natasha's a pragmatist; willing to use whatever has the best damage rating based on her skill levels.

This, again, is interesting - because it's identical to the behavior they exhibited as RR companions. The issue is that these girls have never been RR companions. I couldn't clean the masters from the plugin successfully; so I copied the NPC base-forms to a new plugin; and wrote in new scripts, combat styles, classes, and dialogue. They don't even have the same IDs. Different plugin, different IDs, different scripts, different saves... identical behavior.

This worries me. RR companions have to "learn" like any of us "real" people. This is mostly confirmed, by the way - having been reported and verified by quite a few players while I had the call out for intensive testing of companions and their abilities last year. On average, it takes them eight to ten hours of play time to get the hang of things.

I've since learned that this information actually is saved to our hard drives; and is not part of the savegames, themselves. That's why once they've "learned", companion behavior stays good until and unless you uninstall and reinstall the game totally. The information was actually found last year by a player trying to track down the engine's memory leak. He found that FO3 was saving information into somewhere deep and dark in the Windows install. I don't think he ever identified exactly what information was being saved; but from what I've seen in the game over the years, I know perfectly well what it's saving: it's the AI that I and so many other players have run into on numerous occasions.

Trouble is, this information is plugin and character specific. Turning a plugin off and on won't clear it; but moving the same character to a new plugin gets that character flagged as new, and it has to learn all over again. As well, the learned behavior if you will doesn't carry over between characters. Long-time readers will recall the horrid performance I suffered from the Arianrhod companion created specifically to be my partner in Nos' Adventures. She got better, but never did get as good as the ones in my companions pack; despite them all using the exact same scripts, packages, and combat styles.

My new companions shouldn't have learned this fast. They were terrors out of the box, as it were; being held back in the beginning only by some errors I had made in the first draft of the scripts.

Which, of course, begs the question: if I repeat my process; create a new companion with the same combat style, same script, same packages... would they work the same? This is something I'm going to have to investigate.

As for tertiary, non-combat functions:

I'm torn on the teleporting code. While it technically works, it suffers from much the same problems that ttomwv's teleporting code had: that is, they tend to 'port around a lot at random, rather than just when they're supposed to. While I only implemented teleporting to pull a companion along if we ended up in different cells, it doesn't work correctly at the Megaton gate; which means that much like in FONV, the engine is tagging them as being in the same cell you are; it just isn't actually moving them right away.

I'm considering trying some form of timer; to cut down on weird warpings in the wasteland. Maybe a five or so second delay - if the companion stays in a different "cell" for more than five seconds, then the teleport command trips; but not before. This would, I think, cut down on random warping as you moved through the open wastes. Unfortunately, I have not had good luck with the reliability of timers in the past in this game.

As it stands, companions not immediately following you into a new cell, or occasionally getting lost may simply be one limitation we do have to accept. It may well turn out that my Pip-Boy plugins and Herculine's recall items are really the most efficient and least troublesome solution; that there isn't an automatic fix that can be scripted in to thwart flaws in the engine.

On another note: the 'party size dependent' plugin idea continues to work well. I'm not sure how practical it will be - plenty of players already mewl "cheat!" every time a companion does anything other than suck and die; so I'd imagine I'll hear quite a bit of bitching if I do implement any sort of party-size based bonuses to stats or skills.

Seems nearly everything needs to be made optional these days. Ungrateful wretches. Like to see them script better; they're so damned smart...

*ahem* Don't mind me. Bitter moment.

Anyway.

As I said before, it feels good to be back in FO3. So much in the other two games just doesn't work. Bethsoft hasn't unfucked FONV yet, and Oblivion is such a primitive incarnation of the scripting engine that a lot of the code I prefer to use doesn't work in it. I had forgotten how good I was at this sort of thing.

Following that train of thought; I'm more than likely going to be working on some new companions for the game. These will probably provide insight for other modders; but they will absolutely NOT be any sort of a "create your own" system; nor will they be tied to one.

I've had some new ideas that I think should pan out well. One, is a companion who grows and learns as you do. Now, I don't mean by that simply their skills go up. I've thought of a method to have several combat styles - skill levels, if you will - that the companion will automatically progress through as they level up and their skills increase. While not strictly speaking learning this would nonetheless present the appearance to the player that the companion was revising their behavior as they got more experience at fighting.

I've also come up with a way to have the companion switch weapons, based on distance to their opponent. Unfortunately, this is item dependent; so it would have to be coded based on the weapon mods you were (or weren't) running. As it wouldn't be an in-line setup, I'm not sure how well it would go over. The trick, I think, would be setting it up so that if they didn't have any of the weapons in the distance-lists, they'd simply fight as normal. I'm still not sure if I could set up the behavior to make proper use of missile launchers and such.

Lastly, as I look over the screenshots from last night, I can't help but think one thing: damn they ended up hot. I've got to be sure to back up my custom skin textures and a copy of that plugin.

Okay, I've rambled enough. Doubt anyone cares this much about my digital-philosophical meanderings.

Good day, Kiddies.

4 comments:

  1. Your companions did what in the Super Duper Mart? Bloody hell, that's scary! That sort of scripting would make the Terminators in the Cybernetic Dawn mod just horrifying *shudders* I like it :)

    Now, just so I understand you on this point, your "party size" plug-in moddifies the performance and effectivenss of companions based upon the number of characters in the squad? That would make sense to me, especially if it added to the effectiveness based upon how long the squad had been together as a unit. I know basically jack about tactics, but I do know a little about teamwork. The better you know your teammates, the better you all work together.

    ReplyDelete
  2. *whew*

    That post wasn't too long to read, but I think it was too long to accurately respond to everything that was covered.

    The short version: this all sounds great and I look forward to getting the opportunity to do some testing.

    On the learning business, however, I may have screwed myself if the AI info is indeed stored in some obscure corner of the game install. When I got the new hard-drive I simply copied the Oblivion and New Vegas installs, but (for some forgotten reason that apparently must have made sense to me at the time) with FO3 I did a fresh install. Should be good where testing is concerned I suppose.

    ReplyDelete
  3. @Sean: No, the party-size scripting is just an... enabler, you could say. What it does, is allow me to add and remove perks from the player based on how many companions they have hired.

    For instance, in my test here, if two of the three are in my party, I get +2 to perception; under the theory that the three of us all watching and communicating would make it easier to identify threats from further away.

    It would be just as easy to have it mod damage or damage resist or healing or any of a dozen other things; for the player or for the companions.


    @Herculine: Sorry; I know it was a bit long, but I find if I don't get it out when I'm thinking about it, I tend to get to doing something else and forget.

    ReplyDelete
  4. Ah, ok, that makes sense as well. More eyes, in more directions.

    ReplyDelete