Fallout 2 mod FO2 Engine Tweaks (Sfall)

my rapid perks mod in xp with killaps patch only installed,narg didn't show the perk for me,in vista it works as intended,reinstallation in xp(vhdd)then showed all perks with megamod/frp 1.2,but all vanilla perks were not avail,that was with all of my sfall mods(on my site) installed,,very odd behavior,during second test with vanilla patched with official patch only(no content mods),it seemed to work as intended,again very odd,its as if the game or something isn't reading the variables at all,and once the hide_real_perks was called,wasn't any way to bring them back(with frp and megamod,none of my mod specific mods installed,including killaps patch by itself)

edit : just verified that all current dxwebsetup files are installed on my vhdd,they were,ran it from a microsoft website

Nirran
 
pretty sure it is related to this type of install,in my main folder in vhdd xp,the perks work as intended,tho i only checked a few levels

http://www.nma-fallout.com/forum/viewtopic.php?t=53053

edit : confirmed,moving master and critter dat to to fo2 install(where the exe is) fixes it,not sure what the config of the email sent to me was,probably similar,i will find out,he emailed the save to me,and in that save narg didnt have the perks,but the other 2 did,didnt actualy see the bug he specified in any of my games,only what i listed

edit : im completely full of crap about this,with fresh fo2 install and killaps patch his save he sent me doesnt even load,i think he altered the sfall globals to make the bug visable to save face,extremely sorry for wasting your time

Nirran
 
Nirran said:
edit : im completely full of crap about this,with fresh fo2 install and killaps patch his save he sent me doesnt even load,i think he altered the sfall globals to make the bug visable to save face,extremely sorry for wasting your time
I wouldn't accuse people of faking bug reports just yet. It's more likely he made a mistake in the installation on xp, that didn't show up in a fresh, clean install on another os...

Cubik2k said:
I have a small suggestion:
make max hit points of critters bigger than 999
I know sfall has plenty of rather obscure features that no-one seems to know about, but I think the naming of the 'set_stat_max' function is fairly self evident. :P

Although saying that, if the player ever did go over 999 hp you'd almost certainly see some interface glitches. It should work fine for other critters though, which is what I'd assume you want it for given that the player typically doesn't get anywhere near 999 hp.
 
Timeslip said:
I wouldn't accuse people of faking bug reports just yet. It's more likely he made a mistake in the installation on xp, that didn't show up in a fresh, clean install on another os...

your probably right,i have a tendancy to jump the gun and make assumptions

Nirran
 
Well, I didnt tried that "set_stat_max" function :P

I want to make hp>999 only for critters, not for player.

I think abiut editing critters proto files to mkae them stronger (999+ hit points).
Will that function recognize this new stats value from *pro files?
 
Cubik2k said:
Well, I didnt tried that "set_stat_max" function :P

I want to make hp>999 only for critters, not for player.

