Fallout 2 mod FO2 Engine Tweaks (Sfall)

What I mean is, the 1st post brings the new that the engine was tweaked to use mouse scroll at inventory, etc. After that, follows the discussion. Then I asked (or meant to ask): are the tweaks in the 1st post the only ones existing? Or did the modders, inspired by this, try and create new tweaks to the engine?

If so, I suggested these new aditional tweaks be listed in 1st page; if not, nevermind. In any case, congrats for any acomplishments and thanks for all your efforts in making Foullout greater and greater.
 
the mod can be found here http://sourceforge.net/projects/sfall/ and it contains a readme that has a changelogg,the mod has lots of features not mentioned on page 1

edit : not ment to undermine your post,it is a good idea

edit : tried art_anim(obj_art_fid(critter)) for the attack animations,but it always returns standing as this is calculated before the attack happens,boo hoo

edit : what bits hold the number that is returned with get_kill_counter(xx) that is displayed in the kill counter frame of the ui?reason i ask is some of them will change dependant on some other kill_type,for instance with this code both alien and ant kill types go up in value when an ant is killed

Code:
         if((get_sfall_global_int("perk0187") == 1) and (get_kill_counter(Kill_Type_Aliens) > get_sfall_global_int("kills_16"))) or ((get_sfall_global_int("perk0187") == 0) and (metarule3(103,KILL_TYPE_alien_kills,0,0) > get_sfall_global_int("kills_16"))) then 
            begin 
               if(get_sfall_global_int("perk0187") == 0) then 
                  begin
                     set_sfall_global("kills_16", metarule3(103,KILL_TYPE_alien_kills,0,0));
                  end 
               else 
                  if(get_sfall_global_int("perk0187") == 1) then 
                     begin 
                        set_sfall_global("kills_16", get_kill_counter(Kill_Type_Aliens));
                     end 
               set_sfall_global("perk1944", (get_sfall_global_int("perk1944") + 1));
               if(not(has_fake_perk(AlienExpert))) then 
                  begin                                                                                             
                     if(get_sfall_global_int("perk1944") == get_sfall_global_int("perk1842")) then 
                        begin
                           float_msg(dude_obj, "You are eligable for the Perk " + AlienExpert, 9);                                                             
                        end  
                  end 
               else 
                  if(has_fake_perk(AlienExpert)) then 
                     begin                                                                                             
                        give_exp_points(get_sfall_global_int("perk1815"));                                                                                       
                        display_msg("You gain " + get_sfall_global_int("perk1815") + " experience from " + AlienExpert +" perk."); 
                     end
               //display_msg("kill count Alien " + get_sfall_global_int("kills_16") + " kill count global " + get_sfall_global_int("perk1944") + " kill needed " + get_sfall_global_int("perk1842")); 
            end
         if((get_sfall_global_int("perk0187") == 1) and (get_kill_counter(Kill_Type_Giant_Ants) > get_sfall_global_int("kills_17"))) or ((get_sfall_global_int("perk0187") == 0) and (metarule3(103,KILL_TYPE_giant_ant_kills,0,0) > get_sfall_global_int("kills_17"))) then 
            begin 
               if(get_sfall_global_int("perk0187") == 0) then 
                  begin
                     set_sfall_global("kills_17", metarule3(103,KILL_TYPE_giant_ant_kills,0,0));
                  end 
               else 
                  if(get_sfall_global_int("perk0187") == 1) then 
                     begin 
                        set_sfall_global("kills_17", get_kill_counter(Kill_Type_Giant_Ants));
                     end 
               set_sfall_global("perk1945", (get_sfall_global_int("perk1945") + 1));
               if(not(has_fake_perk(AntExpert))) then 
                  begin                                                                                             
                     if(get_sfall_global_int("perk1945") == get_sfall_global_int("perk1871")) then 
                        begin
                           float_msg(dude_obj, "You are eligable for the Perk " + AntExpert, 9);                                                             
                        end   
                  end 
               else 
                  if(has_fake_perk(AntExpert)) then 
                     begin                                                                                             
                        give_exp_points(get_sfall_global_int("perk1844"));                                                                                       
                        display_msg("You gain " + get_sfall_global_int("perk1844") + " experience from " + AntExpert +" perk."); 
                     end
               //display_msg("kill count Ant " + get_sfall_global_int("kills_17") + " kill count global " + get_sfall_global_int("perk1945") + " kill needed " + get_sfall_global_int("perk1871")); 
            end

perk0187 is ExtraKillTypes in ddraw.ini,kills_16 and kills_17 are required for the perk to be selectable

Nirran
 
A request for Timeslip.

I have done some modding of maps with the Fallout mapper. It is obvious to anyone who has used it extensively that the mapper and hence the games engine has more than its fair share of flaws. One critical problem deals with the number of animated objects (Animate Forever script), or critters, each map (including all of the elevations) can animate at one time. The limit is 20. Therefore if you have for instance 18 animated scenery pieces on a map, a maximum of 2 further critters will be able to animate themselves - i.e. walk, scratch, fumble, etc. The rest will remain frozen to the floor, including NPC’s, even if the PC travels over the map any NPC’s over the 20 limit will remain frozen in the one spot (this excludes combat). The critters will take it in turns to cycle through their animations.

