Fallout 2 mod FO2 Engine Tweaks (Sfall)

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

  1. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    Quick public service note: As of today, the fallout 2 installer on GOG bundles sfall 2.19. the colour fix is handled by launching via a wrapper program, which kills explorer (i.e. not using sfall or the 256 colour option) so there will no longer be those compatibility mode errors when installing the unofficial patch/rp or fps issues when installing the high res patch. Things like item highlight that affect gameplay are disabled by default. The critical hit table fixes are also disabled by default, because 2.19 broke critical hits against horrigan and I didn't quite get 2.20 out in time.

    Also, looking through ddraw.ini to see exactly what they'd done has just made me cringe at all the spelling mistakes and other typos in there... :oops:
     
  2. gvx

    gvx First time out of the vault

    86
    Apr 4, 2008
    TO Timeslip
    sFall 2.20
    Criticals.cpp
    Line 96 undefined "slot"


    #ifdef TRACE
    char logmsg[256];
    if(critTable[slot].values!=defaultTable[slot].values) {
    sprintf_s(logmsg, "Entry %s value %d changed from %d to %d", section, i, defaultTable[slot].values, critTable[slot].values);
    dlogr(logmsg, DL_CRITICALS);
    }
    #endif
     
  3. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Just a wild guess, at least it passes the compiler check :P
    Code:
    Line 96: if(critTable[slot2].values[i]!=defaultTable[slot1].values[i]) {
    Line 97: sprintf_s(logmsg, "Entry %s value %d changed from %d to %d", section, i, defaultTable[slot1].values[i], critTable[slot2].values[i]);
     
  4. Lexx

    Lexx Background Radiant
    Moderator Modder

    Apr 24, 2005
    Did they messaged you or did you found out by "accident" that it's used now? Just curious. :>

    Btw. there was at least one other bug in Sfall, which Helios fixed for me long time ago. I don't think he added it to the repository, but I am not sure. Thing is, I forgot *what exactly* it was, but I seem to remember a problem with the status change of get_game_mode.

    The very first time when you check for if the player is on the worldmap or anywhere else, the status wasn't set to "1" (worldmap), even though the player was. It only worked the second time you entered the worldmap screen.

    Can you check this out? I would like to update my ddraw.dll, but currently I can't, as I use a custom one and my scripts would get buggy again if I ignore this.

    Though, I could also send you my ddraw.dll if that helps.
     
  5. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    @gvx thanks. I didn't make a new modders pack version, so I hadn't compiled with TRACE set. NovaRain's fix is correct.

    @lexx
    They asked first, and took my advice about setting it up too.

    I remember you mentioning that problem before. I couldn't replicate it at the time, and I still can't now... I tried global script types 1 and 3, and getting onto the world map by walking or by the world_map function, and everything worked... (See my code below) You can try this dll and see if it helps, but it's a bit of a stab in the dark. If that doesn't work, you're going to have to show me the script that's failing for you...

    Code:
    variable wmap, down;
    
    procedure start begin
    	if (game_loaded) then begin
    		set_global_script_repeat(1);
    		set_global_script_type(3);
    		down:=0;
    		return;
    	end
    	if(in_world_map) then begin
    		if(not wmap) then begin
    			wmap:=1;
    			display_msg("Entered world map");
    		end
    	end else begin
    		wmap:=0;
    	end
    
    	if(key_pressed(29)) then begin
    		if(not down) then begin
    			down:=1;
    			world_map;
    		end
    	end else begin
    		down:=0;
    	end
    end
     
  6. Ardent

    Ardent A Smooth-Skin
    Modder

    678
    Jul 24, 2009
    I can confirm the bug. I tried to make my movie-displaying global script work (mentioned a few posts earlier) and I finally succeeded, but for me too, the game only sees that you're in the world map when you enter it for the second time.
    As for the script structure, it is identical to the example you posted above, except I'm displaying videos instead of flipping variables.
     
  7. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    How weird. :/ Did you try it with that test dll I posted above?
     
  8. Ardent

    Ardent A Smooth-Skin
    Modder

    678
    Jul 24, 2009
    Not yet. I'll test that asap and get back to you.

    BTW, I also have a different problem now. Whenever I display a movie, a distorted image of the world map remains in the center of the screen, obscuring the movie. I tried using gfade_out() before playing the movie, hoping it would refresh the screen or whatever, but it didn't help. Are you aware of any way of hiding the worldmap image when displaying the movie? Maybe something like that could be introduced as a new sfall feature?

    EDIT: OK, now it works fine with the new DLL. Thanks, Timeslip! Anything you can do about the world map displaying over the video?
     
  9. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    I don't think I've ever tried displaying a movie on the world map... I need to head to work now, but I'll check tonight. Are you playing a normal fallout movie? I suspect playing back an avi instead would work.

    yay. :)

    ok, that fix'll be in the next release then.
     
  10. Ardent

    Ardent A Smooth-Skin
    Modder

    678
    Jul 24, 2009
    I wanted to emulate Hakunin dream sequences, but I need more control over when the movie is displayed. Yes, I was using normal Fallout .mve format movies. I'll try with an AVI and edit this post with the result. Have a nice day at work then :)

    EDIT: OK, .avi movies display fine, but turning on sfall's DX9 mode (with pixel scaling and everything) and enabling Mash's fog of war settings on the HiRes patch default mode makes the game run very, very slowly and choppy.
    I suppose it would be easier for Mash to add .avi support on his patch, rather than having sfall interact with it, wouldn't it? :look:
     
  11. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    Yup, same complaint as normal. sfall's dx9 graphics mode and the res patch really don't play nicely together. I think I'm going to have a bit of a clear out of the graphics code, put gpublt on by default, and see if I can make it behave itself a little better.

    Actually, while I'm having a clearout, I may as well get rid of some of the other pointless cruft too. Unless anyone speaks up in their defence, the following features that afaik aren't in common use (or in any sort of use at all...) are going to go missing next version:
    upscaling filters
    ddraw.ini defined global shader (besides, someone could do the same thing via script, if particularly desperate)
    the fake multiplayer
    the update check
    versions of the world map speed patch other than the one that's on by default

    Anything else that could do with being dumped?

    I doubt mash would want to add avi support to the res patch; that would require bringing in a whole pile of extra stuff. The wacky graphics stuff that no-one actually uses can be left to sfall. I'll see if I can get the normal movies to behave.



    I've added set_critter_skill_points and get_critter_skill_points script functions. They work on the number of extra points that have been put into a skill, and ignore the extras from stats, difficulty level and other bonuses. You can compare the result of get_critter_skill_points to the normal function that gets a critters skill to work out what any current bonuses are.

    That's a mistake in the documentation. That function is for capping the skills of a critter below 300. There's no mod parameter. :/
     
  12. Ardent

    Ardent A Smooth-Skin
    Modder

    678
    Jul 24, 2009
    You're a charm, Timeslip. ;)

    I admit that I never used any of these personally. :look:

    I e-mailed Mash with the question, let's see what he says.
     
  13. NovaRain

    NovaRain Casual Modder Modder

    Mar 10, 2007
    Do you mean those marked as "OBSOLETE" in pre-2.7 ini but still can be enable manually?
     
  14. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    Yup
     
  15. Sduibek

    Sduibek Creator of Fallout Fixt Moderator Modder

    Oct 27, 2010
  16. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    ok, with the high res patch at 1280x1024 I'm at 200fps with gpublt off and 250 with it on... And that's before I've actually done what I was intending to do to speed it up. So what's peoples problems with poor fps? What on earth sort of resolutions do you play at? O.o

    Sure. That's the preferred place to dump them actually, so that when I vanish for 6 months they don't get lost in the middle of the thread. :p
     
  17. Ardent

    Ardent A Smooth-Skin
    Modder

    678
    Jul 24, 2009
    I'm playing at 1280x800, but large resolutions aren't necessarily the core of the problem. The game runs fine on small maps, such as random encounter maps and typical F2 maps. However, the HiRes patch for Mapper enables you to build much bigger maps, because you can now access all 40000 hexes. In MR, we have plenty of very big maps with plenty of details (scenery), and on these maps, the game is at about 15-20 FPS for me.
    It could also be my old shitty computer slowing things down. :look:

    Turning on the gpublt improves things, so the game is slow, but playable.
     
  18. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    That's very weird. While it's certainly true that a larger map will reduce fps, sfall has to do the same amount of rendering work regardless of what fallout is doing, so if your fps hit was coming solely from a larger map, gpublt shouldn't make any difference to it. :/

    Still slowly working my way through the backlog. I've done both of these now. (the new mod_skill_points_per_level and set_perk_freq script functions) I also added get/set_available_skill_points, because why the heck not. (I know get was already possible with get_pc_stat, dunno if there was already some way of setting them...)
     
  19. Ardent

    Ardent A Smooth-Skin
    Modder

    678
    Jul 24, 2009
    I'm not an expert, so I can't really pinpoint the causes of low FPS. But I'll try to run some more number-based tests with different configurations of sfall and hires patch and let you know if I find anything worthwhile.

    Thank you very much! I know you've heard it a thousand times, but I'm going to say it all the same - you're awesome :)
     
  20. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    This appears to be a bug in the high res patch. With it uninstalled, playing movies on the world map works fine, regardless of the graphics mode sfall is using. With it installed, the world map displays on top of the movie even at a 640x480 resolution.

    I think Mash will have to fix that one.

    Fixed.