Fallout 2 mod FO2 Engine Tweaks (Sfall)

Does anyone know how I can get the npcarmor.ini to work with the RP 2.3.3.? I'm trying to revert some of the custom armor appearances of some of the NPCs but sofar copying the npcarmor script and .ini file from the modderspack seems to do nothing at all. Any change I make in the npcarmor.ini is simply ignored. Do I need to activate it somehow in the ddraw.ini?
Make sure you're using sfall 4.0, the script does not work with older 3.x.
Also you might need to replace all party member scripts with the ones without embeded armor appearances mod enabled to avoid possible conflict. You can extract them from the manual installation package.
 
Last edited:
Thanks for the pointers Nova! I think I found the scripts you are talking about and I got it to work with the armor apperances. Unfortunately, for Cassidy this means his talking head is gone. I suppose there is no easy work around for that?

Edit: I have figured it out. I decompiled the script and edited the pid number directly in killaps file. Now I have the talking head and all the armor appearances I wanted!
 
Last edited:
sfall 4.0.5 and 3.8.10 are released on SourceForge, along with their respective modders packs and win2k version (3.8.x only).
Changelog said:
v4.0.5
>Added an option to use Fallout's normal text font instead of DOS-like font on the world map
>Added an option to increase the maximum number of tile FRMs (from Crafty)
>Added the ability to define allowed weapon animations for NPCs to NPC armor appearance mod (in the modders pack)

Original engine bug fixes and various features from Mr.Stalin:
>Added a fix for a crash when the critter goes through a door with animation triggers
>Added a fix for critters killed in combat by scripting still being able to move in their combat turn if the distance parameter in their AI packages is set to stay_close/charge, or NPCsTryToSpendExtraAP is enabled
>Added support for adding custom background FRM to the character creation/screen of the hero appearance mod
>Added an option to display the range of the second attack mode in the inventory when you switch weapon modes in active item slots
>Added an option to set up a key to let you move/drop a whole stack of items at once without the 'Move Items' window
>Added an option to change the counter in the 'Move Items' window to start at the maximum number of items
>Added an additional mode to metarule2_explosions function
>New script function: set_iface_tag_text
>Expanded get_mouse_buttons function to return a value for the middle mouse button
>Improved the functionality of hs_inventorymove and hs_invenwield

There were several limits about the usage of show/hide_iface_tag before: you can only use up to five additional notification boxes, their text labels must be in intrface.msg which can't be changed dynamically, and you only get to choose red/green text colors. Now the new set_iface_tag_text script function provides a more flexible way to set up text labels for the boxes. For example, here's a global script that can display the ammo type of your currently holding weapon in a notification box:
Code:
procedure start;

#include ".\HEADERS\DEFINE.H"
#include ".\HEADERS\define_extra.h"
#include ".\HEADERS\COMMAND.H"
#include ".\HEADERS\sfall.h"

variable only_once;
variable ammoLabel;

procedure start begin
   variable item, ammoPID;

   if game_loaded then begin
      hide_iface_tag(9);
      set_global_script_repeat(60);
   end else begin
      if (critter_inven_obj(dude_obj, INVEN_TYPE_RIGHT_HAND) > 0) then begin
         item := critter_inven_obj(dude_obj, INVEN_TYPE_RIGHT_HAND);
      end else if (critter_inven_obj(dude_obj, INVEN_TYPE_LEFT_HAND) > 0) then begin
         item := critter_inven_obj(dude_obj, INVEN_TYPE_LEFT_HAND);
      end else begin
         hide_iface_tag(9);
         ammoLabel := "";
         return;
      end

      if (obj_item_subtype(item) == item_type_weapon) then begin
         ammoPID := get_weapon_ammo_pid(item);
         if (ammoPID > 0) then begin
            if (ammoLabel != message_str_game(GAME_MSG_PRO_ITEM, ammoPID * 100)) then begin
               ammoLabel := message_str_game(GAME_MSG_PRO_ITEM, ammoPID * 100);
               set_iface_tag_text(9, ammoLabel, 3);
               show_iface_tag(9);
               only_once := 1;
            end
         end else begin
            if (only_once == 1) then begin
               hide_iface_tag(9);
               ammoLabel := "";
               only_once := 0;
            end
         end
      end
   end
end

