aurreth Posted April 26, 2021 Share Posted April 26, 2021 Working on a bunch of semi-linked mods and as part of one of them I have a terminal and holotape that gives the "current status" of all the vaults. What I'd like to do is on first run of that terminal/tape make the mapmarkers for those vaults visible, whether or not the player has discovered them yet. Basically a way to show the player where the other vaults are. So, big question, what has to be set or changed on a mapmarker or location to make it show up immediately, no matter where the player is in the world? I figure I need a Papyrus fragment in the terminal attached to the "Vault Status" menu selection, but that's pretty much all I got. Link to comment Share on other sites More sharing options...
LarannKiar Posted April 27, 2021 Share Posted April 27, 2021 (edited) There's an AddToMap object reference script function. Use that on the map marker's reference. You can use the OnQuestInit() event (if your quest is flagged as "Start Game Enabled"). (But editing Map Markers is also an option: remove the "Initially Disabled" and add the "Visible" flag to the map marker's reference). Edited April 27, 2021 by LarannKiar Link to comment Share on other sites More sharing options...
aurreth Posted April 27, 2021 Author Share Posted April 27, 2021 There's an AddToMap object reference script function. Use that on the map marker's reference. You can use the OnQuestInit() event (if your quest is flagged as "Start Game Enabled"). (But editing Map Markers is also an option: remove the "Initially Disabled" and add the "Visible" flag to the map marker's reference). Editing 5 markers is actually the easy way, but the problem is that "Initially Disabled" and "Visible" don't apparently work the way you think they should. Vault75MapMarker is Initially Disabled AND Visible. Vault114MapMarkerRef is neither. Same for Vault95MapMarkerRef. Vault 81 has two map markers, neither Visible, one Initially Disabled, one not. So there is no consistency in how those are applied. There has to be another factor involved here. 75 is only added to the map after entering the school basement. Parkway Station is added when you find it, 114 is added when you exit with Nick (and I still can't even find that damn marker in the files). 95 is like anything else, get close enough and it appears. 81, I'm not even sure why there are two markers. Ok, the quest/script route. I'm seeing how that could work. Each vault has it's own sub menu item, so accessing that could trigger a dedicated stage of the quest. Use a RefAlias in Quest Aliases and a script fragment. Aaaaand my CK ate itself. Of course. I'll be back after I reinstall the stupid thing. Thanks for the assist! Link to comment Share on other sites More sharing options...
LarannKiar Posted April 27, 2021 Share Posted April 27, 2021 (edited) If you're using a holotape, you can use the OnMenuItemRun(int auiMenuItemID, ObjectReference akTerminalRef) event: Event OnMenuItemRun(int auiMenuItemID, ObjectReference akTerminalRef) If auiMenuItemID == 1 ;you pressed the menu item (index 1) MapMarker01.AddToMap() ElseIf auiMenuItemID == 2 ;you pressed the menu item (index 2) MapMarker02.AddToMap() EndIf EndEvent This event is in the terminal script. So you can attach a script like this to a terminal. It also works if the holotape (terminal) is in the Pip-Boy. (I wouldn't use terminal script fragments.. just a lot of unnecessary files). Edited April 27, 2021 by LarannKiar Link to comment Share on other sites More sharing options...
aurreth Posted April 27, 2021 Author Share Posted April 27, 2021 Ok, so how do I replace "MapMarkerXX" with the appropriate reference? Link to comment Share on other sites More sharing options...
LarannKiar Posted April 27, 2021 Share Posted April 27, 2021 (edited) Scriptname YOURSCRIPTNAME extends Terminal Const ;Group MapMarkers ObjectReference Property MapMarker01 Auto Const ;Don't forget to fill these properties with the map markers (select them in the Render Window) ObjectReference Property MapMarker02 Auto Const endGroup Event OnMenuItemRun(int auiMenuItemID, ObjectReference akTerminalRef) If auiMenuItemID == 1 ;you pressed the menu item (index 1) MapMarker01.AddToMap() ElseIf auiMenuItemID == 2 ;you pressed the menu item (index 2) MapMarker02.AddToMap() EndIf EndEvent Edited April 27, 2021 by LarannKiar Link to comment Share on other sites More sharing options...
aurreth Posted April 27, 2021 Author Share Posted April 27, 2021 Got it. I'm too used to regular programming, where I'd declare the variable explicitly inside the program header and not in an additional pop up properties window. "new event onmenuitemrun cannot be defined because the script is not flagged as native" Link to comment Share on other sites More sharing options...
aurreth Posted April 27, 2021 Author Share Posted April 27, 2021 (edited) Ok, this compiles: For each menu item, Papyrus Fragment MapMarkerXX.AddToMap() With an ObjectReference Property defined for each MapMarkerXX Edit: The idea here is to give the player a list of vanilla vaults at the start of the game, when they use the overseer terminal in 111 to open the escape door. There is a menu item, "Vault Status" (or something like that, whatever), that calls up a list of all non-mod vaults. Select Vault 75, it gives you some verbage like "status unknown"... and adds the map marker for 75 to the map. Also going to add a wall terminal to the overseers room in each vault, as well as a holotape, that has the same info as a backup for people using an alternate start mod. No problem creating the terminal, sub menus, holotape, etc. Just have to add the map markers. Edited April 27, 2021 by aurreth Link to comment Share on other sites More sharing options...
Recommended Posts