Fallout 2 mod FO2 Engine Tweaks (Sfall)

Discussion in 'Fallout General Modding' started by Dude101, Jul 30, 2007.

  1. Wild_qwerty

    Wild_qwerty Sonny, I Watched the Vault Bein' Built!

    Feb 2, 2004
    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.
     
  2. Dude101

    Dude101 Vault Fossil
    Modder

    Aug 3, 2005
    Latest new:
    http://timeslip.chorrol.com/temp/foScriptExtenderTest.7z

    He is playing with extending FO scriping.

     
  3. ravachol

    ravachol First time out of the vault

    26
    Jul 16, 2006
    I don't know... has someone tried to use the bigger resolution patch with these tweaks?

    I don't know exactly what this patch does to the engine but I don't see why it wouldn't work.

    Easy.

    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.

    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.

    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.

    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).

    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...).
     
  4. lisac2k

    lisac2k Vault Senior Citizen
    Modder

    Oct 26, 2004
    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?

    Agree totally. Elegance galore.


    This would be more than welcome :D

    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.
     
  5. Dude101

    Dude101 Vault Fossil
    Modder

    Aug 3, 2005
    Timeslip re 13 time limit Time limit
     
  6. Alchemist

    Alchemist Nocturnal Mechanic Modder

    164
    Dec 26, 2004
    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?
     
  7. killap

    killap Bear Dude Moderator Modder

    May 16, 2005
    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.
     
  8. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    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.

    Using graphics mode 4 fixes it. Mode 5 stops fallout blacking out, but it blacks out your desktop instead.
     
  9. killap

    killap Bear Dude Moderator Modder

    May 16, 2005
    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!
     
  10. AJ Rimmer Bsc.Ssc.

    AJ Rimmer Bsc.Ssc. First time out of the vault

    38
    Aug 11, 2007
    love the kaga encounters.... adds huge fun-playable depth.
     
  11. killap

    killap Bear Dude Moderator Modder

    May 16, 2005
    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-)
     
  12. Wild_qwerty

    Wild_qwerty Sonny, I Watched the Vault Bein' Built!

    Feb 2, 2004
    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.
     
  13. lisac2k

    lisac2k Vault Senior Citizen
    Modder

    Oct 26, 2004
    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.
     
  14. Demonslayer

    Demonslayer Water Chip? Been There, Done That

    968
    Aug 8, 2005
    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.
     
  15. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    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.

    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.
     
  16. TF

    TF First time out of the vault

    65
    Jan 6, 2005
    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.
     
  17. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    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(); }
    }
     
  18. Jesterka

    Jesterka Water Chip? Been There, Done That

    912
    Mar 16, 2006
  19. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    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?
     
  20. Jesterka

    Jesterka Water Chip? Been There, Done That

    912
    Mar 16, 2006
    *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?