Jump to content

How to modify AbFortifyHealth correctly (enter/exit from Power Armor).


Recommended Posts

Maybe a script approach would be better.

Better, but I don't know how to do it :)

 

 

If it did not remove all the health gained from entering the power armour you could use it as a healing station.

Yes, thats the problem. But I solve it with Damage Threshold - http://www.nexusmods.com/fallout4/mods/7573

Link to comment
Share on other sites

 

Basically from what I have read, you want extra 100 health when you are in power armor, and when you exit, that extra health should be removed. I'll explain how can you do that without using scripts. You need to duplicate powerArmorStrengthEffect, then just change Assoc. Item 1 to Health. Add it on EnchPa_Abilities, give it magnitude 100 and that should do what you want.

 

I've tried this from the beginning. But the problem is - my health is spent first:

 

I have 100 HP and PA adds 100 HP. Enetring the PA and I have 200 HP. When damage is received for 80 HP, I still have 120 in PA, but when I get out of PA, I have only 20 HP.

 

that's because it subtracts added value when effect finishes, you cannot do much without some scripting. Let's try that way then:

 

Create new magic effect with archetype Script and add new script on it. paste following code there:

ActorVAlue Property HealthAV Auto
int playerhealth

Event OnEffectStart(Actor akTarget, Actor akCaster)
    playerhealth = Game.GetPlayer().GetValue(HealthAV) as int
    Game.GetPlayer().ModValue(HealthAV, 100)
endEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
    Game.GetPlayer().SetValue(HealthAV, playerhealth)
endEvent

Don't forget to fill HealthAV property with health actor value. Add this magic effect to enchPA_abilities. It doesn't need any magnitude or duration.

Link to comment
Share on other sites

setvalue????

 

he will loose any health gained from lvling up while wearing the power armour plus if he puts any points into endurance.

This is true I'm afraid.

 

I don't know if they fixed OnEffectFinish where it will fire reliably(in Skyrim it doesn't), but you can change the code a bit to compare the stored current value with the current health value at the time the effect finishes and then remove the added portion gained from the magic effect, leaving any possible modifiers from leveling intact. I don't know this new Actor Value system works.

Edited by TheDungeonDweller
Link to comment
Share on other sites

Create new magic effect with archetype Script and add new script on it. paste following code there:

ActorVAlue Property HealthAV Auto
int playerhealth

Event OnEffectStart(Actor akTarget, Actor akCaster)
    playerhealth = Game.GetPlayer().GetValue(HealthAV) as int
    Game.GetPlayer().ModValue(HealthAV, 100)
endEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
    Game.GetPlayer().SetValue(HealthAV, playerhealth)
endEvent

Don't forget to fill HealthAV property with health actor value. Add this magic effect to enchPA_abilities. It doesn't need any magnitude or duration.

 

I tried to do it, but immediately ran into problems. This is difficult for me. Moreover, there was a simpler solution (Damage Threshold). But thanks for trying to help!

 

 

setvalue????

 

he will loose any health gained from lvling up while wearing the power armour plus if he puts any points into endurance.

O yes, this is a dangerous parameter :confused:

 

 

Damage Threshold only causes Ai to flee if the actors are not properly equipped to fight. It doesn't even have to be a overhawl level to achieve that. A few mods that are desired anyway fit the bill. Because it's a design for the enjoyment of a very challenging Endgame level 40 to 200+ tested long term.

According to my idea, all weapons with damage lower than 100 HP, will not cause any damage to NPC in PA (_MGEF_Damage_Threshold). And all impacts with force lower than Assault rifle, will not cause damage to PA itself (_MGEF_Damage_Threshold_PA_Health).

70 hp - Assault rifle

85 hp - Sentry's minigun (.308 and with 150-200 rounds per gun)

90 hp - minigun (.308)

95 hp - .308 sniper rifle

90-120 hp - Deathclaw attack

180-240 hp - Deathclaw power attack

500 - .50 sniper rifle

Human have 80-120 HP, depending of the their composition/strength, but most of them 90-105.

 

About fleeing enemies - It is necessary to create the effect based on DamageHealthContact, that will work only for NPC/Player in PA,but when adding the effect to the weapon, prohibit it for PA. If Power Armor DT is 50, and additional (via DamageHealthContact) will be 50, NPC with 10mm pistol will attack PA without any damage. But with pipegun (.38 cal @ 40 hp damage) will not. Now I want to make sure that the dogs will also attack us. Zero damage to us and PA, but it's fun.

 

 

 

Because it's a design for the enjoyment of a very challenging Endgame level 40 to 200+ tested long term. It's untested at lower levels, but we started running FO4 when it launched. Doubling the level requirements & then doubling that again, still ends up with reaching over level 200. Lot of stuff happens during that time.

My opinion, in such games there should no be any NPC/Player/Items levels and combat Perks (most of it). It's not right. It was suitable in the Fallout 1 and 2, but only not in Fallout 3, New Vegas and Fallout 4. I changed all this already. Also, I removed from the game a lot of dubious modifications of weapons (like Armor piercing receiver :wacko:) and many for armor.

Edited by orangedeal
Link to comment
Share on other sites

  • Recently Browsing   0 members

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