Is modding combat possible this way?

Not Lost Hope

First time out of the vault
I had an idea. Imagine a guy with a knife attacking a guy with a gun. If and after the knife guy manages to close in on the gun guy, he isn't going to stand there and get shot but will fight to keep the gun from pointing at himself. Give characters using guns a to-hit penalty when standing next to a hostile character.

Is this possible somehow? Modifying the to-hit formula, or maybe giving a penalty to skills or something.

Taking this further, the penalty could be adjusted based on the Unarmed or Melee skills of the guys fighting, so if your guy knows kung fu he can use his guns effectively hand-to-hand as well. Facing multiple opponents might give a penalty to close combat skills in addition to ranged skills as it's hard to punch someone when his friend is holding you back. This would make getting surrounded by melee opponents very dangerous.

Any of this possible or am I just thinking wishful?
 
Giving guns a hit chance penalty is possible using a hook script, can't remember which one at the moment. For every attack you have to figure out who is attacking, who is being attacked, what hexes are they standing in, what weapon is the attacker using, etc, a lot of work, but doable.

As for the multiple attackers... not sure. One could do a check around an attacked NPC to see if there are any more NPCs in the surrounding hexes, and then if it's possible, check whether those NPCs are hostile towards this one.

These aren't bad ideas, and they might not be terribly complicated to implement, but using a hook script will break compatibility with other mods that also modify it.
 
Back
Top