Fallout 2 mod FO2 Engine Tweaks (Sfall)

I think I mentioned about combining this with the patcher in the new forum, but if you could make this application replace the patcher that would be coool too.

I'm sure the source code for the patcher is here at NMA, so you could see where it is writing etc...

Being able to select which config.cfg file to use is really handy as it will let you run separate mods on the same PC without overwriting each other.
 
Latest new:
http://timeslip.chorrol.com/temp/foScriptExtenderTest.7z

He is playing with extending FO scriping.

In any case, when I'm modding I generally do whatever seems like a fun idea at the time, and worry about whether anyone else will find it interesting later. That obviously means I don't do much planning ahead, but if I come up with anything useful I'll be sure to post it.

Then again, if it's just a surprise you want, if you install this then you'll probably find what happens if you start a new game and use first aid on klint fairly surprising, especially if you have a loud motherboard speaker. evillol.sml.gif (I was trying to come up with a way for in game scripts to interact with my dll.)
 
lisac2k said:
Bigger resolution support? (this one is hard, I know)
I don't know... has someone tried to use the bigger resolution patch with these tweaks?

lisack2k said:
World Map Speed Fix?
I don't know exactly what this patch does to the engine but I don't see why it wouldn't work.

lisack2k said:
Hakunin Dreams Remove?
Easy.

lisack2k said:
13 years limit? (this one is really tough)
Not really: it seems someone has found where the program checked for this limit (http://www.nma-fallout.com/forum/viewtopic.php?p=380808&highlight=#380808). I didn't test anything but by looking at the code, I can say it's very probable that's it.

lisack2k said:
Other standard features (like in the patchers before): starting sprites, setting starting datum and map etc...
Anything that needs to alter some bytes in the executable can be done easily (like I suggested, patching when the dll is loaded is the best way to do it). It could also be configured by the ini file.

Wild_qwerty said:
I think I mentioned about combining this with the patcher in the new forum, but if you could make this application replace the patcher that would be coool too.
There's no need for a loader/patcher: the dll is loaded within fallout's process so you have direct access to everything fallout has.

Wild_qwerty said:
I'm sure the source code for the patcher is here at NMA, so you could see where it is writing etc...
I already know most of the offsets used in the patcher (if not all). Having already dug into fallout's executable, most of the function/values patched are recorded in my ida dead listing (in fact I think I could find a few new interesting things by looking at my past work on this).

Wild_qwerty said:
Being able to select which config.cfg file to use is really handy as it will let you run separate mods on the same PC without overwriting each other.
Very easy to do. But it would mean that you have to edit by hand the ini file every time you want to switch between two mods (and if the mods require different patching configurations...).
 
ravachol said:
lisack2k said:
World Map Speed Fix?
I don't know exactly what this patch does to the engine but I don't see why it wouldn't work.
I've noticed one interesting thing about it. When I use a small utility for slowing down the processor speed, the world map problem disappears (as you know, this problem affects not only the speed on the worldmap, but also the encounters). So, any chance to make a varible, which could serve as a divisor for the processor speed or something like that, and put it in the INI?

ravachol said:
Anything that needs to alter some bytes in the executable can be done easily (like I suggested, patching when the dll is loaded is the best way to do it). It could also be configured by the ini file.
Agree totally. Elegance galore.


ravachol said:
(in fact I think I could find a few new interesting things by looking at my past work on this).
This would be more than welcome :D

ravachol said:
But it would mean that you have to edit by hand the ini file every time you want to switch between two mods
One could easily rename the old INI file and make (copy/paste/edit) a new one in a seconds. At least this is what I'd do.
 
Timeslip re 13 time limit Time limit
Hasn't that already been done? http://www.nma-fallout.com/forum/viewtopic.php?t=10538&start=51

I've added it to my mod anyway; it's the TimeLimit line in ddraw.ini. Set to -1 to disable the time limit, or somewhere between 0 and 255 to set a custom limit. The default is 13, so it wont change the limit unless you tell it to. I have no idea what the side effects will be when you hit 13 years; I've only been testing it by setting lower limits. I'm 99% sure that there will be side effects of some description though, because about 6 months into year 13 the variable that measures how long its been since the game start will roll over back to 0.

Edit: I've done some testing, and when the variable rolls over the whole game locks up, so it's not exactly playable. The crash date was 8th of march 2255 and the usual time limit is 25th July 2254, so you only get an extra 7ish months.

Edit2: It looks like I can make it work by manually resetting the date back to 2241 each time you go over the 13 year limit.
 
It looks like I can make it work by manually resetting the date back to 2241 each time you go over the 13 year limit.
Some people in Russia where using this 'dirty' method for several years. Date where rolled back manually of course. Looks like 'clear' method is still not implemented.

BTW, have anyone checked F1 modification? Does it fix 'screen blackout' issue or not? :roll:

-- Update --
Win 2K3, Fallout v1.2. F1 mod doesn't work for me at all. Game fails to startup. Wrong EXE?
 
Version 1.6 of the tweaks are up.

http://timeslip.chorrol.com/sfall.html

Code:
A new version (v1.6) is out. I've fixed the last thing that was bugging me: If you use a high resolution in windows then the mouse is far too sensitive in fallout even if you turn the in game sensitivity all the way down to its minimum. There's also a fix for the sharpshooter perk that dude101 asked me to include, and a new windowed mode which is much faster than the old one at the expense of movies not being coloured correctly.

There is a ScriptExtender=0 line in ddraw.ini that I haven't really explained. If it's set to 1, you get access to the extra scripting functions I was playing around with. The only ones in 1.6 are read_byte(int address), read_short, read_int and read_string, which can be used to read memory in fallout's address space.

The sharpshooter fix is what ravachol had fixed a while back. Now it is part of Timeslip's ini file rather than having to modify the .exe yourself.
 
Version 1.10 is up. The biggest additions since 1.6 are a fix for the 13 year time limit that doesn't require rolling back the date, a fix for the pathfinder perk and some extra scripting stuff. (There's a changelog here.)

