Fallout 2 mod FO2 Engine Tweaks (Sfall)

No problems were noticed when playing video in the game.
My System: w7, DirectX9, K-Lite Codec Pack installed, video card NVIDIA :)

Are You sure, that You've configured ddraw.ini properly for the playback (and *indeed* playback the upscaled .avi videos insted of .mve) or do you just want to 'troll' me from a "NVIDIA card owner's" position? :p
i don't think the videos are alright at all. No matter what settings i use to cut them they always end up without sound and in turbo display mode ingame. My codecs must be ok since external aplication (i use Allplayer) plays back the video just fine.

Although the upscale AI I've installed for testing purposes did come with some codecs of it's own FFdd if i remember correctly. they're not installed separately in the system, however FFdd also come with CCCP codec pack which i do have installed.
 
Last edited:
NovaRain I read through criticals.cpp and noticed something which I think might be an error but I could be wrong. Wanna get clarification.

At line 168 the entry is:
Code:
SetEntry(4, 0, 4, 2, -1);
This translates to:
SetEntry(Ghouls, Head, 5th Crit_lvl, stat_check, value =-1)

This field sets which SPECIAL to be checked. Its endurance which should technically be checked.

The above line is saying -1 should be checked. My guess is Endurance Can't be -1.

I suppose stats should be from 0 to 6. ST, PE, EN, etc... 0, 1, 2, etc.

Am I mistaken about something? cause if not then my guess is that the value "-1" was probably intended for the "Modifier check" field and not the STAT check field.
And even if the value of this field is correct, then the next field (modifier check field) should technically hold a value, which it doesn't.

If I caught this right and I'm not mistaken, then the following line 170 has the same error.

Please confirm.
 
Are You sure, that You've configured ddraw.ini properly for the playback (and *indeed* playback the upscaled .avi videos insted of .mve)
Of course right. I'm using these videos for further tests.
 
-1 means "no stat". If you read the notes at the button of the table on fandom you'd know why.

Oh yes. sorry about that. I have read that page so many times that I don't read those parts anymore, and had forgotten that note. my mistake.
 
Of course right. I'm using these videos for further tests.

Guess I'll wait for the results..

Anyway do you want the rest of those Fo1 upscaled videos? The rest didn't had to go through bandicut and I downloaded them with conversion through "Any Viideo Downloader". The rest of the videos I speak of seem to work fine for me, although Lexx said they work 'wonky' or something, whatever that was about.
Anyways whenever ending a playback of .avi videos in pipboy the game turns interface to black color. Simply refreshing the interface returns it to normal (although not the leather/metal sidebar art). This might be looked into as well.
If there are blue sidebars during playback, then there are no <moviename>.cfg files present.
Simply setting a fade in/out effect with colors set to 0,0,0 for "0" frame fixes this.
 
EDIT** shortening and updating.**


So the question was: when needing persistent arrays,

1. Where is best to create them within the script, and,
2. how to call them from other scripts.


Documentation says that permanent arrays (created, or fixed) can be accessed by any script



** Answer to first part is, Doesn't matter where you create them. Arrays are global. but the variable that holds its ID is local.

Still no answer for the second part. I'll update if I figure out.
 
Last edited:
sfall 4.2.8 and 3.8.28 are released on SourceForge, along with their respective modders packs.
Changelog said:
v4.2.8
>Fixed a bug in ObjCanSeeObj_ShootThru_Fix that caused the source to be unable to see the target if it has the 'ShootTrhu' flag set
>Fixed the encounter messages still being limited to 50 entries per table when EncounterTableSize is set to greater than 50
>Fixed temporary arrays in scripts being cleared when flushing the keyboard buffer
>Improved the field of view check in ObjCanSeeObj_ShootThru_Fix
>Improved the functionality of GlobalShaderFile to be able to load multiple shader files
>Improved the performance of DX9 graphics modes
>Extended the upper limit of set_pickpocket_max and set_hit_chance_max script functions to 999
>Expanded get_window_attribute script function to support the automap interface window
>Removed the check for valid objects from get/set_object_data script functions to make them work with other structured data
>Removed KeepWeaponSelectMode and InterfaceDontMoveOnTop from ddraw.ini because there is little reason to turn them off
>Added a fix for the engine building the path to the central hex of a multihex object
>Added a fix for the flags of critters in the line of fire not being taken into account when calculating the hit chance penalty of ranged attacks
>Added a fix to the check for ranged weapons in the Fast Shot trait and FastShotFix
>Added a fix for the background image of the character portrait on the player's inventory screen
>Added a fix for the broken Print() script function
>Added the original Fallout 1 behavior of the Fast Shot trait to FastShotFix
>Added an option to enable linear texture filtering for DX9 graphics modes
>Added support for ACM audio file playback and volume control to soundplay script function
>Added support for transparent interface/script windows
>Added the ability to change the poison level for critters to poison and set_critter_stat script functions
>Added the ability for controlled critters to use Sneak skill in combat
>Added a volume control to reduce the volume for play_sfall_sound script function
>Added an argument to intface_redraw script function to redraw all interface windows
>Added a new argument to HOOK_TOHIT hook script
>Added a new argument to HOOK_COMBATDAMAGE hook script
>Added a new hook type to HOOK_WITHINPERCEPTION hook script (when AI determines whether it sees a potential target)
>Added two sharpen filter files as global shader examples to the modders pack
>New script functions: interface_art_draw, interface_print, combat_data
>Updated the ammo ini loader mod in the modders pack
 
