Friday, October 28, 2011

NCCS v0.8, The Slow March Forward

NCCS has taken a major step forward this morning; further eclipsing its would-be "competition".

Firstly, the Nellis artillery issue has been fixed -- and without touching a single base game reference or script. How I did it would be boring technical minutiae, so I'll spare you all; except to say that in-party companions now exist in a perpetual state of being considered the player's teammate -- save when you talk to them, or during combat if you have XP sharing off. This teammate change will also allow some compatibility with follower-centric perks; but this is mostly untested so I don't know offhand which work without further scripting. The new "teammate" condition has been tested and verified to not affect companions' ability to enter the Lucky 38, or keep their weapons on entering other casinos.

Second, during the companionscript overhaul, I re-wrote the case-spawning code. It is now driven by form lists rather than specific item names. This will allow for plugin-patching of the weapon lists, to allow it to work with mod-added weapons without changing individual scripts or forcing your custom companion to require a weapon mod. It will also allow similar patches to include the DLC weapons in the case-spawning code -- though obviously new ammunition types will require modifying the scripts.

Third... companions will now repair their own weapons. Yeah, you read that right. Companions' weapons will no longer reach 0% condition, break, and be dropped only for you to have to go look for where they dropped the damned thing. NVSE is not required for this feature. Companions' repair ability is linked to their repair skill; and companions who are not using the new repairer class will only be able to maintain their weapons at about 60%. Once a Repairer companion's repair skill tops out, they'll be able to maintain nearer 100%, with their weapons never dropping below 70%. I think this strikes a good balance; since it'll keep their weapons from breaking, but not negate the need for the player to perform periodic repairs if they want companions to do maximum damage.

Fourth: this is mostly a back-end issue and not something you players will ever see, but I managed to shave 65 lines off the companionscripts in the course of the rewrite. This is important because the scripts were getting up near the character limit; and by cutting so many lines off I've preserved the ability to continue expanding the scripts for a moderate part of the future.

Lastly, not a new mod development so much as a testing result: I know a couple players and myself have run into an issue where the companions hesitate before engaging an enemy; reloading their weapon one or more times before entering combat. I got some more testing in, and this seems to be directly related to non-standard ammunition types. When I removed the special ammo from the companions, and added default ammo, the issue went away. It doesn't seem to be a sure-fire issue or fix; but that does seem to be the most common way to fix it. I can't even begin to surmise what's causing it (but I have the nagging suspicion it's an engine issue) so I doubt there'll be an NCCS-specific fix in the foreseeable future.

And of course, here's the new alpha; for those three of you who give half a fuck.

