Working on a combat overhaul project (FO2)

Cyrus

It Wandered In From the Wastes
Reason for me asking so many questions lately, I am working on a project to do a number of things. I'll skip the explanations and whys (later) and give you the really short version.

I was unhappy with the damage mod formula, and looked for a fix. Examined the different solutions (glovz, YAAM), felt they had some limitation I didn't like, wanted something more flexible and customizable. 5 years later, I know enough to be able to do it.

It started as a desire for a simple damage mod fix, but has now grown to more. Mainly cause I realized fixing a damage formula alone cannot address all the problems. And also I wanted extra niceties.

Things I'm planning to do as part of this project:

  • Rewrite the whole damage formula
  • Add a DT modifier as a dedicated modifier for ammo
  • Add custom damage type for ammo
  • add custom penetration for weapons (any weapon can have its own value, no longer limited to weapon_penetrate perk. can apply to either or both DT and DR)
  • Custom critical chance modifier for weapons (as in Fallout Tactics)
  • Custom tohit chance modifier for weapons (no longer limited to +20 weapon_accurate perk)
  • AC modifier for weapons (just like ammo)
  • Custom knockback for weapons
  • Weapon Primary and Secondary modes can have different stats
  • Option for Bonus Ranged Damage to be +15% instead of +2 (As in Fallout Tactics)
  • Option for Bonus HtH Damage to be be +15% instead of +2 (As in Fallout Tactics)
  • Option for finesse to to be better (still conflicted)
  • Address the problem of Sniper perk and bursts all bullets critical all penetrating
  • change armor bypass mechanic (always 80% versus stepped)
  • A general quick fix for laser resistances.
  • Modular, fully customizable through ini file. can add weapons, turn features off and on.
  • Compatible with RPU, Fo2tweaks, sfall 4.x, and likely ECCO mod
The above would be an engine fix. So it can be molded and used as a platform for any mod. It wouldn't be a fixed presentation. So weapon data can be customized and new weapons added should a modder want to do that.

As a complementary project
  • Redo weapons
  • Redo ammo
  • Fix all critter resistance stats
  • Fix weapon progression in the game
  • Get rid of bunch of BS in the game (combat wise)

Yeah. Anyway. That's most of my objective list. That's what I'm working on.

Thanks for reading.
 
Great idea.

Obviously, I don't agree with EVERYTHING u wrote, since no two people think the same, but since most things will be customizable, it should cause no problem.

I'd be happy to help if I can, and also learn more about the process. Specifically about adding the DT modifier for ammo (or replacing with the AC nodifier, which I think is redundant for ammo and can be implemented differently), which I already asked for help previously.
 
To be clear I don't agree with all of it myself either haha. Like for example I hate AC altogether and wish it removed from the whole fucking game. However in order to satisfy people who might complain about removing AC, I am leaving every option. But personally I would never use the AC part in my mods and would actually get rid of all armor AC for all critters. As you say, its totally redundant and just badly implemented concept.

With this system, you can keep AC, DR, X and Y fields for ammo, and still get a DT too. It would be like your AMMO file has an extra field. Hell, in the system I've designed you can have both multiplicative and additive DR and DT. So if you don't want additive, you can use multiplicative. Even both at the same time. No compromises here. I'm going all out! :lol:

I'd be happy to help if I can, and also learn more about the process.
For sure, I'm open to both help and suggestions. If you have requests or issues you want addressed tell me now so I examine their feasibility to add. As for help, sure, what would you like to help with?

which I already asked for help previously.
If you did then I have missed it. Just ask away, If I know I'll tell you. Plus, its likely you won't need to fix anything anymore because once I'm done with this its gonna be so comprehensive that it will likely meet all your needs.
 
Awesome.

I sure do hope things work out.

I don't have anything specific to offer as far as help goes. Just saying :)
 
FYI, I'm not guaranteeing that I'll be able to do all of this, but they are on my task list, and I'm serious about my task list.

For example weapon AC component and tohit bonuses require the entire tohit formula to be rewritten. And... well... that's quite a task, and many much more competent modders before me have not done it and have shied away. So I can't guarantee that particular part, but.. one step at a time :).

