GithubHelp home page GithubHelp logo

shinyhobo / bg3-modders-multitool Goto Github PK

View Code? Open in Web Editor NEW
267.0 15.0 33.0 6.86 MB

Utility for quickly generating Baldur's Gate 3 mod packs from an unpacked workspace (among other things). This project is not open source; read the license.

License: Other

Batchfile 0.38% C# 99.62%

bg3-modders-multitool's Introduction

Stargazers Static Badge

Baldur's Gate 3 Modder's Multitool

Main Window

The Modder's Multitool is the Swiss Army Knife of Modding utilities for Baldur's Gate 3. Aiming at making modder's live seasier, the Multitool implements a variety of automated tools to simplify the modding process: From unpacking and searching game files all the way to simplifying the packaging process and enabling more organized workspaces, if you're a modder, you need the Multitool.

Features

  • Automatically paks, zips, and generates metadata
  • Mod pak unpacking to workspace, with automatic file conversions
  • Automatically converts files named like example.lsf.lsx and example.lsb.lsx to example.lsf and example.lsb, respectively. This means you no longer have to manually convert files and then copy them into their respective directories.
  • Supports dependencies and multipaks (multiple mods in the same workspace, and multiple workspaces)
  • Utility for extracting some/all game assets at once. It can take more than an hour for the complete set, but will place all the extracted files in a folder in the same directory as the application
  • Unpacked and packed file indexers
  • Incremental indexing
  • Index search functionality
  • Individual and mass file extraction
  • File previews and text highlights
    • DDS
    • GTP
    • GR2
    • Text
  • Open (and automatically convert) files from index searcher
  • UUID and TranslatedString handle generator
  • Launch game saves directly
  • GameObject Explorer (stats, attributes, icon, model, and model files)
  • Mass LSX converter
  • Colada model conversion
  • Subfolder support
  • File linting
  • Color picker
  • Atlas texture splicer and creator
  • Modding resource links
  • Shortcuts to common modding directories
  • Automatic updates
  • Command line interface (packing, unpacking, indexing, search)

How do I use these tools?

Excited to work with the Multitool's help, but unsure how to use it? See the Wiki for more information about the Project and how to use specific features of the Multitool, or look below for the ideal steps to learn the Multitool.

  1. Installation
  2. Configuration
  3. General Usage
  4. Updating the Multitool

Linux Users

You should be able to use most functions using Bottles (Wiki Guide) if running Linux

Licensing

Copyright © ShinyHobo 2020-2024

This software is source available, not open source. Redistribution, and modification for private or public use, without express permission from the copyright owner, is prohibited.

Baldur's Gate 3 Modder's Multitool is unofficial fan content, not approved/endorsed by Larian Studios. Portions of the materials used are property of Wizards of the Coast LLC and Larian Studios Games ltd.

LSLib is owned by Norbyte and utilized under the MIT license.

bg3-modders-multitool's People

Contributors

alchemicsoundscape avatar finaudmods avatar iceriny avatar logosworks avatar nandez avatar shadowchild avatar shinyhobo avatar ultraporing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bg3-modders-multitool's Issues

Add case sensitive search toggle

The index search functionality ignores case currently. Below the search bar, a checkbox for activating case sensitivity should be placed.

UUID Generation

Add field for UUID generation. A button should generate this UUID in a field. Clicking the field should copy the UUID to the clipboard and inform the user.

No lines found; search returned filename only.

I am doubtful this is a program problem and not a me problem but I have tried several different versions of the tool. And an older copy of BG3 (7/22) and yet each time I attempt to do an index search - GR2s are appearing as "No lines found; search returned filename only."

I'm thinking this might be a granny2.dll however I have a copy of it in both the folder with Multitool and the converter. The converter also fails to convert as it cannot find the grann2.dll.

This granny2.dll works successfully if attempting to use Noesis version.

Works great but I am still having a problem with object explorer at least now it is giving me an error. This for the version that released a few days ago.

One or more errors occurred.
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action1 body) at bg3_modders_multitool.Services.RootTemplateHelper.ReadRootTemplate() at bg3_modders_multitool.Services.RootTemplateHelper.<LoadRootTemplates>b__51_0() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at bg3_modders_multitool.Services.RootTemplateHelper.d__51.MoveNext()

Add 3D model asset list tab

It would be helpful if a list of the assets used to render the model were listed. Clicking an item in this list should open the folder to the item.

Index search model preview not showing

2022-08-14_00h14_45

sadly index search gr2 model preview doesn't show the models anymore, it gets stuck on "loading..." the models seem to convert fine going by the diag box and because it shows no errors in the diag I am not sure what could be going wrong.

