Darktide Mod Manager #39

Merged
lucas merged 91 commits from feat/dtmm into master 2023-03-01 22:27:42 +01:00
Owner
No description provided.
lucas added 90 commits 2023-03-01 22:24:49 +01:00
The compiler doesn't complain about this, so I assumed it
was able to correctly resolve a conversion
`BundleFileType` -> `Murmur64` via their shared `From` impl: `u64`.

But it appears that is not the case, and the simple `t.into()` just
calls itself. So I need to do the conversion via the intermediary value
manually.
This is mostly helpful to check/debug whether the internal dictionary
actually contains the expected data. For manually looking through the
entire dictionary, opening the CSV file is still more convenient.
This type is similar to an `Either` between a `Murmur64` hash and a
`String`. This is necessary to be able to retain hash information where
the hash is not in the dictionary, but at the same time allow string
names where they are available.

Up until now, when reading a bundle, all hashes would be converted to
strings, which made sense for displaying those names. But when writing
the same bundle back, those strings ended up being re-hashed, resulting
in incorrect hashes.
Rather than checking all groups, when no cli flag was given, no groups
were checked.
The file header format is a bit more complex than I first realized,
especially around when a path to `data/` is included, and which size
field determines its file name length.
This removes the LuaJIT binary as a runtime dependency and decreases
the complexity of the compilation, by not needing to juggle a bunch of
temp files anymore.

However, it was a bit of a pain to get everything set up in the end.

Closes #4.
Aussiemon provided the last missing piece of information about the
binary format.
Ditch the `.mod` file and move its data into the config file.

The `run` function was the only thing that could have been dynamic, but
the vast majority of mods in VT2 never made use of that. Infact, VMF was
probably the only mod that had a different content for that.
Directories were ignored as invalid extension type. Now they are
recursed into.
DMF is part of the mod loading process and can therefore not be treated
like a regular mod.
Create parent directories if necessary.
There are a bunch of optional commands provided by druid that trigger
this, but we only really need it to check for custom ones that weren't
implemented, yet.
With splitting DMF and DML, there is now more than one case where this
is needed, so it may well be made proper now.
The template still defines them, and, as with VT2 most creators will
probably stick with it, but they do have the option to make a non-DMF
mod now.
Hard linking doesn't work across devices/mount points, and I'm not keen
on reworking the data directory to be placed accordingly, right now.
Only files in `data_dir` will be deleted, deployed bundles will stay
for now. See #29 for the rational.

Closes #24.
Adds an additional crate for shared functionality between dtmt and dtmm
that doesn't fit in the sdk.
Ref #7.
DML's package needs to be added to the boot bundle as well. Current
issue: Adding any package file to the bundle breaks the game's loading.

But I don't know where this messes things up.
Closes #34.
Ref #28.
Ref #28.
After digging through the VT2 SDK `.exe`, I found that `.package` files
(`stingray::ResourcePackageResource`) actually have more data than I
originally knew about. Most notably, there is a 1 byte `flags` value
that is written at the end of every package file.

Depending on what value those flags have, more data could come after it,
but in most cases, it's just that one byte, which I must have missed in
the binary.

Ref: #28.
Ref: #36.
Two different functions were each reading the bundle database
from the backup, so their changes would overwrite each other.
Additionally, mod bundles were missing from the database.

Ref: #28.
It would generate a syntax error when there was more than one entry in
the table.
The monkey-pacthed function was still called multiple times.
As requested by Fatshark.
Closes #19.
Apparently Fatshark does not proxy `dt` in their boot loading sub
states. But we do need that for the mod manager.
The final puzzle piece for mod loading, at least on DTMM's side.

Closes #28.
For now this merely recovers backed-up game files and leaves mod bundles
 in-tact. The game doesn't care about those anyways.

Closes #8.
Ref: #7.
- add checkbox for enable/disable
- highlight the selected mod
- adding visual spacing
- add alternating row background color

Ref: #15.
Closes: #14.
There's not much info to show here, really.

Ref: #16.
Ref: #16.
These need to be executed as early as possible if they're supposed to
capture all of their respective calls.
Closes #18.
Closes #9.
Keep the flexibility for dev, but in prod drop stdout and restrict the
log view to stuff useful to the user.
Closes #17.
This removes another runtime dependency.
lucas added 1 commit 2023-03-01 22:27:02 +01:00
* master:
  fix(sdk): Fix resolving package wildcards
  chore: Update serde_sjson
lucas merged commit 3ed47e236b into master 2023-03-01 22:27:42 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: bitsquid_dt/dtmt#39
No description provided.