Fallout 2 mod FO2 Engine Tweaks (Sfall)

Josan12

There is nothing complicated.

Make a window through the say function. The response "remove the weapons."

When you click to install set_global_var (GVAR_REMOVE_WEAPON, 1);

In the scripts to parties, to add to critter_p_proc.

if global_var (GVAR_REMOVE_WEAPON) == 1 then remove the weapons in the inventory.

Code:
When you click to remove weapons

//remember the PID object of his right hand
set_local_var (LVAR_GET_CURRENT_WEAPON_1, critter_inven_obj (self_obj, INVEN_TYPE_RIGHT_HAND));
//remember the PID object left hand
set_local_var (LVAR_GET_CURRENT_WEAPON_2, critter_inven_obj (self_obj, INVEN_TYPE_LEFT_HAND));

//remove weapons
inven_unwield (self_obj);

When you click "take arms"
//give weapons to the right hand
wield_obj_critter (self_obj, LVAR_GET_CURRENT_WEAPON_1);
//give weapons to the left hand
wield_obj_critter (self_obj, LVAR_GET_CURRENT_WEAPON_2);

There is a chance that this code will work. :D
[/quote]
 
Thanks for the description, Jordan, but i'm really a noob at scripting and it takes me days to figure out how to do even really basic stuff. Could you (or someone) give me more basic information such as what scripts to edit, and what proc it goes under, etc etc??
 
Josan12

This is a simple example script.

acklint.ssl

#include "..\headers\define.h"

#define NAME SCRIPT_ACKLINT

#include "..\headers\command.h"
#include "..\headers\ModReact.h"

procedure start;
procedure critter_p_proc;
procedure pickup_p_proc;
procedure talk_p_proc;
procedure destroy_p_proc;
procedure look_at_p_proc;
procedure description_p_proc;
procedure use_skill_on_p_proc;
procedure damage_p_proc;
procedure map_enter_p_proc;

procedure Node998;
procedure Node999;

procedure Node001;

#define LVAR_Herebefore (4)
#define LVAR_Hostile (5)
#define LVAR_Personal_Enemy (6)
#define LVAR_GET_CURRENT_WEAPON (7)

procedure start begin
end

procedure map_enter_p_proc begin

//In the hand already have the spear.

//Stored in local variable weapons from their hands.
set_local_var(LVAR_GET_CURRENT_WEAPON, obj_pid(inven_cmds(self_obj, INVEN_CMD_INDEX_PTR, 0)));
//Remove weapons.
inven_unwield(self_obj);

end

procedure critter_p_proc begin
/*
Assign condition.
For example to remember in a global variable and check the value 0 or 1.
If 0 do nothing.
If 1 then give the weapons.
If 2 then remove the weapons.
if (condition that you assign.) then begin
//Give weapon
wield_obj_critter(self_obj, obj_carrying_pid_obj(self_obj, local_var(LVAR_GET_CURRENT_WEAPON)));
end
*/
end

procedure damage_p_proc begin
end

procedure pickup_p_proc begin
end

procedure talk_p_proc begin
start_gdialog(NAME,self_obj,4,-1,-1);
gSay_Start;
call Node001;
gSay_End;
end_dialogue;
end

procedure destroy_p_proc begin
end

procedure look_at_p_proc begin
end

procedure description_p_proc begin
script_overrides;
end

procedure use_skill_on_p_proc begin
end

procedure Node998 begin
end

procedure Node999 begin
end

procedure Node001 begin
//We give up arms that we remember.
wield_obj_critter(self_obj, obj_carrying_pid_obj(self_obj, local_var(LVAR_GET_CURRENT_WEAPON)));
end
 
Howdy, Im having crashes when leaving arroyo when I use version sfall 1.44c with megamod 2.34
When I use the sfall that came with megamod version 1.29 it doesnt crash. I already cahnged the city limit to 1 and still crashes. Can someone please help me out? or should I just use the version that came with megamod?
Here are the steps I've taken prior to the crash.
Installed fresh fallout 2
installed MM 2.34
installed sfall 1.44c
installed reso patch 2.1
changed some maps to widescreen {Arroyotemple,arryo bridge, caves0-7, mountaints0-4 and tribalmap.}
 
