Fallout 2 mod FO2 Engine Tweaks (Sfall)

Any way to understand object is a book? Apparently, this is true for the books: `obj_item_subtype(object) == item_type_misc_item`. However, there are multiple other miscellaneous items there. Any sure book identification method?

The thing is I can list all of known books. There are just handful of them. However, what if some other mods adds more books? Would it be there an automatic way to detect them and especially the skill they affect?

I don't think there is. You will have to check each proto id (pid) separately.
 
Any neat or standard way to merge ddraw.ini entries and MSG files? Is executable installation program the only way to modify them?
Could it be done automatically from scripts? Like check if record is not there then add it?
 
Any way to modify max HP added per level?
If the above is not possible, any way to recalculate max HP at load?

It seems that HPDependOnBonusStats=1 in Stats.ini modifies only base HP dependency on EN but not what is added per level.
 
Last edited:
If the above is not possible, any way to recalculate max HP at load?
Should be able to do that with 'start' procedure in a global script.
Get player's level and do the recalculation yourself, then use set_critter_extra_stat.
 
Last edited:
Should be able to do that with 'start' procedure in a global script.
Get player's level and do the recalculation yourself, then use set_critter_extra_stat.

Good function. Unfortunately, it is not that straightforward. Resulting derived stat is not always a direct function of current stat/level. For example, EN = 10 produces 2 + 10 / 2 = 7 HP increase per level. What if player picks a Lifegiver at some level. That give additional 4 HP per level every time player level up *after* that. That makes it impossible to recalculate from ground up knowing only EN and current level. One should also know *when* Lifegiver was received.

For that kind of modifications it is better to hook into actual modification routines. Like leveling up, taking drugs, etc.
 
Anybody knows how to retrieve following weapon parameters? I didn't find anything in either "it_..." fields or "proto_wp_..." fields. Thank you.
  • Skill used by weapon (unarmed, melee, small guns, big guns, energy guns, throwing).
  • Weapon burst size (PROTO_WP_BURST ?).
  • Clip size.
  • One/two handed.
Update.

Found this one in define_extra.h
#define WEAPON_BIGGUN 256 // 0x00000100 - Big Gun
#define WEAPON_2HAND 512 // 0x00000200 - 2Hnd (weapon is two-handed)
#define WEAPON_ENERGY 1024 // 0x00000400 - Energy Weapon (forces weapon to use Energy Weapons skill)

I guess, it answers the question about the skill for ranged weapon but if none of skill flags (Big Gun, Energy Weapon) is set how to understand whether it is ranged/unarmed/melee?
 
Last edited:
Burst size - PROTO_WP_BURST.
Clip size - PROTO_WP_MAG_SIZE.
For weapon skill, check the attack animation first (melee, unarmed, throwing), then the damage type (conventional firearms, energy weapons), then the "biggun" flag (small guns or big guns). The WEAPON_ENERGY flag is a sfall addition, you don't get it from vanilla protos.
 
For weapon skill, check the attack animation first (melee, unarmed, throwing), then the damage type (conventional firearms, energy weapons), then the "biggun" flag (small guns or big guns). The WEAPON_ENERGY flag is a sfall addition, you don't get it from vanilla protos.

#define PROTO_WP_ANIM (36)
?
 
Any way to modify loaded game messages? I need to modify them slightly. For example, change min ST requirements for weapon. It would be nice to be able to edit them in memory and just search/replace rather than force player to update all msg files at install time.
 
Any hints on traits/perks modifications? I understand they are quite different in mechanics and can use different hooks and get triggered at different time, etc. However, any links to existing examples, projects, code that does something with them will be highly appreciated.
 
Any way to make time pass as when reading a book? I didn't find any function in sfall docs.
 