BTW, there's a screenshot for the new WorldMapFontPatch option (disabled/enabled):
JaIqjWi.png
 
Last edited:
If someone is playing Resurrection or other TCs with sfall 4.0.5, could you check if enabling NPC combat control crashes the game? I'm having the crash in non-RP/UP games when the player ends his turn, with the error message:
The instruction at 004589fc referenced memory at 00000065
The memory could not be read from

I'm curious if it's just me or a more common bug.
 
sfall 4.0.7 is released on SourceForge, along with the modders pack.
Changelog said:
v4.0.7
>Fixed the game thinking you dropped an active explosive when the dropping is prevented with hs_inventorymove (from Mr.Stalin)
>New script function: inventory_redraw (from Mr.Stalin)
>NPC combat control mod now centers the screen on the controlled critter and has new options to display critter's name

A note about the new DisplayName option in sfall-mods.ini:
Due to how the notification boxes work in the game, you have to assign a specific number to the name box. Currently sfall offers 5 extra boxes with number 5 to 9, and RP has already used 5 and 6 for its new notifications (player/NPC crippled). So you need to set the option at least 7 to avoid conflict with RP.
 
Last edited:
First of all, thank you so much for the amazing work.
My questions are:
Is there some way to use sfall (ini or mod or whatever) to increase the initial number os SPECIAL points I can allocate?
Also, is there a way to highlight NPCs like you highlight containers and corpses?
 
Is there some way to use sfall (ini or mod or whatever) to increase the initial number os SPECIAL points I can allocate?
Also, is there a way to highlight NPCs like you highlight containers and corpses?
1. It would be much easier to use F12se to edit your character.
2. The script source of the item highlighting mod is available in the modders pack. You can modify it to include highlighting critters.
 
1. It would be much easier to use F12se to edit your character.
2. The script source of the item highlighting mod is available in the modders pack. You can modify it to include highlighting critters.

Thanks for the answers. I just got the modder's pack but it looks like a lot of information to take in, I'll look into it when I have a little more time.
And I don't feel safe using the save editor, really. Guess I"ll just, you know, not cheat lol.
 
Just installed mutants rising demo. I've noticed it uses the stats.ini file in order to change carry weight. When I pick the small frame trait, the carry weight get stuck on 70 (80 if gifted), regardless of your strength.
Is that on purpose? since it seems a bit odd.

Please also explain how to fix that, regardless of that being a mistake or not. It would really help me to improve my modding skills, since sfall is such a strong tool\s and understanding how it works is a big step forward.

Thanks,

zorchar

zorchar@gmail.com

BTW, it might be an ignorant question but, is there an sfall "tutorial" in english? or some turorial explaining ini files and such related content?(besides basic int compiling and the likes)
 
Last edited:
Just installed mutants rising demo. I've noticed it uses the stats.ini file in order to change carry weight. When I pick the small frame trait, the carry weight get stuck on 70 (80 if gifted), regardless of your strength.
Is that on purpose? since it seems a bit odd.
The perks.ini in MR demo has wrong setting for Small Frame. Since its effect should be "+1 Agility, -30 Carry Weight", you can alter the lines like this:
Code:
; Modifies Small Frame to give a smaller malus to Carry Weight
[t2]
NoHardcode=1
StatMod=5|1|12|-30
 
The perks.ini in MR demo has wrong setting for Small Frame. Since its effect should be "+1 Agility, -30 Carry Weight", you can alter the lines like this:
Code:
; Modifies Small Frame to give a smaller malus to Carry Weight
[t2]
NoHardcode=1
StatMod=5|1|12|-30

Thx.

How can you implement a brand new ini file? Let's say for automatically updating the listing of veriables in order to install a mod to an existing Fallout 2 installation, regardless of previous versions installed. You can't override the existing listing since you want it to fit lists that have been changed and you want to keep the previous alterations.

As I said, I don't really understand ini files and maybe the example is non ini-related. Clarifications will be most welcome and appreciated.
 
found
Code:
;To use more than one save slot for quick saving (F6) and without picking a slot beforehand. The number assigned is a number of save slots (1..10) to use for quick saving, cycling from the top one down and over to the earliest one.
AutoQuickSave=5
doesnt work,am i setting it wrong?

Nirran

edit : i see it is crafty additions,possible to add this to curent sfall?
 
