Jump to content

Is Power Armor a Creature?


Recommended Posts

I try to play the game without Power Armor and use stealth mechanics so I'm not very knowledgeable on how the Power Armor works. Someone asked me in a post if my mod allowed for the player's stat bonuses to carry over while wearing Power Armor and I learned that the vanilla game doesn't apply the player's stat bonuses or carry weight from clothing and backpacks while wearing Power Armor.

 

I tried to figure out if I could "fix" it and had a suspicion that Power Armor may have began as a modified Super Mutant model, because the size similarity. Then I looked in FO4Edit at the Race category, and Power Armor has a Race with its own SPECIAL attributes, carry weight, HP, AP... everything that would be needed to create a character that was a Power Armor frame.

 

Unless I'm drastically overcomplicating things, I think that when the player equips Power Armor, the character they created at the beginning of the games is "paused", and some of its attributes like HP and inventory are applied to a substitute creature called Power Armor or Power Armor Frame. While "wearing Power Armor", everything that happens "to the player" is actually happening to the Power Armor creature, and when the player unequips Power Armor any lasting changes like damage or inventory are applied back to the player character and it is unpaused.

To me, this also explains how Power Armor can use the same equipment slots as regular clothes and Armor but not unequip all of those items. Power Armor is never actually equipped "on the player", it is equipped to the Power Armor creature, which has its own equipment slots. It's just convenient and "a mirage" that the model of the player character fits almost perfectly into the model of the Power Armor, but in reality wearing Power Armor may be more like "wearing" or "transmutating" into a Radscorpion or a SuperMutant than it is like equipping an outfit.

 

Does this help at all in figuring out how to carry over the carry weight and stats from the player while wearing Power Armor?

Edited by th3t3rr1bl30n3
Link to comment
Share on other sites

It could. I think it could also be a script in the game engine.

When the player stands in a trigger area behind Power Armor and presses E, a script runs that copies some of the player's information, the tables or arrays that store all the inventory and HP and Rads, and it applies that certain information to the Power Armor by just... appending the different arrays of information to the base file. When the player unequips Power Armor, a "reverse" script runs, which takes the appended information from the Power Armor which has probably changed, and it overwrites the new values back onto the tables of the player character. So if you dropped something from your inventory or lost health while wearing Power Armor, those new values are applied to the player character when you unequip Power Armor.

So to the have the player's carry weight apply when in Power Armor would require a script that includes the additional arrays that need to be appended to Power Armor with the HP and Inventory. Carry weight may be easier than stats though, because the Power Armor records have a lot of if/then statements controlling how Strength and some other stats are calculated.

Edited by th3t3rr1bl30n3
Link to comment
Share on other sites

Sooo i did a lot of digging around power armor to make my mod Nuka Bench,

Heres whats in "systempowerarmorscript" which is tied to the SystemPowerArmorQuest

 

scriptName SystemPowerArmorScript extends Quest

;-- Properties --------------------------------------
objectreference property myPowerArmorRef auto
race property PowerArmorRace auto
weapon property MachineGun01 auto
;-- Variables ---------------------------------------
Int myMaxBatteryLife
Int myBatteryLife
race myPlayerRace
;-- Functions ---------------------------------------
function PowerArmorShutdown()
(myPowerArmorRef as powerarmoractivatorscript).PowerArmorSystemSync(myBatteryLife, myMaxBatteryLife)
myPowerArmorRef = none
game.GetPlayer().SetRace(myPlayerRace)
endFunction
function PowerArmorStartUp(objectreference PowerArmorRef, Int CurrentBatteryLife, Int MaxBatteryLife)
myPlayerRace = game.GetPlayer().GetRace()
game.GetPlayer().SetRace(PowerArmorRace)
myPowerArmorRef = PowerArmorRef
myBatteryLife = CurrentBatteryLife
myMaxBatteryLife = MaxBatteryLife
game.GetPlayer().EquipItem(MachineGun01 as form, false, false)
endFunction
function PowerArmorRecharge(Int RechargeAmount)
myBatteryLife += RechargeAmount
if (myBatteryLife > myMaxBatteryLife)
myBatteryLife = myMaxBatteryLife
endif
endFunction

 

There is a race switch when you get in and out, as well as a lot of other things going on.

FormID 0003E577 (Armor) ArmorPoweredFrame has a description in it "This is what gets equipped on an actor when he gets into power armor furniture", with that and how fusion cores get turned into an OMOD like armor modifications when plugged into a frame I can say theres alot more to it and the race change is probably a minimal aspect.

Edited by lilkandeekid
Link to comment
Share on other sites

Its an extension of the script. Theres also a "PowerArmorBatteryInsertScript" and "PowerArmorRechargeScript" that are pretty self explanatory.

 

scriptName PowerArmorActivatorScript extends ObjectReference

;-- Properties --------------------------------------
Int property BatteryLife auto
Int property MaxBatteryLife auto
systempowerarmorscript property SystemPowerArmorQuest auto
;-- Variables ---------------------------------------
;-- Functions ---------------------------------------
function PowerArmorSystemSync(Int SystemBatteryLife, Int SystemMaxBatteryLife)
BatteryLife = SystemBatteryLife
MaxBatteryLife = SystemMaxBatteryLife
endFunction
function OnActivate(ObjectReference akActionRef)
if (akActionRef == game.GetPlayer() as ObjectReference)
if (self as ObjectReference == SystemPowerArmorQuest.myPowerArmorRef)
SystemPowerArmorQuest.PowerArmorShutDown()
elseif (SystemPowerArmorQuest.myPowerArmorRef == none)
SystemPowerArmorQuest.PowerArmorStartUp(self as ObjectReference, BatteryLife, MaxBatteryLife)
else
SystemPowerArmorQuest.PowerArmorShutDown()
SystemPowerArmorQuest.PowerArmorStartUp(self as ObjectReference, BatteryLife, MaxBatteryLife)
endif
endif
endFunction
Edited by lilkandeekid
Link to comment
Share on other sites

  • Recently Browsing   0 members

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