Scripting Idea I'd like help with (draw best weapon and follower force level option)

Kothyxaan

First time out of the vault
Hello,

There are two scripts I would like to see made, sadly I can only (in some cases) modify pre-existing script, so when I say I'd like help, i'd actually like someone to use their own valuable time to make this script (with nothing more than thank you very much and best wishes from me and anyone else who would use these scripts).

First one is just an adaptation of a pre existing script (Party orders) by Pelicano (maybe it could be added to the existing mod). It would be a "draw your best weapon" order, which would be based on your followers combat options (so melee'rs would draw a melee weapon and those who you have as ranged would draw their best ranged weapons). Would be ideal if it could be used in combat (so the next time your follower acts he draws his best weapon and then acts, but not sure if this is possible).
My reasoning, much as the holster your weapon, its far more convienient to have a one key press and all your followers have drawn/holstered their weapons at the same time instead of going through each ones dialogue. Sometimes in combat your character will switch to a melee weapon and then not switch back, so then you have to go through the dialogue to get them to re-equip their missile weapon at the end of the combat, maybe I'm lazy...

Next one is a dialogue option added to your followers where you can force level them individually. Maybe two options, one that would level them no matter what, and another that would only level them if it was appropriate (ie based on your level and if they would have levelled if youd had them with you from the start. So if you were level 1 none of your followers would go up a stage, whereas if you were level 40 you could level them all the way). Either way only one stage at a time. Something along the lines of "Let me teach some skills I have learned".
Basically this is because when I mess around with the protos and add them to the master file (via the processdat program) sometime my npc's are put to their lowest stage and then refuse to level up. Secondly, I always try to rush and get the npc's as quickly as possible so they can level with me, I'd prefer not to rush.

Thats it, hopefully some kind soul will help me out with these ideas, and if you do im sure karma will bless you till the end of your day, just as much as i will (over the top?)
 
Last edited:
I may do first one if it's even possible (if someone investigated this already, please comment), since I already tinkered with Party Orders mod recently.
Second request doesn't look interesting.
 
Hey thanks Phobos2077, I wish you the best of luck! Let me know if you have any success please.
But honestly the second one is fantastically, magnificently, spectacularily and amazingly interesting!... honest...
Well ok, id not make anyone do anything their not interested in (apart from my wife, but thats a completly different topic... ahem)
I was thinking about looking into the party orders when I got my laptop back, but honestly most of whats in a script is beyond my understanding.
 
The option to have your crew draw their weapons would be very nice, indeed. Sadly, I don't know how to do any scripting, or I would have tried to do that a long time ago, among other things. Wouldn't that be something in the line of a reverse order from the holstering command?
 
The option to have your crew draw their weapons would be very nice, indeed. Sadly, I don't know how to do any scripting, or I would have tried to do that a long time ago, among other things. Wouldn't that be something in the line of a reverse order from the holstering command?

Well, I tried that. There IS a command which seem to make NPC successfully wield selected weapon with animation. The problem, however, is selecting which weapon to use... It most likely be impossible to accurately simulate "Use best weapon" behavior, because I never saw means to access party NPC combat settings (like "use ranged then melee, etc.") via scripts. The second problem is that specific NPC can only use some types of weapons. If I could find a way to address second problem, what would be the best weapon?
Max damage/ min damage? Maybe range should be taken into consideration somehow?

Edit: OK, I think I've managed to simulate weapon selection pref "None" (for example, Sulik chooses molotov cocktail over spiked knuckles). Problem is, I can't detect the actual weapon preference of NPC.. For example, this may lead to cases when NPCs will always wield grenades (because of their damage) instead of firearms.. There may be another way that requires more scripting...
 
Last edited:
I figured it would be more complex than just reversing the holster weapon option. Maybe priority could be done by cost of the weapon (how do they choose their weapons through the combat settings and dialogue)? Also whats fair to note is the equipment on your follower will be equipment that you want them to use. So any choice wouldnt be a bad one, because you have already vetted their weapons when you give them their weapons. But off course if you had their AI set to melee and they use their ranged weapon or vica versa...
But yeh the problem is how to get them to use their AI (combat) settings to determine weapon choice, finding where how they choose their weapons are stored; melee over ranged, ranged over melee, melee, ranged, none, thrown, unarmed (script, AI, I mean seriously where is that file?)
Well it appears im no use, so ill just sit here and cheer you on.
 
But yeh the problem is how to get them to use their AI (combat) settings to determine weapon choice, finding where how they choose their weapons are stored; melee over ranged, ranged over melee, melee, ranged, none, thrown, unarmed (script, AI, I mean seriously where is that file?)
Well it appears im no use, so ill just sit here and cheer you on.

It's not a "problem", it's just impossible to do, unless some ASM genius finds and adds this to sfall. We can implement any algorithm of selecting the best weapon, but it's no use because it will be not what the player wants.
Example. Sulik has a sledgehammer and some SMG (let's say G11 with some ammo) and player configured him to use Melee only to conserve precious caseless ammo. Now, obviously, by all means the best weapon will be G11, which not what we wanted.
The second option I was considering is to somehow "remember" last used weapon for each companion and select it when ordering "arm yourself". But this is pointless, because:
1) it's already done automatically, when combat starts, your companion won't use bare hands, they will equip the weapon
2) if, let's say, Sulik preference is set to "Ranged then melee" and he already switched to Melee, the script will again order him to equip his sledgehammer instead of what we probably wanted (an SMG).