I think abiut editing critters proto files to mkae them stronger (999+ hit points).
Will that function recognize this new stats value from *pro files?
When fallout computes a critters stat, it sums the values in the proto for the base and extra values, adds on any contributions from perks etc, and then clamps it between min and max values. (And there's some more complication in the case of derived stats, but you can ignore that for now.) set_stat_max modifies the max value that fallout clamps stats to. If a critter proto had values of 750 for their hp in both the base and extra fields, then they would show up in game initially with 999 hp, but then calling set_stat_max(STAT_hp, 2000) would cause that to increase to 1500.

You'll have to do a bit of experimenting to see what you need to do in the way of healing critters and stuff, and what happens on reloads, when the stat max will shrink back to 999 until your script kicks in again.
 
it turned out that the difference between the save and the perks being shown was that he always plays with the game on hard mode,reducing skills by 10%,and the characters he was using all had negative values,and all variables for perk requirements in my mods,the ini setting for all the ones i didn't add a value to are 0,hence < 0 and perk didn't show,glad we solved that one,in a day or so i will change the ini files to -10 or something,to not have a repeat

thank for stopping me from being an ass

Nirran
 
with this script as gl_ fired is displayed,with it as hs_ it does not,the perk is gecko skinning

Code:
#include "C:\Game Files\Fallout 2\HEADERS\sfall.h"

#include "C:\Game Files\Fallout 2\HEADERS\Perk_Inc.h"

#include "C:\Game Files\Fallout 2\HEADERS\ItemPID.h"

variable one := 0;
variable two := 0;
variable three := 0;
variable four := 0;
variable five := 0;
variable six := 0;
variable seven := 0;
variable eight := 0;
variable nine := 0;
variable ten := 0;
variable eleven := 0;
variable twelve := 0;
variable thirteen := 0;
variable fourteen := 0;
variable fifteen := 0;
variable sixteen := 0;
variable droppable := 0;

procedure start;
procedure ConvertToBinary(variable value);
procedure Scrounger_Perks(variable critter);
procedure Drop_Weapons(variable critter);
procedure Not_Dropable(variable weapon);
procedure Lootable_Armor(variable critter);
procedure Gecko_Items(variable critter);
procedure Delete_Worn_Armor(variable critter);

procedure start begin
   variable critter;
   if (game_loaded) /*or (init_hook)*/ then
      begin
         set_sfall_global("megamod1", get_ini_setting("megamod.ini|SETTINGS|weapon_drop")); 
         set_sfall_global("megamod2", get_ini_setting("megamod.ini|SETTINGS|lootable_armor")); 
         set_sfall_global("megamod3", get_ini_setting("megamod.ini|SETTINGS|armor_pieces")); 
         set_sfall_global("gecko_01", get_ini_setting("megamod.ini|SETTINGS|gecko_meat_drop")); 
         //display_msg("meat " + get_sfall_global_int("gecko_01"));
         set_sfall_global("gecko_02", get_ini_setting("megamod.ini|SETTINGS|gecko_pelt_drop")); 
         //display_msg("hide " + get_sfall_global_int("gecko_02"));
         register_hook(HOOK_ONDEATH);
      end 
   else 
      begin
         critter:=get_sfall_arg;
         call Delete_Worn_Armor(critter);
         call Scrounger_Perks(critter);
         if(get_sfall_global_int("megamod2") == 1)then 
            begin 
               call Lootable_Armor(critter);
            end  
         if(get_sfall_global_int("gecko_02") == 1)then 
            begin 
               display_msg("Fired");
               call Gecko_Items(critter);
            end
         if(get_sfall_global_int("megamod1") == 1)then 
            begin 
               call Drop_Weapons(critter);
            end 
      end
end

procedure ConvertToBinary(variable value) begin
   one := 0;
   two := 0;
   three := 0;
   four := 0;
   five := 0;
   six := 0;
   seven := 0;
   eight := 0;
   nine := 0;
   ten := 0;
   eleven := 0;
   twelve := 0;
   thirteen := 0;
   fourteen := 0;
   fifteen := 0;
   sixteen := 0;
   if(value >= 32768) then 
      begin
         value := value - 32768;
         sixteen := 1;
         //display_msg("value " + value);
      end
   if(value >= 16384) then 
      begin
         value := value - 16384;
         fifteen := 1;
         //display_msg("value " + value);
      end  
   if(value >= 8192) then 
      begin
         value := value - 8192;
         fourteen := 1;
         //display_msg("value " + value);
      end  
   if(value >= 4096) then 
      begin
         value := value - 4096;
         thirteen := 1;
         //display_msg("value " + value);
      end
   if(value >= 2048) then 
      begin
         value := value - 2048;
         twelve := 1;
         //display_msg("value " + value);
      end  
   if(value >= 1024) then 
      begin
         value := value - 1024;
         eleven := 1;
         //display_msg("value " + value);
      end 
   if(value >= 512) then 
      begin
         value := value - 512;
         ten := 1;
         //display_msg("value " + value);
      end
   if(value >= 256) then 
      begin
         value := value - 256;
         nine := 1;
         //display_msg("value " + value);
      end  
   if(value >= 128) then 
      begin
         value := value - 128;
         eight := 1;
         //display_msg("value " + value);
      end 
   if(value >= 64) then 
      begin
         value := value - 64;
         seven := 1;
         //display_msg("value " + value);
      end
   if(value >= 32) then 
      begin
         value := value - 32;
         six := 1;
         //display_msg("value " + value);
      end  
   if(value >= 16) then 
      begin
         value := value - 16;
         five := 1;
         //display_msg("value " + value);
      end 
   if(value >= 8) then 
      begin
         value := value - 8;
         four := 1;
         //display_msg("value " + value);
      end
   if(value >= 4) then 
      begin
         value := value - 4;
         three := 1;
         //display_msg("value " + value);
      end  
   if(value >= 2) then 
      begin
         value := value - 2;
         two := 1;
         //display_msg("value " + value);
      end  
   if(value >= 1) then 
      begin
         value := value - 1;
         one := 1;
         //display_msg("value " + value);
      end
end

procedure Scrounger_Perks(variable critter) begin
   call ConvertToBinary(get_proto_data(obj_pid(critter), 32));
   if(seven == 0) then
      begin
         //display_msg("flag not set");
         if(has_fake_perk(ExtraGold) and (get_sfall_global_int(182) == 1) )then 
            begin
               //display_msg("has gold perk");
               item_caps_adjust(critter, (get_sfall_global_int(183) * has_fake_perk(ExtraGold)));
            end
         if(has_fake_perk(ExtraAmmo) and (get_sfall_global_int(185) == 1) )then 
            begin 
               //display_msg("has ammo perk");
               if(obj_pid(critter_inven_obj(critter, 1)) > 0)then 
                  begin 
                     //display_msg("has weapon 1");   
                     if(get_weapon_ammo_pid(critter_inven_obj(critter, 1)) > 0) then 
                        begin
                           //display_msg("has ammo 1");
                           add_mult_objs_to_inven(critter, create_object_sid(get_weapon_ammo_pid(critter_inven_obj(critter, 1)), 0, 0, -1), (get_sfall_global_int(186) * has_fake_perk(ExtraAmmo)));
                        end
                  end 
               if(obj_pid(critter_inven_obj(critter, 2)) > 0)then 
                  begin 
                     //display_msg("has weapon 2");   
                     if(get_weapon_ammo_pid(critter_inven_obj(critter, 2)) > 0) then 
                        begin
                           //display_msg("has ammo 2");
                           add_mult_objs_to_inven(critter, create_object_sid(get_weapon_ammo_pid(critter_inven_obj(critter, 2)), 0, 0, -1), (get_sfall_global_int(186) * has_fake_perk(ExtraAmmo)));
                        end
                  end 
            end
      end
end

procedure Drop_Weapons(variable critter) begin
   variable weapon := 0;
   if (critter_inven_obj(critter, 1)) then
      begin
         weapon := critter_inven_obj(critter, 1);
         call Not_Dropable(weapon);
         if (droppable) then
            begin
               rm_obj_from_inven(critter, weapon);
               move_to(weapon, tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2)), elevation(critter));
            end
      end
   if (critter_inven_obj(critter, 2)) then
      begin
         weapon := critter_inven_obj(critter, 2);
         call Not_Dropable(weapon);
         if (droppable) then
            begin
               rm_obj_from_inven(critter, weapon);
               move_to(weapon, tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2)), elevation(critter));
            end
      end