Last edited:
Some combination of sfall 4.0.7, Megamod 2.4.7.3, a bunch of minimods either made by Nirran or included in the 'modders pack', and some more personal changes and bits taken from other mods makes the CarChargingFix disable all refueling altogether. My guess is that it's related to the car changes in the Megamod.
 
Because CarChargingFix checks the specific PID of Highwayman, for mods with custom vehicles it should be disabled.
 
sfall 4.1 is released on SourceForge, along with the modders pack.
Changelog said:
v4.1
>Added an option to display experience points with the bonus from Swift Learner perk when gained from non-scripted situations (from Crafty)

Original engine bug fixes and various features from Mr.Stalin:
>Implemented a code injection system for game hooks. In previous versions, the code of game hooks was always executed even if there is no corresponding hook script. Now the code of a game hook only gets injected into the game when the corresponding hook script exists
>Code refactoring of some hook scripts
>Fixed an issue with file IDs of additional game msg files being shifted when a file in ExtraGameMsgFileList is missing
>Fixed obj_can_see_obj script function not checking if source and target objects are on the same elevation before calling hs_withinperception hook script
>Improved the functionality of ExtraGameMsgFileList to allow manually assigning numbers to specific msg files
>Improved the functionality of hs_ammocost when CheckWeaponAmmoCost is enabled
>Improved and expanded the functionality of UseScrollingQuestsList
>Expanded is_iface_tag_active function to check tag value of 0/1/2 (sneak/poisoned/radiated)
>Added a fix for missing AC/DR mod stats when examining ammo in barter screen
>Added a fix for the display issue in the pipboy when a quest list is too long with UseScrollingQuestsList diabled
>Added a fix for the clickability issue of holodisk list in the pipboy
>Added a fix for the broken obj_can_hear_obj script function
>Added a fix for multihex critters moving too close and overlapping their targets in combat
>Added a fix for critters not checking weapon perks properly when searching for the best weapon
>Added an option to keep the selected attack mode when moving the weapon between active item slots
>Added an option to set the number of additional notification boxes to the interface
>Added an option to load alternative dialog msg and subtitle files for female PC (translation friendly)
>Added an option to display full item description for weapon/ammo in barter screen
>Added options to change the location of quest list scroll buttons
>Added options to use more than one save slot for quick saving
>Added a new return value to hs_barterprice hook script to modify the value of player's goods
>Added a new argument to hs_withinperception hook script
>Added DIALOGVIEW flag to the game mode functions (when reviewing the current conversation)
>New script functions: get_string_pointer, dialog_message
>New hook scripts: hs_useanimobj, hs_explosivetimer, hs_descriptionobj

Due to the amount of changes and new features implemented in 4.1, 4.0.8 and 3.8.11 maintenance builds are also released in case there is some serious bug in 4.1.

Some explanation about AIBestWeaponFix option in all releases:
NPCs pick the weapon with the highest priority value in their inventory. The priority value is calculated in ai_best_weapon_ engine function:
Base Priority = (weapon max dmg - weapon min dmg) / 2

Yes, NPCs think the weapon with a larger damage range is better. Between a weapon with dmg 1-50 and one with dmg 30-60, they will choose the former if other conditions (weapon type, perk, price, etc.) are the same. Not sure if the devs meant to use the average damage but made a mistake, or it's intended.

And if the weapon has a weapon perk, Base Priority will be multiplied by 5. But the check never works properly due to a bug in the function.

The most significant change of enabling the option is Frank Horrigan will equip his end boss knife instead of his end boss plasma gun at the beginning of the final battle. Thus the fight becomes much easier. It's because the knife has weapon penetrate perk (priority: 35) and the plasma gun has none (priority: 20). The easiest solution is giving the plasma gun some unimportant weapon perk like weapon night sight (which is useless in the fight) with f2wedit, or setting the "hidden" item flag in its proto (requires hex editing).
 
Last edited:
with files from 4.1 modder pack,floor2 is not recognized,am i doing something wrong?

edit : same with compiler from modderspack_4.0.8
 
Last edited:
with files from 4.1 modder pack,floor2 is not recognized,am i doing something wrong?

edit : same with compiler from modderspack_4.0.8
You need to include sfall.h. All new script functions since 3.8 use sfall_funcX implantation, so it's necessary to include the header.
 
Back
Top