My sFall Mods and Tools

Discussion in 'Fallout General Modding' started by Nirran, Sep 27, 2009.

  1. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    decided to start a thread for all my mods,this thread will be for all of my sfall mods

    edit : installation of any of my mods :

    unzip the 7z file into main fallout2 folder, free 7-zip (if needed)

    be sure to read the various ini files and set them to your personal tastes

    though i zipped the pro files with read only set,double check data\proto\items and data\proto\critters .pro files are set to read only

    edit : cutom perks had wrong numbers on pack rat code,fixed and uploaded

    Nirran
     
  2. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    tweaked my hs_combatdamage script,burst attacks should be within vanilla range,please post here any bugs comments suggestions,criticizm is welcome as well

    Nirran
     
  3. .Pixote.

    .Pixote. Venerable Relic of the Wastes
    Modder

    Sep 14, 2009
    Nirran are you open to script-Sfall requests…if so then I would like a function that allows a weapon to fall in a random direction, one hex from the injured party. Josan has already built a mod that allows individuals to drop their hand weapon after a critical shot, and I’m hoping that it can be improved upon. But critically the item shouldn’t be able to fall through walls and scenery, so it needs to react to the map blockers…is it possible.

     
  4. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    probably,using the blocking hex to check for the pid on the tile,if it exists,move it in a dif dirrection,shouldnt be hard,have a link to the mod?

    edit : nevermind about the mod link,this code should work(havent tested it)
    Code:
    procedure Drop_Weapons(variable critter) begin
       variable weapon := 0;
       variable dropped_hex := 0;
       if (critter_inven_obj(critter, 1)) then
          begin
             weapon := critter_inven_obj(critter, 1);
             call Dropable(weapon);
             if (droppable) then
                begin
                   rm_obj_from_inven(critter, weapon);
                   dropped_hex := tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2));
                   while (tile_contains_obj_pid(dropped_hex, elevation(dude_obj), 33554499) != 0) do begin
                      dropped_hex := tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2));
                   end
                   move_to(weapon, dropped_hex, elevation(critter));
                end
          end
       if (critter_inven_obj(critter, 2)) then
          begin
             weapon := critter_inven_obj(critter, 2);
             call Dropable(weapon);
             if (droppable) then
                begin
                   rm_obj_from_inven(critter, weapon);
                   dropped_hex := tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2));
                   while (tile_contains_obj_pid(dropped_hex, elevation(dude_obj), 33554499) != 0) do begin
                      dropped_hex := tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2));
                   end
                   move_to(weapon, dropped_hex, elevation(critter));
                end
          end
    end
    
    procedure 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
    
    be sure to change the pid's in droppable to the mod that is being installed,those are megamod

    edit : had the wrong pid for the blocker,made sure the code will compile

    Nirran
     
  5. .Pixote.

    .Pixote. Venerable Relic of the Wastes
    Modder

    Sep 14, 2009
  6. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    want the mod for frp?

    Nirran
     
  7. .Pixote.

    .Pixote. Venerable Relic of the Wastes
    Modder

    Sep 14, 2009
    Im sorry - what's "frp"...
     
  8. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    fallout restoration project?

    anyway,have a better method,wont need to check for individual pid numbers

    Code:
    variable convert_one := 0;
    variable convert_two := 0;
    variable convert_three := 0;
    variable convert_four := 0;
    variable convert_five := 0;
    variable convert_six := 0;
    variable convert_seven := 0;
    variable convert_eight := 0;
    variable convert_nine := 0;
    variable convert_ten := 0;
    variable convert_eleven := 0;
    variable convert_twelve := 0;
    variable convert_thirteen := 0;
    variable convert_fourteen := 0;
    variable convert_fifteen := 0;
    variable convert_sixteen := 0;
    variable convert_seventeen := 0;
    variable convert_eighteen := 0;
    variable convert_nineteen := 0;
    variable convert_twenty := 0;
    variable convert_twenty_one := 0;
    variable convert_twenty_two := 0;
    variable convert_twenty_three := 0;
    ;
    procedure ConvertBitFlagField(variable value);
    procedure Drop_Weapons(variable critter);
    
    procedure Drop_Weapons(variable critter) begin
       variable weapon := 0;
       variable dropped_hex := 0;
       call ConvertBitFlagField(get_proto_data(obj_pid(critter), 32));
       if (critter_inven_obj(critter, 1)) then
          begin
             weapon := critter_inven_obj(critter, 1);
             if (convert_seven == 0) then
                begin
                   rm_obj_from_inven(critter, weapon);
                   dropped_hex := tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2));
                   while (tile_contains_obj_pid(dropped_hex, elevation(dude_obj), 33554499) != 0) do begin
                      dropped_hex := tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2));
                   end
                   move_to(weapon, dropped_hex, elevation(critter));
                end
          end
       if (critter_inven_obj(critter, 2)) then
          begin
             weapon := critter_inven_obj(critter, 2);
             if (convert_seven == 0) then
                begin
                   rm_obj_from_inven(critter, weapon);
                   dropped_hex := tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2));
                   while (tile_contains_obj_pid(dropped_hex, elevation(dude_obj), 33554499) != 0) do begin
                      dropped_hex := tile_num_in_direction(tile_num(critter), random(0, 5), random(1, 2));
                   end
                   move_to(weapon, dropped_hex, elevation(critter));
                end
          end
    end
    
    procedure ConvertBitFlagField(variable value) begin
       convert_one := 0;
       convert_two := 0;
       convert_three := 0;
       convert_four := 0;
       convert_five := 0;
       convert_six := 0;
       convert_seven := 0;
       convert_eight := 0;
       convert_nine := 0;
       convert_ten := 0;
       convert_eleven := 0;
       convert_twelve := 0;
       convert_thirteen := 0;
       convert_fourteen := 0;
       convert_fifteen := 0;
       convert_sixteen := 0;
       convert_seventeen := 0;
       convert_eighteen := 0;
       convert_nineteen := 0;
       convert_twenty := 0;
       convert_twenty_one := 0;
       convert_twenty_two := 0;
       convert_twenty_three := 0;
       if (value >= DAM_BACKWASH) then 
          begin
             value := value - DAM_BACKWASH;
             convert_twenty_three := 1;
             //display_msg("value " + value);
          end
       if (value >= DAM_CRIP_RANDOM) then 
          begin
             value := value - DAM_CRIP_RANDOM;
             convert_twenty_two:= 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_RANDOM_HIT) then 
          begin
             value := value - DAM_RANDOM_HIT;
             convert_twenty_one := 1;
             //display_msg("value " + value);
          end 
       if (value >= DAM_HURT_SELF) then 
          begin
             value := value - DAM_HURT_SELF;
             convert_twenty := 1;
             //display_msg("value " + value);
          end
       if (value >= DAM_DUD) then 
          begin
             value := value - DAM_DUD;
             convert_nineteen := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_LOSE_AMMO) then 
          begin
             value := value - DAM_LOSE_AMMO;
             convert_eighteen := 1;
             //display_msg("value " + value);
          end 
       if (value >= DAM_HIT_SELF) then 
          begin
             value := value - DAM_HIT_SELF;
             convert_seventeen := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_LOSE_TURN) then 
          begin
             value := value - DAM_LOSE_TURN;
             convert_sixteen := 1;
             //display_msg("value " + value);
          end
       if (value >= DAM_DROP) then 
          begin
             value := value - DAM_DROP;
             convert_fifteen := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_DESTROY) then 
          begin
             value := value - DAM_DESTROY;
             convert_fourteen := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_EXPLODE) then 
          begin
             value := value - DAM_EXPLODE;
             convert_thirteen := 1;
             //display_msg("value " + value);
          end
       if (value >= DAM_BYPASS) then 
          begin
             value := value - DAM_BYPASS;
             convert_twelve := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_ON_FIRE) then 
          begin
             value := value - DAM_ON_FIRE;
             convert_eleven := 1;
             //display_msg("value " + value);
          end 
       if (value >= DAM_CRITICAL) then 
          begin
             value := value - DAM_CRITICAL;
             convert_ten := 1;
             //display_msg("value " + value);
          end
       if (value >= DAM_HIT) then 
          begin
             value := value - DAM_HIT;
             convert_nine := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_DEAD) then 
          begin
             value := value - DAM_DEAD;
             convert_eight := 1;
             //display_msg("value " + value);
          end 
       if (value >= DAM_BLIND) then 
          begin
             value := value - DAM_BLIND;
             convert_seven := 1;
             //display_msg("value " + value);
          end
       if (value >= DAM_CRIP_ARM_RIGHT) then 
          begin
             value := value - DAM_CRIP_ARM_RIGHT;
             convert_six := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_CRIP_ARM_LEFT) then 
          begin
             value := value - DAM_CRIP_ARM_LEFT;
             convert_five := 1;
             //display_msg("value " + value);
          end 
       if (value >= DAM_CRIP_LEG_RIGHT) then 
          begin
             value := value - DAM_CRIP_LEG_RIGHT;
             convert_four := 1;
             //display_msg("value " + value);
          end
       if (value >= DAM_CRIP_LEG_LEFT) then 
          begin
             value := value - DAM_CRIP_LEG_LEFT;
             convert_three := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_KNOCKED_DOWN) then 
          begin
             value := value - DAM_KNOCKED_DOWN;
             convert_two := 1;
             //display_msg("value " + value);
          end  
       if (value >= DAM_KNOCKED_OUT) then 
          begin
             value := value - DAM_KNOCKED_OUT;
             convert_one := 1;
             //display_msg("value " + value);
          end
    /*   //display_msg("value " + value);
       if (value != 0) then 
          begin
          //display_msg("Convert Bit Flag Field Failed " + value);
       end*/
       return value;
    end
    
    that checks for the dropable flag on the critter,
    should be universal now,any mod

    edit : the mod is on my site now,feel free to do what ever you would like with it.

    Nirran
     
  9. .Pixote.

    .Pixote. Venerable Relic of the Wastes
    Modder

    Sep 14, 2009
    Good stuff Nirran

    What I was intending to do was to combine the dropped weapons from Fallout Tactics (edited versions) into Fallout 2…each individual gun in the game would have a more accurate corresponding dropped weapon, this would play in nicely with Josan’s mod – except with your improved version the actual weapon could also have the 6 different dropped hex positions.

    The Tactics weapons also have 4 individual directions the weapon can lay on the ground… (NE – SE – SW – NW, there are no directions for E and W)…ideally the weapon will drop randomly onto the ground and with a random direction.

    (Below the Fallout Tactics weapons – in game). What I will do is make a mod that changes the appearance of the dropped Fallout 2 weapons, so the Pancor will look like a Pancor on the ground, hunting rifle, etc…instead of all looking the same. But I don’t expect everyone to like this idea.

     
  10. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    interesting,would be cool

    forgot to mentioned i tested the hex blocking code,set 5 critters with spears on a map with no scripts,hex blockers in all but one dirrection,worked in the test,should be fine

    yes im always open for requests

    Nirran
     
  11. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    Aug 15, 2007
    What's wrong with bwand? It would save an aweful lot of typing.
    Code:
    procedure Drop_Weapons(variable critter) begin
       variable weapon := 0, tmp;
       variable dropped_hex := 0;
       tmp:=get_proto_data(obj_pid(critter), 32);
       if (critter_inven_obj(critter, 1)) then
          begin
             weapon := critter_inven_obj(critter, 1);
             if (tmp bwand DAM_CRIP_ARM_RIGHT) then
                begin
    <snip>
                end
          end
       if (critter_inven_obj(critter, 2)) then
          begin
             weapon := critter_inven_obj(critter, 2);
             if (tmp bwand DAM_CRIP_ARM_LEFT) then
                begin
    <snip>
                end
          end
    end
     
  12. Continuum

    Continuum Vault Fossil

    Nov 8, 2006
    It was one of the most annoying visual stuff about Tactics - each fucking weapon looked identical as inventory image when lying on the ground, but not when placed in hands :wall: What was a point of doing this? To piss off players even more with lack of layered sprites, I guess.
     
  13. Lexx

    Lexx Lived Through the Heat Death
    Moderator

    Apr 24, 2005
    That's exactly the reason why I don't like this as well. The weapon in hand should looks like that on ground.
     
  14. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    nothing i guess,i wrote that function before i knew bwor and bwand were "and" aand "or" bit logic,i should prolly redo the stuf i have written with those,maybe when im bored

    edit : tho with hindsight it is pretty obvious,i was taught bit logic in the navy but it has been maybe 15 years since then

    Nirran
     
  15. Jotisz

    Jotisz Mildly Dipped

    Aug 28, 2007
    Well i would be okay with it but only for the items that doesn't have a real ground look (shown as a box on the ground) about the others I wouldn't change them since the weapons can't be remade (the engine can't use that many frms for one critter) to be shown in the hands....
     
  16. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    after re-reading this thread,i missunderstood,you wanted weapons to drop on critical,the mod i wrote is on death,for on critical use this
    Code:
    #include "C:\Game Files\Fallout 2\HEADERS\LVL_Heal.h"
       
    procedure start;
    procedure Drop_Weapons(variable target,);
    
    procedure start 
    begin
       variable target;
       variable attacker;
       variable target_damage;
       variable attacker_damage;
       variable special_effect_target;
       variable special_effect_attacker;
       variable attack_weapon;
       variable body_part;
       if (init_hook) then begin 
       end else begin
          target := get_sfall_arg;
          attacker := get_sfall_arg;
          target_damage := get_sfall_arg;
          attacker_damage := get_sfall_arg;
          special_effect_target := get_sfall_arg;
          special_effect_attacker := get_sfall_arg;
          attack_weapon := get_sfall_arg;
          body_part := get_sfall_arg;
          if (body_part == 1) and (target_damage > 0) and (special_effect_target bwand DAM_CRIP_ARM_LEFT) and (special_effect_target bwand DAM_CRITICAL) then begin 
              call Drop_Weapons(target);
          end else if  (body_part == 2) and (target_damage > 0) and (special_effect_target bwand DAM_CRIP_ARM_RIGHT) and (special_effect_target bwand DAM_CRITICAL) then begin 
              call Drop_Weapons(target);
          end
       end
    end
            
    procedure Drop_Weapons(variable target) begin
       variable weapon := 0;
       variable dropped_hex := 0;
       variable critter_flags := 0;
       critter_flags := get_proto_data(obj_pid(target), 32);
       if (critter_inven_obj(target, 1)) then begin
          weapon := critter_inven_obj(target, 1);
          if not(critter_flags bwand DAM_BLIND) then begin
             rm_obj_from_inven(target, weapon);
             dropped_hex := tile_num_in_direction(tile_num(target), random(0, 5), random(1, 2));
             while (tile_contains_obj_pid(dropped_hex, elevation(dude_obj), 33554499) != 0) do begin
                dropped_hex := tile_num_in_direction(tile_num(target), random(0, 5), random(1, 2));
             end
             move_to(weapon, dropped_hex, elevation(target));
          end
       end
       if (critter_inven_obj(target, 2)) then begin
          weapon := critter_inven_obj(target, 2);
          if not(critter_flags bwand DAM_BLIND) then begin
             rm_obj_from_inven(target, weapon);
             dropped_hex := tile_num_in_direction(tile_num(target), random(0, 5), random(1, 2));
             while (tile_contains_obj_pid(dropped_hex, elevation(dude_obj), 33554499) != 0) do begin
                dropped_hex := tile_num_in_direction(tile_num(target), random(0, 5), random(1, 2));
             end
             move_to(weapon, dropped_hex, elevation(target));
          end
       end
    end
    remove
    Code:
    (special_effect_target bwand DAM_CRIP_ARM_LEFT)
    if you want them to drop on any critical,instead of only when the targets arms are crippled

    edit : added hs_combatdamage to the weapon drop mod(same code as in this post).

    edit : tested,checks good(after fixing logic),re-uploaded(logic was reversed)

    Nirran
     
  17. Nevill

    Nevill First time out of the vault

    Mar 14, 2007
    Nirran, do your mods work together? If not, is there a way to make them work together with each other?
     
  18. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    most of them do,some dont,what mods would you like to combine?

    edit : lootable armor and weapon drop are the only 2 mods that aren't compatable with the other mods

    Nirran
     
  19. Nevill

    Nevill First time out of the vault

    Mar 14, 2007
    I was looking specifically at those. :(

    Barter and Custom Perks also seem nice. I'd like to play RP 2.1.2 with the four of them installed.
     
  20. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    the hs_ondeath that comes with custom perks has code very similar to the weapon drop,also the hs_combatdamage has the drop weaps on damage to a crippled arm,the lootable armor for frp will take me a while to write,i will add it to the ondeath i use in custom perks,setting megamod or frp in the ini,prolly take quite a while

    the way the perks are written is pretty over-powered,check the stats in CustomPerks.ini,all the numeric values are settable for every perk that has number components

    Nirran