10 comments:

  1. Thank you for the update Nos. I see you were rather busy with this one. Being a complete Noob with the construction and terminology end of things, I am assuming that the "teammate" condition was derived by fiddling with the NCCS faction?

    And companions that repair their own stuff? That sure is a handy feature. Requires less "babysitting" on the player's part.

    I would also figure that besides giving you some room for future expansion, removing those 65 lines from the scripts will allow the game engine to process them faster. Not perceptibly of course, but still faster. I think every little bit helps in this case.

    I can't say that I have noticed the reloading issue with my companions, but that might be because I rarely use the special ammo myself, let alone hand it out to companions. I normally let it pile up, or sell it off.

    I will give the new alpha version a run soon. Most likely start sometime today or over the weekend.

    ReplyDelete
  2. "I am assuming that the "teammate" condition was derived by fiddling with the NCCS faction?"

    Nah, it's an engine setting (SetPlayerTeamMate 1 or 0). In FO3 it was only used to access inventory -- the "OpenTeamMateContainer" function is what lets us directly access NPC inventory in FO3/NV where we couldn't in Oblivion -- but in FNV it's tied to all sorts of things. If an NPC is flagged as the Player's teammate, they use the wheel when you talk to them; are unkillable even without the essential flag in non-HC mode; are eligible for 'companion perks', and are affected by several of the follower-related player perks; share experience points from kills with the player; and are exempted from certain scripted events like the shelling on approach to Nellis.

    Previously, NCCS companions only used the teammate flag during combat (if XP sharing is on) and to access their inventory -- it was kept at 0 otherwise. Since it appears to be the only conflict free way around the artillery, they now keep the teammate flag except when you talk to them (to avoid the wheel) and when they're in combat if XP sharing is off.

    The ammo thing is a bit of an annoyance. NPCs can use special ammo like AP; so it's handy to have on hand to pass out -- you can tailor your companions' weapons to the situation just like you can your own. Sadly, like nearly everything else Obsidian touched it apparently doesn't work right. It's random anyway; sometimes it happens, sometimes it doesn't. Different companions and different weapons may or may not be affected by it in different games. It's almost impossible to predict.

    Personally, later in the game I don't use 'normal' ammo at all anymore. Rifles get match ammo; handguns tend to get DT-reducing SWC or JSP ammo. Incendiary in the AMR is always a kick.

    ReplyDelete
  3. Ah, and I have learned more things related to modding today :) I'll have to keep that all in mind for later. I am sure it will come in handy.

    ReplyDelete
  4. Damn! I didn't even have time to test the last update! I guess that's what I get for getting a job...

    Well, I'm glad to hear that you're pleased with the progress. The changes sound good to me. I'm downloading and will play as soon as I get a chance!

    ReplyDelete
  5. "Well, I'm glad to hear that you're pleased with the progress."

    Well of course I'm pleased. If I weren't, I'd have done what I always do when shit don't work out -- I delete it all and never mention it to anyone. As the demotivational says: If at first you don't succeed, remove all evidence that it was you who tried.

    ReplyDelete
  6. "If at first you don't succeed, remove all evidence that it was you who tried."

    I haven't heard that one before, but it works for me :)

    ReplyDelete
  7. bleh, not fond of the NCCS peeps having to use default ammo. stupid Obsidian needs to be beat up so their shit works at least semi-decently

    ReplyDelete
  8. Well, I thought I should come by and mention that so far, the Companion Repair scripts seem to be working for me. I placed a 9mm pistol into the inventory of one of Herculine's creations, and I noticed the condition had improved after a few spot checks. I think at least a game day passed before the change happened. I will rinse and repeat with a couple other companions to verify I wasn't seeing things.

    ReplyDelete
  9. @Druuler:

    I wasn't very specific, my apologies. When I said "companions will repair their weapons" I meant the one they have equipped. Obsidian added a new script function that lets you manipulate the equipped weapon of the player (for the weapon repair kits), and it turns out it works on NPCs as well... but only on equipped weapons. Weapons that are just in inventory have to be repaired via the old NVSE method, which I didn't implement because last time I tried adding NVSE it fucked the companion scripts blue and tattooed them.

    In testing the code, I gave a combat knife at about 10% health to a companion -- and no other weapons so she could only equip the knife -- and the repair happened a frame or two after equipping; literally as fast as I could talk to her again after her model showed the knife as equipped.

    If your companion was actually using the gun and it still took a day to repair I'd like to hear about it; since that ain't a'sposed ta happen. Just keep in mind that if she's standard ranged class, she won't repair a weapon until it hits... 50%, I think? 50 or 60%, one of the two. The aim being to keep the weapons from going Tango Uniform, but not fully repaired as the normal combatant companions aren't expert repairers and such.

    ReplyDelete
  10. It is possible she pulled the pistol out to use. I was trying to keep an eye on that, as I think I do remember you saying that is was supposed to happen with the weapon they were using. Despite having ammo for the shotgun she started with and the pistol I gave her, she does like to get up close and personal with her machete.

    If I get some more play time in this weekend, and I figure that to be most likely, I will pick up a couple more NCCS characters and test for both proper repair function and repairing while not using.

    ReplyDelete

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