Jump to content

Recommended Posts

This thread is for discussing the Restringer tool; design of it, testing of it, and so on.
 
 
 
WHAT IT DOES
 
Restringer analyzes mods and makes a patch that reduce the string count of those mods.
 
 
 
ORIGIN STORY
 
While studying this issue, Monoman1 cleverly noticed that if two scripts use the same names for their variables, that name only appears once in the string table.
 

If mod authors were to use a common set of variable names it seems strCount would be reduced accordingly. It would be very far from ideal for mod authors though.

-- Monoman1, March 21st 2016.
 
Eventually we realized that other approaches to fixing the string count issue wouldn't work. Monoman1 was right though, it would be terrible if mod authors had to rename their variables themselves. So we decided to make a post-processor that would rewrite the PEX files automatically. That way end-users could patch whatever mods they wanted to.
 
 
 
INSTRUCTIONS
 
Restringer is still in alpha. But the user interface is pretty self-explanatory, I think.
 
Automatic mode:

The first time Restringer is run, it will create a file called "settings.json". That file contains a setting called "modPaths". If you put the paths of your mods into "modPaths", the tool will run on automatic mode (no user interface) and just patch those mods. This is a legacy feature from before I added the GUI. But it's still there if you want to use it.

 

 

 

REQUIREMENTS

  • Java is a requirement -- Restringer is written entirely in Java.
  • Mod Organizer is strongly recommended for managing your mods and Restringer patches. I'll try to add some explicit support for Nexus Mod Manager at some point.
  • If you want to use Mod Organizer to run Restringer on your Skyrim\data directory, you need to have the 32-bit version of Java installed. But I strongly discourage people from running Restringer on the Skyrim\data directory. It's a bad idea.

 

 

 

WHAT MODS TO PATCH

  • Restringer is meant for patching ENDPOINT mods. Endpoint mods are mods that can be uninstalled without affecting any other mods; they have no other mods depending on them. For example, Chesko's Campfire is NOT an endpoint mod, because Frostfall and Wearable Lanterns depend on it (unless you don't have them installed, in which case go install them because they're AMAZING). Frostfall and Wearable Lanterns ARE endpoint mods. Sevencardz' Immersive Horses is another endpoint mod, because nothing depends on it.
  • If a mod has no scripts, then it doesn't use any strings so there is no reason to patch it. It's fine if an endpoint mod has a few ESP patches that do depend on it, as long as there are no scripts in the patch.
  • If you really need to patch a mod like Campfire, patch it and its dependants at the same time. If you patch Campfire, Frostfall, and Wearable Lanterns together, they form an ENDPOINT SET, because nothing outside of the set depends on them.
  • Some people really want to run Restringer on their entire load order as well as Skyrim itself. If you can make that work for you, great. But I don't recommend it.

 

 

WHAT YOU CAN DO

 

  • Test the tool!
  • Run it on a few mods, install the patch, start a new game, test out the mod, see if it still works. Tell me how it goes.
  • Use TESVESS to get before-and-after string counts, to see if there's improvement after patching a mod. Post your data here.
  • Check your papyrus logs, see if you get a bunch of errors that weren't there before. Post your logs here if there's something interesting in them.
  • Play with the tool, try to get it to crash in exciting ways. Let me know how you crashed it.
  • Find problems or annoyances with the user interface... keeping in mind that Java UIs are always kind of clunky.

 

 

NOTES

 

  • I'm distributing Restringer under the Apache 2.0 license.
  • Source code available below. :-)

 

Restringer 2016-05-03 (application).7z

Restringer 2016-05-03 (source).7z

Share this post


Link to post

Awesome. I'm going to create a Restringed category on my strings list as we start getting numbers. Thank you so much for all your hard work, your a god damn lifesaver. If I could give you an internet blowjob I would do so despite my marital status, and I'm pretty sure I could convince my husband you deserve it.  :D

Share this post


Link to post