end

procedure Not_Dropable(variable weapon) begin
   if(obj_pid(weapon) != 270) and (obj_pid(weapon) != 274) and (obj_pid(weapon) != 290) and (obj_pid(weapon) != 291) and (obj_pid(weapon) != 365)
   and (obj_pid(weapon) != 371) and (obj_pid(weapon) != 372) and (obj_pid(weapon) != 427) and (obj_pid(weapon) != 372) and (obj_pid(weapon) != 489)
   and (obj_pid(weapon) != 498) and (obj_pid(weapon) != 518) and (obj_pid(weapon) != 520) and (obj_pid(weapon) != 530) and (obj_pid(weapon) != 531)
   and (obj_pid(weapon) != 644) and (obj_pid(weapon) != 645) and (obj_pid(weapon) != 654) and (obj_pid(weapon) != 675) then begin
      droppable := 1;
   end
   else
      begin
         droppable := 0;
      end
end

procedure Lootable_Armor(variable critter) begin
   variable random_roll;
   variable armor_piece;
   variable random_armor_piece;
   if(get_sfall_global_int("megamod5") == 0) then 
      begin                                                                                          
         if (((obj_art_fid(critter) % 512) == 2) or ((obj_art_fid(critter) % 512) == 26) or ((obj_art_fid(critter) % 512) == 31)                    
         or ((obj_art_fid(critter) % 512) == 56) or ((obj_art_fid(critter) % 512) == 84)) then begin                                                
            if (has_skill(dude_obj, 13) >= 30) or (has_trait(0, dude_obj, 44)) then 
               begin                                                           
                  add_obj_to_inven(critter, create_object_sid(113, 0, 0, -1));                                                                         
               end                                                                                                                                     
         end 
         else 
            if (((obj_art_fid(critter) % 512) == 6) or ((obj_art_fid(critter) % 512) == 13) or ((obj_art_fid(critter) % 512) == 34)           
         or ((obj_art_fid(critter) % 512) == 45) or ((obj_art_fid(critter) % 512) == 116) or ((obj_art_fid(critter) % 512) == 121)) then begin      
            if (has_skill(dude_obj, 13) >= 50) or (has_trait(0, dude_obj, 44)) then 
               begin                                                           
                  random_roll := random(1, 100);                                                                                                       
                  if (random_roll <75>= 60) or (has_trait(0, dude_obj, 44)) then 
               begin                                                           
                  random_roll := random(1, 100);                                                                                                       
                  if (random_roll <75>= 80) or (has_trait(0, dude_obj, 44)) then 
               begin                                                           
                  random_roll := random(1, 100);                                                                                                       
                  if (random_roll < 34) then 
                     begin                                                                                                     
                        add_obj_to_inven(critter, create_object_sid(2, 0, 0, -1));                                                                        
                     end 
                  else 
                     if (random_roll <67>= 110) or (has_trait(0, dude_obj, 44)) then 
               begin                                                          
                  random_roll := random(1, 100);                                                                                                       
                  if (random_roll < 34) then 
                     begin                                                                                                     
                        add_obj_to_inven(critter, create_object_sid(17, 0, 0, -1));                                                                       
                     end 
                  else 
                     if (random_roll <67>= 130) and (has_skill(dude_obj, 12) >= 110)) or (has_trait(0, dude_obj, 44)) then 
               begin                   
                  random_roll := random(1, 100);                                                                                                       
                  if (random_roll <75>= 140) and (has_skill(dude_obj, 12) >= 120)) or (has_trait(0, dude_obj, 44)) then 
                     begin                   
                        random_roll := random(1, 100);                                                                                                       
                        if (random_roll <75>= 160) and (has_skill(dude_obj, 12) >= 145)) or (has_trait(0, dude_obj, 44)) then 
                     begin                   
                        add_obj_to_inven(critter, create_object_sid(554, 0, 0, -1));                                                                         
                     end                                                                                                                                     
               end                                                                                                                                        
      end 
   else 
      if(get_sfall_global_int("megamod3") == 1) then 
         begin                                                                                 
            if (((obj_art_fid(critter) % 512) == 31) or ((obj_art_fid(critter) % 512) == 2) or ((obj_art_fid(critter) % 512) == 84)                    
            or ((obj_art_fid(critter) % 512) == 56) or ((obj_art_fid(critter) % 512) == 26)) then begin                                                
               if (has_skill(dude_obj, 13) >= 30) or (has_trait(0, dude_obj, 44)) then 
                  begin                                                           
                     armor_piece := 0;                                                                                                                    
                     if(random(1, 100) > (85 - luck))then 
                        begin                                                                                               
                           if(obj_is_carrying_obj_pid(dude_obj, 811) < obj_is_carrying_obj_pid(dude_obj, 809)) then 
                              begin                                    
                                 armor_piece := 811;                                                                                                            
                              end 
                           else 
                              if(obj_is_carrying_obj_pid(dude_obj, 809) <obj_is_carrying_obj_pid>= 50) or (has_trait(0, dude_obj, 44)) then 
                  begin                                                           
                     armor_piece := 0;                                                                                                                    
                     if(random(1, 100) > (85 - luck))then 
                        begin                                                                                               
                           if(obj_is_carrying_obj_pid(dude_obj, 850) < obj_is_carrying_obj_pid(dude_obj, 812)) then 
                              begin                                    
                                 armor_piece := 850;                                                                                                            
                              end 
                           else 
                              if(obj_is_carrying_obj_pid(dude_obj, 812) <obj_is_carrying_obj_pid>= 50) or (has_trait(0, dude_obj, 44)) then 
                  begin                                                           
                     armor_piece := 0;                                                                                                                    
                     if(random(1, 100) > (85 - luck))then 
                        begin                                                                                               
                           if(obj_is_carrying_obj_pid(dude_obj, 850) < obj_is_carrying_obj_pid(dude_obj, 812)) then 
                              begin                                    
                                 armor_piece := 850;                                                                                                            
                              end 
                           else 
                              if(obj_is_carrying_obj_pid(dude_obj, 812) <obj_is_carrying_obj_pid>= 80) or (has_trait(0, dude_obj, 44)) then 
                  begin                                                           
                     armor_piece := 0;                                                                                                                    
                     if(random(1, 100) > (85 - luck))then 
                        begin                                                                                               
                           if(obj_is_carrying_obj_pid(dude_obj, 842) < obj_is_carrying_obj_pid(dude_obj, 841)) and                                           
                           (obj_is_carrying_obj_pid(dude_obj, 842) < obj_is_carrying_obj_pid(dude_obj, 840)) then begin                                      
                              armor_piece := 842;                                                                                                            
                           end 
                           else 
                              if(obj_is_carrying_obj_pid(dude_obj, 841) < obj_is_carrying_obj_pid(dude_obj, 842)) and                                  
                           (obj_is_carrying_obj_pid(dude_obj, 841) < obj_is_carrying_obj_pid(dude_obj, 840)) then begin                                      
                              armor_piece := 841;                                                                                                            
                           end 
                           else 
                              if(obj_is_carrying_obj_pid(dude_obj, 840) < obj_is_carrying_obj_pid(dude_obj, 842)) and                                  
                           (obj_is_carrying_obj_pid(dude_obj, 840) <obj_is_carrying_obj_pid>= 110) and (has_skill(dude_obj, 12) >= 75)) or (has_trait(0, dude_obj, 44)) then 
                        begin                    
                           armor_piece := 0;                                                                                                                    
                           if(random(1, 100) > (85 - luck))then 
                              begin                                                                                               
                                 if(obj_is_carrying_obj_pid(dude_obj, 843) < obj_is_carrying_obj_pid(dude_obj, 845)) and                                           
                                 (obj_is_carrying_obj_pid(dude_obj, 843) < obj_is_carrying_obj_pid(dude_obj, 844)) then begin                                      
                                    armor_piece := 843;                                                                                                            
                                 end 
                                 else 
                                    if(obj_is_carrying_obj_pid(dude_obj, 845) < obj_is_carrying_obj_pid(dude_obj, 843)) and                                  
                                 (obj_is_carrying_obj_pid(dude_obj, 845) < obj_is_carrying_obj_pid(dude_obj, 844)) then begin                                      
                                    armor_piece := 845;                                                                                                            
                                 end 
                                 else 
                                    if(obj_is_carrying_obj_pid(dude_obj, 844) < obj_is_carrying_obj_pid(dude_obj, 843)) and                                  
                                 (obj_is_carrying_obj_pid(dude_obj, 844) <obj_is_carrying_obj_pid>= 130) and (has_skill(dude_obj, 12) >= 110)) or (has_trait(0, dude_obj, 44)) then 
                        begin                   
                           armor_piece := 0;                                                                                                                    
                           if(random(1, 100) > (85 - luck))then 
                              begin                                                                                               
                                 if(obj_is_carrying_obj_pid(dude_obj, 848) < obj_is_carrying_obj_pid(dude_obj, 847)) and                                           
                                 (obj_is_carrying_obj_pid(dude_obj, 848) < obj_is_carrying_obj_pid(dude_obj, 846)) then begin                                      
                                    armor_piece := 848;                                                                                                            
                                 end 
                                 else 
                                    if(obj_is_carrying_obj_pid(dude_obj, 847) < obj_is_carrying_obj_pid(dude_obj, 848)) and                                  
                                 (obj_is_carrying_obj_pid(dude_obj, 847) < obj_is_carrying_obj_pid(dude_obj, 846)) then begin                                      
                                    armor_piece := 847;                                                                                                            
                                 end 
                                 else 
                                    if(obj_is_carrying_obj_pid(dude_obj, 846) < obj_is_carrying_obj_pid(dude_obj, 848)) and                                  
                                 (obj_is_carrying_obj_pid(dude_obj, 846) <obj_is_carrying_obj_pid>= 130) and (has_skill(dude_obj, 12) >= 110)) or (has_trait(0, dude_obj, 44)) then 
                        begin                   
                           armor_piece := 0;                                                                                                                    
                           if(random(1, 100) > (85 - luck))then 
                              begin                                                                                               
                                 if(obj_is_carrying_obj_pid(dude_obj, 848) < obj_is_carrying_obj_pid(dude_obj, 847)) and                                           
                                 (obj_is_carrying_obj_pid(dude_obj, 848) < obj_is_carrying_obj_pid(dude_obj, 846)) then begin                                      
                                    armor_piece := 848;                                                                                                            
                                 end 
                                 else 
                                    if(obj_is_carrying_obj_pid(dude_obj, 847) < obj_is_carrying_obj_pid(dude_obj, 848)) and                                  
                                 (obj_is_carrying_obj_pid(dude_obj, 847) < obj_is_carrying_obj_pid(dude_obj, 846)) then begin                                      
                                    armor_piece := 847;                                                                                                            
                                 end 
                                 else 
                                    if(obj_is_carrying_obj_pid(dude_obj, 846) < obj_is_carrying_obj_pid(dude_obj, 848)) and                                  
                                 (obj_is_carrying_obj_pid(dude_obj, 846) <obj_is_carrying_obj_pid>= 160) and (has_skill(dude_obj, 12) >= 145)) or (has_trait(0, dude_obj, 44)) then 
                        begin                   
                           add_obj_to_inven(critter, create_object_sid(554, 0, 0, -1));                                                                         
                        end                                                                                                                                     
                  end                                                                                                                                        
         end      