I've also made a mini example mod that uses a global script and some graphics shaders. (Drinking booze makes the screen go blurry.)

If anyone has any extra scripting functions they want added, feel free to ask. The list I have so far for 1.11 is in_local_map, in_world_map, force_encounter, set_shader_int and set_shader_float.

Does it fix 'screen blackout' issue or not?
Using graphics mode 4 fixes it. Mode 5 stops fallout blacking out, but it blacks out your desktop instead.
 
If anyone has any extra scripting functions they want added, feel free to ask. The list I have so far for 1.11 is in_local_map, in_world_map, force_encounter, set_shader_int and set_shader_float.

Ah, a force_encounter function would be great! That way the Kaga random encounters I have included in my expansion will be forced upon the player as was originally intended. Nice.

Global scripts will be awesome as well, glad you decided to include them. Keep up the great work!
 
AJ Rimmer Bsc.Ssc. said:
love the kaga encounters.... adds huge fun-playable depth.
I take it you are talking about the kaga encounters in the MegaMod? My are much different. You'll have to wait and see. 8-)
 
I'm not sure if you have already done this, but if you can make it so that a different config file other than fallout2.cfg could be used possibly through the use of a command line parameter

eg: fallout2.exe -c mod.cfg

Also the same sort of thing for the patch000.dat file

eg: fallout2.exe -d modpatch.dat

So if I wanted to load a separate config file and patch file for my mod I could just add a few switches to the shortcut that launches the mod. I know the current Fallout2 patcher does this but it only works for the US and UK versions and the patch file changer appears to be a little flakey.
 
This is not a good work, but an awesome one! You did in a few weeks what couldn't be done in years! Thanks for all you have done.

Anyway, I noticed you've added the game_loaded function, for which I think was already there and working. Or am I wrong? Other than that, I really like the new scripting additions.

Also, one of the greatest problems in FO2 that I can remember right now were the inappropriate damage calculations for the AP ammo. Glovz made a fix for it a while ago, his EXE has been tested for some time. Maybe you could check it out or contact him and fix it once and for all.
 
Awesome work Timesplit is doing.
At first i didn't find the scrolling thingy very interesting but the rest he's doing is excellent.

I guess now lot's of mods can be re-done in a easier way.
 
Wild_qwerty said:
I'm not sure if you have already done this, but if you can make it so that a different config file other than fallout2.cfg could be used possibly through the use of a command line parameter
iirc, fallout opens the config file before loading ddraw, so I wouldn't be able to patch it. I'll double check just in case.

Edit: Looks like I was wrong. 1.11 lets you change the config file in ddraw.ini. I'll try and do something about command line arguments for 1.12.

lisac2k said:
Anyway, I noticed you've added the game_loaded function, for which I think was already there and working. Or am I wrong? Other than that, I really like the new scripting additions.
If there is something else that does the same thing I didn't find it, but I only started trying to learn fallout scripting last week so I suppose I could have missed it.

is_loading_game may never return true, or could return true multiple times for one script, (game_loaded will return true exactly once for each script,) and doesn't work from global scripts or most procedures of normal scripts anyway. The only other functions I found check whether a map had loaded, rather than a save game. Are there any others that I missed?

Edit2:
1.11 is up. force_encounter is working, but let me know if anyone finds any bugs.
 
This is incredible, you have my full support, please keep it up.
This is a pretty silly random idea but what do you think you could do about colored lighting for instance? Worst case scenario it's a local shader effect on a scripted object.
 
TF said:
This is a pretty silly random idea but what do you think you could do about colored lighting for instance? Worst case scenario it's a local shader effect on a scripted object.
I have no idea how to make a normal coloured light source, but if you want coloured ambient lighting and don't mind the effect being applied to the UI as well as the map, shaders are the easiest way to do it. Just load the shader below and then use set_shader_vector to set the lightColour variable to whatever you like.

Code:
sampler s0;

float4 lightColour = { 1, 1, 1, 1 };

float4 PS( float2 Tex : TEXCOORD0 ) : COLOR0
{
    return saturate(tex2D(s0, Tex)*lightColour);
}

technique T0
{
    pass p0 { PixelShader = compile ps_2_0 PS(); }
}
 
Jesterka said:
Another quest for a tough man of your calibre, Mr. Timeslip: http://www.nma-fallout.com/forum/viewtopic.php?t=38442&highlight= :wiggle:
Changing how far down you can scroll is easy, (change the 4 bytes at 0x004C21FB,) but by itself is probably not enough to let you add extra cities to the list. How do I set which locations show up there? Is setting the townmap_label_art_idx line in cities.txt enough?

Edit: After doing some testing, it turned out that changing that value is all you need to do. It looks a bit glitchy without a replacement frm, but the buttons still work. I'll include the locations list patch in 1.12. :)

Something else related to that city list; if I scroll to the top and then click the up arrow again, it doesn't scroll, but the red buttons next to each location name go unresponsive, and I need to click the down arrow before I can use them again. Is that a known bug, or is it just my installation being weird?
 
*sigh*
Sorry, but I won't respond much of your questions (I'm anything but not the programmer :P), but ravachol or Lisac2k or Wild_qwerty could do that.

Instead of the reply, I'll cheekily add here another annyoing problem - is there a possibility to increase the maximum map size in fo2mapper? Sometimes it proves to be damnably limitative. It was limited because of slow machines in '97/'98, I guess. TeamX mapper is a bit better in that, but we don't use it. Any opinion?
 
Back
Top