BDO Toolkit - A .NET modding library for Black Desert Online

UndercoverPervert

Content Creator
Joined
Aug 9, 2016
BDO Toolkit
A .NET modding library for Black Desert Online

Requirements
Installation/Usage
  1. Download the archive anywhere on your computer.
  2. Unzip all the files in the archive.
  3. Open the executable "BDOToolkit Installer.exe".
  4. Press 1 then enter, and then any key to exit. You're done!
Developers only: Reference your projects to BDOToolkit.dll.
Note that redistribution of the library is prohibited, users will install the library to the GAC (Global Assembly Cache), and your project will load the library from the GAC (handled automatically by the .NET Framework) on their machine, this is so that projects that were not updated to the library's latest changes (such as bug fixes) do not roll back users. DO NOT include BDOToolkit.dll while redistributing your project, link to this thread instead.

FAQ
Q: Who is it for?
A: For mod developers to code with, and for users to install so that projects using the library may access it.

Q: Can I include the library in my project's/mod pack's archive?
A: No, redistribution is prohibited to prevent version conflicts, the GAC installation will provide the relevant projects with the library.

Q: Can I see the source code?
A: Not at the moment, no. The library is in serious need of clean up, refactoring and optimizations, the source code will not be made available at this time.

Q: Documentation?
A: Sadly not available yet. Documentation will be available in the library with future updates.





Meta Injector
A port of Meta Injector which utilizes the library.​

Requirements
Installation/Usage
  1. Download the archive anywhere on your computer.
  2. Unzip "Meta Injector.exe" to your game's "Paz" folder.
  3. Copy your modified files to the sub-folder "files_to_patch" in your game's "Paz" folder
  4. Run "Meta Injector.exe" and follow the menu instructions.


Restore N' Patch
A launcher wrapper for Black Desert Online to avoid repairs during updates​

Requirements
  • .NET Framework 4.6.1
  • BDO Toolkit (see above)
  • Projects with implemented support to be located in the same folder (better control over that soon™)
Installation/Usage
  1. Download the archive anywhere on your computer.
  2. Unzip the archive's contents to your game's "Paz" folder.
  3. Create a shortcut to "Restore N' Patch.exe" on your desktop (or wherever you normally launch the game from).
  4. Use the shortcut from now on to run the game. No longer fearing a sudden update triggering a file recheck.
FAQ
Q: What does it do?
A: The program restores the latest backup of the meta file, and launches the game's launcher, waiting for the launcher's closure, the program then attempts to find the game's process to suspend it, the program will then check if the meta file was updated, if not, the original patched meta will be restored, if it was updated, the program will execute compatible programs to patch the meta file.

Q: Does the program have to run as Administrator?
A: Yes, Black Desert Online runs as Administrator, and for the program to have access to suspend and later resume the process, the program has to have elevated permissions.




blahblahblah I'll finish this post later, you all are going mad while you wait...
 
Last edited:

UndercoverPervert

Content Creator
Joined
Aug 9, 2016
CHANGE LOGS

BDO Toolkit

  • 1.3.0 (Mar 28, 2018):
    - The installer has been touched up a little for the first time since release.
    - Version policy not included in this release, this means programs targetting older versions of the library will not be using this update. This is done to encourage users to update to the latest version of all of the provided tools. The next update which will include automatic updates will also not include the version policy, back to normal after that.
    - Performance improvements when asked to refresh the meta file's contents.
    - Performance improvements when saving modifications (rework still needed).
    - Performance improvements when checking for modifications.
    - Fixed file extraction possibly corrupting the file when attempting to clean up the file's data.
    - Fixed an optimization issue causing files with the same name to not be detected properly.

  • 1.2.0 (Feb 28, 2018, 4,090 downloads):
    - Improved legacy patching support, although far from complete. Unintended behaviors may still occur.
    - Added Paz property to the FileBlock class.
    - Added property LegacyMods to class MetaFileInfo.
    - Performance improvements when attempting to locate file blocks.
    - Bug fixes.


    * Minor breaking changes, recompilation of affected programs is needed.

  • 1.1.0 (Feb 10, 2018, 3,151 downloads):
    - Fixed and optimized adding file blocks.
    - Removed unneeded sort for file blocks.
    - Import() with matchPath set to false will now only compare the file name instead of the full path.

  • 1.0.0 (Feb 7, 2018, 1,690 downloads):
    - First public release
