Fallout 2 mod FO2 Engine Tweaks (Sfall)

Josan12 said:
Hey Timeslip: also - do you have any idea how to modify the body-part to-hit chance in the .exe?

I would love to be able to make a tiny mod that makes the eyes much harder to hit (IMO the single greatest culprit for making FO2 too easy ....)

What do you think?

A quick and dirty way to do this might be to just double the AP requirements for aimed shots. And cap the small guns skill at 100.
 
I have a question regarding the Engine Tweaks. I'm using version 1.37 with the Megamod 1.34. Its running almost perfectly at 1680 x 1050. The only problem is that some weather effects appear as yellow square rectangles (rain) or as a constant, semi-transparent grid of black and white squares.

I'm using the Global.fx file from the Megamod Wiki.

I would like either to disable weather effects if I can't get them to render properly or get them to render properly.

I know its the weather efffects and not something else because the problem can be fixed by quicksaving and quickloading the same map (which resets the weather variables, I guess).

Any help would be greatly appreciated.
 
Kanhef said:
The critical hit tables are hardcoded into the engine and are documented here: http://falloutmods.wikia.com/wiki/Critical_hit_tables. In theory they can be modified (by hacking the .exe or as a possible future feature of sfall), so you could alter the headshot criticals so that they don't cause instant death. There is a 'weapon dropped' critical hit effect, which is used for ghoul arm hits, but it seems to be bugged and doesn't work. It would take some serious hacking to fix it, and make attacks cause a specific effect.
Any thoughts Timeslip?
 
Josan12 said:
Hey Timeslip: also - do you have any idea how to modify the body-part to-hit chance in the .exe?
Yup, I managed to find that one. I've just uploaded 1.40, and it lets you set the hit modifiers in the ini. There's also get_bodypart_hit_modifier and set_bodypart_hit_modifier script functions if you want to make a perk that increases your chance of scoring headshots or something.

SkynetV4 said:
I would like either to disable weather effects if I can't get them to render properly or get them to render properly.
I don't really have any suggestions for why it's not working, but if you want to disable it just find and remove the relevant script from fallouts script folder. In my original weather mod it was called 'gltsrain.int', but it may well have been changed in the megamod.

Glovz said:
Kanhef said:
The critical hit tables are hardcoded into the engine and are documented here: http://falloutmods.wikia.com/wiki/Critical_hit_tables. In theory they can be modified (by hacking the .exe or as a possible future feature of sfall), so you could alter the headshot criticals so that they don't cause instant death. There is a 'weapon dropped' critical hit effect, which is used for ghoul arm hits, but it seems to be bugged and doesn't work. It would take some serious hacking to fix it, and make attacks cause a specific effect.
Any thoughts Timeslip?
I've got more chance of being able to play with that than being able to fix corpses blocking weapons fire. (I really wish I could fix corpses... It seriously annoys me too. :() I know where the critical hit code lives, and where fallout stores which bodypart was hit. Going from that to causing a specific effect will be the hard bit...

And one from falloutnow.de since I don't have an account over there.
Helios said:
timeslip is f****** bit**, no chance that I work with him.
Not sure where that came from... What'd I do to deserve personal attacks? :o
 
Luigibacsi said:
Hi Timeslip!
Would it be possible to fix the "sound or endings problem" with your patch?
The usual fix is to turn sound hardware acceleration off, but I'm not aware of any way to do that from inside the application using sound.

Depending on what causes it, turning eax on might help. (Or it might make it worse, or more likely wont do anything.) Leave the default environment at 1 so that it doesn't have any effect on the sound.
 
Timeslip said:
Josan12 said:
Hey Timeslip: also - do you have any idea how to modify the body-part to-hit chance in the .exe?
Yup, I managed to find that one. I've just uploaded 1.40, and it lets you set the hit modifiers in the ini. There's also get_bodypart_hit_modifier and set_bodypart_hit_modifier script functions if you want to make a perk that increases your chance of scoring headshots or something.

How do you do it, Timeslip!? :clap: You are the man/woman! I thought we'd lost your skills to FO3 modding for good :)
 
>>The possibility to link World Map travel speed and Current inventory weight

This is quite easy :) But just like mod to F2.
 
IMO the only thing that still needs to be done is making worldmap travelspeed independent of processor speed. Or is this already done/ not possible to do?
 
IMO the only thing that still needs to be done is making worldmap travelspeed independent of processor speed.

