Fallout 2 mod FO2 Engine Tweaks (Sfall)

Btw. can we force special encounters? You know, with the red flash etc. Would be fancy. Right now there are no special encounters in the Fo1 port, and I'm thinking about ways to implement them.
 
Sadly that doesn't work with the way our encounter system works. It depends on worldmap.txt being empty. As soon as anything gets added to the list, it will be chosen, simply because it's the only one being there. This is why I'd like to script that as well, circumventing the worldmap.txt file.

I mean, I could just run with force_encounter() again, but that means skipping the fancy blinking icon.


Shit's done.
 
Last edited:
Hey guys :)

So, I updated sfall to 4.1.9.1, along with the modderspack, and now I get the following error when I compile a script:

upload_2019-8-24_23-19-51.png


Any ideas what it is / how to fix it / how I can get around it? Currently, my scripts aren't compiling.

Below are the contents of the "Details" section:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at ScriptEditor.CodeTranslation.Compiler.Compile(String infile, String& output, List`1 errors, Boolean preprocessOnly)
at ScriptEditor.TextEditor.Compile(TabInfo tab, String& msg, Boolean showMessages, Boolean preprocess)
at ScriptEditor.TextEditor.compileToolStripMenuItem1_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripMenuItem.ProcessCmdKey(Message& m, Keys keyData)
at System.Windows.Forms.ToolStripManager.ProcessShortcut(Message& m, Keys shortcut)
at System.Windows.Forms.ToolStripManager.ProcessCmdKey(Message& m, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.ContainerControl.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8762 (QFE.050727-8700)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ScriptEditor
Assembly Version: 3.5.4.5
Win32 Version: 3.5.4.5
CodeBase: file:///B:/Game%20Making/Mutants%20Rising/MR/trunk/Sfall_script_editor/Script%20editor/ScriptEditor.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.8770 (QFE.050727-8700)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5495 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5494 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ICSharpCode.TextEditor
Assembly Version: 3.2.1.6466
Win32 Version: 3.2.1.6466
CodeBase: file:///B:/Game%20Making/Mutants%20Rising/MR/trunk/Sfall_script_editor/Script%20editor/ICSharpCode.TextEditor.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Thanks a bunch!
 
I think this was related to... actually I have forgotten what it was related to. But if you use the new script editor, it should compile correctly again.

/Edit: I think as soon as there is some syntax error or it can't find a define, the above mentioned error appears. Not 100% sure anymore now, though.
 
sfall 4.2 and 3.8.20 are released on SourceForge, along with their respective modders packs.
Changelog said:
v4.2
>Fixed a bug in XPTable that prevented the player from reaching the highest specified level
>Fixed create_message_window script function to prevent it from creating multiple message windows
>Fixed obj_art_fid script function returning incorrect player's FID when the hero appearance mod is enabled
>Fixed a crash bug in message_str_game script function when passing a negative fileId value
>Fixed MainMenuFontColour not changing the font color of the copyright text on the main menu
>Fixed a hero appearance mod issue that caused the incorrect FRM to be displayed when opening bag/backpack in the inventory
>Fixed some arguments in BARTERPRICE hook when trading with a party member
>Fixed a crash bug introduced in 4.1.8 when calling game_time_advance in the map_exit_p_proc procedure with active explosives on the map
>Fixed some of sfall features that depend on the hi-res patch not working properly in some cases
>Fixed a bug introduced in 4.1.8 that broke the AllowLargeTiles option
>Fixed the AP cost display issue in NPC combat control mod
>Improved the functionality of add_extra_msg_file script function to use 'English' as the fallback language for loading msg files
>Changed the DAM_BACKWASH flag to be set for the attacker before calculating combat damage when taking self-damage from explosions
>Changed CorpseLineOfFireFix to be enabled by default
>Removed the dependency of Body_Torso from Body_Uncalled hit modifier, and re-added BodyHit_Torso to ddraw.ini. Now you can use set_bodypart_hit_modifier script function to set them individually
>Replaced the 'Take All' hotkey mod with an extended UI hotkeys mod in the modders pack
>Added a fix to prevent the car from being lost when entering a location via the Town/World button and then leaving on foot
>Added a fix for items on the ground being obscured by a pool of blood after the corpse is removed
>Added a fix for player's position if the entrance tile is blocked when entering a map
>Added a fix for the player stuck at 'climbing' frame after ladder climbing animation
>Added an option to change the path and filename of the critical table file
>Added an option to change the font color of the button text on the main menu
>Added an option to override the path location of all ini files used by scripts
>Added an option to change some of Fallout 2 engine functions to Fallout 1 behavior
>Added support for the new 'Energy Weapon' flag to weapon protos. This flag forces the weapon to use Energy Weapons skill regardless of its damage type
>Added options for tweaking some engine perks to the perks ini file
>Added a new flag to force_encounter_with_flags script function
>Added COUNTERWIN flag to the game mode functions (when moving multiple items or setting a timer)
>Added a new argument to hs_adjustfid hook script
>Added a new argument to hs_barterprice hook script
>Added a compute damage example script to the modders pack
>Slightly increased the width of the car fuel gauge on the world map interface
>New script function: register_hook_proc_spec
>New hook script: hs_stdprocedure

Note: Cublik2k's F2wedit has already supported setting the new 'Energy Weapon' flag for weapon protos.
 
Last edited:
Is it possible to make an option in Sfall to make random encounters occur when "resting until healed" on random maps. The idea is simple, just like in Baldur's Gate, when resting outside of towns you have a chance of being interrupted while resting, that wouldn't include caves. A pop up window could say "You have been stumbled upon" (something like that :P ) . Then the player must conclude the encounter, fight - run, whatever. It might be a trading caravan for instance with a high luck skill.

Anyway the outdoor skill should be the key factor here, and skill 100% you get no encounters, at 90% you have a 10% chance of an encounter, 80% - 20% chance, etc. An outdoor skill below 50% will make it really difficult to rest until healed.

Why this request? I think it make the game more challenging and unpredictable - good stuff I say.

:flameon:
 
There's a RESTTIMER hook since sfall 4.0.4. I think one can spawn critters on the current random encounter map based on it.
It won't be a simple FeatureIWant=1 option in the ini but has to be scripted.
 
Last edited:
Not sure if this would really change a thing.
I was thinking about this the other day, because it's certainly possible... just a bit of work. The thing is, though, it can easily end up as an item farm (if the "reinforcements" are too easy), or it annoys the player and he just wanders on the worldmap over a location circle OR he just waits it out directly in a town location.

It would probably be better to limit the amount of time you can rest based on certain factors, and not artificially spawn in mobs which you can either exploit or easily avoid.
But even if you would limit the amount of time you can rest... it's probably easily circumvented and suddenly you just added a new batch of tediousness to the game.

In my Fo2 mod, I had resting disabled for a while - you had to rent a hotel room to use the resting timer OR you had to have a sleeping bag item and were only able to use it in certain locations (which would then teleport you to a new "camp" location, which WOULD spawn hostile critters randomly, like .Pixote. suggests).

After having that feature in the game for 2 years... I scrapped it. Not because it didn't work, but simply because I realized that it just didn't feel good.
 
Last edited:
Don't know if this is the right place to ask this question, but is there a way to force line breaks into a single text passage? Like making the game interpret "\n" correctly or something? Its a very minor thing, but I find some texts rather cluttered the way they are - especially item descriptions with several aligned sentences like: "This is item so and so. It weights X. It has X shots of Y..." Would be nice to be able to separate the description from the weight and ammo stuff. I'm aware that some texts then may get to long to be displayed correctly, but I'd edit rather edit those to make them fit. (And yes, I'm aware that there is an option to toggle the item description for ammunition types on/off for the barter menu.)
 
sfall 4.2.1 and 3.8.21 are released on SourceForge, along with their respective modders packs.
Changelog said:
v4.2.1
>Fixed a bug in save_array script function that could corrupt sfallgv.sav when saving a new array under the same key
>Fixed a crash bug in PremadePaths when a name exceeds 11 characters
>Fixed move_obj_inven_to_obj/drop_obj script functions not removing the equipped armor properly for the player and party members
>Fixed inven_unwield script function not updating the active item button on the interface bar for the player
>Fixed art_change_fid_num script function not setting player's FID correctly when the hero appearance mod is enabled
>Fixed critter_add/rm_trait script functions ignoring the value of the 'amount' argument. Note: pass negative amount values to critter_rm_trait to remove all ranks of the perk (vanilla behavior)
>Fixed the xp bonus set by set_swiftlearner_mod script function not being reset on game load
>Fixed the player name while controlling other critters
>Fixed NPC combat control mod not removing the inherited perks from controlled critters properly
>Improved the display of the car fuel gauge on the world map interface
>Improved the hero appearance mod to search for files in .dat files and folders simultaneously
>Improved hs_invenwield hook script to run for the player and NPCs when removing equipped items, and added a new argument to it
>Expanded set_critter_stat script function to allow changing STAT_unused and STAT_dmg_* stats for the player, and STAT_unused for other critters
>Changed AllowUnsafeScripting to not require sfall debugging mode
>Removed NPCStage6Fix and CorpseLineOfFireFix from ddraw.ini because there is little reason to turn them off
>Added a fix to prevent the player from equipping a weapon when player's current appearance doesn't have the animation for it
>Added a fix to use 'English' as the fallback language directory for loading msg files
>Added a fix for party member's equipped weapon being placed in the incorrect item slot after leveling up
>Added a new value to AIBestWeaponFix to change the priority multiplier for having weapon perk to 3x (the original is 5x)
>Added a new flag to MainMenuFontColour to only change the font color of the Fallout/sfall version text
>Added optional options to enable modification sections for perks and traits to the perks ini file
>Added support for displaying AP cost up to 19 on the active item button on the interface bar
>Added a check for valid objects to get/set_object_data script functions
>Added a debug message about missing art file for critters
>New script functions: unwield_slot, add_trait, get_inven_ap_cost
>Updated NPC armor appearance mod and added an alternative npcarmor.ini for vanilla Fallout 2 (in the modders pack)
EDIT: the perks removing bug in gl_partycontrol.int is fixed. You can re-download the release package or just download the fixed script from my post below. Sorry for the inconvenience caused.
 
Last edited:
sfall 4.2.1 and 3.8.21 are released on SourceForge, along with their respective modders packs.

There's an issue with party NPC perk shareing function.
I tried Fo1in2 and went to shady sands caves with Ian. After first turn it switched over to Ian. after I ended Ian's turn (CombatControl=2) *My* character suddenly looses all perks that were shared with party members, and i need to gain a new perk to select those perks once agin. I'm sure that this is not how it was ment to be by design. as Loosing critical perks such as awareness or sniper only to level up another 3 levels to get one of them agin (and this seposedly happens after *every* combat) is waaay out of place.

Was this the way the perk removal was ment to be?
 
Nah, it's me did a half-assed test job here.
Here's the updated script that should work correctly now (tested with PerksList=0,2,4,26,73). I'll update the release packages later.
 
Last edited:
I just want to throw an idea out there...is it possible to create a floating text in combat where the one being hurt has a floating text of their damage.

Imagine I shoot a ghoul with a hunting rifle and do 20 damage, could that damage number appear as a red floating number over the ghouls head for a few seconds (eg: -20). If someone takes a stimpak then a green number floats over their head (eg: +18). They could still keep all their usual floating dialogues - this shouldn't have any effect on the pipboy screen.

It might be a fun little feature... &gt;_&gt;
 
Nah, it's me did a half-assed test job here.
Here's the updated script that should work correctly now (tested with PerksList=0,2,4,26,73). I'll update the release packages later.

well I actually found this bug out because i shared Night Vision perk and it vanished during the night time in cave so all of a sudden everything went black as sun was glaring on my monitor ( which does not help explore dark areas btw.) .
Eigther way i use the setup below for my perks of choice for NPCs:
PerksList=0,73,1,2,2,2,3,3,4,4,5,8,8,8,9,21,23,24,14,14,

A firm set with everything nessecary to turn a peasant party NPC into warmachine including those usually useless quadrupled body type party npcs ( dogs of all kinds, and from all mods too).
 
sfall 4.2.1.1 and 3.8.21.1 are released on SourceForge. They are maintenance/hotfix releases for the previous version.
Changelog said:
v4.2.1.1
>Fixed a crash bug introduced in 4.2.1 with the fix for corpses blocking line of fire
Sorry if anyone got the crash when in combat.
 
The new sfall now adds that 'magic hand' animation whenever you use an item to something (Refueling the car, Stimpak on NPCs, Throw quarters at cola machine, etc.), which wasn't a thing before.

I want to turn that thing off. It's both tedious and has no point whatsoever to watch that animation. Is there anyway to turn that bad boy off?
 
Back
Top