If I find enough time, the damage engine part should be done and polished in a few weeks.
 
For example weapon AC component and tohit bonuses require the entire tohit formula to be rewritten. And... well... that's quite a task, and many much more competent modders before me have not done it and have shied away. So I can't guarantee that particular part, but.. one step at a time :).

Yeah, I know. I tried finding out myself and realized I just lack the knowledge to do it. This can be worked around with an added function on a tohit hook_script, though I realize the original formula would be best to find.

About the similar problem with the ammo AC modifier. - Do u know how to modify the ammo stats? If not Then:
YAAM changes the ammo's DR to DT, I think. So one solution for that particular ammo modifier problem will be to find out, by asking or otherwise, how YAAM did that, and replacing AC with DR (DT and DR will remain). I tried asking myself, but maybe I wasn't asking properly.
 
I'm not 100% clear on what you are asking, if you are asking a question, but let me answer what I think you are asking.

Do I know how to modify the stats? yes. If you are modding through scripting and you are redoing the damage output through hookscript then you have freedom about what to do with ammo stats and how you wanna interpret and apply them. You can even ignore them altogether if you want.

I dealt with same issue. First of all it became clear to me that because armor has a DT field, a DT modifier is absolutely necessary in the game. There is no way around it. You either have to get rid of armor DT entirely, or add a modifier so it can be affected. Then at first because of my limited modding knowledge I thought the only way to do it was to replace one of the ammo stat fields. I thought a lot about which ammo stat to replace, and while I thought AC was the best sacrifice, doing so would have impacted the tohit calculations, so that was out. Next was DR, but then that would have been a massive game mechanic change, and I concluded I shouldn't go down that route. My final realization was that the X and Y value are not both necessary for damage multiplier. One can be enough with the same effect, freeing the other one to be used as DT; and at first I designed a whole system around that. But then once I learned how to use ini files I realized replacing ammo stat fields is not necessary either. You can add as many fields as you want in ini files and plug them in your formula and use as you want, eliminating the need for replacing ammo stats.

This is the best solution. Extra stats created through ini files and loaded into engine.
 
Last edited:
Cool. Thanks for explaining and enlightening. I guess you're right, because the damage formula is simple and well known (unlike that elusive to_hit formula).
 
The pseudo code for the tohit chance has been written by NovaRain. Whether it's complete or not I am not sure. Need to find out.
 
In your knowledge is the pseudo code missing anything or is it good enough to be used to write the tohit code?
 
Reason for me asking so many questions lately, I am working on a project to do a number of things. I'll skip the explanations and whys (later) and give you the really short version.

I was unhappy with the damage mod formula, and looked for a fix. Examined the different solutions (glovz, YAAM), felt they had some limitation I didn't like, wanted something more flexible and customizable. 5 years later, I know enough to be able to do it.

It started as a desire for a simple damage mod fix, but has now grown to more. Mainly cause I realized fixing a damage formula alone cannot address all the problems. And also I wanted extra niceties.

Things I'm planning to do as part of this project:

  • Rewrite the whole damage formula
  • Add a DT modifier as a dedicated modifier for ammo
  • Add custom damage type for ammo
  • add custom penetration for weapons (any weapon can have its own value, no longer limited to weapon_penetrate perk. can apply to either or both DT and DR)
  • Custom critical chance modifier for weapons (as in Fallout Tactics)
  • Custom tohit chance modifier for weapons (no longer limited to +20 weapon_accurate perk)
  • AC modifier for weapons (just like ammo)
  • Custom knockback for weapons
  • Weapon Primary and Secondary modes can have different stats
  • Option for Bonus Ranged Damage to be +15% instead of +2 (As in Fallout Tactics)
  • Option for Bonus HtH Damage to be be +15% instead of +2 (As in Fallout Tactics)
  • Option for finesse to to be better (still conflicted)
  • Address the problem of Sniper perk and bursts all bullets critical all penetrating
  • change armor bypass mechanic (always 80% versus stepped)
  • A general quick fix for laser resistances.
  • Modular, fully customizable through ini file. can add weapons, turn features off and on.
  • Compatible with RPU, Fo2tweaks, sfall 4.x, and likely ECCO mod
