Jump to content

Question

Posted (edited)

ReLinker

Hishy had the idea of making a little tool to allow us to merge mods with scripts - it takes the merge maps that are produced when you merge something, grabs all the scripts and LODGen files from you active mod list (BSAs included) and replaces the old plugin name and formIDs with the new plugin name and formIDs.

We all know what a fantastic tool Merge Plugins is. However there are certain mods which cannot be merged due to the use of certain scripting functions which are called on the original plugin name. Functions including GetFormFromFile, GetModByName, checkModPresence, and IsPluginLoaded look for specific .esp names. When you create a merge the original .esp name(s) no longer exists (unless you rename the merged plugin back to one of the original plugin names but this in itself can cause problems including broken MCM menus and is therefore not ideal) and therefore any function call looking for them will no longer trigger. These functions can be called by one of the scripts included in the mod being merged, or by scripts from other mods outside the merge.

A prime example of this is how the 'self-patching' in Legacy of the Dragonborn works by looking for the existence of a whole host of plugin names and activating the various additional displays if the mods are loaded. ReLinker actually came about out of a conversation regarding merging the four BadGremlins treasure hunt mods and patching the LotD activator script to make sure all four displays were still activated.

ReLinker is run outside ModOrganizer and runs on whichever profile you last had open before closing out of MO. It scans your load order looking for merges, and for every merge it finds it reads the contents of plugins and map .txt files and creates a reference list of the original plugin names and the new merged plugin name, along with the original and renumbered FormIDs. It then scans every script in your load order looking for any of those functions mentioned above and editing the scripts to reflect the new plugin names and formIDs. So in the example above once we've merged all four treasure hunts into Treasure Hunts.esp and run ReLinker, the DBM script will now look for Treasure Hunts.esp four times and activate all four displays. Likewise if you were to merge a mod like Sneak Tools whose scripts contain numerous Sneak Tools.esp lookups, ReLinker would then edit all of the Sneak Tools scripts in the merge itself to ensure they now look for the new merged plugin name and renumbered formIDs instead.

ReLinker works on both loose files (if you unpack your BSAs) and on scripts within BSAs. It directly edits the .pex files, doing away with the need to decompile and recompile the scripts which has greatly sped up the process over in the release version.

Instructions:

  1. Make sure you have the profile you want to ReLink active in Mod Organizer and that you have completed and activated all of your merges.
  2. Exit Mod Organizer
  3. Run ReLinker and follow the on screen instructions to specify the required paths.
  4. Check on screen output to ensure ReLinker has completed successfully.
  5. Close the ReLinker window and open Mod Organizer.
  6. Scroll to the bottom of the left pane and locate the new ReLinker Output mod.
  7. Activate ReLinker Output and leave it at the bottom of the left pane to ensure the new ReLinked scripts have priority over the originals.
  8. That's it, there is no 8

If you add/remove/update any mods or create any new merges and want to ReLink again then simply remove the existing ReLinker Output mod completely, exit MO and repeat the process again.

Prerequisites:

  • Mod Organizer - does not work with other managers;
  • Do not remove the merge folder after completing a merge.

Download it here. The tool will ask you for some things and will try to guess them properly. If the values between square brackets are correct, simply press ENTER without inputting any value. The output scripts and LODGen files will be stored in a new mod folder named "ReLinker Output". To revert the changes from this tool simply disable or delete the folder.
 
Good Practices:

  • ReLinker will run with the latest profile used in MO;
  • Close MO before running it.

By default, the following BSA's are ignored to speed up the process and because they don't contain any scripts with the functions that are affected:

  • Skyrim - Misc.bsa
  • Skyrim - Shaders.bsa
  • Skyrim - Textures.bsa
  • Skyrim - Interface.bsa
  • Skyrim - Animations.bsa
  • Skyrim - Meshes.bsa
  • Skyrim - Sounds.bsa
  • Skyrim - Voices.bsa
  • Skyrim - VoicesExtra.bsa
  • Update.bsa
  • Dawnguard.bsa
  • HearthFires.bsa
  • Dragonborn.bsa
  • HighResTexturePack01.bsa
  • HighResTexturePack02.bsa
  • HighResTexturePack03.bsa
  • Unofficial Skyrim Legendary Edition Patch.bsa
  • Falskaar.bsa
  • Wyrmstooth.bsa

If you have specific issues or suggestions post it directly to the this topic. I'm always happy to receive questions and feedback. Happy merging!

 

EDIT: Thanks dunc for the much better description!

Edited by hishutup
  • +1 2

Recommended Posts

  • 0
Posted

I followed the SRLE Extended LOTD guide. I found that the Fairy jar display doesn't work whne using Relinker. Just would like to report. If you need any more info please let me know. Thanks.

  • 0
Posted

I don't usually lurk on here anymore and I kind of forgot about this but currently, I am looking into it.

 

I need the relinker compiled scripts, specifically "DBM_QF__051521A2" as its relevant to the issue and the plugin that is relevant.

 