end                 

procedure Gecko_Items(variable critter) begin
   variable temp_box;
   variable item;
   variable decide;
   if((obj_art_fid(critter) % 512) == 67) or ((obj_art_fid(critter) % 512) == 68) or ((obj_art_fid(critter) % 512) == 81)then 
      begin             
         temp_box := create_object_sid(128, 0, 0, -1);                                                                                           
         move_obj_inven_to_obj(critter, temp_box);                                                                                               
         destroy_object(temp_box);                                                                                                               
         decide := random(1, 2);                                                                                                                 
         if (has_trait(0, dude_obj, 73)) then 
            begin                                                                                              
               if ((obj_art_fid(critter) % 512) == 67) then 
                  begin                                                                                   
                     item := create_object_sid(276, 0, 0, -1);                                                                                         
                  end 
               else 
                  if ((obj_art_fid(critter) % 512) == 68) then 
                     begin                                                                          
                        item := create_object_sid(277, 0, 0, -1);                                                                                         
                        if(global_var(686) == 1)then 
                           begin                                                                                                
                              add_obj_to_inven(critter, create_object_sid(640, 0, 0, -1));                                                                   
                           end                                                                                                                               
                     end 
               else 
                  if ((obj_art_fid(critter) % 512) == 81) then 
                     begin                                                                          
                        item := create_object_sid(552, 0, 0, -1);                                                                                         
                     end                                                                                                                                  
               add_obj_to_inven(critter, item);                                                                                                     
            end                                                                                                                                     
         if(get_sfall_global_int("gecko_01") == 1) then 
            begin                                                                                      
               if (has_trait(0, dude_obj, 40)) then 
                  begin                                                                                             
                     if(random(1, 100) > (85 - luck))then 
                        begin                                                                                          
                           if(decide == 1)then 
                              begin                                                                                                        
                                 item := create_object_sid(803, 0, 0, -1);                                                                                     
                              end 
                           else 
                              if(decide == 2)then 
                                 begin                                                                                               
                                    item := create_object_sid(804, 0, 0, -1);                                                                                     
                                 end                                                                                                                              
                        end 
                     else 
                        begin                                                                                                                      
                           item := create_object_sid(800, 0, 0, -1);                                                                                        
                        end                                                                                                                                 
                  end                                                                                                                                    
               add_obj_to_inven(critter, item);                                                                                                       
            end                                                                                                                                       
      end                                                                                                                                          