The above would be an engine fix. So it can be molded and used as a platform for any mod. It wouldn't be a fixed presentation. So weapon data can be customized and new weapons added should a modder want to do that.

As a complementary project
  • Redo weapons
  • Redo ammo
  • Fix all critter resistance stats
  • Fix weapon progression in the game
  • Get rid of bunch of BS in the game (combat wise)

Yeah. Anyway. That's most of my objective list. That's what I'm working on.

Thanks for reading.

Hello everyone, and especially @Cyrus!

First let me say, that I greatly enjoy your attempt to fix and improve several aspects of the game.
You addressed very important points that seem to be very important to work on and I think I don't speak for myself alone, that finding solutions for most of the items you are mentioning, is, has been and I also guess, will be a persistant thing for many players and modders of the game.

As I'm too working on an ongoing WIP-modding project to improve my game to a desirable state I would say that I have also come to the point where I solved almost all the things I marked necessary for myself (and just need time to finish all the edits).

For your specific points I want to throw my two cents, hopefully being of some help too.

Lets start with
# Add custom damage type for ammo
Ecco adds 40mm Incendiary Grenade ammo, dealing fire damage when loaded.
It does that with its hs_afterhitroll.int hook script and works for other ammo too.
Based on that I created EMP ammo for Grenade Launcher, Rocket Launcher and Shotguns (yay!)
works about 95% as desired, only missed shots and bursts that hit a different critter than the initial one cause normal dmg though. Would luv to have someone helping me with this by looking over the scripts. I had to find a work around for an area-of-effect-dmg behavior on missing with the shotgun and solved it somehow but I cannot say what exactly did fix it in the end. (so remember this if you find funny lines due to my limited scripting skills)
If anyone knows how to remove the normal-dmg-on-missing behavior I would be very grateful.
The script also contains added lines for a modified version of Ecco's stealth attack feature, which were needed to make that stealth feature work with selected weapons (mostly recognizing weapons in both hands).
Therefore, I created "silent" weapons (by adding them into a conditions line) and gave a huge bonus with former useless silent_death-perk.
(see PMOD_EMP_DMG_AMMO_AND_SNEAK_ATTACKS.rar)
script contains proto numbers from added items (610-641: EcCo, 642-768: PMOD)

# Custom knockback for weapons
Eccos wonderful scripts hs_combatdamage.int and hs_itemdamage.int make this work with every desired weapon by using hook scripts also.
In addition several other game effects are possible. Ecco uses this for item-specific knockout- and stealth attacks.
I expanded this by using loose_turn effect to create stat-related stun weapons like a flash grenade (yay!) or stat-related knockdown effect for a heavy cannon. Also fo2tweaks adresses this by changing all knockback effects to 0 hex in its gl_g_knockback.int script, effectively removing its annoyance.
(see PMOD_CUSTOM_KNOCKOUT_KNOCKBACK_STUN GRENADES.rar)
script contains proto numbers from added items (610-641: EcCo, 642-768: PMOD)

Maybe, also custom AC or tohit or even critical chance modifier might be possible with that...

# Option for finesse to to be better (still conflicted)
The Perks.ini from sfall modderspack allows for editing many perks and traits. There you can easily change the value for finesse.
The gl_perkadjust.int script from sfall modderspack too at least lets you set the swift learner perk to 20%, also applies a heave_ho! fix, and lets you change values of pyromaniac, rad_resist and poison_resist perks. If someone wants to put their hands on other hard codes perk effects that would be awesome (looking on you, adrenaline_rush_perk..)
I edited many perks'n traits to better performance and balance, together with a few new ones and put them, together with the concerning frms and a line-counted SKILLDEX.LST file to the download.
(see PMOD_CHANGED_PERKS_AND_TRAITS.rar)

