Fallout 2 Modding: Quick Question / Answer Thread

Cyrus

It Wandered In From the Wastes
This type of thread is a really good idea to have in any modding forum, so I am making it. Its only 15 years too late, but better late than never! :)

All small questions can go in here, so that there aren't a 100 threads addressing small subjects. Also easier for people to read, all in one place.

I hope no one is apposed! :)
 
So here we go:


1. Is the damage of ranged weapons generated totally randomly within the min/max, or is it based on how far the target is?


2. In the combat formula:
ND = ((RD+RB) × (X/Y) × (CM/2) × (CD/100) - ADT/max(5*AI,1)) × (100 - max((ADR/max(5*AI,1) + RM),0) / 100
...What type of varibles are X and Y?
Short? Long? Byte? signed/undigned? INT?

Thank you.
 
Last edited:
Damage is randomly within min-max.

As for the formula, it might help if you explain what the hell RD, RB, CM, CD, ADT, AI, ADR and RM are supposed to mean.
 
Oh, I just pulled this from this page: http://falloutmods.wikia.com/wiki/Fallout_engine_calculations

I thought everyone pretty much knows this. All the way at bottom of page:
ND = net damage value
RD = random damage value produced from weapons hit damage range
RB = ranged bonus (RB=0 unless the player has Bonus Ranged Damage perk)
X = ammo dividend
Y = ammo divisor
CM = critical hit damage multiplier (if no critical hit then CM=2, otherwise assigned value from ritical hit table)
CD = combat difficulty multiplier (Easy=75, Normal=100, Hard=125)
AI = 1 if critical hit which ignores armor, otherwise 0
ADT = armor damage threshold value
ADR = armor damage resistance value
RM = ammo resistance modifier (only value allowed to be negative or positive in the equation)

But also those varibales aren't important, I only wanna know X and Y. Can they be negative,... what is their numeric range, that sort of thing.
 
Oh, I just pulled this from this page: http://falloutmods.wikia.com/wiki/Fallout_engine_calculations

I thought everyone pretty much knows this. All the way at bottom of page:
ND = net damage value
RD = random damage value produced from weapons hit damage range
RB = ranged bonus (RB=0 unless the player has Bonus Ranged Damage perk)
X = ammo dividend
Y = ammo divisor
CM = critical hit damage multiplier (if no critical hit then CM=2, otherwise assigned value from ritical hit table)
CD = combat difficulty multiplier (Easy=75, Normal=100, Hard=125)
AI = 1 if critical hit which ignores armor, otherwise 0
ADT = armor damage threshold value
ADR = armor damage resistance value
RM = ammo resistance modifier (only value allowed to be negative or positive in the equation)

But also those varibales aren't important, I only wanna know X and Y. Can they be negative,... what is their numeric range, that sort of thing.

They are the damage mod on the ammo used, as listed in the inventory image (always 1/1 for melee/unarmed attacks). It is 1/1 for most ammo, 3/2 for some, and a whopping 2/1 for Gauss and Needler AP ammo (i.e. 200% damage). JHP ammo has a 2/1 mod as well, but also a +20 DR mod so that Damage Resistance is increased on the target. This still results in far better damage than other ammo, especially with criticals. On AP ammo it is an erroneous 1/2, which means all AP ammo is shit because it does half damage.

I've fixed this in F2WR by giving AP ammo a 1/1 mod and a -40 DR mod, whereas JHP has a 7/2 damage mod and a +48 DR mod. This puts the point where AP ammo outperforms JHP at Metal Armor (whose DR I have also increased, while lowering DT).

The damage mod values are stored as signed integers in the ammo proto file, so in theory they can be negative, but I have no idea what happens if you try.
 
Last edited:
The damage mod values are stored as signed integers in the ammo proto file
Bingo, thanks. That's what I wanted to know. The other stuff I knew, but thanks anyways.

And yeah I know about your mod, as a matter of fact I will likely use your mod as the base for mine, but first, I need to learn how to mod for FO2! lol


Now do you know how big X and Y can be? Are they a single byte value (-127 to +128) or Short (-32000~ to +32000~)? (I've got something up my sleeve, hence these questions... :wink: )



2. When I read the guides often it says pass a speech check, but no number is given, what is actually checked if no number is specified?


3. I'd like to learn how to edit the combat formula (both ranged and Unarmed/melee), and also learn to edit critter, and item files (proto files I guess). How can I get started, where should I look to learn?


Thanks guys.
 
Last edited:
Thanks so much guys.

BTW, Ive really looked hard and asked elsewhere but got no answer to this:

Do any of the Melee or Ranged weapons have any hidden characteristics that are not already listed on the wiki pages? For example critical chances, like the heymaker and piercing strike. I'm wondering for example if there is a difference between a thrust and a swing action for some melee weapons. I haven't found any info searching the internet or this forum.
 
There are no hidden characteristics like that. And there's no difference between thrust and swing.
 
So is it not possible then to give additional critical chance or penetration ability to a particular attack-mode of a weapon?

Similar to unarmed, but for melee weapons.
 
This is possible, with the hs_combatdamage and hs_tohit hook scripts. It does require you to rewrite much of the formula yourself, if you want to do it correctly. And yes, I believe these mechanics are implemented in Jim's mechanical overhaul and phobos' combat rebalance mod.

You can download the sfall script editor and open the hook script .int files in those mods with it, to see how they have done it.
 
Last edited:
Awesome! ...Though a bit like ...holy crap! Where will I find the time to learn all of that!

Thanks guys.
 
On many occasions modders are saying that certain things are "impossible" to change, or in the engine. But there are mods which work by changing the engine, e.g. Mr. Fixit. What is going on? Is it that changing the engine is possible but difficult because it depends on a lot of code, or is it more difficult (for example, if some things are closed source so they can't easily be replaced or even recreated).

Asking because I'm planning to spend some time modding, preferably contributing to very promising mods which need programmer time. Any loosely related advice which wasn't mentioned in the question would also be appreciated.
 
On many occasions modders are saying that certain things are "impossible" to change, or in the engine. But there are mods which work by changing the engine, e.g. Mr. Fixit. What is going on? Is it that changing the engine is possible but difficult because it depends on a lot of code, or is it more difficult (for example, if some things are closed source so they can't easily be replaced or even recreated).

Asking because I'm planning to spend some time modding, preferably contributing to very promising mods which need programmer time. Any loosely related advice which wasn't mentioned in the question would also be appreciated.
Changing the engine is difficult because it basically means reverse engineering it, hunting down memory addresses and writing a lot of assembly code.
The preferred way to do it nowadays is through sfall, which is open source, but even so it requires that you make a custom version of it which might not be compatible with future versions or other mods.
 
On many occasions modders are saying that certain things are "impossible" to change, or in the engine. But there are mods which work by changing the engine, e.g. Mr. Fixit. What is going on? Is it that changing the engine is possible but difficult because it depends on a lot of code, or is it more difficult (for example, if some things are closed source so they can't easily be replaced or even recreated).

Asking because I'm planning to spend some time modding, preferably contributing to very promising mods which need programmer time. Any loosely related advice which wasn't mentioned in the question would also be appreciated.

mr fixit is actually a funny example of how inflexible something like graphics in the engine still is. When you first look at it, it might seem very simple: the inventory art of the item you want to create superimposed over custom artwork by the mod creator. But this inventory art (frm's) can't simply be used on the fly: it has to be converted to a pcx file first. These pcx's don't have the transparency that comes with frm's, so you can't simply superimpose them. So what the creator had to do was manually integrate each and every piece of item art with his custom interface, which is really silly when you think about it.

This is sort of a lesson for everything related to fallout modding: very little is out of bounds or strictly hardcoded per se, but you will need to be creative in terms of intensive (or even total) workarounds (see some of my threads for how this applies to something like AI modding).
 
Are there reasons [technical reasons] that the FOnline engine cannot be used to replace the original in a future user patch?
(Loosely akin to BG-TuTu.)
 
Back
Top