end

procedure Delete_Worn_Armor(variable critter) begin
   variable delete_item;
   if (obj_pid(critter_inven_obj(critter, 0)) > 0) then 
      begin
         delete_item := critter_inven_obj(critter, 0);
         rm_obj_from_inven(critter, delete_item);
         if(tile_contains_obj_pid(1, 0, obj_pid(delete_item))) then 
            begin                                   
               delete_item := tile_contains_pid_obj(1, 0, obj_pid(delete_item));                                 
               destroy_object(delete_item);                                                           
            end                                                                                         
      end
end

this is the ini
Code:
[SETTINGS] 
;set to 1 to enable weapons dropping to the ground on death,set to 0 to disable
weapon_drop=0

;set to 1 to enable armor dropping from critters on death,0 to disable
lootable_armor=1
;if lootable_armor is set to 1,this will enable pieces of armor that can be crafted into armor sets rather then whole armors dropping,set to 1 to enable,set to 0 to drop sets of armor already crafted
armor_pieces=0

;set to 1 to enable gecko skins dropping from gecko,set to 0 to disable
gecko_pelt_drop=1
;if gecko_pelt_drop is set to 1,set to 1 to enable gecko meat dropping from gecko critter's.(Nirran's Expanded Stimpack's mod requiers this set to 1,or all meat will not drop if that mod is installed,if set to 1 and mod is not installed, has no effect.)
gecko_meat_drop=1

