FIXED RELEASED WHICH SHOULD PREVENT NOTE LOSS If note isn't present but has "Been Digitized" displayed check back on the tab later If note hasn't left the MISC tab in the INV Section, it either isn't a supported note, or there's been some delay.
it's crazy that this wasn't in the main game. Why give up an organized note section in favor of throwing them all randomly in the misc tab with every other misc item? I can't tell you the number of times I've opened my pip boy looking for it. Two thumbs up
For those having an issue with being unable to progress the Gilded Grasshopper quest, "Read Food for the Grashopper", the console command suggested in earlier comments simply completes the quest. Don't do that. Instead, use the following console command to advance to the next part of the quest to complete it as normal.setstage MS07B 30
Since the mod author seems to have abandoned this mod, and it is currently in a dangerous state (due to it deleting all notes and breaking quests that depend on the physical note), I will provide a basic analysis of what needs to be done:
Replace the function CheckItems to delete the logic for removing physical notes. This way the notes will still be in the inventory, and we just need to drop them into a container.
Create a patcher.
Add the esl Flag to the mod header.
Remove the Container item and the Leveled List since their purpose is only for debugging.
The new function just needs to be the following to fix the issue with the quests support:
Spoiler:
Show
Function CheckItems() PlayerRef = Game.GetPlayer() If (PlayerRef) int Index = 0 While (Index < GlobalValues.GetSize()) If (PlayerRef.GetItemCount(BookItems.GetAt(Index)) >= 1 && (GlobalValues.GetAt(Index) as GlobalVariable) == false) SetGlobal(GlobalValues.GetAt(Index) as GlobalVariable, true) Debug.Notification("Note Digitized to DATA") EndIf Index += 1 EndWhile EndIf EndFunction
The patcher needs to do the following:
Iterate over every single Book item and copy it as a Message into this mod, adding SSWB_ at the start of the EDITOR ID (Skip the ones with variables (<example>), delete all the HTML tags. The copy only migrates the values FULL - Name, DESC - Description and It needs to set flag Message Box on DNAM - Flags.
Create a Global named PlayerHasNote### (00-99,100-999) of Type Boolean and Value set as 0 for each of the cloned messages.
Clear SSWB_VNotes, SSWB_MiscNotes and SSWB_GlobalValues.
Register all the new Messages on SSWB_VNotes, all the ref Messages on SSWB_MiscNotes and all the Global variables on SSWB_GlobalValues.
There are probably better ways to implement this logic but since that is outside my knowledge, this should be more than enough. I will probably implement this during this week using a Synthesis Patcher.
The following code can be used to create your own Synthesis Patcher and integrate all the books. This will also carry over any changes done by other mods to the message contents:
Spoiler:
Show
using Mutagen.Bethesda; using Mutagen.Bethesda.Synthesis; using Mutagen.Bethesda.Fallout4; using Mutagen.Bethesda.Plugins; using Noggog; using System.Text.RegularExpressions; using System.Resources;
namespace ReturnoftheNOTESTabPatcher { public class Program { public static async Task<int> Main(string[] args) { return await SynthesisPipeline.Instance .AddPatch<IFallout4Mod, IFallout4ModGetter>(RunPatch) .SetTypicalOpen(GameRelease.Fallout4, "YourPatcher.esp") .Run(args); }
var sswbVNotes = sswbVNotesRef.GetOrAddAsOverride(state.PatchMod); var sswbMiscNotes = sswbMiscNotesRef.GetOrAddAsOverride(state.PatchMod); var sswbGlobalValues = sswbGlobalValuesRef.GetOrAddAsOverride(state.PatchMod);
Note: Current bug, despite defining the Global as a boolean, it is being registered as Long. It seems to be a Synthesis bug, so the quick solution is to open the created patch with FO4Edit and use "AT - QuickChange v2.5.pas" to replace in the property "FNAM - Type", the value "Long" for "Boolean". You can also use this step to set the ESL flag (if applicable).
Really idiotic that they added a junk section but then removed the notes section so MISC ends up being even more cluttered than it used to be. Old note section was also organized by date picked up and made it indicated if you already read a note or not. Just a direct downgrade over the old system despite having new menus lol
DO NOT UNINSTALL THIS MOD or you'll lose all your notes. For those who can't complete The Gilded Grasshopper, because reading the digitized note doesn't progress the quest, type into console:
CompleteQuest MS07b
That instantly completes the quest giving you the XP and clearing it from your quest list. At least for this quest it is safe to do this without missing out on content. This mod is so close to greatness, mod author pulled an avatar
Any idea how to progress the Deacon note prompt? He tells you not to read it, but you're supposed to and talk to him again, but the prompt never follows properly with the digitized note.
you can also Tipe "SetStage 000229FD 30" into the console it will set the quest forward as if you read the note
Thank you! This is exactly what I needed. Kinda regretting installing this mod. I never realized before just how many quests are started by or involve reading notes.
It's an interesting concept but it's a huge pain to expand upon and add notes from different mods. It either needs a revision of how it works or an automatic tool for patching.
A very interesting Mod because in fact the Vanilla version Note system is painful to use.
In its current state, your Mod isn't really usable because the Notes that trigger quests seem to be problematic. But you will also need to provide technical details to be able to integrate non-vanilla Notes of the Mods present in our loading order.
- what to add with FO4Edit so that the Note is recognized by your Mod.
I keep your Mod in my queue before injecting it into my heavily modded game.
Additional note: I use FallUI and your Mod integrates without any problems
Anyone know how to fix this? I have the most recent F4SE and most recent of this mod and PBT, and when I start the game with the F4SE shortcut it pops up a dialogue saying this mod is 'expecting a different version' and will not load. True to form, the 'Notes' section is missing in the pip-boy.
<alias=Dungeon> is a text replacement tag, it replaces this tag with the actual name of the dungeon that is filling the alias named Dungeon in the quest to which the book (note) belongs.
The Book records need to be an alias of the same quest in order to use text replacements from the quest aliases, but messages do not, messages have a dropdown menu to select the owner quest, you need to find out to which quest is the book related to, and set it as owner quest for the message, so the game knows from what quest aliases it should take the text replacements in this message.
The problem is that text replacements might not work with pipboy tabs, that's something you'll need to find out, I would recommend to display the message using show() function before testing it in pipboy tabs to make sure that the message is properly configured for text replacement.
87 comments
If note isn't present but has "Been Digitized" displayed check back on the tab later
If note hasn't left the MISC tab in the INV Section, it either isn't a supported note, or there's been some delay.
DLC UPDATE IN THE WORKS, PLEASE BE PATIENT
setstage MS07B 30
The new function just needs to be the following to fix the issue with the quests support:
Function CheckItems()
PlayerRef = Game.GetPlayer()
If (PlayerRef)
int Index = 0
While (Index < GlobalValues.GetSize())
If (PlayerRef.GetItemCount(BookItems.GetAt(Index)) >= 1 && (GlobalValues.GetAt(Index) as GlobalVariable) == false)
SetGlobal(GlobalValues.GetAt(Index) as GlobalVariable, true)
Debug.Notification("Note Digitized to DATA")
EndIf
Index += 1
EndWhile
EndIf
EndFunction
The patcher needs to do the following:
There are probably better ways to implement this logic but since that is outside my knowledge, this should be more than enough. I will probably implement this during this week using a Synthesis Patcher.
Just replace the present one over at: Scripts\SpicedSuit\BookDetector.pex
using Mutagen.Bethesda;
using Mutagen.Bethesda.Synthesis;
using Mutagen.Bethesda.Fallout4;
using Mutagen.Bethesda.Plugins;
using Noggog;
using System.Text.RegularExpressions;
using System.Resources;
namespace ReturnoftheNOTESTabPatcher
{
public class Program
{
public static async Task<int> Main(string[] args)
{
return await SynthesisPipeline.Instance
.AddPatch<IFallout4Mod, IFallout4ModGetter>(RunPatch)
.SetTypicalOpen(GameRelease.Fallout4, "YourPatcher.esp")
.Run(args);
}
public static void RunPatch(IPatcherState<IFallout4Mod, IFallout4ModGetter> state)
{
Regex titleHeaderRegex = new(@"^\[[^\]]+\]\s*", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex divHeaderRegex = new(@"<div(\s+[^>\r\n]+)?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex fontHeaderRegex = new(@"<font\s+[^>\r\n]+>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex fontTailRegex = new(@"</?font/?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex imgHeaderRegex = new(@"<img\s+[^>\r\n]+>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex imgTailRegex = new(@"</?img/?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex dynamicFieldsRegex = new(@"<(Global|Alias|Token)(\.\w+)?=[^>\r\n]+>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex italicRegex = new(@"</?i/?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex boldRegex = new(@"</?b/?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex underscoreRegex = new(@"</?u/?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex paragraphHeaderRegex = new(@"<p(\s+[^>\r\n]+)?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex paragraphTailRegex = new(@"</?p/?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex htmlBreaklineRegex = new(@"</?br/?>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex breaklineRegex = new(@"[\r\n]+", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex htmlTrashRegex = new(@"</[^>\r\n]+>", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
Regex redactedChainRegex = new(@"(\-REDACTED\-\s*){2,}", RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
ModKey masterModKey = new("PBT_RoN", ModType.Plugin);
var masterMod = state.LoadOrder.TryGetValue(masterModKey);
if (masterMod != null)
{
var sswbVNotesRef = state.LoadOrder.PriorityOrder.FormList().WinningContextOverrides().FirstOrDefault(x => x.Record.EditorID == "SSWB_VNotes");
var sswbMiscNotesRef = state.LoadOrder.PriorityOrder.FormList().WinningContextOverrides().FirstOrDefault(x => x.Record.EditorID == "SSWB_MiscNotes");
var sswbGlobalValuesRef = state.LoadOrder.PriorityOrder.FormList().WinningContextOverrides().FirstOrDefault(x => x.Record.EditorID == "SSWB_GlobalValues");
if (sswbVNotesRef != null && sswbMiscNotesRef != null && sswbGlobalValuesRef != null)
{
var sswbVNotes = sswbVNotesRef.GetOrAddAsOverride(state.PatchMod);
var sswbMiscNotes = sswbMiscNotesRef.GetOrAddAsOverride(state.PatchMod);
var sswbGlobalValues = sswbGlobalValuesRef.GetOrAddAsOverride(state.PatchMod);
sswbVNotes.Items.Clear();
sswbMiscNotes.Items.Clear();
sswbGlobalValues.Items.Clear();
foreach (var bookGetter in state.LoadOrder.PriorityOrder.Book().WinningContextOverrides())
{
if (bookGetter.Record.Name?.String != null && bookGetter.Record.BookText?.String != null)
{
string title = titleHeaderRegex.Replace(bookGetter.Record.Name.String, "");
title = dynamicFieldsRegex.Replace(title, "-REDACTED-").Trim();
string content = bookGetter.Record.BookText.String;
content = italicRegex.Replace(content, "'");
content = boldRegex.Replace(content, "");
content = underscoreRegex.Replace(content, "");
content = dynamicFieldsRegex.Replace(content, "-REDACTED-").Trim();
content = paragraphHeaderRegex.Replace(content, "\r\n");
content = paragraphTailRegex.Replace(content, "");
content = content.Replace("[pagebreak]", "\r\n");
content = htmlBreaklineRegex.Replace(content, "\r\n");
content = fontTailRegex.Replace(fontHeaderRegex.Replace(content, ""), "");
content = imgTailRegex.Replace(imgHeaderRegex.Replace(content, "-REDACTED-"), "");
content = redactedChainRegex.Replace(content, "-REDACTED-");
content = divHeaderRegex.Replace(content, "");
content = htmlTrashRegex.Replace(content, "");
content = content.Trim();
//content = breaklineRegex.Replace(content, "\r\n");
if (!string.IsNullOrEmpty(content) && content != "-REDACTED-" && Regex.Replace(content.Replace("-REDACTED-", ""), @"[\b\s]", "").Trim().Length > 20 && !title.Contains("-REDACTED-"))
{
Console.WriteLine($"{title} => {content}");
sswbMiscNotes.Items.Add(bookGetter.Record);
Message newMessage = new(state.PatchMod);
newMessage.EditorID = $"SSWB_{bookGetter.Record.EditorID}";
newMessage.Name = title;
newMessage.Description.String = content;
newMessage.Flags.SetFlag(Message.Flag.MessageBox, true);
sswbVNotes.Items.Add(newMessage);
GlobalBool newGlobal = new(state.PatchMod);
newGlobal.EditorID = $"PlayerHasNote{state.PatchMod.Globals.Count}";
sswbGlobalValues.Items.Add(newGlobal);
}
}
}
}
else
{
Console.WriteLine($"Error enumerating key FormID Lists!");
}
}
else
{
Console.WriteLine($"Mod {masterModKey.FileName} not found!");
}
}
}
}
Note: Current bug, despite defining the Global as a boolean, it is being registered as Long. It seems to be a Synthesis bug, so the quick solution is to open the created patch with FO4Edit and use "AT - QuickChange v2.5.pas" to replace in the property "FNAM - Type", the value "Long" for "Boolean". You can also use this step to set the ESL flag (if applicable).
CompleteQuest MS07b
That instantly completes the quest giving you the XP and clearing it from your quest list. At least for this quest it is safe to do this without missing out on content. This mod is so close to greatness, mod author pulled an avatar
it will set the quest forward as if you read the note
In its current state, your Mod isn't really usable because the Notes that trigger quests seem to be problematic.
But you will also need to provide technical details to be able to integrate non-vanilla Notes of the Mods present in our loading order.
- what to add with FO4Edit so that the Note is recognized by your Mod.
I keep your Mod in my queue before injecting it into my heavily modded game.
Additional note:
I use FallUI and your Mod integrates without any problems
The Book records need to be an alias of the same quest in order to use text replacements from the quest aliases, but messages do not, messages have a dropdown menu to select the owner quest, you need to find out to which quest is the book related to, and set it as owner quest for the message, so the game knows from what quest aliases it should take the text replacements in this message.
The problem is that text replacements might not work with pipboy tabs, that's something you'll need to find out, I would recommend to display the message using show() function before testing it in pipboy tabs to make sure that the message is properly configured for text replacement.