I'm working on this. I'll totaly rewrite slow-down code.

P.S. And sorry for my bad English :?
 
Alray said:
>>The possibility to link World Map travel speed and Current inventory weight

This is quite easy :) But just like mod to F2.

This is something i've always wanted !!! - but i don't understand - are you saying you've made it possible? If so, please tell me how!
 
Dude101 said:
Geat work for sure! don't forget about the feature request page on the wiki:
Right, lets work my way through some of them.

An ability to disable gaining additional HP on level up-in Fallout 1 and Fallout 2.
sfall for fallout 1 doesn't do anything beyond the speed thing, mouse wheel and graphics mode, so that's out. For fallout 2 sfall has been able to do that since 1.38; look at the set_hp_per_level_mod script function.

The possibility to set an armour items AC to be less than 0. Also to increase the Vault suit (default armour) AC.
Is that not possible with regular scripting? Using set_critter_extra_stat to alter base AC when you wear/remove armour should be sufficient.

The possibility to set the amount of AC points from agility/unspent AP
I don't normally say that I'll do things before I've done them in case they turn out to not be possible, but that's one case where I think I can say with some certainty that I can do it. Will try and squeeze it into 1.41.

Edit: Done, tested and working. :)

The ability to edit critical hit tables, allowing some bug fixes and unique tables for new critter types.
Done, tested and working. Will be in 1.41. Two cavets; you're limited to 22 critter types, so any unique tables will take some fancy scripting. (No reason why you can't do it; you just need to recycle the table of a critter type that doesn't exist on the same map, and reset it again when the player leaves.) Secondly, I haven't fixed the dropped weapon effect. I'll take another look at it before 1.41, but don't hold your breath.

Compatibility with the Fallout 1.3.x TeamX unofficial patch.
sfall expects bits of code and data to be in specific places in memory, so it requires a specific version of the exe. If the teamx patch doesn't work with the exe that sfall works with, it'll be a lot of work to port it. (Although not anywhere near as much work as it would be to port the fallout 2 version, at least.) Is there any reason why the patch needs a different exe?


And the rest I either have no clue how to do yet. They may happen at some point in the future, but like usual no promises until after I've done them. :P

Dude101 said:
Alray posted some botton codes or something on page 38 as well:
oh, I kind of skipped those pages because of the flame war. Didn't realise there was something useful there. :oops: Will go back and reread.
 
A 1.41 beta is up. (Along with sslc here.) Three new features this time.

Critical tables
Can be overridden either by script using the new set/get/reset_critical_table functions, and/or by supplying a CriticalOverrides.ini file. In either case OverrideCriticalTable in ddraw.ini needs to be set to 1. (Off by default because it noticeably lengthens loading times.)

If you're using an ini to override, the syntax is to have one section for each critter/bodypart/critical level block, in the format [c_<critter id>_<bodypart>_<critical level>] (e.g. [c_00_0_0] for the lowest level of critical on a male targeted at the head.) That section can contain any of 'DamageMultiplier', 'EffectFlags', 'StatCheck', 'StatMod', 'FailureEffect', 'Message' or 'FailMessage' keys. Any not present just use the default values.

e.g. a file containing
Code:
[c_01_0_0]
DamageMultiplier=100
[c_01_0_1]
DamageMultiplier=100
[c_01_0_2]
DamageMultiplier=100
[c_01_0_3]
DamageMultiplier=100
[c_01_0_4]
DamageMultiplier=100
[c_01_0_5]
DamageMultiplier=100
Would cause all critical hits to the head of a female to do silly amounts of damage.