;set to 1 to enable party member armor graphic mod,set to 0 to disable
party_armor_graphic=0

everything besides the changes to make the script hs_ or gl_ is exactly the same

Nirran
 
Timeslip said:
nirran said:
edit : would it be possible to add get and return target and attacker special flags in hs_afterhitroll hook script?or does it only use the hit_miss int for the text?actualy what im realy after is being able to set the critical table text that is returned,that possible?
No, the critical flags haven't been calculated at that point, so there's nothing to override. You need to do that from combatdamage.

ok then,is it possible to change aftertohit hook to tohit roll hook?would solve alot of problems i am having,i am using a aftertohit and changing the hit var,sometimes the game rolls damage when my script returns a miss,also it would solve my target/attacker flags
 
Nirran said:
ok then,is it possible to change aftertohit hook to tohit roll hook?would solve alot of problems i am having,i am using a aftertohit and changing the hit var,sometimes the game rolls damage when my script returns a miss,also it would solve my target/attacker flags
I have no idea what you're asking for there. There is already a tohit hook that runs to calculate the hit probability, and an afterhitroll that lets you modify the hit type and target. What do you want to change to what? And why would it solve your flags problem? They're set when fallout works out the damage, which is long after either of these hooks.

As for hitting even if you force a miss, that's probably because when you miss fallout checks for any valid targets along your shooting path to hit instead, and of course the original target is always an option. Not sure what you can do about that...