# Change armor bypass mechanic, problem with sniper and burst, Bonus Ranged Damage to % than flat...
Maybe you'll find some of these points in the gl_g_damage_mod.int from fo2tweaks.
It introduces a new damage formula by global script and may give some options to add things like that. There you definitely can set a custom penetration value and maybe can add +% ranged damage. I even think that it claims to have solved the sniper criticals with burst but I'm not sure. Honestly I decided against using it because I cound't find a sweet spot for consistant JHP/AP transition. (Looks like it doesn't have one..)
And well, I balanced my sniper_perk with 130 skill requirement in small or energy guns so it doesn't work with big burst guns or burst builds in general without some effort..

Which bringst me to another point, the everyones favorite...
# damage formula and JHP/AP fix
having tested YAAM and Glov'z I finally came to the conclusion that they do not produce consistent results when transitioning from jhp to ap ammo with different weapons, armor and caliber. Shocker.
With consistant results I mean a transition from jhp to ap getting superior generally on the same border (I prefer leather armor mk2 to metal armor) and jhp strongly falling off against power armor (I prefer getting almost useless). This contains as well a realistic shotgun-dmg-against-armor behavior. Without consistance, proper balancing and progression flow doesn't seem to be possible. (With YAAM, weapons of higher dmg seem to benefit too much from jhp caliber, rendering ap ammo almost useless again..)
While I know, everyone loves them, I came to reason, that the Weapons Redone Mod, by using the original formula and adjusting just a few weapon, ammo and armor stats, does indeed produce these results more consistently and gives the right amount of control with its simplicity. Watch the numbers in the PMOD_AmmoArmorValues.xls I use for my own balancing calculations if you may. (with credits to Magnus's orig .xls)

It also does provide good laser resistance results as same to other more exotic resistances.

Also useful is Magnus's gl_update_map_objs_from_proto.int script, which instantly applies changes to map objects. (see UPDATE_MAP_OBJ_FROM_PROTO.rar)


Note to mention some other things that might come in handy:

# Ecco Barter Script (hs_barterprice.int)
Ecco does a fine job by using a barter script to adjust buying and selling prices together with other modifiers like charisma, town reputation AND a demand system for locations to simulate economy. While the premade formulas did not create good results I took the time to adjust the numbers to what feels like a perfect state. Some corner details:
+ selling value does not go above buying value and both meet at barter=300
+ price ratio escalates from Klam to San Fran in reasonable (blance-wise: hard) way:
8:1(KLA) to 15:1(SF) with barter=0, 3:1(KLA) to 5:1(SF) with barter=100
+ starting from ~barter=100 it is possible to do profitable trade runs between cities with existing trade routes and goods (hides, drugs, meds, gold,...)
+ items in demand are designed to match lore and local aspects (meds cheap in VC, skins cheap in Klam and vice versa,...)
(see PMOD_BARTER_FORMULA.rar)

# Fix Unarmed costs
Ecco also introduces a script (hs_calcapcost.int) to adjust AP-costs of unarmed attacks.
Its decision to make all basic punches 3 AP and basic kicks 4 AP, together with +1 AP to the
coresponding special attacks feels natural and gives good results.
(see FIX_UNARMED_COSTS.rar)

For game flow and misc stuff I adjusted some scripts.
For example I find the costs of the Highwayman way too pathetic and made it 10000$ instead. You can change it to whatever you like, though.
Or the fact that Randall in VC attempts to prove your false citizenship papers, but the computer does not recognice the fraud. I fixed this by adding some lines and made him to "thank you" for "delivering" the stolen papers, confiscating them and eventually refusing to trade with you until you get regular citicenship and so enhancing the game flow with later access to advanced gear.
I also created a new Trader Willy formula which does take your Luck as also barter skill into account than solely Luck, thus improving the barter skill, creating reasonable prices and giving it some more flexibility with different builds. All in the downloads. Scripts dcsmitty.int and ectrader.int are based on Ecco's scripts. The dcsmitty.int does contain proto numbers from added items (610-641: EcCo, 642-768: PMOD)
(see PMOD_CAR_10000_$.rar, PMOD_RANDALL_NO_FALSE_CITIZEN_PAPERS.rar and PMOD_TRADER_WILLY_SCRIPT.rar)

Thinking about Luck itself I am thinking about adding a formula to bring this into some random number generations like they are used to calculate merchant inventar and stuff. Simply adding
"* (random (8, 12))/10 * ((7+(LU/2))/10)" would create a 20% luck modifier to these calculations. But I don't know if the engine already does this hardcoded, nor have time for expanded tests. All my smaller scale tests haven't shown any effect of Luck on the original game's standard randomization. Does anyone can confirm this by chance?

Oh, and I fixed the environmental armor by renaming some wrongly named frms, copying them for missing animations and creating an entry in the npcarmor.ini for NPCs. Still needs to be added into the game manually as the latest RP 2.3.3 did decide against. (see PMOD_ENVIRONMENTAL_ARMOR FIX.rar)

For game progression I strongly recommend to closely check the worldmap.txt edits, as even with FWR or the glorious Ecco mod critters equipment sometimes do not match their animation frms sets or still carry easy to take end-game weapons (looking on you, Prospectors or San Fran Caravan...).

While doing that I'd strongly recommend to remove all money from random critters. Better replace them with basic melee weapons and you not only halfway-solve the money problem, but also increase critters fighting capabilities when running out of ammo and stuff.
Well, using Ecco's adjustable combat.ini and related hs_ondeath.int script, which make critters get stripped off from some gear on death, helps there too. (also in PMOD_CUSTOM_KNOCKOUT_KNOCKBACK_STUN_GRENADES).

That's for now. Hope you find something usefull inside this humongous wall of text..:)
 

Attachments

Last edited:
First thanks for the nice write up, and thanks for all the resources you pointed out. Much appreciated. Kind of you.

A few points to respond to.

I am well familiar with for2tweaks combat damage code. That work by burn is the reason why I am able to have a go at this. Without his preliminary work I would have never been able to learn how to do this, so my hat off to him.

having tested YAAM and Glov'z I finally came to the conclusion that they do not produce consistent results when transitioning from jhp to ap ammo with different weapons, armor and caliber. Shocker.
Exactly my discovery. It can be demonstrated mathematically, though its a hassle. For example with glovz mod, you can have TD penetration of 50% , 66%, 75%, 80%, 83.33%... etc.. but no other values less or in between. So you can't have 33% or 40%. 50 is minimum. Doesn't allow additive either. Although I initially thought I liked the additive feature of YAAM better, I have since come to the conclusion that multiplicative is more realistic.

With YAAM, converting 1 point of DT damage to equal 10% of DR is a bit of a deal breaker, and causes damage mismatch issues. The "consistency" you mention. Not very versatile for modification either. That's the very short version of why another damage mod.

This is not to knock them, they were made at a time with much less access to game engine.

Burn's damage mod is the one I consider the most versatile, But I just want to do more and want more features.


I am personally actually not a fan of making many different branches of modding for a game. I think its the wrong way to go. I think all efforts should be concentrated together on few branches instead of every man for himself.

So I really don't like to make another mod(branch). I prefer to built on the best work thats done already. While I do think that the combination of RPU, fo2tweaks and ECCO are that, I decided not to build on top of ECCO because ECCO was build with YAAM in mind and that was kind of a problem. Not to mention ECCO utilizes a lot of scripts and to ensure compatibility then I had to learn all ECCO scripts inside and out, and that was too much for me.

So I am actually not too familiar with all the capabilities of ECCO but it sounds like there is already some solutions there I should look at. I don't want to solve problems that have already been solved because then you create needless branching.

I do intend to make my finished work compatible with ECCO if possible. it doesn't make sense not to take advantage of the great feature set of ecco. I do not want to make another branch, instead improve the problems of what already is.



The thing about AP/JHP is that the problem does not lie in just ammo or formula. its the combination of ammo/weapon damages/armor details/ and formula. You have to balance the whole package. There is also the issue of interpretation, or design perspective. The important note here is that I don't think we are all on the same page on this. Some think JHP should do no damage to high armor. Some disagree. And IMO both have valid arguments. So I'm not sure one solution truly fits all, no matter how good the solution. Its possible to make the game very tactical... but is that the right way to go? That's a serious question to be answered, its a game design decision.

So from design perspective, the question is how do you resolve this issue such that it satisfies most, stays true to game's original philosophy, and prevents branching.

Well, good luck with that one.


Lets see if we can get this done and bring some of those new weapons of your and have some fun!
 
Last edited:
Wow, quick, kind and sophisticated answer.
How can I like comments btw? Just know the option to give rads or report... :)

Yes, consistancy is key. For whatever goal one is aiming for (be it for the power-armor-is-tank or the weapons-always-must-hurt party or any else..).

Anyway, cool thing so many fine people are giving their dedication for this game.
 
Last edited:
ehem.... "fine people"... ehem.... might be pushing it a little bit. What the fallout community has gained in technicality, has lost in personality. Stay, grab some popcorn, and see! :lol::lol::lol::lol::lol:


rads only it is Im afraid ;)
 
