Fallout 2 mod FO2 Engine Tweaks (Sfall)

Is somehow possible to modify dude skills? There is an original FO2 function critter_mod_skill. But it does not work with negative values (-20, MAXINT - 20). They are treated as positive ones. I need to add +10 to all dude skills and then revert them back if some condition passes. And it is possible to modify only 2 skills per perk(using more perks causes they are all visible in the CHAR screen).

In sfall function list there is some function set_critter_skill_mod(CritterPtr, int max, int mod).
But it does not accept 3 arguments (script editor throws an error), it accept only first 2.

So i've found memory offsets of all skills via Cheat Engine. It changes skill values reliably.

Small guns are 0051C4AC and every next 4 bytes are next skills up to 0051C4F0 - Outdoorsman.

So I changed my ddraw.dll to debug one and added to ddraw.ini (is it really needed to use debug version of sfall?)
[Debugging]
...
AllowUnsafeScripting=1
...

And tried in critter_p_proc in obj_dude
write_int(5358764, 10); // should change Small Guns to minimum by SPECIAL + 10 but it does not work
display_msg("value: " + read_int(5358764)); // it does not display anything :-/

I've also tried read/write_byte. Does somebody(Timeslip? :))) have an idea where the mistake is? Thanks.

EDIT: It seems those offset functions do not work for me. I have the latest sfall and script compiled with Script Editor from the latest modders pack.
EDIT2: I've compiled sfall and removed that #ifdef TRACE before bool AllowUnsafeScripting... and now it seems to work properly even in non debug version of sfall.

It seems that "AllowUnsafeScripting" options should be in the Misc section instead of Debug section as it is in ddraw.ini in debug version of sfall in modders pack.
 
Killap: For the Educated Perk. I think It can be repaired by a global script. Maybe i will try it someday. But I'm afraid that script added points will display after CHAR screen is reopened again. Even the perk is confirmed after closing CHAR screen (it can be canceled).
 
Swift Learner doesn't change the display of experience earned in message window.

For example killing rats it says 25 points even though you're getting 26 (rank 1) or 27 (rank 2).

Is this something that can be fixed through Sfall?

EDIT: nevermind, Nirran made a script for this.
 
sea:
You can get rid of that funky colours by setting 16/32-bit colour mode in High-Res patch, while sfall is running in a default 8-bit graphics mode.
If you are running sfall in one of DX9 modes, try to turning on GPU blitting function in sfall's settings.
 
Has anyone got play_sfall_sound and stop_sfall_sound to work? I can't get it working. I'll ask the guys on my team as well. Is this bugged / disabled due to lack of interest? or am I being stoopid.
 
Dude101 said:
Has anyone got play_sfall_sound and stop_sfall_sound to work? I can't get it working. I'll ask the guys on my team as well. Is this bugged / disabled due to lack of interest? or am I being stoopid.
Do you have AllowDShowSound=1 in the [Sound] section of ddraw.ini? hmm... actually, looking at the code, that should only be needed for replacing existing sound files with other formats. What does the script that you're trying to call it with look like?
 
Timeslip said:
Dude101 said:
Has anyone got play_sfall_sound and stop_sfall_sound to work? I can't get it working. I'll ask the guys on my team as well. Is this bugged / disabled due to lack of interest? or am I being stoopid.
Do you have AllowDShowSound=1 in the [Sound] section of ddraw.ini? hmm... actually, looking at the code, that should only be needed for replacing existing sound files with other formats. What does the script that you're trying to call it with look like?

Code:
variable playing_music;

procedure spatial_p_proc begin
   if (source_obj == dude_obj) then begin
      if (playing_music == 0) then begin
         playing_music:=1;
         play_sfall_sound("data\sound\SFX\piano10.mp3",0);
         add_timer_event(self_obj,game_ticks(3),0); //the event resets var playing_music to 0, to prevent stacking
      end
   end
end

I placed a spatial script at the entrance to a bar, as I you want the sound to play when the Player enters the joint. The mp3 file is located in data/sound/SFX. AllowDShowSound=1 is in effect.
 
Dude101 said:
"data\sound\SFX\piano10.mp3"
You need to escape your backslashes. \n is a newline, \t a tab, \\ is a backslash.

Although \s and \p are meaningless, so you should be getting 'Unrecognised escape character '\s' on line xxx' warnings. Do you have warnings disabled?
 
Timeslip said:
Wild_qwerty said:
Timeslip, do you think it would be possible to add new weapon types to fallout? Or even new attack modes?
I think I know enough about weapon types to make an attempt at it, at least. New attack modes are less likely. :P

In any case, I'd prefer to work on one thing at a time. I'm waiting until elevators are tested properly before starting on something new, or I wont know which part is causing problems if any pop up.

taag said:
Yeah, someone should help you. It's unrealistic to expect everything to be done just by you. You have open sourced it, so was there any success with that?
The rain mod isn't built into sfall, it's just a normal fallout mod that uses sfall script functions. Not really much there to open source. :P

But yes, quite a few people have submitted modifications to sfall. Check the credits in the readme.

taag said:
P.P.S. I have some requests: is it possible to re-enable or implement again the "Tell me about" feature from Fallout 1? And is there a way to get back the Night Person trait?
Tell me about, not really. At least, not in the immediate future.

Night person was included in JOG's modified version of my extra traits mod. The link seems to be dead now though, and I don't have a copy. I can add it to the official version easily enough; what are the hour ranges for the bonus?