Normally this wouldn’t be considered a serious problem, but in RP 1.3 there has been a major rebuild of all the maps. I have no knowledge of programming, scripting, etc, this might be a simple case of adjusting caching, but can you please have a look into the mapper and see if you can overcome this problem.

An easy way to test this is to use the scenery artwork (1187 – steam) and apply the script - Animate Forever, lay down 20 steams and then add a few extra. Thanks…
 
Nirran said:
edit : what bits hold the number that is returned with get_kill_counter(xx) that is displayed in the kill counter frame of the ui?reason i ask is some of them will change dependant on some other kill_type,for instance with this code both alien and ant kill types go up in value when an ant is killed
Sorry for the late response, I only just saw your edit.

It's a typo in the version of the get_kill_counter function that gets used when extra kill types is enabled. (and in the mod_kill_counter function, too.) There's an e in there that shouldn't be, which is causing the counters to overlap. It'll be the low order bits that hold the actual value, so you can use the fallout script equivalent of 'var & 0xffff' to get the actual value back out. I'll get that fixed for the next release.

That's been in there ever since I first added the option to add extra kill types, however many years ago. Looks like you're the first one to actually use it. :P (Edit: Or the first to try and read the kill counters from a script while using it, at least.)
 
Nirran said:
edit : to_hit hook script get_sfall_arg; returns -10 for attacker and 0 for target sfall version 2.2,set_sfall_return works right
oh wow. For such a tiny little comment, that one is nasty.

On the bright side, you may have just found the cause of a lot of the more random problems with hook scripts. On the downside, it means that they're rather fundamentally broken, and short of rewriting the way fallouts scripting system works there's not much I can do about it.

It's basically a reentrancy problem. The on_hit hookscript runs, sets its arguments correctly, but then when fallout calculates the base hit chance it checks the players skills, which triggers the trait_adjust_skill hook script, which overwrites the old set of arguments. I can quite easily fix that specific case because the reentrancy problem is solely on sfalls side; the problem is other cases where a hook script is triggered from another script. e.g. if a critter is killed from a script, and hs_ondeath fires, it overwrites part of the state of the script that originally killed the critter. Much brokenness ensues.

The best I can do is to try and limit the problem by removing the hooks that it's possible to trigger from a script, and making the remaining ones reentrency safe. The hooks on trait_adjust_skill and trait_adjust_stat are going to have to go to start with, and I'll have to do some testing to see just what exactly I can get away with. (ondeath is one of the more commonly used ones, so I really don't want to have to dump it...)
 
Hey Timeslip,
Just curious if you are aware of the "bag" bug and whether you could find a solution or fix?

The bug basically has to do with how inventory is handled when the player has a bag(s) in their inventory and/or if it is in use (items are in the bag).

1- quest items are not removed from general inventory if they appear after a bag

2- quest items are not removed from bag inventory

That should be the extent of it but killap or others may be able to expand and/or clarify the bug better.
 
Glovz said:
Hey Timeslip,
Just curious if you are aware of the "bag" bug and whether you could find a solution or fix?
Yes, I am aware, and my preferred solution would be to remove bags from the game.

I've already let you attach voice files to combat floats and unhardcoded city reputations so far this week. Give me a bit of a rest. :P
 
Timeslip said:
Glovz said:
Hey Timeslip,
Just curious if you are aware of the "bag" bug and whether you could find a solution or fix?
Yes, I am aware, and my preferred solution would be to remove bags from the game.

I've already let you attach voice files to combat floats and unhardcoded city reputations so far this week. Give me a bit of a rest. :P

Agree with last bit.

Bags are nifty to have though.
 
2.3 is up.

>Added the ability to attach voice clips to floating text displayed in combat
>Added an option to override the hardcoded city reputations list
>New script function: get_attack_type
>Added a fix for the original engine issue that could prevent npc levelling with some party compinations
>Fixed reentrency problems in hook scripts
>Fixed the delay loading of d3dx, which became broken when I switched to the newer directx sdk.
>Removed the trait_adjust_* hook scripts, which were causing unfixable script corruption

To attach voice clips, add the file name into the second set of {}'s in the msg file just as you would for talking heads. It only works for combat messages atm, and the sound files have to be in the sfx folder rather than the npc's voice folder, since the folder name isn't attached to the floats.

The 'Added a fix for the original engine issue that could prevent npc levelling with some party compinations' refers to a fix for an issue that means that if an npc without AI data appears in your party list before another npc, that npc cannot level up. I'm not certain this is the problem that the megamod has with klint, because people have reported that sfall's option to remove random levelling fixes that issue, whereas it would have no effect on this one.
 
Timeslip said:
2.3 is up.

>Added the ability to attach voice clips to floating text displayed in combat
>Added an option to override the hardcoded city reputations list
>New script function: get_attack_type
>Added a fix for the original engine issue that could prevent npc levelling with some party compinations
>Fixed reentrency problems in hook scripts
>Fixed the delay loading of d3dx, which became broken when I switched to the newer directx sdk.
>Removed the trait_adjust_* hook scripts, which were causing unfixable script corruption

thnx Timeslip !!

Nirran
 
Thanks for upadte Timeslip. i see you recover files :)

