On editing follower weapon preferences and combat behavior.

Discussion in 'Modding and Scripting Support' started by Ash Mantle, Feb 27, 2010.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. Ash Mantle

    Ash Mantle New Member

    Messages:
    2
    Likes Received:
    0
    Joined:
    Feb 27, 2010
    Hello, folks. Hope you're all doing well.

    TL;DR is: please help this sorry newb make your average melee follower pick up a gun and quit running into that mob of baddies. Anyway.

    I'm fiddling with Arcanum (unofficial patch applied, latest version) this month, and was heartened by the sheer amount of work people have undertaken to make the game more fun and malleable. Good stuff.

    I am hitting a bit of a snag, though - one I tried using this forum's search feature to solve, but unfortunately either the question has been phrased differently before and searches are unhelpful or I've recently gotten a jump on senility and completely lost my reading comprehension, so apologies if I should have readily found my answer by now. Also, if this thread is in the wrong forum, I'd be glad if one of the staff moved it wherever it belongs.

    So here's the deal: I'd like to make combat with a significant number of followers more tolerable. I'm referring to turn-based combat, for reference, and 'significant' here refers to 'more than two,' because it's about at this point that if you have a great big pack of melee goons running around it gets hard to toss around a few grenades - your average zombie mob, for example, will get blown right into your group by the third or fourth molotov, or Magnus or Virgil will helpfully run right into the midst of them. This is really great for little things like keepin' them alive.

    I've had some success turning the followers in the game into ranged weapon users through creative use of Arcanum Edit and the Follower Editor, which allows me to allocate points into Virgil's firearms skill until he can hit the broad side of a barn without shooting off his foot. Rockin'.

    I can also do the whole weapon denial thing where you leave a follower nothing but a handgun and some rounds and that follower uses it. God forbid they get ahold of a railroad spike, though.

    However, I'm going to hit a plateau pretty quickly, here - between the need to give my followers melee backup weapons for when I forget to give them bullets, the growing hoard of said backup weapons in my own inventory, and the overwhelming urge my followers still have to get into some poor NPC spider's grill to put one in its eye cluster, it might be fair to say that my fun level's goin' down.

    So.

    Goals:

    1) Find as reliable a method as possible to change follower behavior in terms of weapon selection from inventory.

    Current methods include influencing weapon selection by playing with magic/tech meters (but a follower in my party with a pro-tech bias of 25, 3 points and apprentice in firearms, and 2 points in melee will still choose a crap enchanted sword over a fine revolver with a hundred bullets), denying followers access to weapons, and toying with melee and ranged combat skill levels.

    2) Find some way to force followers to stand their ground and fight from a distance, at least until they run out of bullets.

    Don't have any idea on how to do this at the moment. I suppose I could load them down until they can barely walk, but this might screw up their flee attempts.

    I'm thinking of setting their AI up so that they'll flee a short distance in all fights, as there is a variable for how far an NPC flees and another variable for how big a chunk needs to be taken out of their health bar for them to do so, but I'm wondering if anyone's tried this already - it might just produce an endless 'approach until in fighting range->fail flee check->flee out to periphery of battle->regroup->approach until in fighting range' loop. Which would kind of suck.

    I'm willing and able to expirement with the AI params, but I can't seem to get a bead on the AI script for weapon selection ><
    Will happily fiddle with scripting if someone feels like lending a hand.

    All ideas are welcome, as are reports of how badly this will all go off the rails - or even flat denials for that matter.

    Thanks for your time, especially if you made it through that massive textwall post.

    -Ash
     
  2. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    Let me preface this by saying I've not played with these things to see if they work...but you didn't mention trying it in your post, so it seems like it's worth a shot.

    Have you tried editing the second to last AI parameter in ai_params.mes?
    It's minimum distance and it's set to 4 or 5 for various supposedly ranged characters.

    Some other random untested possibilities:
    Add a script on the equip portion of the weapons you're interested in for back-up melee weapons. The script could check the inventory for bullets/arrows, and return and skip default if found. This could cause infinite loop problems, though...It could also lead to them not trying to equip the weapon again once they run out of bullets.
    (similar to above) disallow unequipping of the gun. Using a script on unequip.

    As another question...have you tried giving them really powerful gun options? Something like an Elephant Gun maybe?
     
  3. Ash Mantle

    Ash Mantle New Member

    Messages:
    2
    Likes Received:
    0
    Joined:
    Feb 27, 2010
    Edit: Thanks for the prompt reply. Almost forgot to say that, 'cause I'm a god-damned barbarian.

    Haven't tried any of that, and apparently I didn't read over the comments in AI_params.mes carefully enough or I would've noticed minimum distance in combat ><

    I wonder if someone could inform me if it's feasible to drop the .mes file in question into a subfolder in /data and have it affect my current game, or if I'd need to start a new game? Also of the folder structure, I'd assume it's /data/rules.

    At present, it appears that followers will ONLY equip a weapon that uses ammunition if the ammo's present in their inventory, so if they're given finite amounts of bullets they'd automatically switch over to a melee weapon (or at least put the bow or gun away) when they run out. So one solution could be to just give the lot of 'em a preference for guns - they definitely demonstrate a preference for melee weapons at the moment that neither their skillset nor their attributes accounts for. Plus, the guns they're getting outperform the melee weapons they've got, damage-wise.

    I'll test the switchover on running out of ammo and post results here. Probably give a follower a gun with one bullet in it and get into a scrape, see what happens after they use up the round, and so on.

    I suppose this raises a concern that the follower's AI might wig out if it's backed into a corner and can't get out to minimum distance to use it's weapon. That means it might be ideal to either stick a variable into the AI parameters to account for this in terms of weapon choice (set up a script to give it a value of 1 or 0 for melee weapons, and 5 or something for ranged). Failing that, I guess it'd be nice to have followers have a ranged param set as well as a melee one and have them switch from one AI parameter set to another based on availability of ammunition, weapon at hand, etc.

    Any of that feasible?
     
  4. darkinvader

    darkinvader New Member

    Messages:
    1
    Likes Received:
    0
    Joined:
    Apr 26, 2010
    By helping the newbie is highly appreciated. Thanks
     
  5. Arthgon

    Arthgon Well-Known Member

    Messages:
    2,733
    Likes Received:
    12
    Joined:
    Dec 30, 2007
    Oh great! Is this a spambot which I see before me? *Cast Death by Flames upon darkinvader/dreamwarrior/warfreakanix.*
     
Our Host!