Converting model to .dae for rendering...
[DEBUG] Using log level: ALL
[DEBUG] Using game: BaldursGate3
[DEBUG] Using graphics options:
[DEBUG] export-normals = True
[DEBUG] export-tangents = True
[DEBUG] export-uvs = True
[DEBUG] export-colors = True
[DEBUG] deduplicate-vertices = True
[DEBUG] deduplicate-uvs = True
[DEBUG] recalculate-normals = False
[DEBUG] recalculate-tangents = False
[DEBUG] recalculate-iwt = False
[DEBUG] flip-uvs = True
[DEBUG] ignore-uv-nan = True
[DEBUG] y-up-skeletons = True
[DEBUG] force-legacy-version = False
[DEBUG] compact-tris = True
[DEBUG] build-dummy-skeleton = True
[DEBUG] apply-basis-transforms = True
[DEBUG] x-flip-skeletons = False
[DEBUG] x-flip-meshes = False
[DEBUG] conform = False
[DEBUG] conform-copy = False
[DEBUG] Using path: \?\D:\Baldurs Gate 3\ExportTool-v1.15.14\UnpackedData\Models\Generated\Public\Shared\Assets\Characters_Anims\Dwarves_Female\Resources\DWR_F_NKD_Head_E.GR2
[DEBUG] Using path: \?\D:\Baldurs Gate 3\ExportTool-v1.15.14\UnpackedData\Models\Generated\Public\Shared\Assets\Characters_Anims\Dwarves_Female\Resources\DWR_F_NKD_Head_E.dae
Exporting model Dummy_Root with skeleton Dummy_Root
[INFO] Export completed successfully.
Fixing vertices...
Model conversion complete!

It does work fine in GameObject Explorer

Add estimated time to complete to index searcher

It can take well over an hour for the indexer to index all the game assets. Add an estimated time display to give the user an idea of how long the process will take. The equation for this approximation is (timetaken / filesProcessed) * filesLeft = timeLeft, and will return a time left in the time units used by timeTaken. The time approximation should update with each file processed.

Add Time stamp

Could it be possible to add Time stamps on the log window ?
so it would be possible to know when the last time I compiled a mod

Add true multipak support

Mod workspaces require the Mods folder to be in the first level, so multipaks are only supported if the workspace packs all mods into the same .pak. We should detect if the mods folder is on the second level in order to support generation of multiple pak files, and combine them in info.json.

When generating info.json, add Group GUID to determine how mods are packed together. Mods in the same group are mods that are in the same .pak.

Indicate match type in file list

Right now, users have to hover over a file to determine if the match was due to a line match or simply a filename match. To the left of the text, an indication should be visible for each row indicating what kind of match it was.

Allow users to select .paks they want to include

For most mod makers, it is excessive to unpack all the game assets. When clicking on "unpack all files", we should prompt the user to select from a list of found files and then allow them to either confirm or cancel the selection. It should include both a select all and deselect all button.

Add quick launch toggle to config menu

Note from Norbyte:
passing the -continueGame parameter to bg3.exe will automatically load your latest savegame without having to click anything in main menu
also, creating a 0 byte Data\Localization\English\Video\Splash_Logo_Larian.bk2 will skip the splash video at the beginning

Add error handling - LSLib versions

Some people have not yet updated their copy of LSLib to version 1.15.2. Add error handling to check the version number and inform the user if their version is out of date.

Unpacking Process UI

Rather than opening up windows for each unpack process, it would be better to open up a single modal that has a list of the processes and whether or not they are complete (ie. red box no, green box yes). The UI would list each process by .pak name and two statuses (complete! and working... with moving elipses) followed by the status box (maybe inside in the status box?).

Add file preview for matching lines to index searches

Currently, search functionality only lists files and allows users to open them with the default program. Some form of preview should be available to users so they don't have to open the file and search for it. This could be on long hover, or in a companion window/window section.

Automatic detection of multipack

On folder load, it should check to see if the Mods directory is in the root directory. If so, it is a single pack, else a multipack. On multipack, loop through available folders to pack mod and append meta.lsx data to info.json.

Issue running bg3-modders-multitool.exe in WINE 7.4

I was encouraged to post this issue by my friends, even if it goes nowhere. I am aware that Linux is not officially supported on anything.

Hopefully all the information you need is in the attached error log. I had a bunch of updates this morning and WINE was one of them. Now your .exe doesn't want to run. LSLIB still works, so I can still mod BG3, but I just wanted you to know.

backtrace.txt

Thank you for your time.

Add .GR2 to non-dae file converter widget

It has been requested that functionality be added for converting the .GR2 model files to non-dae formats, such as .fbx. This should be added somewhere on the gameobject explorer, perhaps on a new tab (labeled Model Tools?).

.lsf files not converting to .lsx even with granny2.dll

I have the granny2.dll within the ExportTool-v1.18-P folder, which I got from 1.15.13.
Screenshot 2023-08-07 135809

I get receive these types of errors when de-compressing the files:
Note: this is not the initial decompression I did for the unpacked files. When I did do the initial decompression more error lines for lsf. were specifically shown. Lines below only show the .lsbc files (?)