New question:
Is it possible to save log to file?
I mean save to file all text from low left widnow like it is made in fonline by "F2" key.
 
questions :

what does get_attack_type return?

would it be possible to increase the amount of sfall globals from 16 bit to 32 bit?(i am assuming it is a 16 bit function)

would it be possible to add a function that loads the worldmap without the car?

your mod rules Timeslip,thanks much

Nirran
 
i think 2.3a either has a memory leak or something not right about the speed alteration function(s),i normally play at 350% of normal and running mostly the same sfall mods as pre-2.3a i experience some slow down of the game,it isn't that much,changes speed to about 150% of normal

at first i thought it was a mod or something i did,but with 2.2 and 2.1 with the same exact mods i dent experience the slowdown

thought you should know

edit : just removed all the global scripts and hook scripts from my script folder and tested,it does the same thing,odd it doesn't always do it though

Nirran
 
Nirran said:
what does get_attack_type return?
Haven't got a clue, you'll have to trial and error it.

Nirran said:
would it be possible to increase the amount of sfall globals from 16 bit to 32 bit?(i am assuming it is a 16 bit function)
And why would you assume they're 16 bit? In fact, the identifiers are theoretically 64 bit being 8 characters long, but since they're encoded as strings you're limited to a bit of a subset of what's really available. In any case, you really don't want to use too many sfall globals, because they're slower than the real thing, and will get progressively slower as you add more. They're only there as an emergency measure for adding extra globals to mods without requiring a game restart.

If you're going to be making heavy use of them then I'll need to replace the list they currently use with a hash map, which will stop them slowing down the more you add. (Something that I can do far more easily now that I've dumped win9x.)

Nirran said:
i think 2.3a either has a memory leak or something not right about the speed alteration function(s),i normally play at 350% of normal and running mostly the same sfall mods as pre-2.3a i experience some slow down of the game,it isn't that much,changes speed to about 150% of normal

at first i thought it was a mod or something i did,but with 2.2 and 2.1 with the same exact mods i dent experience the slowdown
Odd. The only thing that changed between 2.2 and 2.3 that would possibly hurt performance is the changes I made to the hookscript machinery, but since there are no hookscripts that get run every frame that shouldn't have any impact. I'll have to do some poking around myself.
 
Timeslip said:
Nirran said:
what does get_attack_type return?
Haven't got a clue, you'll have to trial and error it.

Nirran said:
would it be possible to increase the amount of sfall globals from 16 bit to 32 bit?(i am assuming it is a 16 bit function)
And why would you assume they're 16 bit? In fact, the identifiers are theoretically 64 bit being 8 characters long, but since they're encoded as strings you're limited to a bit of a subset of what's really available. In any case, you really don't want to use too many sfall globals, because they're slower than the real thing, and will get progressively slower as you add more. They're only there as an emergency measure for adding extra globals to mods without requiring a game restart.

If you're going to be making heavy use of them then I'll need to replace the list they currently use with a hash map, which will stop them slowing down the more you add. (Something that I can do far more easily now that I've dumped win9x.)

Nirran said:
i think 2.3a either has a memory leak or something not right about the speed alteration function(s),i normally play at 350% of normal and running mostly the same sfall mods as pre-2.3a i experience some slow down of the game,it isn't that much,changes speed to about 150% of normal

at first i thought it was a mod or something i did,but with 2.2 and 2.1 with the same exact mods i dent experience the slowdown
Odd. The only thing that changed between 2.2 and 2.3 that would possibly hurt performance is the changes I made to the hookscript machinery, but since there are no hookscripts that get run every frame that shouldn't have any impact. I'll have to do some poking around myself.

maybe it is the amount of globals im using then causing the slowdown,tho it doesnt always happen,reason im using that many globals is im trying to make my perk script sompletly customizable with an ini file,letting the user set them any way he/she wants,would appreciate it if you would do the hash thing you talked about(tho i dont have a clue what you are saying heh) anyway,thnx for the response

edit : maybe im wrong about the globals causing the slowdown cause i started a new game without mods and it was slow,odd

edit : i assumed it was 16 bit because at about a 1000 globals it errored,i thought 1024 was the limit

edit : confirmed that the game slowdown happens without any global scripts in scripts folder,with a new game

Jim
 
Nirran said:
edit : i assumed it was 16 bit because at about a 1000 globals it errored,i thought 1024 was the limit
16 bit would imply a limit of 65535, not 1024, but there's no hard limit in sfall; as long as you can keep supplying it with different strings it should keep going. You may be hitting a different limit. Is there a limit on the number of strings you can include in one script? If you take your perk script up to the point of crashing, and then start using more globals from other scripts does it still crash?
 
Back
Top