As for reddvilzz, the author thought i'd be real funny to use a bunch of odd encoded symbols for a dummy name which is causing python to misinterpret the number of chars. He has been playing with that for more than awhile.

 

EDIT: I believe the issue reddvilzz observed should be fixed in ver 30
Its identical to issue 3

I even look at the binaries expecting something new but nope same issue apparently.

Can you try again with a fresh build from the releases

  • 0
Posted (edited)

I don't usually lurk on here anymore and I kind of forgot about this but currently, I am looking into it.

 

I need the relinker compiled scripts, specifically "DBM_QF__051521A2" as its relevant to the issue and the plugin that is relevant.

 

As for reddvilzz, the author thought i'd be real funny to use a bunch of odd encoded symbols for a dummy name which is causing python to misinterpret the number of chars. He has been playing with that for more than awhile.

 

EDIT: I believe the issue reddvilzz observed should be fixed in ver 30

Its identical to issue 3

I even look at the binaries expecting something new but nope same issue apparently.

Can you try again with a fresh build from the releases

 

Here is the DBM_QF__051521A2 script

 

https://ufile.io/fdc77

Edited by darkside
  • 0
Posted

Can I get your merged file and also probably the original unmodified compiled pex.

I think something really weird may be happening.

Will upload them when I get home. Thanks for looking in to it.
  • 0
Posted

You have the same story as in the other guy so this post also applies to you.

 

 

For Hiscarp

    Fish12 = game.GetFormFromFile(111790, "Collectables and Treasures Merged.esp")

111790 = 1B4AE which is valid
0CHjTf0.png
 
 
For Fairy 09

    Fairy09 = game.GetFormFromFile(3434, "Collectables and Treasures Merged.esp")

3434 = D6A which is valid
YpAMj31.png

 

for butterfly

    JARButterflyTree = game.GetFormFromFile(4821, "Collectables and Treasures Merged.esp")

4821 = 12D5 which is valid 

TZnCZC6.png

 

 

 

I'll add you to the discussion for notification reasons.

  • 0
Posted (edited)

I don't usually lurk on here anymore and I kind of forgot about this but currently, I am looking into it.

 

I need the relinker compiled scripts, specifically "DBM_QF__051521A2" as its relevant to the issue and the plugin that is relevant.

 

As for reddvilzz, the author thought i'd be real funny to use a bunch of odd encoded symbols for a dummy name which is causing python to misinterpret the number of chars. He has been playing with that for more than awhile.

 

EDIT: I believe the issue reddvilzz observed should be fixed in ver 30

Its identical to issue 3

I even look at the binaries expecting something new but nope same issue apparently.

Can you try again with a fresh build from the releases

Okay I'll test that. Thank you hishy and ganda Edited by reddvilzz
  • 0
Posted

Alright I pushed a fix that was supposed to have been pushed about a month ago, so... uhmm... yh xD check if it works with the new version.

  • 0
Posted

I was peeking through papyrus to debug something out and I found interesting stuff.

 

Here I have some snip of the papyrus log showing a script trying to find a plugin that I have merged. In this case Birdsofskyrim.esp.

 

 

[12/17/2016 - 04:04:28PM] [** SKYBIRDS v0.930000 IS LOADING **] [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 377 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] [skyBirds]SKSE was detected. [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 380 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 381 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 382 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 383 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] [skyBirds]Checking if "Birds of Skyrim" is loaded... [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 384 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 385 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [_APBQuest (C500AA5E)]._APBQuest.SKSE_Init() - "_APBQuest.psc" Line 288 [_APBQuest (C500AA5E)].QF__APBQuest_0100AA5E.Fragment_2() - "QF__APBQuest_0100AA5E.psc" Line 82 [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 386 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] [skyBirds]"Birds of Skyrim" was not detected. Please ignore the above errors that were produced. [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 387 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] [aaaHitStopCustomMenu <aaaHitStopMenuQuest (CA004E12)>] INITIALIZED [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 388 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 389 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52 [12/17/2016 - 04:04:28PM] Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: <unknown self>.Game.GetFormFromFile() - "<native>" Line ? [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.Init() - "_APB_Extend_BOS.psc" Line 390 [alias myPlayer on quest _APBQuest (C500AA5E)]._apb_extend_bos.OnLocationChange() - "_APB_Extend_BOS.psc" Line 52

 

 

I've merged the skyBirds + Birdsofskyrim all together and ran ReLinker. Is this error means that relinker not fixing this current script I have merged?

  • 0
Posted

Its just spam, ignore it and then disable papyrus logging because it can be misleading.

Isn't it pretty clear it's looking for an ESP which has been merged?

 

Error: File "Birdsofskyrim.esp" does not exist or is not currently loaded. stack: .Game.GetFormFromFile()

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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

Important Information

By using this site, you agree to our Guidelines, Privacy Policy, and Terms of Use.