With regards to you other weird hookscript problems, I've been improving sfall's logging capabilities a bit, so you'll be able to get debug printouts when hook scripts run, etc. I can't see any problems here, so until you can provide a small reliably-failing testcase (as opposed to giant scripts that aren't even self-contained,) there's not much I can do.
 
After updating to the new version of the Megamod, trying to start Fallout 2 resulted in the "Could not load DirectX: This program requires Windows 95 with DirectX 3.0a or later or Windows NT version 4.0 with Service Pack 3 or greater" error message. After looking around on the Internet I followed someone's advice and moved the ddraw files to the Data folder, effectively removing sfall, which turned out to be stupid, as although I could now launch the game, it clearly wasn't working entirely as intended (and besides, some of the sfall features sound pretty interesting).

Now I made sure to update to the latest version of DirectX 9.0c, complete with that .dll file you mentioned in your FAQ, but Fallout 2 still gives me the same error message. Do you have any idea as to what else I could do in this regard?

Thanks in advance.
 
Timeslip said:
Nirran said:
ok then,is it possible to change aftertohit hook to tohit roll hook?would solve alot of problems i am having,i am using a aftertohit and changing the hit var,sometimes the game rolls damage when my script returns a miss,also it would solve my target/attacker flags
I have no idea what you're asking for there. There is already a tohit hook that runs to calculate the hit probability, and an afterhitroll that lets you modify the hit type and target. What do you want to change to what? And why would it solve your flags problem? They're set when fallout works out the damage, which is long after either of these hooks.

i was asking that aftertohit be changed to tohit roll hook,changing the over-write of fo2 code to the actual tohit roll code

i will write a script that fails that is simple,ill do that later today

and by the way all of the includes are in my custom perks mod source files folder(over-site on my part)

Nirran
 
@danilych
If you're getting that error, then fallout is failing to load ddraw.dll for some reason. Set the graphics mode to 0 to rule out DirectX problems, but if it still doesn't work then I have no idea what's causing it.

Nirran said:
i was asking that aftertohit be changed to tohit roll hook,changing the over-write of fo2 code to the actual tohit roll code
But there's already the tohit hook? I'm still not sure what you're after. The afterhitroll code runs after the hit has been rolled, but before the result is used. There's nowhere else it can go. :?

Nirran said:
i will write a script that fails that is simple,ill do that later today

and by the way all of the includes are in my custom perks mod source files folder(over-site on my part)
Having things split into multiple files is still not very useful for the purposes of bug tracking. (And I was thinking as much of the ini file, and resultant unused code paths in the script, as included headers.) If you can make a small test case, that would be great though. :)
 