ac bonus from unspent ap
The bonuses are controlled by script, and the bonuses can be set for regular ap and h2h evade separately, in fractions of 1/4. In addition, the h2h evade hardcoded effect is modified to support multiple levels. (The perk itself still limits you to 1 level, but if a mod changes that then it'll now work, rather than extra levels above 1 having no effect.)

e.g. if you used 'set_unspent_ap_bonus(6); set_unspent_ap_perk_bonus(2);', and the player ended the turn with 2 ap left, they would get 3 extra ac without any levels of h2h evade, 4 with 1 level and 5 with 2.

The default values are 4 for both, i.e. 1 point of ac for each spare point of ap, doubled if you have h2h evade.

hook scripts
This is the reason it's beta; there's a lot of potential for me to have broken something here. I'll quote the readme to save typing it out again:

hookscripts.txt said:
Hook scripts are specially named scripts that are run by sfall at specific points to allow mods to override normally hardcoded behaviour in a more flexible way than sfall's normal ini configuration.

In addition to the bit of code it overrides, the script will be run once when first loaded and again at each player reload to allow for setup. Hook scripts have access to a set of arguments supplied to sfall, but aren't required to use them all. They also return one or more values, but again they're optional, and you only need to return a value if you want to override the default.

There are three script functions specific to hook scripts:

int init_hook()
The hook script equivilent of game_loaded; it returns 2 when the script is first loaded, 1 when the player reloads and 0 otherwise.

mixed get_sfall_arg()
Gets the next argument from sfall. Each time it's called it returns the next argument, or otherwise it returns 0 if there are no more arguments left.

void set_sfall_return(int value)
Used to return the new values from the script. Each time it's called it sets the next value, or if you've already set all return values it does nothing.
The only one in there atm is for the hit chance, which would enable you to write a script that did something like scaling how the hit chance drops with distance so that eye's get harder to hit faster than the torso, or something similar.

As a quick example script, compiling this and saving it as hs_tohit.int will simply increase the chances of everything hitting anything by 20%
Code:
procedure start;

procedure start begin
	if(init_hook) then begin

	end else begin
		set_sfall_return(get_sfall_arg + 20);
	end
end
Not actually a very good script, because it can result in chances over 100; the script is run after the normal hit chance is capped at 95.

I'll get some extras in for 1.41 proper, if anyone has any suggestions for hardcoded sfall effects they'd like to be able to script.
 
Hi Timeslip

get_ini_setting(char* setting)

Sample

get_ini_setting("config.ini|acklint|item")

[ACKLINT]
Item=6

Code

add_obj_to_inven(dude_obj, create_object_sid(get_ini_setting("config.ini|ACKLINT|Item"), -1, -1, -1));

This works

You can add one function?

get_ini_string(char* setting)
Sample

get_ini_string("config.ini|Dlg|WinImg")

[Dlg]
WinImg=pcx/win_dlg.pcx

call Proc_Create_Window("Win_Dlg", 130, 0, 414, 480, get_ini_string("config.ini|Dlg|WinImg"));
 
I've just updated the 1.41 beta. There's now a new hook script that gets fired after fallout has decided if an attack hits, but before it does anything about it, and lets you override if the attack is successful, the bodypart that gets hit and the target. If you want to make a mod that makes attacks occasionally hit the wrong bodypart or similar, that's the place to do it.

As a couple more examples, save these as hs_afterhitroll.int

Code:
//With this, no attack will ever hit
procedure start;

procedure start begin
	if(init_hook) then begin
	end else begin
		set_sfall_return(1);
	end
end

Code:
//All attacks will hit the head, regardless of where they're aimed
procedure start;

procedure start begin
	if(init_hook) then begin
	end else begin
		set_sfall_return(get_sfall_arg);
		set_sfall_return(0);
	end
end

Jordan said:
You can add one function?

get_ini_string(char* setting)
ok. It's included in the new 1.41b I just posted. :)
 
Hi, Timeslip.

I wrote some new stuff for sfall. Maybe you know, that Fallout load his files for some order: first of all look for files patch%3.dat (from patch000.dat till patch999.dat), then master_patches (critter) and master_dat(critter). This work well, but we have one trouble - in original when fallout find first patch%3.dat it stop looking for another one. This is very bad for modders. When they write some mods they must place patches to data folder (and this can give a lot of bugs). If just we can fix this - all mods can be easier to "distribute". Mod will distributing like: patch000.dat, patch001.dat and so on.
And I finally fix this problem (I work on it for a long time :) ) Also I change range wich Fallout looking for patch file (not 000-999, new range in misc section in ini - number_patch_loop=15). And also I change step of this loop.
I hope you understand my broken English :D

Code:
	int number_patch_loop=GetPrivateProfileInt("Misc", "number_patch_loop", -1, ini);
	if(number_patch_loop>-1) {		
		// Disable check
		SafeWrite8(0x0444363, 0xE9);
	    SafeWrite32(0x0444364, 0xFFFFFFB9);
		// New loop count
        SafeWrite32(0x0444357, number_patch_loop);
		// Change step from 2 to 1
		SafeWrite8(0x0444354, 0x90);
		
	}
 
Alray, your english is pretty good. ;)

I got this idea too a while ago but I thought it wasn't possible to realize.
 
Back
Top