Jump to content

Weapon mod - Headshot damage multiplier


dbbolton

Recommended Posts

I am working on a custom weapon mod, and I'd really like to add a custom enchantment or effect that will give a gun increased headshot damage. I want the effect to be tied to a weapon, i.e. not a permanent character perk. However, I don't know if such an effect is even possible. I assume it would require some scripting, but I don't know.

 

Any advice would be appreciated.

Link to comment
Share on other sites

Look at Locational Damage this mod has most of what you seek, loads of options to increase or decrease 14 different hit zones. With different hit points for each weapon type.

I play a sneak archer with increased head damage for ranged weapons and to make it fair I set it so the player can get "head shotted" too and not just Enemy NPC's.

Link to comment
Share on other sites

Isn't that a Skyrim mod? This is the NV forum...

 

Anyway, I want to create a custom weapon effect/enchantment in the GECK for a specific weapon, not install a mod that will affect all weapons.

 

You can have a perk with the condition for a specific weapon (ie playerRef.getEquipped == myUniqueWeapon)

Edited by devinpatterson
Link to comment
Share on other sites

You can have a perk with the condition for a specific weapon (ie playerRef.getEquipped == myUniqueWeapon)

So you're saying it would be easier to make a perk that's only granted when the weapon is equipped rather than to create an object effect that's tied to the weapon?

 

I guess that would work, but what Entry Point would I use for the perk, and would I need to add any other conditions to it?

Link to comment
Share on other sites

I guess that would work, but what Entry Point would I use for the perk, and would I need to add any other conditions to it?

 

Check the list (I'm at work and can't access the geck) and see if it will work for you. I'd focus on critical hit or weapon damage for the entry point. I'd also check limb damage (adamantium skeleton etc). Yeah you'll need at the very least a the getHitLocation function if you want the extra damage to apply to only head shots (IIRC 1 & 2 are head) or some other method to restrict your damage multiplier to head shots. You might have others (right hand not crippled etc), but that's up to you.

Link to comment
Share on other sites

Here's how I'm setting it up. Let me know if anything is off.

 

 

Conditions
Target     Function Name    Function Info                    Comp    Value
Subject    GetEquipped      Weapon: 'dbb10mmPistolUnique'    ==      1.00

Perk Entries
Rank    Priority    Type           Data 1                     Data 2            Data 3
1       0           Entry Point    Calculate Weapon Damage    Multiply Value    1000.0

Perk Entry Conditions
Target    Function Name     Function Info    Comp    Value    -
S         GetHitLocation    NONE             ==      2        OR
S         GetHitLocation    NONE             ==      1        OR
For testing purposes, I'm making it 1000 so it will be really obvious whether it's working. I'll probably lower it to 2 afterwards.

 

For reference, here is the GECK function page where I confirmed that 1 and 2 are the correct values: http://geck.bethsoft.com/index.php?title=Function_Page

 

If that's all OK, my next step is to attach the perk to the weapon. It seems to me I'll still need to create an object effect that calls a script to give the player the perk when the weapon is equipped and to remove it when it is unequipped, but I'm not sure. If there's a simpler way to do it, I'd prefer that.

Link to comment
Share on other sites

If that's all OK, my next step is to attach the perk to the weapon. It seems to me I'll still need to create an object effect that calls a script to give the player the perk when the weapon is equipped and to remove it when it is unequipped, but I'm not sure. If there's a simpler way to do it, I'd prefer that.

 

Don't know brother, havn't had a chance to fire up the geck and now I'm heading out to my night job. But there are probably more than one way to accomplish what your looking for. If you go this route, that we've been discussing, then you can add a base effect->item/effect script. But an additional condition, on teh perk, that the unique weapon be equipped, should also fly.

Link to comment
Share on other sites

Well, I've gotten pretty close, but I'm still not there. I set up an effect to give the player the perk. Basically, the first time you successfully shoot someone, you are notified that you've been given the perk (but only once) and the perk shows up in the PipBoy correctly.

 

However, the perk doesn't do anything. According to the GECK Wiki,

 

GetHitLocation won't work if used in a weapon's Object Effect, but will work if used in the weapon's Crit Effect.

 

GetHitLocation will only return the correct value in a GameMode block in the frame that the reference is killed.

So, I set up my effect as a spell, and set the weapon's critical effect to use this spell. So the player still has the perk, but it doesn't actually do anything and I can't figure out why. My guess is something to do with the GameMode thing.

 

I tried using the critical damage entry instead and it didn't work either.

 

The way I'm testing this is as follows: I set the pistol's damage and critical damage to 1, set the critical chance to 100%, and set the modifier to x1000. Then I spawned a Behemoth in front of me and shot it in the head. If it's working, the Behemoth should lose half its health from one shot. However, it loses essentially none, suggesting that the effect is broken.

 

Thanks for all your help so far. If you have some time later to try this out in the GECK later I'd really appreciate it, but there's no rush at all.

Link to comment
Share on other sites

After some more testing, I've figured out that the damage multiplier condition is the only problem (I think).

 

If I remove it, or set to to something like "GetHitLocation < 100" (which should always be true), the perk seems to work. One earlier problem was that I had set it to subject when it should be target.

 

So for whatever reason, the game is not registering a head shot as 1 or 2. I assume behemoths' heads are also 1 or 2 but I could be wrong. My only lead at this point is the potential GameMode issue.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...