maybe im not awake enough to respond yet,ill wait a few hours before i respond to that one,heh

i definetly will(after i druink a few pots of coffee and wake up :P ),still love your mod!

edit : what i was asking for is to over-ride the to hit code,rather then after to hit code,but if it over-rides all the var in that code isnt any point to doing that,reason i asked for it is that if the engine returns critical,it will display text from the critical tables(if the target has a table),and that text over-rides the flags from combatdamage hook(thats why i asked for flag returns in aftertohit hook)

edit : only result is that when the engine flags it a critical,and the tables return the target was knocked down,the txt will say they were knocked down when the combatdamage script returned not knocked down,and they arent realy knocked down

Nirran
 
Timeslip said:
@danilych
If you're getting that error, then fallout is failing to load ddraw.dll for some reason. Set the graphics mode to 0 to rule out DirectX problems, but if it still doesn't work then I have no idea what's causing it.

Yeah, still doesn't work. It did, however, turn out to work flawlessly on my laptop, so I suppose that narrows own the problem to the computer. Might it have something to do with ATI?
 
Nirran said:
maybe im not awake enough to respond yet,ill wait a few hours before i respond to that one,heh

i definetly will(after i druink a few pots of coffee and wake up :P ),still love your mod!

edit : what i was asking for is to over-ride the to hit code,rather then after to hit code,but if it over-rides all the var in that code isnt any point to doing that,reason i asked for it is that if the engine returns critical,it will display text from the critical tables(if the target has a table),and that text over-rides the flags from combatdamage hook(thats why i asked for flag returns in aftertohit hook)

edit : only result is that when the engine flags it a critical,and the tables return the target was knocked down,the txt will say they were knocked down when the combatdamage script returned not knocked down,and they arent realy knocked down

Nirran

it is possible this is a mistaken report on my part,im not completely sure but i think i had this bug when i was setting critical value in aftertohit,and then setting it again in combatdamage,i will do testing on that today,that way you dont waste your time

edit : just verified that the bug exists, :(

Nirran
 
I found a small bug: if ControlPartyMembers is set to 1, in combat every my turn game is producing my clones, that are friendly to me
 
2.6 is up.
Code:
>New script function: set_map_time_multi
>Added option to speed up the spinning interface counter animations
>Debug editor now has access to sfall globals, and can show the names of globals and critters
>Fixed a nasty memory corruption bug in hookscripts
>Added an option to increase the number of save slots (From Mash)
>Added improved logging capabilities
Edit: Just noticed I forgot to include the updated version of MPClient.exe, so if anyone downloaded in the last few minutes and plans to use the debug editor, you'll want to redownload.
 
Nice new tools for modders. Thanks!
Will Modder Pack v2.4.7 work with new sfall v2.6? I mean "compiler" from modder pack.
 
Back
Top