Clg•Seed said:
Howdy, Im having crashes when leaving arroyo when I use version sfall 1.44c with megamod 2.34
When I use the sfall that came with megamod version 1.29 it doesnt crash. I already cahnged the city limit to 1 and still crashes. Can someone please help me out? or should I just use the version that came with megamod?
Here are the steps I've taken prior to the crash.
Installed fresh fallout 2
installed MM 2.34
installed sfall 1.44c
installed reso patch 2.1
changed some maps to widescreen {Arroyotemple,arryo bridge, caves0-7, mountaints0-4 and tribalmap.}

Did you overwrited both files with the newest sfall?

You must copy only ddraw.dll and the copy the lines from the latest ddraw.ini that are not present in the one that the Megamod uses.

This way you'll have the latest sfall with the settings required for the Megamod.
 
*Updated Post

Well It worked thanks alot, It seems I get the crash because of this line:
From 1.44c
;Set to 1 to use the fallout 1 code to control world map speed
WorldMapFPSPatch=1

;Controls the world map speed if WorldMapFPSPatch is 1. Higher values cause slower movement
WorldMapDelay2=66
Original Line from MM Sfall 1.29:
;World map travel time percentage modifier
;Modifies how fast in game time passes while you're moving around the map screen without affecting encounter rate
;The pathfinder fix needs to be turned on for this to work
;100 is normal speed, 0 stops time from passing
WorldMapTimeMod=100

Used winmerge and this is the only line I havent copied.
 
I posted this in Restoration project topic so you may have missed it :

Timeslip said:
IanZ said:
ITEM HIGHLIGHTS!!!
You're asking for something that already exists. sfall already lets you assign a key to toggle item highlights. (edit: although not in the version included in 1.2, so you'd have to update it yourself. 1.3 presumably will.)

Wow, thats a great feature! I did not know about it even thought I have been following sfall development closely.

;A key to press to toggle the highlighting of all items on the ground on the current map
ToggleItemHighlightsKey=42

I'll wait for RP 1.3 for my next replay but what key is 42 on keyboard? Also would it be possible to implement this feature to sfall for fallout 1 also (currently replaying it)?
 
Hey Timeslip, did you see this thread:

http://www.nma-fallout.com/forum/viewtopic.php?p=679825#679825

???

Would it be possible for you to add an option in sfall that makes all non-robotic critters drop their weapons as per the following script when killed/KO'd??

Code:
procedure destroy_p_proc begin

variable poop := 0;
variable pooper := 0; 

poop := critter_inven_obj(self_obj, 1);
pooper := tile_num_in_direction(tile_num(self_obj), random(0, 5), random(1, 2));
rm_obj_from_inven(self_obj, poop);
move_to(poop, pooper, elevation(self_obj));
 
@Josan12: As we discussed, that current code only removes the item from the right hand when the critter is killed. I gave you the other codes if you want the game to check if the critter is unconscious.
 
1.45 is up.

>Added a new hook script, hs_combatdamage
>Added 3 new script functions: remove_script, set_script and get_script
>Fixed the vanilla fallout bug where an instadeath critical hit for no damage wouldn't run the critter death function
>Fixed issue with the initilization function of most hook scripts not being rerun on player reload
>Added an extra check to try and fix WorldMapFPSPatch crashes

The new hookscript is run whenever an attack hits in combat, and lets you change damage and critical effect flags. (And also to apply damage and effect flags to the attacker, if you want to make tesla armour that reflects lasers or something.)
 
I don't know if it's just my computer problem, but whenever I select ddraw.dll (1.45) trying to do something (right click, copy, etc), my explorer.exe always hangs with 100% CPU usage. I've checked that my PC has no virus/trojans, still can't figure out how this happened. The 1.44c dll from Megamod 2.35 doesn't have any problem.
My system is WinXP Pro SP2 (US English) with Japanese MUI (for some personal reasons).

