Jump to content

7 Days to Die Mod Localization loader


mr.devolver

Recommended Posts

7 Days to Die Mod Localization loader v4.8a

Coded by mr.devolver

 

Hello everyone!

 

This is my first contribution to the mod community.

 

For those of you who are like me and want to play with a lot of mods installed, but don't feel like

adding all those mod localization files manually to your game, I created a simple batch script

to automate the process. I know I'm not the best coder, so this script is not perfect and it's highly

experimental, but feel free to improve it and share your improved version with us!

 

Description:

This script is supposed to go through all of your 7 Days to Die mods

and automatically load their localization.txt and localization - quest.txt

files into the original game localization files.

 

Before making any changes, this script creates a backup of your original

game localization files.

 

Warning:

It does NOT keep track of your changes, so if you want to keep your

current backup, you should save it to a special directory somewhere

outside of its original location.

 

Please note that this script must run from your Mods directory.

If you're running it from a different location, it will not work.

 

UPDATE #1

Please note that for the best experience, you should always make sure that all installed mods that use localizations have their localization files properly named and formatted.

 

Proper file names are localization.txt and localization - quest.txt (if available).

 

I've seen at least one mod which did not use proper format and I had to edit it manually to make it work with my script. It was a mod called Sol_RabbitTraps which is a cool mod, but its localization file name was not a proper one and its format assumed that you will manually edit the localization file when adding this mod.

 

This was the format:

Replace:

 

perkTheHuntsmanRank1Desc,progression,Perk,New,Harvest 20% more resources from animals using any bladed tool or weapon. Learn to craft Primative Rabbit Trap.,,,,,

perkTheHuntsmanRank4Desc,progression,Perk,New,Harvest 80% more resources from animals using any bladed tool or weapon. Learn to craft Reusable Rabbit Trap.,,,,,

 

Add:

 

Herbivore_Bait_Desc,items,Resources,New,Used to craft Baited Traps.,,,,,

Unbaited_Primitive_Rabbit_Trap_Desc,items,Resources,New,Add Herbivore Bait to this.,,,,,

Baited_Primitive_Rabbit_Trap_Desc,blocks,Block,New,Place on terrain within sunlight and wait.,,,,,

Unbaited_Reusable_Rabbit_Trap_Desc,items,Resources,New,Add Herbivore Bait to this.,,,,,

Baited_Reusable_Rabbit_Trap_Desc,blocks,Block,New,Place on terrain within sunlight and wait.,,,,,

Huntsman_Rank_1_Desc,items,Book,New,"For players who already had the perk when the mod was added because they wont have the recipes.".,,,,,

Huntsman_Rank_4_Desc,items,Book,New,"For players who already had the perk when the mod was added because they wont have the recipes.".,,,,,

 

As you can see, this is not something you could just add at the end of the game localization file. Thankfully, my script can deal with this kind of situation automatically, because it automatically replaces the lines starting with the same key word and adds the ones that don't exist yet, so all you have to do in this case is rename the file to localization.txt and my script will add it for you! :)

 

!!!! USE AT YOUR OWN RISK !!!!

This script is provided AS IS. At this point it's a highly experimental

alpha version and may damage your game files.

 

Feel free to improve it and share your improved version with other users!

 

Thanks!

 

Update log (v4.8a):

Hotfix:

* Alpha 18 introduced some changes that made my script incompatible with the latest version of the game. 7 Days to Die Mod Localization loader v4.8a brings an experimental hotfix for Alpha 18. Please test this version and feel free to let me know if any issues occur, thanks!

 

Update log (v4.6a):

Fixes:

* There was a problem which caused that some lines wouldn't be handled properly in some situations.

Added:

* Script now checks whether the backup was already created or not and gives you a chance to prevent any changes to it.

Changed:

* Script now clears the screen before it does its thing, so that user will be aware of the fact that the process of updating the files already started.

* Small improvements here and there, not really visible to the user.

 

Current version is v4.8a - Now with experimental Alpha 18 support.

 

Download the current version from here!

 

Old versions:

Download v4.6a from here - Stable version for Alpha 17.

Download v4.0a from here

Link to comment
Share on other sites

this is fabulous! Makes it much easier to go through the rebuilding process!

 

Neat! This looks more polished than my batch script :p

 

Nice one!

 

Thank you guys, I'm very happy that you find my creation useful! :)

 

Russiandood, I've heard of your script, but never saw it. Could you point me to it?

Link to comment
Share on other sites

Thank you guys, I'm very happy that you find my creation useful! :)

 

Russiandood, I've heard of your script, but never saw it. Could you point me to it?

 

Any of my mods have it, I think most if not all of Russiandood's mods have it in there too. I believe that Mayic is using it as well. Not sure whom else has utilized it?

Link to comment
Share on other sites

  • 1 month later...
Now that I got off my butt and decided to do some localization for my stuff, I'll probably include this in my mods if that is okay. :)

 

