Jump to content

Q: Adding/Removing a Perk when set Armor/Clothes removed/worn


Recommended Posts

Yes, as the title states Im looking for a good way to have a perk (custom Perk I added) added to a player when they wear an item but then removes it when they, well, take it off.

 

 

I have searched the CK and even double checked my work in FO4Edit to make sure I didnt add anything I shouldn't have but have yet not been able to get the effect I am looking for.

 

 

-Uno

Link to comment
Share on other sites

Scriptname TestScriptPleaseRename extends ObjectReference Const

Perk Property pPerk Auto Const Mandatory

Event OnEquipped ( Actor akActor )
	akActor.AddPerk ( pPerk )
EndEvent

Event OnUnequipped ( Actor akActor )
	akActor.RemovePerk ( pPerk )
EndEvent

This should work.

 

Just set the script property in the item to the perk you want added/removed.

Link to comment
Share on other sites

I didnt get the notice of your post, weird.

 

Ok I will see what I can do to make that in the CK but am new to scripting.

 

My existing Perk:

ID: CorpseVision

04000857

 

 

 

 

No results found for 'ObjectReference' but it allowed me to make a new script and, I clicked the 'const' .

In the window below, 'Documentation String'

 

it wouldnt accept anything, saying:

"The parent script doesnt exist, please choose one that does"

 

----------------

I tried editing what I have in my armor for my Goggles to match what you had above, it didnt work wither.

 

-.-

Link to comment
Share on other sites

Oh right, you need to extract the script source files from "Data\Scripts\Source\Base\Base.zip" to "Data\Scripts\Source\Base\". The CK should have done that automatically, but if you tell it not to it will almost never ask again.

Link to comment
Share on other sites

I was ahead of you on that and no, nothing like that exists to be extracted.

I have used the Archive Extractor before, while making my mods standalone, so went ahead and extracted everything from all DLC's into a separate folder I use for modding reference back a while ago but didnt see anything pertaining to the CK unfortunately.

I will wait for morning then grab the CK again, watch how its extracted to see if it reviles something I missed.

:-)

 

 

----------------------------

*relaunched the Beth launcher, got the CK again, it updated and tossed a few new folders in my game DIR (all over really).

I see now what you meant.

All is good once I get past this "loaded multiple masters" error when opening my Mod in the CK but, I was able to make the script just by loading FO on its own and making the script for the wedding ring as you showed in your example. So I have the script now, just need to add it to my Goggle mod.

 

 

 

 

- Opening my mod in CK, now getting:

"Multiple master files selected for load. Load operation aborted" errors now. I never had an issue opening multiple master mods before this update.

LOL Beth keeps us on out toes ha ha

 

(will be following this: https://steamcommunity.com/app/377160/discussions/0/364039785169337238/ )

 

 

---> DONE, I got the perk created, the CK opened with no errors, the script connected to my Goggles.

 

Phew, that was fun actually, I love bypassing the roadblocks game companies throw at us :-P

Edited by UnoWild
Link to comment
Share on other sites

Im not sure if its working or not. I will have to remove the perk manually then check it again. played 12 more hours on far harbor and havent even really started the main quest. I like making games last forever. :-)

Link to comment
Share on other sites

I will look into that, great suggestion.

 

 

The perk activates a series of Spells and magic effects. You see these mods a lot now but I am trying to push it further so you dont have the effect just by installing the mod, I'd like mine to only work if wearing the Goggles. Once perfected, I will add it to my other helmet then start work on a Armor. :-)

Edited by UnoWild
Link to comment
Share on other sites

  • Recently Browsing   0 members

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