Adding a holotape to inventory is easy, though with a new game all gear is stripped from the character around about the time he exits the Cryopod. This leaves people to either:
* console in a tape
* craft a new tape at the chemistry station (if the author has implemented that)
For modders: here is basic papyrus scripting to set up your mod so that it adds the holotape after exiting Vault 111.
Note: If you want to fire off a quest after leaving Vault 111, use this mod:
https://www.nexusmods.com/fallout4/mods/21858
Give the modder an endorsement, his resource helped me loads!
============================================================================
For this tutorial I am using the following (the full source is included with the Raze My Settlement mod):
Workspace: RazeMySettlement
Script: RMS_Scripts.psc
This gives a directory/file setup of:
Data\Scripts\RazeMySettlement\RMS_Scripts.pex <-- compiled file
Data\Scripts\Source\User\RazeMySettlement\RMS_Scripts.psc <-- source file
Start by setting up a quest to hold the scripts and fire everything off - set it up to run on start, once (priority 45 is plenty). Attach the script in the Scripts tab, add two properties:
* MQ102 (and make sure that it points to MQ102)
* your holotape (and make sure that it points to your holotape - I'm using RMS_Holotape and RMS_Holotape_VIS, for options)
The following code should be self-evident to the experienced scripters, hopefully the comments are good enough for new scripters:; function to add the appropriate holotape to inventory, depending upon installed mods
Function AddHolotape()
; VIS-G?
if (Game.IsPluginInstalled("VIS-G Item Sorting.esp"))
; add appropriate holotape to the Sole Survivor's inventory
Game.GetPlayer().AddItem(RMS_Holotape_VIS, 1, true)
; VIS?
elseif (Game.IsPluginInstalled("ValdacilsItemSorting-00-ValsPicks-DLCVersion-VanillaWeight.esp") || \
Game.IsPluginInstalled("ValdacilsItemSorting-00-ValsPicks-DLCVersion.esp") || \
Game.IsPluginInstalled("ValdacilsItemSorting-00-ValsPicks-NoDLCVersion-VanillaWeight.esp") || \
Game.IsPluginInstalled("ValdacilsItemSorting-00-ValsPicks-NoDLCVersion.esp"))
; add appropriate holotape to the Sole Survivor's inventory
Game.GetPlayer().AddItem(RMS_Holotape_VIS, 1, true)
else
; vanilla
Game.GetPlayer().AddItem(RMS_Holotape, 1, true)
endif ; stop running this quest (we don't want it continually running after the holotape is given)
Self.Stop()
; notify the player
Debug.Notification("Raze My Settlement holotape added to inventory.")
EndFunction
; function to check the holotape and add upon leaving vault 111
Function CheckHolotape()
; check the main quest
;Debug.Notification("Main Quest stage: " + MQ102.GetCurrentStageID())
; have we already left the vault
if (MQ102.GetCurrentStageID() >= 10)
; add the appropriate holotape
AddHolotape()
else
; start watching for exiting vault 111
RegisterForRemoteEvent(MQ102, "OnStageSet")
endif
EndFunction
; check the on stage set events
Event Quest.OnStageSet(Quest akSender, Int auiStageID, Int auiItemID)
; is it MQ102 and has the stage hit 10 (exit the vault)
if (akSender == MQ102 && auiStageID >= 10)
; add the holotape
AddHolotape()
; stop watching MQ102
UnregisterForRemoteEvent(MQ102, "OnStageSet")
endif
EndEvent
Now we need to run the CheckHolotape() function upon first run. We do this in a quest fragment - set it up for stage 10 or something right at the beginning of the quest stages, in the papyrus fragments set kmyQuest to the name of your attached script (in my case it is RazeMySettlement:rms_scripts):
; check the holotape
kmyQuest.CheckHolotape()
Now the quest will fire and run the function to check the holotape - if the character has exited Vault 111 it will immediately add the holotape, else it will keep an eye on the MQ102 quest to see when he does and then add it.
0 comments