Retrieving file list for decompression.
Retrived file list. Starting decompression; this could take awhile.
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\Characters_Common_TL_Test.lsbc to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\Characters_Common_TL_Test.lsbs to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\Object_Door.lsbc to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\GlobalFunctions\9271e03f-0ebf-4e79-8973-4485e0b01e13.lsbc to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\Object_Door.lsbs to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\GlobalFunctions\9271e03f-0ebf-4e79-8973-4485e0b01e13.lsbs to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\GlobalFunctions\9cd5fc9a-ade1-47de-93b9-abdd9087e89c.lsbc to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\GlobalFunctions\9cd5fc9a-ade1-47de-93b9-abdd9087e89c.lsbs to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\GlobalFunctions\b58f8c86-48dc-4048-8570-4e6a435de58c.lsbc to .lsx!
Failed to convert C:\Users\user name\Downloads\bg3 modding resources\ExportTool-v1.18-P\UnpackedData\Assets\Public\Shared\Assets\Blueprints\GlobalFunctions\b58f8c86-48dc-4048-8570-4e6a435de58c.lsbs to .lsx!
Decompression complete.


As a result gr2 3d models don't appear on the index search and the gameobjectexplorer, and am unable to convert to dae.
Screenshot (446)

This error shows up even though I do have the granny2.dll file in the folder:

[FATAL] Export failed: Granny2.dll is required for compressed GR2 files.
at LSLib.Native.Granny2Compressor.Decompress4(Byte[] compressed, Int32 decompressedSize)
at LSLib.Granny.GR2.GR2Reader.UncompressStream()
at LSLib.Granny.GR2.GR2Reader.Read(Object root)
at LSLib.Granny.Model.Exporter.LoadGR2(String inPath)
at LSLib.Granny.Model.Exporter.Export()
at Divine.CLI.CommandLineGR2Processor.ConvertResource(String file)
Error loading .dae: Filename was null or could not be found. Inner exception:

Add file preview window to index search

Rather than using a popup, add a file preview window to the right side of the search window. This should cache the lines for the file so that it does not slow down each time a file is previewed. When opening a file, there should be some kind of animation to indicate what is happening.

File indexer and crawler

Add file contents indexer to support quick file searches. Utilize generated index to provide a list of files containing the search text. Display preview of lines in companion window/section. Allow opening of selected file with the system default program.

Converting map files (bshd?).

I am looking to do something with the map itself. But in order to do anything with it, I need to be able to actually have the map files, PNG, JPG, WEBP all would be fine. Even if they are tiled. Any chance we can get access to those?

I am new to this tool, if they are available but I overlooked them, please feel free to point me in the right direction!

Log gets spammed with "No files" message when doing a directory search

The message should only run once, but it runs thousands of times due to the recursive nature of the program. Update DirectorySearch so that it only checks for the existence of the folder once. Only display "no files available" message if attempting to run a search rather than building an index.

Disable drag and drop section unless divine.exe is set

It is possible to attempt a packing without divine.exe set. This results in the .pak not generating and an error message appearing in the log. It should not be possible to drop files in the box unless the setting is set. The area should be grey to indicate its disabled status.

Disable unpacking button if bg3.exe is not selected

It is possible to push the button if this is not set, which provides the user with an empty list of files and no popup. Either the console should inform the user that they need to select the location of the bg3.exe file, or it should be disabled until this exe is selected. If the Data folder is not found, it should inform the user that the setting is incorrect and to reselect.

Investigate index committing on search

It isn't possible to run a search until the index changes have been committed. Try calling writer.Commit() from the search function if the index does not exist. Otherwise, disable the search files button across all indexing window instances unless the index exists. Both the button and search field should be greyed out. The search field would contain text similar to "No index found. Please index files to search."

Add support for dependencies

Dependencies are picked up first in the meta.lsx file, causing an incorrect info.json file to be generated. They should be added as a property of the mod rather than replace it in its entirety.

Add shortcuts

Add shortcuts to get to mods folder, profiles folder, and start game (if .exe has been selected).

One or more errors occurred when opening GameObject Explorer

This was the first error.

One or more errors occurred.
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Func4 bodyWithLocal, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable1 source, ParallelOptions parallelOptions, Action1 body, Action2 bodyWithState, Action3 bodyWithStateAndIndex, Func4 bodyWithStateAndLocal, Func5 bodyWithEverything, Func1 localInit, Action1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable1 source, Action1 body) at bg3_modders_multitool.Services.RootTemplateHelper.ReadRootTemplate() at bg3_modders_multitool.Services.RootTemplateHelper.<LoadRootTemplates>b__51_0() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at bg3_modders_multitool.Services.RootTemplateHelper.d__51.MoveNext()

After this I unpacked the files that are required again, reindexed just to make sure it wasn't something that went wrong before. And the above error still came up when loading GameObjectExplorer and waiting for it to load.

Automatic detection of available meta.lsx file

Rather than using the name of the project folder to get the required file, it should recursively search the Mods folder for the meta.lsx file and return an error if it finds more than one.

Create Unpacking Window

Currently, the unpacking process opens a new console window for each .pak file being unpacked. It would be a better user experience to consolidate those windows into a single popup:

  • List the files being unpacked
  • Display the status of each with an emoji (check, x, hourglass)
  • Move current "unpacking processes starting" message to new popup window.

Add meta.lsx generator

Ask user to create one if they drag and dropped their workspace, but the file was missing. Confirmation box for matched file would appear with editable fields; can confirm and save.

  • Author
  • Description
  • Name
  • Folder
  • UUID (generated)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.