Awesome. I'm going to create a Restringed category on my strings list as we start getting numbers. Thank you so much for all your hard work, your a god damn lifesaver. If I could give you an internet blowjob I would do so despite my marital status, and I'm pretty sure I could convince my husband you deserve it.  :D

 

Aw, you're sweet. :-)

Share this post


Link to post

markdf this tool is sweet. You're the greatest and made big breakthrough in Skyrim technical issue department. You're right next to sheson. :)

Share this post


Link to post

i got restringer working. been trying it with Selene Kate mod since it's high in strings.

 

installed normally Kate works as it's supposed to.

with it restrung, much of it works. all the MCM menu seems to work fine (ie; change hair styles, color, stats ect), she uses her unique idle anims and attacks...but i cannot recruit her as i should. the proper unique Kate dialog does not show. this is on a clean save

it DOES reduce the strings by like 50% tho!

Share this post


Link to post

markdf this tool is sweet. You're the greatest and made big breakthrough in Skyrim technical issue department. You're right next to sheson. :)

 

Let's not start saying crazy things... last thing I need is people giving me their firstborn. I can barely handle the one I already have. :P

i got restringer working. been trying it with Selene Kate mod since it's high in strings.

 

installed normally Kate works as it's supposed to.

with it restrung, much of it works. all the MCM menu seems to work fine (ie; change hair styles, color, stats ect), she uses her unique idle anims and attacks...but i cannot recruit her as i should. the proper unique Kate dialog does not show. this is on a clean save

 

Can you please post a couple of papyrus logs, one without the patch and one with?

 

It's this mod, right? I'll test it out tomorrow, see what I can learn.

http://www.nexusmods.com/skyrim/mods/36993/?

Share this post


Link to post

If it is that mod, recruitment works ok for me. The mod contains a seq file so you may need to save and reload that save to kick start the quest. 

Share this post


Link to post

So will this still be something that is for new game only or has anyone tested this on an existing save?

Share this post


Link to post

New game strongly recommended as far as I know. You will essentially be ripping the guts out of scripts, rearranging them and putting them back in. 

Share this post


Link to post

I do not (and will not) use MO or NMM.  I am a Wrye Bash man, and I have some questions.

 

1)  It looks like I would need to patch an entire directory tree at a time.  As such, I would probably need to, say, extract all of the mods I want to patch to another directory and then process them all at once that way.  Then I could repackage them and install the repackaged mods via Wrye.  Is that about right?

 

2)  Is this a one-time process?  In other words, once a mod is patched, does it ever need to be re-patched if I add a new mod to the mix?  I understand I'd need to repatch an updated mod of course...

Share this post


Link to post

New game strongly recommended as far as I know. You will essentially be ripping the guts out of scripts, rearranging them and putting them back in. 

Fair enough can't have everything I have 5k left better make it count.

Share this post


Link to post

I have had my coffee, and now have additional questions and concerns.

 

1)  You say in the current description, "Restringer is meant for patching ENDPOINT mods. Endpoint mods are mods that are not a dependency of any other mod."  Well, most mods depend on Skyrim.esm.  They often also depend on update.esm, dawnguard.esm, etc.  So that would effectively mean NOTHING can be patched by your mod except for skyrim.esm as you are currently explaining it.  That can't be true, can it?

 

2)  CAN we patch skyrim.esm?  Because a vanilla game generates half the string limit anyhow.

 

3)  I request the source code, and I request it either be posted here in this thread or included with the patcher.

 

Let us say I am a responsible modder, interested in reducing my strings.  And let us say I want to build (or rebuild) my mod in such a way that it will not need to be patched by your patcher.  I will need to know the inner workings of how your patcher works.  And if you get hit by a bus tomorrow, I, and every other mod author, are screwed.

Share this post


Link to post

You say in the current description, "Restringer is meant for patching ENDPOINT mods. Endpoint mods are mods that are not a dependency of any other mod."  Well, most mods depend on Skyrim.esm.  They often also depend on update.esm, dawnguard.esm, etc.  So that would effectively mean NOTHING can be patched by your mod except for skyrim.esm as you are currently explaining it.  That can't be true, can it?

