Jump to content

Better Power Armor


Recommended Posts

Hello. There is a modification called Better Power Armor. The author, unfortunately, decided not to continue the development of his project.
He wanted to translate this modification into scripts.
I have some knowledge of the Phyton language, but I ran into a number of problems in Papyrus and have no idea how to proceed further.
The bottom line is that the author's modification is implemented via PERK / MGEF.
Help us with advice on how and what to do next to achieve 100% damage blocking before breaking parts, with the exception of certain types of ammunition.
ScriptName Yagami:PowerArmorBlockingDamage extends ActiveMagicEffects

ActorValue Property PowerArmorLeftLegCondition Auto
ActorValue Property PowerArmorRightLegCondition Auto
ActorValue Property PowerArmorLeftArmCondition Auto
ActorValue Property PowerArmorRightArmCondition Auto
ActorValue Property PowerArmorTorsoCondition Auto
ActorValue Property PowerArmorHeadCondition Auto

Actor Property PlayerRef Auto Const
float Property armorHealth Auto
ObjectReference Property armorPiece Auto
Edited by Solarium228
Link to comment
Share on other sites

I'm not sure how Better Power Armor is implemented, but to get you started in Papyrus you use an Event to do things. Your script should also extend another base script, so for that you would use ActiveMagicEffect not ActiveMagicEffects. The Events you can use depend on what you're extending. For ActiveMagicEffect, they inherit events from the actors they are on too. So you can use Actor events on ActiveMagicEffect as well.

 

Example:

ScriptName Yagami:PowerArmorBlockingDamage extends ActiveMagicEffect

ActorValue Property PowerArmorLeftLegCondition Auto
ActorValue Property PowerArmorRightLegCondition Auto
ActorValue Property PowerArmorLeftArmCondition Auto
ActorValue Property PowerArmorRightArmCondition Auto
ActorValue Property PowerArmorTorsoCondition Auto
ActorValue Property PowerArmorHeadCondition Auto

Actor Property PlayerRef Auto Const
float Property armorHealth Auto
ObjectReference Property armorPiece Auto

Actor Target

Event OnEffectStart(Actor akTarget, Actor akCaster) ;Triggered when the magic effect becomes active on an actor. 
    Target = akTarget ;save the target of the Magic Effect for use in other events. 
EndEvent

Event OnCripple(ActorValue akActorValue, bool abCrippled) ;Triggered when a limb from the target becomes crippled, or a crippled limb becomes healthy. 
    If Target.IsInPowerArmor() ;is the target in power armor? 
        If abCrippled == True 
            Debug.Notification("Limb Was Crippled") 
        Elseif abCrippled == False 
            Debug.Notification("Limb Was Healed")
        Endif
    Endif 
EndEvent

For more info on Papyrus scripting, you can go here: https://www.creationkit.com/fallout4/index.php?title=Category:Papyrus

Link to comment
Share on other sites

  • Recently Browsing   0 members

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