Any way to understand object is a book? Apparently, this is true for the books: `obj_item_subtype(object) == item_type_misc_item`. However, there are multiple other miscellaneous items there. Any sure book identification method?
There is no way to separate books from other items of the same type. :(
 
Dude, read the scripting manual. You're asking too many questions.
When you study the fallout engine system, half of the questions will disappear by themselves.
 
Dude, read the scripting manual. You're asking too many questions.
When you study the fallout engine system, half of the questions will disappear by themselves.

I think I do. Otherwise, there would be ten times more questions.

Is this the one? If so I read it. There are also many other sources like sfall. You are right there are many answers there for most of my questions. Whatever I post here is what I could not find answer for. If you know some other sources - please share them too. I'll appreciate it.
 
Few notes
(I'm not up to date on sfall, nor do I know all it's functions (it's very big), so I may be off etc. Anyway this is some feedback which may or may not be useful)

A Quadruped/Robotic creature is called by gender normally “He/She looks unhurt/wounded/almost dead.” or “He/She has crippled limbs.” But when using the Awareness perk it switches to neutral “It has 10/10 HP.”
I noticed this when checking deathclaw eggs, which should always be referred to as “it”. Funny difference. Normally, this doesn't matter as much as most creatures (scorpions etc.) can be called he/she, it's even a nice touch, really. The eggs are an exception, though. And robots actually... And Spore Plants... (And Floaters/Centaurs/Aliens... maybe?)
I checked proto.msg and it has a third line for “neutral gender”:
{524}{}{It looks: %s }
but it doesn't seem to be used apparently... maybe because the engine checks “gender” of the proto file which has only two states (male/female)?
The awareness perk should use:
{525}{}{%s has %d/%d hps.}
which does pull the “he/she/it” from somewhere (not sure where... it is not in proto.msg).
Seems as if the default messages use “gender” to differentiate, while the Awareness perk uses “body type” followed by “gender” to decide how to call the critter. [Note: I'm pretty sure, as I once had a human critter who got called “it” with Awareness perk as his proto had him falsely set to “Body Type: quadruped”. Also floaters are “he/she” (body-type: human) while centaurs (quadruped) are “it” with Awareness perk. So I don't know the engine but I've been out there...]
Not sure, but maybe “kill type” could be utilized to decide on gender? Would not cover eggs, though, but they shouldn't be kill type deathclaw anyway. Still, that could be a neat option that allows more accuracy, the moder could then set “kill type” in the proto and assign each kill type a gender in sfall (i.e. none (uses “it”), else (it defaults) to using gender (male/female) of proto). [And if unhappy, about a special robot being “it” there would be the option to make that robot its own kill-type, FoT did that for some legendary creatures. And Fo2 for Horrigan, it seems.]
Not the biggest of deals, but if “kill type” can be swapped in easily to fix some critters (robots, eggs and plants) but not every single quadruped animal, it would make a neat fix.
[Btw, I wouldn't be surprised if this had been suggested/discussed by someone else previously. I don't claim originality. As said, I only stumbled over this when I was recently faced with deathclaw-eggs having a gender, and checking if I can do something about, which I don't think I can.]


Can't this:
sfall said:
;Set to 1 to use the expanded world map interface
;Set to 2 to skip correcting the position of entrance markers on town maps
;You can use resized FRMs in 700x682 for town maps in the expanded world map interface
;Requires High Resolution Patch v4.1.8 and a new WORLDMAP.frm file in art\intrface\ (included in sfall.dat)
;The resolution of hi-res patch must be set to at least 890x720
ExpandWorldMap=0
Check the current resolution and if below 890x720 turn itself off?
That would help, as currently I'm hesitant to set this as any low resolution seems to crash when entering worldmap. Which is problematic when players can chose their own settings. And having this up in the air with a “if you use x, then turn off y” comment is too vague and demanding. People will phone this crash in all the time. And moders may not even be able to diagnose it (i.e. crash is too set up related and inconsistent).


Is there a reason why this is not on by default?
sfall said:
;Set to 1 to boost the maximum number of script names from 1450 to 10000
BoostScriptDialogLimit=0
It seems like something that could be always on?


And the following could mention that the “replacement background FRM” means “WmTabs.frm”
sfall said:
;The number of slots available in the locations list panel of the world map
;Set to 0 to leave unchanged. 17 is default.
;Setting this greater than 17 requires a replacement background FRM, or you'll get glitched graphics
WorldMapSlots=0
Maybe after “...a replacement background FRM (WmTabs.frm) large/long enough for the assigned slots, or...”
I also failed to find this for a while. Think I was looking for “town”, found it eventually by accident (ended up in the line before and noticed 17, which at that point I had figured out was the limit). In general, the main problem I have with ddraw is finding things, and then understanding what they mean. For example, the above is called “Worldmap TownMarker” in intrface.lst. I would also call them labels rather than slots or slots for town labels. Maybe “;The number of slots available for “Worldmap TownMarker” in the locations list panel of the world map”.

Anyway, all details really.
 
Check the current resolution and if below 890x720 turn itself off?
That would help, as currently I'm hesitant to set this as any low resolution seems to crash when entering worldmap. Which is problematic when players can chose their own settings. And having this up in the air with a “if you use x, then turn off y” comment is too vague and demanding. People will phone this crash in all the time. And moders may not even be able to diagnose it (i.e. crash is too set up related and inconsistent).
It disables itself if the player's resolution is lower than 890x720. The crash upon entering the world map only happens if someone plays the game in HRP's windowed mode and resize the window to smaller size during the gameplay.
It's been more than a dozen releases since the first implementation, so far there's no crash report due to that.
 
It disables itself if the player's resolution is lower than 890x720. The crash upon entering the world map only happens if someone plays the game in HRP's windowed mode and resize the window to smaller size during the gameplay.
It's been more than a dozen releases since the first implementation, so far there's no crash report due to that.
Fair enough, as I said in the beginning I'm not up to date at all. The sfall I used may have been the first implementation (4.2 something, I think), which is probably the issue here... so I'm outdated and just need to update. ;)
 
Back
Top