If a mod depends on Skyrim, Skyrim is a dependency of that mod. Not the other way around.

Share this post


Link to post

 

You say in the current description, "Restringer is meant for patching ENDPOINT mods. Endpoint mods are mods that are not a dependency of any other mod."  Well, most mods depend on Skyrim.esm.  They often also depend on update.esm, dawnguard.esm, etc.  So that would effectively mean NOTHING can be patched by your mod except for skyrim.esm as you are currently explaining it.  That can't be true, can it?

If a mod depends on Skyrim, Skyrim is a dependency of that mod. Not the other way around.

 

 

LOL, sorry I read that explanation and it did look weird to me, (and I think I know what I'm doing generally, and in non general terms does representation of a persons perception equate to the representation perceived by a notional other person perception?). Anyway I'd go for the "Skyrim.esm is the Master, (with 1970's pointy beard),  and all other modifications use it. So just assume that the restringer modder knows what they are doing." 

 

Many apogees for any offense.

 

Share this post


Link to post

I have had my coffee, and now have additional questions and concerns.

This has already been clarified by other people, but yes -- an endpoint mod is a mod that no other mod depends on. A mod that you could uninstall without affecting any other mods. I see how that could be phrased better.

 

You can't patch Skyrim's core scripts unless you patch EVERY script, because when you patch a script then the changes have to be propagated to every script that extends it.

 

For example, if you patch Quest.pex, you have to patch every quest script.

 

I'll post the source code pretty soon.

 

 

There may be another solution: http://www.loverslab.com/topic/61293-help-test-fix-for-save-game-string-table-overflow/

It's also experimental though...

Sweet!

This is literally the best modding community EVER.

 

 

I do not (and will not) use MO or NMM. I am a Wrye Bash man, and I have some questions.

 

1) It looks like I would need to patch an entire directory tree at a time. As such, I would probably need to, say, extract all of the mods I want to patch to another directory and then process them all at once that way. Then I could repackage them and install the repackaged mods via Wrye. Is that about right?

 

2) Is this a one-time process? In other words, once a mod is patched, does it ever need to be re-patched if I add a new mod to the mix? I understand I'd need to repatch an updated mod of course...

If it were me, using wrye bash, I would convert the mod archives into installers so that I could run the patch on the folder in bash_installers. For each mod, I would output into a new folder in bash_installers called "[modname] restringer patch", and place the new installer right after the original mod's installer.

 

It is indeed a one-time process for each mod.

 

 

If it is that mod, recruitment works ok for me. The mod contains a seq file so you may need to save and reload that save to kick start the quest.

You're sure? I was starting to worry about a bug...

Share this post


Link to post

Okay... I've been pretty busy today, haven't had too much time to mess with this until now.

 

Let us say I wish to restring Legacy of the Dragonborn.  Really, who wouldn't want to?

 

But LoTD has several patches.  In my case, I used the CCOR, WAFR, CACO, and CRF patches.  Since these mods depend on LegacyoftheDragonborn.esp, does that mean I cannot restring it?  Or, if I restring them together, since Restringer works on a directory-by-directory basis, would that be sufficient?  Finally, would I also have to restring CCOR, WAFR, CACO, and CRF for everything to work as-intended?

Share this post


Link to post

Okay... I've been pretty busy today, haven't had too much time to mess with this until now.

 

Let us say I wish to restring Legacy of the Dragonborn. Really, who wouldn't want to?

The string table is exclusively a part of Papyrus, so Restringer only works on scripts (and BSA files containing scripts). If a mod has no PEX files (or a BSA file containing PEX files), then it doesn't count. So go ahead and patch LoTD -- and please report your results. :-)

 

I should further clarify "endpoint mod" in the description.

Share this post


Link to post

 

I have had my coffee, and now have additional questions and concerns.