Sure, it's ok, but since my script doesn't come with readme text, please let the users know about this thread, so that they can read some informations, advices and recommendations here in case they aren't sure how to use it or if they have some problems using it. I tried my best to cover some stuff in the first post to help with some issues people may run to and I updated the post to let the people know that there is at least one mod which may need some basic manual editing to make it compatible with my script. So far this script has been doing very good job for me, but I haven't heard anything from others yet, so hopefully it works for everyone. Feedback is always welcome. :)

Link to comment
Share on other sites

  • 2 months later...

Okay well i am doing something wrong and i dont really know what. I am placing the bat file in the directory where vortex stashes the mods and then running it, but every line that goes by in the command prompt has can not open in front. The percentage goes up and will eventually finish but i do not get any results in game, the prefix on all the firearms 2 weapons are still there.

Link to comment
Share on other sites

Okay well i am doing something wrong and i dont really know what. I am placing the bat file in the directory where vortex stashes the mods and then running it, but every line that goes by in the command prompt has can not open in front. The percentage goes up and will eventually finish but i do not get any results in game, the prefix on all the firearms 2 weapons are still there.

 

You have to put the bat file into the base directory called Mods. No subfolder just <GAME DIRECTORY>\Mods\7d2dModLocLoader_46a.bat.

Also, do you use 7 Days To Die Mod Launcher? If so, make sure to only use it once (to apply SDX mods if applicable) and then use my bat file to install all translations and then run your game directly (avoid running your game through Mod Launcher because it WILL revert ALL the translations back to default).

Link to comment
Share on other sites

  • 1 month later...
Have you tested this with A18? I used it to make sure my localization was good, and it seemed to mess it up. All the main menu buttons had Xui in front of them.

 

Hi, thanks for testing and letting me know. Honestly, I haven't tested it with A18 yet. It sounds like a general issue, but before jumping to conclusions I would like to ask you what mods are you installing with this so I could do some testing?

Link to comment
Share on other sites

Just my vehicle mods. Had about 5 mods. Seemed like everything worked good, so I'm not sure what happened. And I also didn't look at the txt file afterwards. Guess I probably should've done that. Lol.

 

Just ran it again and I don't really see anything odd. But everything on the main menu had Xui in front of it. It's kinda like it's breaking the localization somehow.

Link to comment
Share on other sites

Just my vehicle mods. Had about 5 mods. Seemed like everything worked good, so I'm not sure what happened. And I also didn't look at the txt file afterwards. Guess I probably should've done that. Lol.

 

Just ran it again and I don't really see anything odd. But everything on the main menu had Xui in front of it. It's kinda like it's breaking the localization somehow.

 

Hi!

 

I have some good news and bad news...

 

The good news is that by comparing the original file against the modified one, I was able to locate the problem. Something which was supposed to be in both files is missing in the modified file and that's what is causing this problem in game. The line which is missing can be manually added after which the in-game menu works fine again.

 

The bad news is that the script itself is breaking it which is not supposed to happen and unfortunately, at the moment I have no idea what exactly is wrong with the script, so it may take me some time to fix it.

 

I recommend to use manual editing instead of my script until I (or some better coder) get this thing fixed.

 

I'm sorry, guys. I will try my best to make this script work again. :(

 

EDIT:

It seems like TFP broke their own localization format by adding that one line. In previous Alpha 17, every line had to match the strict format and so I made the script to depend on that specific format. The advantage of doing that was that every line that was not formatted correctly was by the script seen as irrelevant and it was removed from the final file. This helped in many cases when you didn't have a proper localization file supplied in the mod and just instructions like "add this line, remove this line, edit that line"... The script was able to automatically add everything that was in proper format. Unfortunately, now that they made this exception, this line which doesn't have the required format, but is still required for game to work correctly is also taken as garbage that must be removed and so my script removes it. Well, at least that's my first guess after first look... Lol... Any ideas?

 

Oh and by the way, this is the exact line in the original file which seems to cause the problem:

"terrOreStonePotassiumRandomDesc

As you can see, its format is not the same as other lines, so it may confuse automatic scripts. :(

Link to comment
Share on other sites

Today's update broke the compatibility of a better fix I was working on. :(

 

Well, the script was never perfect, it was always possible that running it could break something, but in Alpha 17, it worked very well for massive amount of mods that I have installed. The localization format in Alpha 18 changed drastically and I was trying my best to salvage as much as possible from the original script, so that I could make it work for Alpha 18 as soon as possible, but the more I'm testing it, the more issues I'm running into, so it started to feel like it might need a whole new approach this time. Radical changes in the format require radical changes of the script and unfortunately that's something I don't have enough time for, so I decided to take a break from it for now and work on it at my own pace, not trying to catch every new update, every new little change... If and when I have something new to share with you guys, I will let you know. Thanks for using my script and feel free to make it better and beat me to making it compatible with Alpha 18, I will be happy if you do.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...