Last edited:
That's awesome!

Just in time. I finished the other components and was just ready to work on tohit.

This release means a lot to me.


Regarding the new argument for COMBATDAMAGE, I suppose you can't use the normal "get_sfall_arg" on it, can you? what would it return?

Doc says use get/set_object_data. from anywhere?

What would be some use case examples of this argument? how can we use it to our advantage?
 
Last edited:
Regarding the new argument for COMBATDAMAGE, I suppose you can't use the normal "get_sfall_arg" on it, can you? what would it return?
You can get it with normal get_sfall_arg just like other arguments. Don't know why you think it's different from others.
It's exactly the same as what the new "combat_data" returns: the pointer to the combat data.
Here's a simple example that replaces all player's critical hit messages with line 6500 from combat.msg.
Code:
#include ".\headers\define.h"
#include ".\headers\sfall\sfall.h"
#include ".\headers\sfall\define_extra.h"

procedure start;
procedure CombatDamageHandler;

procedure start begin
   if game_loaded then begin
      register_hook_proc(HOOK_COMBATDAMAGE, CombatDamageHandler);
   end
end

procedure CombatDamageHandler begin
   variable
      attacker        := get_sfall_arg_at(1),
      attackerResults := get_sfall_arg_at(5),
      combatData      := get_sfall_arg_at(12);

   if (attacker == dude_obj) and (attackerResults bwand DAM_CRITICAL) then begin
      set_object_data(combatData, C_ATTACK_MESSAGE, 6500);
   end
end
 
Last edited:
Ok I see. I forgot that there is a whole new function called combat data. I'll read the documentation on it first.


**EDIT:
OKAAY, looking silly over here. So I didn't find any new documentation added anywhere about combat data. But reading your example more carefully I realize there is no need for more documentation. Its just set_object_data, parameter, and value. Thanks.
 
Last edited:
I want to increase the open inventory AP_cost. Sfall gives this option in ddraw.ini. But I'm worried, if say I make the cost to be 8, will critters who have less than 8 AP be able to access their inventory at all then?

The ideal situation would be that AP formula for inventory be written as:

inventory_ap_cost = minimum of ( ini_number, critter_current_max_ap).

This would ensure that if the critter has less APs than the required number they would still be able to open their inventory if they haven't spent any action points this turn.

Is this how the code is written in sfall? or will setting the number to a high number like 8 or 10 cause problems?

If it causes problems then I would like to request that a simple fix like the above would be added to sfall to address it.
 
There's STAT_max_move_points, but I'm not sure if that includes move-only points.
That can be compared to get_critter_current_ap.
 
Pretty sure NPCs don't open their Inventory, and just use items from their off-hand at the items AP cost. At least in vanilla that's how it used to be iirc (and I'm more versed in FO1 behavior there than 2 ^^).
 
Have you tried set_inven_ap_cost?
Not yet but here is the thing; using set_inven_ap_cost It should be easy to do this in a script. But then this issue will exist for anyone who decides to raise the number, thinking it will be fine (when it might not be fine). In other words if the check is not written in sfall there always exists this problem for anyone who increases this number and they'd have to write a script to ensure no errors arise.



I'm just thinking it might be better to address it at the source instead of repeatedly for each individual mod. But I'm not 100% sure if it IS a problem. I don't know how sfall's code is written in this regard. What do you think?


Pretty sure NPCs don't open their Inventory, and just use items from their off-hand
So if they have multiple items, they grab directly without inven cost? If that's so then it should be fine then, but we should be sure. Cause if not then one can expect problems.
 
Last edited:
Oh also if set_inven_ap_cost sets the inventory access cost then this souldn't solve the problem because some critters still wouldn't meet the required APs. Unless if you're suggesting to change the AP cost over and over for each critter on their turn... I think that's a potentially troublesome solution or at least I don't know how to do it safely yet.
 
critters do not use AP when accessing any items from their inventory, they spend their points only for reload/use the item.
 
sfall 4.2.8.1 and 3.8.28.1 are released on SourceForge, along with their respective modders packs. They are maintenance releases for the previous version.
Changelog said:
v4.2.8.1
>Fixed a few minor bugs introduced in 4.2.8
>Added support for drawing PCX images to draw_image, draw_image_scaled, and interface_art_draw script functions
>New script function: win_fill_color
>Cleaned up define_lite.h and command_lite.h in the modders pack
 
Back
Top