Well, true to my word, I decided to rework the companion scripts somethin' fierce.
I modified the included combat styles quite a bit; in an attempt to produce more realistic combat behavior for the companions. Note: I said realistic, not effective.
Companions will now flee incoming grenades and such; are more likely to take cover; have a large radius in which they'll engage in combat; and have had the "wait" timers and the time between shots lengthened considerably.
As well, I've split the combat styles up into three groups: low, medium, and high; for both general ranged and sniper styles. As you progress up the tree, performance improves -- companions become more likely to dodge effectively, spend less time deciding what to do once they've found cover, and require less time to reacquire aim between semi-automatic shots.
The new combat styles' implementation is controlled by the companion script, based on the companion's skill level. As this is based on skill and not overall level, giving companions items that boost the guns skill should be able to push them high enough to advance to the next tier, if their normal skill is close enough.
I remember Tarrant unhappily reported once, a couple years ago, that his combat style changing idea hadn't worked; that the NPCs kept defaulting back to their original.
Though I never uploaded any of it, I did learn how to circumvent this behavior of the engine some time ago. I made use of this technique tonight. A fairly simple bit of scripting, the code takes a look at the companion's class when they enter combat, and applies the correct style. It's reset every time they enter combat, so you should be able to change classes as much as you like, without it ever having issues.
I should also note, before anyone asks: there is no "class type" variable to read in the engine. So, if you've jumped in and created your own class for your companion, the new code will be worthless to you. It only works on the three included.
I've gotten in some more testing, and thus far v1.3 does appear to have improved follower performance, at least somewhat. I've been running Artemis with teleporting off, and performance is acceptable; if not excellent. Had a few delays moving between cells, getting stuck on bad navmeshing; the usual. Nothing heavy duty.
I've decided to shelve the cosplay aspect of the mod for the time being. Aside from the scripting that's turned out to be way more complicated than I was expecting (we're talking about several hundred lines, here), I'm also thinking that it will start a deluge of bitching that companions are randomly starting fights for no reason; you brokeded mai gaem, and so forth.
For now, I think I'll stick to adding features that are more useful and less niche.
I still need to make a couple of small code revisions. Once those are done, it'll just be a matter of re-copying the forty-seven other companion scripts, and I'll be ready to upload the next version for people to bitch about not having a wheel or working with sex mods that break half the game.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.