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.

5 comments:

  1. Did someone say "mega-companion"?

    ReplyDelete
    Replies
    1. Too dead tonight to go into it and actually sound coherent; but I'll fill you in in a new post when I'm capable of coming across as something other than insane.

      Delete
  2. Yes, I read that as well. Not to mention noticed how there were screens of someone new that had their name "blacked out" ;)

    That said, Cid looks to be an interesting, if currently overpowered, addition to your squad of companions. I also like your dialogue expansion ideas. I agree that they should help improve each individual companions sense of personality greatly. I have had similar ideas float randomly through the back of my mind more than once, but unless I get back to work on Cameron, I highly doubt that I will be figuring that sort of thing out any time soon.

    ReplyDelete
    Replies
    1. " Not to mention noticed how there were screens of someone new that had their name "blacked out" ;)"

      Someone new? Cid's the only new companion in any of those shots. If you mean Miss Redacted; that's Mystery-chan -- she's just taken to wearing a pre-war hat lately. Or were you digging through the Picasa album?

      Seriously; unless I screwed around and mistakenly uploaded some screenshots of Sammi (the character I made for a "girl and her dog" playthrough to test Cid without support from the others) I can't think of any other new characters I've screenshotted.


      " I also like your dialogue expansion ideas. I agree that they should help improve each individual companions sense of personality greatly. I have had similar ideas float randomly through the back of my mind more than once, but unless I get back to work on Cameron, I highly doubt that I will be figuring that sort of thing out any time soon."

      Well, I like the girls to make random comments. They already had some random dialogue that can occur at any time; but I also wanted comments on specific places.

      Most such ideas crash and burn -- the "bored" code, for example (think I deleted the post talking about it before posting, though) was a massive failure.

      This one seems to be working out okay, though. The script isn't terribly complex; but it can get kind of large, depending on how many cells you want her to recognize.

      Delete
    2. 'Twas Mystery-chan then that I had thought to be "new". I blame it on the hat and the fact that I have not seen her for a while.

      Delete