Meta Injector

  • 1.4.0.1 (June 27, 2019):
    - Rebuilt/1.4.0 re-release to address XIGNCODE "detection".
    - Signed (apparently I forgot to do a year and a half ago).

  • 1.4.0 (Mar 28, 2018, 39,817 downloads):
    - Meta contents refreshed every time the main menu is loaded and before attempting to patch.
    - Fixed underscore-prefixed files not being ignored.
    - Double dot/underscore folders will now have all the files inside them ignored (useful if you want to temporarily stop using certain files, without having to move them out).
    - More fixes regarding file detection order, now matches better with Windows Explorer.
    - Added numerous warnings regarding the automatic patching method.
    - Added duplicate file alerts.
    - Fixed an issue with the Restore N' Patch implementation.

  • 1.3.0 (Feb 28, 2018, 4,086 downloads):
    - Current file number/total count for the current paz archive (the square brackets) will now be gray.
    - Added legacy patching support. To perform a legacy patch, create a "legacy" folder prefixed by a dot/underscore in the path of the files meant to be legacy patched, and place the files/folders inside.
    - Added warning to option 2 to indicate that it's not fully compatible with all the changes made.

    * Requires BDO Toolkit 1.2.0 or higher.

  • 1.2.2 (Feb 14, 2018, 2,457 downloads):
    - Fixed an issue where the last (and possibly only) file meant to be added to an archive would be skipped and re-attempted on the next archive which ended up skipping it again (fixes the archive creation loop).
    - Zeroes will now be filled when enumerating the files for a more consistent look.
    - If multiple archives are needed to perform the patch, the current file number for the current archive and the total amount of files meant for the archive would be displayed in square brackets after the total count (should make the "breaks" in patching clearer).

  • 1.2.1 (Feb 11, 2018, 713 downloads):
    - Fixed an issue caused by the default sorting behavior of Windows, where files placed in a folder would be enumerated before the folders in that folder.

  • 1.2.0 (Feb 10, 2018, 562 downloads):
    - Requires BDO Toolkit v1.1.0 or higher.
    - Underscore-prefixed folders have also been added as path exceptions similarly to dot-prefixed folders (since you can't actually create dot-prefixed folders via Windows Explorer).
    - Folders with the name "add" prefixed by a dot or underscore will have the files inside them added to the game if they don't exist (under the parent folder of the "add" folder. I.E. "character\texture\_add\" will add files to "character\texture\").
    - The file count when patching will now reflect the total count, not the count set for the currently used archive.

  • 1.1.3 (Feb 10, 2018, 513 downloads):
    - Added the version to the title.
    - Fixed improper patching order caused by sorting.
    - Duplicate files will no longer be patched twice, the last one discovered will be the one applied.
    - Updated the description of the automatic detection.

  • 1.1.2 (1.1.1 re-release, Feb 9, 2018, 69 + 224 downloads):
    - Dot-prefixed files are now ignored when the program is searching for files in "files_to_patch" (can be used to leave notes).
    - Minimum Paz archive size before skipping files that would cause the archive to exceed 100MB is changed from nothing to 10KB (this should address the issue with empty archives being created indefinitely when there are individual files larger than 100MB).

  • 1.1.0 (Feb 8, 2018, 1,051 downloads):
    - Paz archives will now be built up to 100MB per archive, the paz number will start at 61337 and increment by one every time a new archive is needed (should fix the "Out of memory" exceptions).
    - Implemented Restore N' Patch support (currently only uses the "structure" patching method).

  • 1.0.1 (Feb 7, 2018, 458 downloads):
    - First public release.
Restore N' Patch

  • 1.3.1.3 (June 27, 2019):
    - Rebuilt/1.3.1.2 re-release to address XIGNCODE "detection".

  • 1.3.1.2 (Apr 25, 2019, 4,896 downloads):
    - Should address the issue where the program would proceed to the patching process before it was supposed to (when the launcher is relaunched due to an update, affects NA/EU non-Steam).
    - Game process/launcher search timeout increased from 5 to 60 seconds.
    - Fixes launcher reopens not being detected.

  • 1.3.0 (Apr 5, 2019, 1,722 downloads):
    - Fixed automatic switch to "idle mode" when the launcher isn't found.
    - Added the -patch argument which will force a re-patch of the files even if there wasn't an update.
    - Added the -launcher "path" argument - allows the specification of a custom launcher path (for regions besides NA/EU, the launcher path has to be within quotes, ex: -launcher "C:\Path\To\The\Launcher.exe").
    - Added the -dontwait argument which makes the program proceed even if the launcher has yet to close, this is automatically activated for the Steam client.
    - If there wasn't an update but the "patched" meta is clean, files will now be automatically patched instead of forcing the user to manually perform the patches (or use the newly added -patch argument).
    - Fixed the issue where the program would fail to start if the last patched backup that was created was corrupted.

  • 1.2.1 (Mar 28, 2018, 30,733 downloads):
    - The program will pause on errors so that they could be more easily reported.

  • 1.2.0 (Feb 28, 2018, 3,519 downloads):
    - Will now automatically default to "idle mode" if the launcher is not found.
    - Fixes a possible conflict.

    * Compiled against BDO Toolkit 1.2.0, hence version 1.2.0 or higher is required.

  • 1.1.0 (Feb 8, 2018, 2,543 downloads):
    - Added "idle mode", activated by the "-idle" startup argument. The mode disables all the launcher-related part of the code, and makes the program idle for the game process indefinitely until it's found.

  • 1.0.0 (Feb 8, 2018, 88 downloads):
    - First public release.
 
Last edited:

Boss

Vivacious Visitor
Joined
Apr 19, 2011
How do I verify that this was even installed when run? My virus protection, idk if its blocking it or not....

Also:

UndercoverPervert UndercoverPervert How does your MetaInjector work file structure wise? I have quite a few outfits that I have edited and used to let the program automatically find the locations...

Where would I put the .pac and .dds?
X:\Black Desert Online\Paz\files_to_patch\.resorepless\??????????????

(sorry if this was all ready answered) Thanks,

Edit: I can not for the life of me figure out how to setup the folder structure for .pac's.....
(the below are what failed...)


Edit x2: I believe this will be the file path for pacs.....
(Use Pax_Browser)
 
Last edited:

BlackFireBR

Content Creator
Joined
Sep 2, 2013
Location
Brazil
How do I verify that this was even installed when run? My virus protection, idk if its blocking it or not....

Also:

UndercoverPervert UndercoverPervert How does your MetaInjector work file structure wise? I have quite a few outfits that I have edited and used to let the program automatically find the locations...

Where would I put the .pac and .dds?
X:\Black Desert Online\Paz\files_to_patch\.resorepless\??????????????

(sorry if this was all ready answered) Thanks,

Edit: I can not for the life of me figure out how to setup the folder structure for .pac's.....
(the below are what failed...)


Edit x2: I believe this will be the file path for pacs.....
(Use Pax_Browser)
You can always use:
Untitled.jpg


Instead of guessing the folder structure for each file.

MetaInjector does that automatically for you if you choose this option
 

UndercoverPervert

Content Creator
Joined
Aug 9, 2016
Added Restore N' Patch, info in the first post.

When Meta Injector has more downloads than BDO Toolkit, but BDO Toolkit is required in order to use Meta Injector :thonk:
 
Last edited:

h4iterr

Vivacious Visitor
Joined
Oct 18, 2016
Thanks, for some reason i was under the impression that feature didnt work any more... Boy I feel silly....
UndercoverPervert UndercoverPervert himself said it:
"Unlike BlackFireBR's Meta Injector, the default and recommended patching method is by folder structure instead of automatic, if you have files that are not in their right folders, they'll most likely fail to patch."
I understood it as the automatic method not working anymore.
 

UndercoverPervert

Content Creator
Joined
Aug 9, 2016
UndercoverPervert UndercoverPervert himself said it:
"Unlike BlackFireBR's Meta Injector, the default and recommended patching method is by folder structure instead of automatic, if you have files that are not in their right folders, they'll most likely fail to patch."
I understood it as the automatic method not working anymore.
It does work, but I don't recommend it since any "misfires" can result bigger issues than they would've before. Also it is way neater to organize your files since you can then use the new dot-prefixed folders being ignored in the paths, like Resorepless copying the relevant files to "files_to_patch\.resorepless" instead of just "files_to_patch". You can organize custom outfits and mods from others like that. For example you could create a ".suzu" folder if you use suzu's outfit mods.
 

h4iterr

Vivacious Visitor
Joined
Oct 18, 2016
It does work, but I don't recommend it since any "misfires" can result bigger issues than they would've before. Also it is way neater to organize your files since you can then use the new dot-prefixed folders being ignored in the paths, like Resorepless copying the relevant files to "files_to_patch\.resorepless" instead of just "files_to_patch". You can organize custom outfits and mods from others like that. For example you could create a ".suzu" folder if you use suzu's outfit mods.
I thought as much. I've had my problems with the automatic sorting method, but it's just so convenient.
I've tried the new meta injector version and it works, mostly. It does have a problem with huge files though - namely the tattoo files, which contain all available tattoos, and my modded ones have a higher resolution, so they're 90MB big. When I try to patch with them, the injector creates a few "normal" paz files, but then it gets confused and starts creating new paz files that are all 20 bytes big, without actually putting any files into them, and I have to cancel it.
I've experimented with the previous version and it seems like the limit is slightly lower than 1GB, so you could make each single paz file around 500MB safely, I think.
Appreciate your work! Sorry for all the impatience and outright rudeness you have to deal with around here.
 

UndercoverPervert

Content Creator
Joined
Aug 9, 2016
I thought as much. I've had my problems with the automatic sorting method, but it's just so convenient.
I've tried the new meta injector version and it works, mostly. It does have a problem with huge files though - namely the tattoo files, which contain all available tattoos, and my modded ones have a higher resolution, so they're 90MB big. When I try to patch with them, the injector creates a few "normal" paz files, but then it gets confused and starts creating new paz files that are all 20 bytes big, without actually putting any files into them, and I have to cancel it.
I've experimented with the previous version and it seems like the limit is slightly lower than 1GB, so you could make each single paz file around 500MB safely, I think.
Appreciate your work! Sorry for all the impatience and outright rudeness you have to deal with around here.
The latest version should address the issue you were having.
 

h4iterr

Vivacious Visitor
Joined
Oct 18, 2016
Here's one of the files. I've found that just itself doesn't hinder the meta injector. But: Make a copy of it, rename it to phw_00_customizing_body_tattoo_0001.dds, and with the two files together, it messes things up.
 

Attachments

UndercoverPervert

Content Creator
Joined
Aug 9, 2016
Here's one of the files. I've found that just itself doesn't hinder the meta injector. But: Make a copy of it, rename it to phw_00_customizing_body_tattoo_0001.dds, and with the two files together, it messes things up.
Try version 1.2.2, this should now be fixed.
 

UndercoverPervert

Content Creator
Joined
Aug 9, 2016
That worked, thanks!
I've seen that you added the ability to insert own files. I'm going to try this out with textures. Is there anything I have to keep in mind, like naming conventions?
Adding you own files won't net you anything unless you know what you're doing. This was mostly added to allow us to modify some models that use the same textures to use different ones, custom ones, like the few female classes that use the same body textures.
 

h4iterr

Vivacious Visitor
Joined
Oct 18, 2016
Adding you own files won't net you anything unless you know what you're doing. This was mostly added to allow us to modify some models that use the same textures to use different ones, custom ones, like the few female classes that use the same body textures.
Well... I know what I'm doing, I think. You should be able to add a texture and change a model with a hex editor to use it, correct?
 

UndercoverPervert

Content Creator
Joined
Aug 9, 2016
Editing the texture a model uses with a hex editor is not the right way to do it. The library contains parsing code for Pac files (currently supporting two versions of the format, there are some unsupported versions and types of the format, mostly to do with certain customization aspects), it is capable of changing texture names for each of the meshes in a model, to any length that you'd like (unlike hex editing which would have you restricted to the same length).
 
Top Bottom