Monday, October 17, 2011

NCCS v0.8, More Improved! Or Not...

So, a player noted in the Nexus comments that Nellis' arty continues to target NCCS companions even after the player makes nice.

I had noted the issue myself when playing through that section of the Mojave this game, but had forgotten about it whilst pursuing other improvements (sorters, improved combat styles, et cetera).

When it was reported, I remembered; and decided to take a closer look at the issue. Sadly, it will not be an easy fix. The targeting script for the shells makes three exceptions: Boomers, the Player (once he's made nice), and the Player's teammates.

Well, the wheel ain't bein' implemented, so we can forget option three. Since it names the player specifically, and not members of the Playerfaction (slackers!) #2 is pretty useless for our purposes as well.

My current way of thinking is that adding the companions (temporarily) to the Boomer faction when they're within a certain radius of the gate will be the best option; and tossing in a condition about the Boomers not hating the player should preserve the ability to engage in hostilities with the Boomers without the companions refusing to engage.

Unfortunately, I can't test it at the moment since I'm smack in the middle of Dead Money; which I hate, by the way. This DLC is one experience that requires the use of the word 'cluster' many times.

Anyway, that's not what I'm posting about. When I was reading around the forums to brush up on the limitations of the GetDistance function (or at least try to -- my search was fruitless) I happened across a thread with an interesting theory. In it, a player posted a script for converting salient green into actual vegetables or something -- I never did catch the point of the whole endeavor -- and a respondent I'll refrain from naming noted that the script could be shorted considerably, by using a form list instead of naming individual items. The posted script looked mighty similar to one of my own sorter scripts, so the wheels began to turn.

I ran up a couple form lists, wrote an alternate sorter script, and implemented the change. Great, thinks I, this will shorten it enough to get all the sorters into one single script and quest!

Tested it in game, all items removed correctly. On a second thought, I decided to check the contents of the container and make sure everything got added right.

...It was about this time that I needed Houston's frequency, 'cause we had us a problem.

It seems that the whole formlist-in-lieu-of-items technique has one teensy flaw. Rather than providing a number to the script for each item, it provides an aggregate number.

For those who were too busy trying to get laid to pay attention in school, I'll explain.

Rather than adding to the container 22 Abraxos, a baseball, fifteen weapon repair kits, and so on; it tallied the total number of items I had that were in the form list... and used that number as the item count for each item it added. It added to the container six hundred and twenty one of each item on the list -- which is to say, every non-quest specific miscellaneous item in the game.

What made me giggle is that this would effectively be exponential. That is: I had 621 total items, spread across the hundred and fifty odd entries in the list, so it added 621 of each item.

Had I emptied the container back into my inventory, and sorted it again, the item count would have gone up to more than 93,000 of each (621x150); next time we'd have 13,972,500 of each... not that I expect the game would survive trying to move that many items.

Not that it wouldn't have been an amusing method of mass item collection... but I did not see this as being good for the mod.

So, in the end I reverted to my "inefficient" original scripts. It may not be flashy, it may not be evolved... but damn it, it works; and at the end of the day sometimes that's all you can ask...

On an unrelated note: my new "advanced" sniper companion that I made for DLC testing with v0.8 fucking rapes Ghost People. She takes limbs off of 'em left and right. The standard companion with the shotgun not so much. One of these days...

Hm. Thought occurred. Was going to say I'll create a companion that uses an AMR... but she's already a purpose made sniper... To the GECK!

...Sorry, what was I talking about? I was reading Wikia on FONV to remember the name of the ghost things, and then I had my AMR moment... I've got to start being more focused, huh?


  1. Just for fun, when you upload the new version you should upload the one with that aggregate exponential sorter. Then, after dozens of whining comments have been posted you could upload the real update with a comment to the effect of: "Oops... my bad..."

  2. Hmm, that would be a humorous, if nasty trick to play on the NCCS downloaders. Of course, it is the humor part that is important ;)

  3. "Just for fun, when you upload the new version you should upload the one with that aggregate exponential sorter."

    What, did someone steal your catnip again? That is evil.

    I like it... but past experience has taught me that very few would see it as a joke; rather I'd just get a ton of "bug reports".

    On the up side, I just finished Dead Money; and NCCS performed admirably... though not perfect. Too much bad navmeshing. They did better than the default followers, though.

    Also: NCCS companion + Operator combat style + AMR + Incendiary ammo + ghost people = hilarity.