Exporting Mod Sources

Note: I am not doing this for release, just for fun for me and my wife.

I started out 8 hours ago with a simple task: Merge Grimmest, Smash N Grab, and Grim Quest…

Learned a lot, but not enough.

At this point, I have Grimmest and SNG working side by side, but any attempt to extract Grim Quest to get access has met with little success. Best I’ve gotten is all 3 working, but I’m missing textures everywhere.

I have searched nearly every thread here about merging mods. It’s been very helpful.

From what I can gather, I need to export tags, but those are normally (from what I know) inside the original source which isn’t available… something about TEXT/EN or something like that.

“When ya can’t run, ya crawl, when ya can’t crawl, ya find someone to carry ya.”

Have you looked at the Grimarillion and Dawn of Masteries mods? They probably have what you want already.

I would but where trying to get SNG’s SP, Devo and Skill points in there. All I really need to do is import playerlevels.dbr into either of those. Recompiling them breaks stuff.

You can extract the arc files, just like you extracted the arz files.
Some files you could place in the arz via AssetManager again, but msh, anm, tex need sources you do not have, so use ArchiveTool to add them to the arcs

That’s the part I don’t know how to do… get the sources.

Yes sir, that is what I used to get most of the way there. Maybe I’m asking the wrong question. Here’s what I have:

Export Database:
$dbPath = “D:\temp\gquest\database”
$dbDest = “D:\temp\gquest\dbExport”
$dbFiles = Get-ChildItem $dbPath
md $dbDest -ErrorAction SilentlyContinue

Foreach ($dbFile in $dbFiles){
$dbFile2 = “d:\temp\gquest\database$dbfile”
Write-Host “Working on $dbFile2…” -ForegroundColor Cyan #-NoNewline
D:\Steam\steamapps\common"Grim Dawn"\ArchiveTool.exe “$dbFile2” -database $dbDest
Write-Host “Done.” -ForegroundColor Green

}

Extract Resources:
$resPath = “D:\temp\gquest\resources”
$resDest = “D:\temp\gquest\resExport”
$resFiles = Get-ChildItem $resPath

Foreach ($resFile in $resFiles){
$resFile2 = “d:\temp\gquest\resources$resfile”
Write-Host “Working on $resFile2…” -ForegroundColor Cyan #-NoNewline
D:\Steam\steamapps\common"Grim Dawn"\ArchiveTool.exe “$resFile2” -extract $resDest
Write-Host “Done.” -ForegroundColor Green

}

These two scripts will extract the files I need as I understand. However, when I go to recompile them. (Even if all I do is export, create new mod in AM, copy to DB to Database and Res to Resources) I end up with missing textures (at the least, I’m probably missing more and don’t know it)

As I said, you do not have some sources, so need to use ArchiveTool to add the textures etc to the arc, not AM

Where do I get the textures?

I’m using the ArchiveTool (in my above scripts). Can I pull more than Database and Resources?

Ok I think I got it. I see the msh, anm, txt files. I assume these are my ‘assets’. So adding them back in, I think I’m going to be using something like:

archivetool.exe “path to resource folder” -add “output file destination” 0

Working now to figure out how to make it work.

From the archivetool:
-add {directory} {base} [compression (0-9)]: add a file/directory

Directory I get, that’s the source data. What is “base”?

I use ‘ArchiveTool creatures.arc -add . creatures 6’ where creatures.arc is the arc to add to, ‘.’ is the dir ArchiveTool is in and creatures is a subdir of that dir

Buddy, whether I succeed at this or not in the end… thank you.

So here’s what I have:

Archivetool is in: D:\Steam\steamapps\common"Grim Dawn"\archivetool.exe
Extracted resource is in: D:\temp\gquest\resexport\creatures
Destination is: D:\temp\gquest\newarcs

The command I’m using is:
D:\Steam\steamapps\common"Grim Dawn"\archivetool.exe “D:\temp\gquest\newarcs\creatures.arc” -add “D:\temp\gquest\resexport\creatures” 6

This creates a creatures.arc in D:\temp\gquest\newarcs\ but the file is 2kb (the original dir is 114mb)

I have to be doing something wrong.

@mamba has 3 arguments after -add, you seem to have missed one. Perhaps this causes the problem?


Btw I used the same command as mamba with success in the past (maybe stolen from him).
(except with 9 instead of 6 because it gave me the same file size as the original, smaller than 0 I tested it against, probably it doesn’t matter)

./../ArchiveTool.exe Scripts.arc -add . scripts 9

(not a Windows command line so it might be a bit different)

./…/ArchiveTool.exe FullPathToNewFile.arc -add FullPathToFolder 9

That’s what I’m doing, can you elaborate on the 3rd arg after -add I’m missing?

Read carefully what @mamba wrote and see that there are 3 arguments not 2 after -add
Perhaps it’s necessary. You have 2 arguments after -add in your command.

@mamba However in my case it was not directory Archive Tool was in
(just my current dir modding inside Grim Dawn directory where I was in command line)

./../ArchiveTool.exe Scripts.arc -add . scripts 9

because ArchiveTool was 1 level above :thinking:

Ok so I moved the ArchiveTool and the DLL it needs to d:\temp\archiveTool

I took the exported Creatures folder and copied it to d:\temp\archiveTool

I ran this command:

d:\temp\archiveTool\archivetool.exe “D:\temp\gquest\newarcs\creatures.arc” -add “d:\temp\archiveTool” creatures 9

It created a creatures.arc in d:\temp\gquest\newarcs but that file is 2kb

1 Like

I promise, I’m trying real REAL hard to read and hang onto each word that is typed here. Something’s not clicking in my brain.

Try this

d:\temp\archiveTool\archivetool.exe “D:\temp\gquest\newarcs\creatures.arc” -add . “d:\temp\archiveTool\creatures” 9

Sorry, there was a typo (space before " instead of 9)


This worked for me on my computer (not Windows command line so paths format might differ):

/C/Program\ Files\ (x86)/Steam/steamapps/common/Grim\ Dawn/ArchiveTool.exe Scripts.arc -add . “C:\Users\MY_USERNAME\Desktop\scripts” 9

  • Scripts.arc is created with proper size in my current command line directory
  • from scripts folder that’s on Desktop
1 Like

yes, technically it is the dir you execute the command in, I copy AT there for simplicity

1 Like