Modifying the THC on body parts

Discussion in 'Fallout General Modding' started by Josan12, Feb 16, 2009.

  1. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    Timeslip in all his/her wizardry has made it possible to modify the to-hit-chance on body locations in FO2. *gets down on knees and praises Timeslip*

    Needless to say, messing with any of these figures would dramatically change the game difficulty.

    I've long been thinking of a little mod that makes the eyes between 50 and 100% harder to hit. Does anyone else feel that easy eye shots make FO2 way too easy?

    Also - does anyone know if the AI NPC's make called shots (to the eyes) ??

    However, from my experience mods that make the game more challenging seem to be rather unpopular .... personally i love a challenge.

    Any opinions on this?
     
  2. Oracle

    Oracle Water Chip? Been There, Done That

    956
    May 19, 2003
    Called shots could use some work. It has always bugged me that when you aim for the eyes and you would miss them, the shot would always miss the target completly. I rather would see that there also was a chance that the rest of the body would get hit.

    As for the called being to easy; I think there should be a bigger penalty for called shot when enemies are far away. A legg and arm could still be doable, a head would be dificult but the eyes... imposible (sniper guns needed)

    Creating other NPC's to aim more is a nice idea to, makes battles more chalanging
     
  3. Kanhef

    Kanhef Vault Dweller

    793
    Sep 2, 2007
    Yes they do. I once got blinded by one of the unarmed Enclave soldiers in the puzzle room level.

    In ai.txt, the called_freq parameter controls how often they make aimed shots. I'm not sure if a value of N means an N% or 1/N chance; the wikia page needs work. I'll guess that which limb they target is random, but also considers min_to_hit so that they don't try to make impossible shots. Increasing critters' skill levels will let them make more head/eye called shots.

    For another challenge, modify some critters to give them a critical table bonus. In addition to generally worse effects, this enables instant-kills to the head, eyes, and torso (uncalled).
     
  4. Slaughter Manslaught

    Slaughter Manslaught Vault Senior Citizen

    Dec 11, 2006
    What he said. Its okay to shoot someone's eye when his distance to you is five meters, but its totally ridiculous to shoot a eye from twenty meters onwards. You are more likely to hit the head, the neck or miss. Unless you have a Scoped Hunting Rifle or Sniper Rifle and high Small Guns skill, then it makes sense.

    I think long-range eye shots should be something doable only with precise snipery weapons, good shooting conditions AND high-skill (more than 150%), but even they should not be garanteed insta-hits even by the endgame.

    By the endgame (New Reno and beyond) eye shots get too easy unless you play with a low-PE or retard character (which probrably has lower skill than the usual diplosniper).

    And making NPCs aim more is a excellent idea. Skilled Soldiers - Vault City guards and patrols, Mercenary Raiders, Unity patrollers, NCR Rangers and Enclave Troopers - Should use more aimed shots.
     
  5. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    A script similar to this should give a penelty for aiming at the eyes from long distances.

    Code:
    //hs_tohit.int
    procedure start;
    
    procedure start begin
    	variable hitchance;
    	variable target;
    	variable attacker;
    	variable bodypart;
    	variable tmp;
    
    	if(init_hook) then begin
    
    	end else begin
    		hitchance:=get_sfall_arg;
    		target:=get_sfall_arg;
    		attacker:=get_sfall_arg;
    		bodypart:=get_sfall_arg;
    
    		if(bodypart==6) then begin
    			//eyes
    			tmp:=tile_distance_objs(target, attacker) - 3;
    			if(tmp > 0) then begin
    				hitchance := hitchance - tmp*3;
    			end
    		end else if(bodypart==0 or bodypart==7) then begin
    			//head or groin
    			tmp:=tile_distance_objs(target, attacker) - 5;
    			if(tmp > 0) then begin
    				hitchance := hitchance - tmp*2;
    			end
    		end
    
    		set_sfall_global("ts_hitpc", hitchance);
    		if(hitchance>95) then begin
    			hitchance:=95;
    		end
    		set_sfall_return(hitchance);
    	end
    end
    
    There's a lot more you could do than that, checking the players weapon and adjusting accordingly for sniper rifles etc. This was just a test for if it's possible.

    I was trying to get it so that if you had low hit chances, then you would accidentally hit other bodyparts. (Hence that set_sfall_global bit; that was used in hs_afterhitroll.int to decide which bodypart you hit, with you only being sure of hitting the correct bodypart at 150% uncapped accuracy.) I've still got a few kinks to work out with that script there though.
     
  6. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    Hey, thanks Timeslip! I would love to play around with this and help tweak it but unfortunately i'm rather hamstrung by my beginner level understanding of scripting.

    What part of the above script would i take to only increase the difficulty of hitting the eyes by say ... 50%?? (I don't really want to mess with the range thing as some players don't like mods to change things too much)

    I like the idea of having a (small) chance of hitting other body parts when missing a called shot but doesn't this run the risk of actually making the game much easier by removing the risk of making called shots? (i.e. paying the price of missing completely for the potential benefit of scoring a more devastating shot)
     
  7. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    No need to script for that. Just change the BodypartHitMod6 line in ddraw.ini from -60 to -110.

    Actually I had it set up so that only hits had a chance to be retargeted; misses continued to miss. That way aimed shots are even harder than normal, with none of their penelty removed.
     
  8. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    Oh i see. Very clever :D I misunderstood. I like this idea - i'll test it out and report back.
     
  9. Slaughter Manslaught

    Slaughter Manslaught Vault Senior Citizen

    Dec 11, 2006
    Looks awesome. When we will see this being released?
     
  10. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    ...... but now i realise i can't compile it becuase i use FSE and it won't recognise the init_hook command :roll:

    Could someone else possibly make an .int of this for me please :oops:
     
  11. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    Then replace the sslc that comes with fse with sfall's sslc. :)

    Like that says, if you're using fse with my modified sslc, it always says that scripts have compiled successfully even when they haven't. (The compiler that fse uses normally is the dos version, hence why I include the fake dos4gw in my sslc download. It's not a good enough fake for fse to be able to understand its errors though.:()
     
  12. Josan12

    Josan12 Vault Senior Citizen

    Oct 15, 2007
    Well i'll be .... it worked. So if you'll indulge me: am i correct in understanding the new hstohit.int will somehow be read by the game via sfall and it's magical dostuff code?? Therefore overriding the what the game would normally do with called shots and do what sfall tells it to do instead? :scratch:

    it's a mystery to me, but interesting.

    Who knows. Depends on how droopy my learning curve is and if Timeslip keeps babying me ;)

    I'll report progress tho ...
     
  13. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    yup. (except that it's hs_tohit.int. The underscore is important.)

    Read the hookscripts.txt that came with sslc.