Last edited:
I'm all for combat rebalance mods, so more power to you I say.

Wish I could make a good enough coment, but your ideas and changes seem wide-reaching enough to make any post I can make a mere shadow of what it could be.

I really like your systemic approach and how you plan on making it something that can be fitted into multiple mods.

I shall try:

  • Rewrite the whole damage formula
  • Add a DT modifier as a dedicated modifier for ammo
  • Add custom damage type for ammo
  • add custom penetration for weapons (any weapon can have its own value, no longer limited to weapon_penetrate perk. can apply to either or both DT and DR)
  • Custom critical chance modifier for weapons (as in Fallout Tactics)
  • Custom tohit chance modifier for weapons (no longer limited to +20 weapon_accurate perk)
  • AC modifier for weapons (just like ammo)
  • Custom knockback for weapons
  • Weapon Primary and Secondary modes can have different stats
  • Option for Bonus Ranged Damage to be +15% instead of +2 (As in Fallout Tactics)
  • Option for Bonus HtH Damage to be be +15% instead of +2 (As in Fallout Tactics)
  • Option for finesse to to be better (still conflicted)
  • Address the problem of Sniper perk and bursts all bullets critical all penetrating
  • change armor bypass mechanic (always 80% versus stepped)
  • A general quick fix for laser resistances.
  • Modular, fully customizable through ini file. can add weapons, turn features off and on.
  • Compatible with RPU, Fo2tweaks, sfall 4.x, and likely ECCO mod

