Jump to content

some weapon realism...but how?


Recommended Posts

Yeah, this works very well, thanks. The same thing for crippling limbs and it would be perfect- any idea which script to use?

If using a script isn´t the right way for that task, i found a perk called ModChanceCripple which enhances the chance of crippling a limb...but how could i

use the perks mechanics to attach it to an magic effect, which then can be used by an enchantment?

Link to comment
Share on other sites

Hm, perhaps, that perk uses Mod outgoing limb damage, at least affects limb hits only. Use it then as a base and boost up to 9999. This perk must be on weapon's owner and can be applied by Mgef - PerkToApply field, Ench and Mgef should be ConstantEffect-Self (no conditions), Ench should be in weapon's OMOD.

Link to comment
Share on other sites

I've been testing the condition "GetHitLocation", I did a magic effect for each number from 0 to 20, and added them all (21 magic effects) to an enchantment, and this enchantment to a omod that I attached to a weapon.

I've shot to the limbs of some NPCs, that's the result:

 

image.png

Link to comment
Share on other sites

Nice! i missed 6 then somehow. And wait, this is exactly, how PowerArmor omods specify BodyPart, weird, i got 0 and 1 from there, but also got assured that rest must be 2-5, without actually looking... pretty dumb...

 

Somebody definitely has to add it to wiki.

Link to comment
Share on other sites

There you have a script I've done:

Scriptname WR:OnHitCrippleScript extends ActiveMagicEffect Const

Int Property CrippleChance = 100 const auto
{% Chance to cripple a limb on hit}
Int Property KnockdownChance = 100 const auto
{% Chance to Knockdown on hit}

Condition[] Property Conditions Auto Const
{Array of structs for limb condition values and names}

Struct Condition
	ActorValue ConditionValue
	{% Condition (limb) To Cripple}
	String ConditionName
	{% Condition (limb) Name, for Debug}
EndStruct

Int Property ConditionIndexToCripple Auto Const
{Condition Index to cripple}

Event OnEffectStart(Actor akTarget, Actor akCaster)
	Int roll
	If ConditionIndexToCripple < Conditions.Length
		roll = Utility.RandomInt(1, 100)
		If roll <= CrippleChance
			Debug.MessageBox("Cripple " + Conditions[ConditionIndexToCripple].ConditionName)
			akTarget.DamageValue(Conditions[ConditionIndexToCripple].ConditionValue, 99999)
		EndIf
	EndIf
	roll = Utility.RandomInt(1, 100)
	If roll <= KnockdownChance
		akCaster.PushActorAway(akTarget, 0)
	EndIf
EndEvent

You need to fill the conditions with the ActorValues that belong to each limb, also the chance percentages for cripple and knockback, and attach it to the magic effect of each limb, depending on the limb you want to cripple you must set a different index as ConditionIndexToCripple (it depends on how you fill the conditions array), it also has knockdown effect: example properties:

image.png

 

PS: I've added a Debug.MessageBox just for debugging, so I can tell if I set it up correctly, but you can comment the line to disable it after testing (prepend the line with semicolon ;)

Edited by DieFeM
Link to comment
Share on other sites

Well, I've got it working only for the first group (the ones that share limb numbers with human race), and it doesn't check for the race, I need to complete the limbs list, because some races share the same limb numbers as you can see, but there are a lot that doesn't, everything is set to 100% chance, with debug messages. You need to add the mod to a weapon in a workbench, only works for the weapons that have the attach point keyword ap_WeaponMaterial, so it shows as a material in the workbench. There you have it: https://drive.google.com/file/d/1P8Ur9c12Q1FfviY2ffRsU6schwQyM1a_/view?usp=sharing

Link to comment
Share on other sites

Hey, i´ve tested it out, but i´m afraid to tell you, that it does not work for me. The cripple effects are working, but they´re always occur 100 percent, although i changed the value to 75. Also, knockdown doesnt work at all (changed the value to 35). A few times a target went down when shot to the arm or leg, but overall no knockdown...

Link to comment
Share on other sites

  • Recently Browsing   0 members

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