This has already been clarified by other people, but yes -- an endpoint mod is a mod that no other mod depends on. A mod that you could uninstall without affecting any other mods. I see how that could be phrased better.

 

You can't patch Skyrim's core scripts unless you patch EVERY script, because when you patch a script then the changes have to be propagated to every script that extends it.

 

For example, if you patch Quest.pex, you have to patch every quest script.

 

I'll post the source code pretty soon.

 

 

There may be another solution: http://www.loverslab.com/topic/61293-help-test-fix-for-save-game-string-table-overflow/

It's also experimental though...

Sweet!

This is literally the best modding community EVER.

 

 

I do not (and will not) use MO or NMM. I am a Wrye Bash man, and I have some questions.

 

1) It looks like I would need to patch an entire directory tree at a time. As such, I would probably need to, say, extract all of the mods I want to patch to another directory and then process them all at once that way. Then I could repackage them and install the repackaged mods via Wrye. Is that about right?

 

2) Is this a one-time process? In other words, once a mod is patched, does it ever need to be re-patched if I add a new mod to the mix? I understand I'd need to repatch an updated mod of course...

If it were me, using wrye bash, I would convert the mod archives into installers so that I could run the patch on the folder in bash_installers. For each mod, I would output into a new folder in bash_installers called "[modname] restringer patch", and place the new installer right after the original mod's installer.

 

It is indeed a one-time process for each mod.

 

 

If it is that mod, recruitment works ok for me. The mod contains a seq file so you may need to save and reload that save to kick start the quest.

You're sure? I was starting to worry about a bug...

 

 

i was using the stringer on Kate which i have inside a merge i made. i had assumed since the merge uses that same scripts as the original kate mod, that restringing those scripts would work w/ the merge. but this seems false. because if i use the original Kate.esp, and the restrung scripts...then all works well!

but if i use those same scripts w/ the merge (which had a proper removal/clean save) then Kate has no unique recruit dialog.

oh and i thought of the SEQ save/reload thing to get dialog to work. didn't hake any diff for the merge.

 

i can get Pap logs for u if u'd like, but it seems the fault lies w/ my merge rather than the restringer. i bet if i remerged Kate and other mods, using the restrung scripts, all'd be well

 

Share this post


Link to post

I can't seem to get the UI to recognize my Mod Organizer folder. I have it installed in my Skyrim directory which is on my D: drive.

 

All I get when trying to set the path for Mod Organizer is:

 

"That directory doesn't seem to contain a ModOrganizer installation:"

 

Did I miss a simple step?

 

Edit: I was able to get it to run but only outside of Mod Organizer itself. My apologies if this is intentional.

Share this post


Link to post

I can't seem to get the UI to recognize my Mod Organizer folder. I have it installed in my Skyrim directory which is on my D: drive.

 

All I get when trying to set the path for Mod Organizer is:

 

"That directory doesn't seem to contain a ModOrganizer installation:"

 

Did I miss a simple step?

It checks that the MO directory is readable, and contains two subdirectories named "mods" and "profiles". Do your mod organizer folder meet those critetia? I assumed that all MO installations do, but I could be wrong.

Share this post


Link to post
Guest Ra'Vashann

I assume it's okay to use this on mods that are a "soft dependency"?  By soft I mean other mods only use events to call into them, rather than function calls or variable sharing.  I am thinking specifically of Deviously Cursed Loot, which from what I understand has lots and lots of strings, but seems to only expose events for other modders to play with.

Share this post


Link to post

I assume it's okay to use this on mods that are a "soft dependency"?  By soft I mean other mods only use events to call into them, rather than function calls or variable sharing.  I am thinking specifically of Deviously Cursed Loot, which from what I understand has lots and lots of strings, but seems to only expose events for other modders to play with.

 

You are exactly right. Actually, even function and property sharing is okay. It's script-extension that is an issue.

 

Share this post


Link to post

Anyway to use it if we don;t have Mod Organiser?

 

Of course. What are you using to manage your mods?

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...