- A suggestion: How about taking a page from Fallout Tactics and adding %modifiers to ammo?

For example:

Explosive Rocket:
damage penetration
+60% +11%

FOT had some strange modifiers tho, like how 7,62mm and 2mm EC had no modifiers whatsoever - which was why the Gauss Rifle was so useless against robots.

- Custom Damage Type for ammo? As in, we could change damage type of attacks through ammo, allowing us to say, fire Incendiary Bullets causing fire damage, or Electric Rockets like in Fallout Tactics? Holy shit that's so dope!

- I love stuff like custom penetrate and knockback. That's far better than simple a flat perk.

- Any plans to deal with dodging? Honestly I always found the implementation weak, I think it would be cool to be able to make a "dodging-focused" character, perhaps focusing on lighter but tough armor, like Leather and Combat Armor.

- I'm not sure if Finesse needs to be better, myself. I always thought it was a very good perk for a rightly-built character.

- Any plans to rebalance stats or at least give that option? Way I see it, ST, EN and LK suck dongs. PE, IN and AG simply dominate the game.

- Am I the only one who thinks the way Melee Damage increases through Strength is wack? I mean, 1-6 ST = 1 melee damage. It only increases after 7. Who the the hell though this was a good idea? Its not. Some 3 ST total wimp should't hit like a 6 ST man with above-average strength. Would require balance changes to how melee and unarmed combat works, I believe. Could be handled with customizable variables, actually.

- Being able to customize armor bypass would be great. Its just cheesy, you get an unlucky roll and suddenly all your armor decides to go bye bye for this one particular attack. I swear I lost a post-endgame character to an immensely lucky armor bypass 10mm SMG point-blank burst from Mr. Bishop. Partial bypasses would be great. A total bypass should be a rare thing.

- If we're talking traits, I would like to see some traits and perks made useful. Like Bruiser, Heavy Handed, etc. Actually, how come we don't have a "No Useless Traits/Perks" mods?
 
Back
Top