Can you tell me about Night person code in gltschardev.ssl?
 
Hello again. I have a request for sfall, something which is probably a bug report and a question:

REQUEST: Is it possible to change the number of Skill Points gained per level via Perks.ini? Or alternatively, the number of Levels you get a Perk at?
I would like to mod Gifted, so that you get Perks every 4 levels, instead of every 3 levels. I was thinking to use Skilled (because it has the appropriate effect) and simulate Gifted with the options available in the Perks.ini, but Skilled gives you +5 Skill Points, while Gifted should give you -5 skill points. That's 10 points difference and it breaks the idea.

BUG REPORT: I was fiddling with the command force_aimed_shots(), giving aiming options to a couple of weapons that normally don't have it (because e.g. they deal explosive or fire damage). When I did that, most other weapons lost the ability to do called shots, despite normally having it.
Initially, it only affected a couple select weapons (e.g. I gave aiming capabilities to a thrown explosive weapon and all thrown weapons lost the ability to make called shots), so I just remedied the problem by using the force_aimed_shots() command on the rest of the affected weapons. I also experienced a reverse effect - e.g. I made a melee weapon dealing fire damage and I gave it the option to make called shots. After that, a couple of other weapons dealing fire damage also got the ability (e.g. a flare gun), although I didn't intend them to.
Now I'm in a bit of a mess, because ever since I added a couple more special "aimed" weapons to the list, the effect of disabled called shots extended on virtually every weapon in the game, including unarmed blows. The only exceptions are weapons included in the "force_aimed_shots" list.
Before you ask, no, I didn't play a character with Fast Shot :P

QUESTION: I want to play some movies while the player is travelling on the world map (like Hakunin's dream sequences really), but I don't want just to replace the original Hakunin sequences, because I need more control over what is being displayed and when (the displaying of the movies depends on the Player's actions and in some cases, the movies may not be displayed at all or sometimes they may be delayed). I wrote a global script for that, but it doesn't seem to work. Here's my code, can you please tell me if I got the conditions right? Maybe you can offer some insights on what I'm doing wrong?

EDIT: Aw, crud. Why don't the code tags work? Every time I put some <> brackets, it ignores what's between them and displays the whole thing wrong. :evil:

Let's try this anyway:

Code:
procedure start; 

#include "..\HEADERS\sfall.h" 
#include "C:\Gry\Fallout 2\Fallout 2 Mapper\scripts\HEADERS\DEFINE.H"
#include "C:\Gry\Fallout 2\Fallout 2 Mapper\scripts\HEADERS\COMMAND.H"

#define NAME                    SCRIPT_GLMOVIES

/* aditional headers here */ 

procedure start begin 
   if (game_loaded) then begin
      set_global_script_type(2); //only works on world map
   end
   else begin
      //Dude must be on the world map, and Cassidy hasn't been saved
      if ((in_world_map == true) and (global_var(GVAR_CASSIDY_STATUS) < 6)) then begin 	 
   	  	 if ((game_time *is_greater_than* global_var(GVAR_HEART_TIME_LIMIT1)) and (global_var(GVAR_CASSIDY_STATUS) *is_lesser_than* 2)) then begin
   	  	 	set_global_var(GVAR_CASSIDY_STATUS,2); //Cassidy's state deteriorates
   	  	 	play_gmovie(AFAILED_MOVIE);
   	  	 end
      end
   end
end

I'm very sorry for the weird replacement of the greater_than and lesser_than signs, but I wanted to paste the code here for convenience.
If you can offer any insights on how to make this work, I'd be grateful. Thanks in advance!
 
Sorry I've been away so long. Real life has been butting its head in far too often lately. (On the plus side, I'm now officially a doctor. :) )

I've made a quick update to sfall to fix critical hits against horrigan and the player. I also disabled the update check, since sfall is updated so infrequently these days. I'll try and work my way through the more recent requests/bug reports in this thread sometime soon...
 
Timeslip, is this possible?

When you start Fallout, and then press Load Game, the default selected save slot is always slot 1.
How about you make it so, that the default selected save slot would be the last changed savegame, that is, which date is closest to current date?
That way, it would be easier to determine which was the current savegame. I always keep forgetting that.
 
Sduibek said:
Timeslip, is this possible?

When you start Fallout, and then press Load Game, the default selected save slot is always slot 1.
How about you make it so, that the default selected save slot would be the last changed savegame, that is, which date is closest to current date?
That way, it would be easier to determine which was the current savegame. I always keep forgetting that.

Savegames display the in-game date and hour - you can easily determine the last save by this (unless you reloaded an earlier savegame and didn't get to some point in time that your bad save game was at or whatever)
 
Ardent said:
Sduibek said:
Timeslip, is this possible?

When you start Fallout, and then press Load Game, the default selected save slot is always slot 1.
How about you make it so, that the default selected save slot would be the last changed savegame, that is, which date is closest to current date?
That way, it would be easier to determine which was the current savegame. I always keep forgetting that.

Savegames display the in-game date and hour - you can easily determine the last save by this (unless you reloaded an earlier savegame and didn't get to some point in time that your bad save game was at or whatever)
Of course, but what the user was saying is if it's possible for the game to automatically select (jump to) the most recent one instead of having to scroll down when loading a fresh instance of the exe. I think it's a pretty cool idea.
 
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:
 
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
 
Back
Top