EDIT: I did some tests, the problem seems have something to do with multi-byte character MUI, my laptop is with the same OS but without Japanese MUI, and it didn't have any problem. Two of my friends has Japanese/Chinese MUI and they both have the same explorer.exe halted problem.
 
Hello Timeslip.

You can add a new function.

void set_spatial_script (obect ptr);

Sample
set_spatial_script (self_obj);

spatial script you can assign only the map and spatial_p_proc will work. This is not convenient. And by using the spatial scripts are created dynamically.
 
1.45b is up.

>Added an option to prevent fallout from hogging the processor
>Fixed get_script still returning a script after calling remove_script
>set_script can now be used on objects that are already scripted
set_script just calls remove_script itself if used on something that's already scripted, so it's not really much of a change. Just saves a line of script.

NovaRain said:
No idea what's going on there. Sounds like a windows bug...

Jordan said:
Sorry, but I'm not sure what your asking for. You want to associate an object with a spacial script for some reason? Or create new spacial scripts? Or something else?
 
Timeslip said:
1.45b is up.
NovaRain said:
No idea what's going on there. Sounds like a windows bug...
Strange, 1.45b is OK....oh well, probably some weird behavior of Asian MUI I guess. :oops:
BTW, will Win9x version be updated to 1.45 as well?
 
Jordan писал(а):
<snip>

Sorry, but I'm not sure what your asking for. You want to associate an object with a spacial script for some reason? Or create new spacial scripts? Or something else?

Yes. But to create them through scripts. Standardly they are created in mapper2.

I realise mines in game. A problem that mines correctly work if are created in mapper2 as spatial a script.

Whether probably to make that spatial a script were created during game?
 
1.46 is up.
>13 new script functions related to a virtual filesystem
>Added a new hook script hs_ondeath
>Added a new option 'GPUBlt' to speed up rendering in dx9 graphics modes by 3-4x
>Using graphics mode 4 or 5 with an out of date version of DirectX now displays a useful error message instead of crashing

The new GPUBlt setting is mainly designed for people using the res patch; it's 3-4x faster than sfall's old rendering method if sfall's output resolution matches fallout's internal resolution. It isn't compatible with scale filters or texture filters, but if you're playing at high resolutions with the res patch you wont need them anyway. You can still use it if sfall is set to a higher resolution than what fallout is spitting out, but you'll lose some of the speed advantage. (Probably still 2x as fast as the normal rendering method though.)
 
Uh, Timeslip, this might not be important, but the explorer.exe hanging bug I mentioned above backs again... :oops:
Guess I should wait for 1.46b to see if everything is normal again...
 
@ Timeslip:

1) Did you see my previous post asking if you think it would be possible to use sfall to make human critters drop their weapons when killed or KO'd??

2) Also - a seperate question: would it be possible to use sfall to make the player critter display a different animation when hit for 0 damage? i ask because i am considering making a different 'hit' animation for the player where the critter casually shrugs off the pathetic 0 damage hit inflicted on them rather than displaying the dramatic 'bends-over-backwards-hit-for-six' animation. :D

3) Also - can you (or anyone else) offer help as to how to put a new button into the character creation screen??

Thanks
 
Josan12 said:
1) Did you see my previous post asking if you think it would be possible to use sfall to make human critters drop their weapons when killed or KO'd??
Script it.

Josan12 said:
2) Also - a seperate question: would it be possible to use sfall to make the player critter display a different animation when hit for 0 damage? i ask because i am considering making a different 'hit' animation for the player where the critter casually shrugs off the pathetic 0 damage hit inflicted on them rather than displaying the dramatic 'bends-over-backwards-hit-for-six' animation. :D
Possibly. I'll need to look.

Josan12 said:
3) Also - can you (or anyone else) offer help as to how to put a new button into the character creation screen??
Not me.
 
Back
Top