So we need to either forget about this feature as meaningless... OR change our approach. It may be possible to just implement order "use ranged" or "use melee" that will maybe work in combat, but.. it's probably bad idea, because currently, it's not possible to order specific NPC in party to do what you want. And ordering entire party to switch to melee/ranged is strange...

I think it's OK that your party members sometimes don't do what you want them to do in combat (using melee too often, etc.), it's how the game works. In real life don't have total control over other people actions, even if you are the CO, they might now follow your order the way you want. And it makes perfect sense in fallout, because:
1) party members are not military bunch.
2) it's not a party based game, like Wasteland. And to be honest I like that.

If you really want total control, you can always use sfall option to control NPCs in combat.

PS: returning to your initial problem: I think ordering to holster the weapon should make your NPC use ranged weapon in next fight, if he is set to "ranged then melee". Just tested this with Sulik. So I don't see an issue here anymore.
 
Speaking of which, I usually have all of the NPCs set to "none" for preference, otherwise they won't use any grenades if I give them any. That seems to be the universal setting for everything. I noticed they won't use them otherwise, at least for my game.
 
You know I always thought that for your follower to draw his weapon it would be like you going into your inventory (ie it would cost ap's). Although lately I did start to question this theory, just never got round to testing it (added to my to do list when I get my laptop back). So if the fix is as easy as telling them to holster their weapon... then hurrah, one of my problems fixed!
Well thanks for your help anyway Phobos, sorry to have wasted your time.
You know CPL, ive never actually let my followers run around with grenades, its that mad gleam in their eye they get when they have burst weapons... I just cant trust them.
I actually added sentry bots to Enclave patrols once, but they were hitting their own men with the rockets blast radius (wonder what script I gave them, AHA a question where are the scripts that critters use stored? I mean in the world dat guards have script 259, i think dont have the game to check, merchants have script 258 where are they in the Fallout folder?), doesnt your followers do that with their grenades?
 
(wonder what script I gave them, AHA a question where are the scripts that critters use stored? I mean in the world dat guards have script 259, i think dont have the game to check, merchants have script 258 where are they in the Fallout folder?)

Script numbers in worldmap.txt refer to line number in data/scripts/scripts.lst, there you will see what script file is sitting on that line (you may add +1 to the number though, I think they are 0-based and line numbers obviously 1-based).
Combat behavior is not controlled by scripts, but rather by AI packet. They are defined in data/data/ai.txt. Each critter prototype has pre-defined AI packet number, but it is commonly changed within critter script.
 
Back
Top