0 Members and 1 Guest are viewing this topic.
using var database = ArzDatabase.Open("path/to/database.arz"); foreach (var record in database.GetAll()) { if (record.TryGet("itemClassification", out var field)) { var value = field.Get<string>(); if (value == "Epic" || value == "Legendary") { record["itemClassification"] = "Rare"; record["--gx-itemClassification"] = value; // keep original value for later use } } } ArzWriter.Write("out.arz", database);
using var context = Context.Create(c => { c.Source(s => s.Path("./test-data/gd-1.1.7.1/database/database.arz")); c.Source(s => s.Path("./test-data/gd-1.1.7.1/gdx1/database/gdx1.arz")); c.Source(s => s.Path("./test-data/gd-1.1.7.1/gdx2/database/gdx2.arz")); c.Target(t => t.Path("./out")); }); // do something with context.Database var record = context.Database[@"records\xpack\game\gameengine.dbr"]; // Will throw exception, because GD has no this record.
var rGameEngine = database[@"records\xpack\game\gameengine.dbr"]; rGameEngine["potionStackLimit"] = 100; rGameEngine["scrollStackLimit"] = 100;
> gx-arz-optimizer.exe --target=gx-opt-tqae-2.9.arz .\glacie-test-suite\arz\tqae-2.9\database\database.arz[ INFO ] Reading: .\glacie-test-suite\arz\tqae-2.9\database\database.arz[ INFO ] Done In: 424ms[ INFO ] Optimizing...[ INFO ] Optimization Result: Completed In: 1,560ms # of Remapped Strings: 29192 Estimated Size Reduction: 1875697 bytes Estimated File Size: 52650726 (96.6%)[ INFO ] Writing To: gx-opt-tqae-2.9.arz[ INFO ] Compression Level: 12[ INFO ] Written In: 5,740ms[ INFO ] Source File Length: 54526423[ INFO ] Target File Length: 51245482 (94.0%)> gx-arz-optimizer.exe --target=gx-opt-sv-aera-1.7.arz .\glacie-test-suite\arz\sv-aera-1.7\database\database.arz[ INFO ] Reading: .\glacie-test-suite\arz\sv-aera-1.7\database\database.arz[ INFO ] Done In: 539ms[ INFO ] Optimizing...[ INFO ] Optimization Result: Completed In: 2,198ms # of Remapped Strings: 40451 Estimated Size Reduction: 2721844 bytes Estimated File Size: 74895993 (96.5%)[ INFO ] Writing To: gx-opt-sv-aera-1.7.arz[ INFO ] Compression Level: 12[ INFO ] Written In: 8,064ms[ INFO ] Source File Length: 77617837[ INFO ] Target File Length: 73906007 (95.2%)> gx-arz-optimizer.exe --compression-level=9 --target=gx-opt-gd.arz .\glacie-test-suite\arz\gd-1.1.7.1\database\database.arz[ INFO ] Reading: .\glacie-test-suite\arz\gd-1.1.7.1\database\database.arz[ INFO ] Done In: 282ms[ INFO ] Optimizing...[ INFO ] Optimization Result: Completed In: 876ms # of Remapped Strings: 0 Estimated Size Reduction: 0 bytes Estimated File Size: 56402016 (100.0%)[ INFO ] Writing To: gx-opt-gd.arz[ INFO ] Compression Level: 9[ INFO ] Written In: 2,193ms[ INFO ] Source File Length: 56402016[ INFO ] Target File Length: 47038301 (83.4%)
7,109,494 A Few Bug Fixes.arc 459,030,819 Levels.arc 57,895,262 N66_Mods.arc 162,300 Quests.arc 528,620 Text_CH.arc 570,685 Text_EN.arc 606,713 Text_RU.arc 3,565,171 _DRX_Effects.arc 42,066,683 _DRX_Meshes.arc 26,064,655 _DRX_Textures.arc10 File(s) 597,600,402 bytes
> gx-arc optimize --repack --compression-level=maximum "./test/_DRX_Effects.arc"[done] Processed: ./test/_DRX_Effects.arc -157,257 bytes, 95.6%> gx-arc optimize --repack --compression-level=maximum "./test/_DRX_Meshes.arc"[done] Processed: ./test/_DRX_Meshes.arc -1,796,375 bytes, 95.7%> gx-arc optimize --repack --compression-level=maximum "./test/_DRX_Textures.arc"[done] Processed: ./test/_DRX_Textures.arc -1,636,480 bytes, 93.7%> gx-arc optimize --repack --compression-level=maximum "./test/A Few Bug Fixes.arc"[done] Processed: ./test/A Few Bug Fixes.arc -102,456 bytes, 98.6%> gx-arc optimize --repack --compression-level=maximum "./test/Levels.arc"[done] Processed: ./test/Levels.arc -16,466,817 bytes, 96.4%> gx-arc optimize --repack --compression-level=maximum "./test/N66_Mods.arc"[done] Processed: ./test/N66_Mods.arc -2,648,977 bytes, 95.4%> gx-arc optimize --repack --compression-level=maximum "./test/Quests.arc"[done] Processed: ./test/Quests.arc -5,723 bytes, 96.5%> gx-arc optimize --repack --compression-level=maximum "./test/Text_CH.arc"[done] Processed: ./test/Text_CH.arc -17,766 bytes, 96.6%> gx-arc optimize --repack --compression-level=maximum "./test/Text_EN.arc"[done] Processed: ./test/Text_EN.arc -53,286 bytes, 90.7%> gx-arc optimize --repack --compression-level=maximum "./test/Text_RU.arc"[done] Processed: ./test/Text_RU.arc -49,759 bytes, 91.8%
7,007,038 A Few Bug Fixes.arc 442,564,002 Levels.arc 55,246,285 N66_Mods.arc 156,577 Quests.arc 510,854 Text_CH.arc 517,399 Text_EN.arc 556,954 Text_RU.arc 3,407,914 _DRX_Effects.arc 40,270,308 _DRX_Meshes.arc 24,428,175 _DRX_Textures.arc10 File(s) 574,665,506 bytes
> gx-arc --helpgx-arc: Glacie Archive ToolUsage: gx-arc [options] [command]Options: --version Show version information -?, -h, --help Show help and usage informationCommands: list, ls <archive> Lists contents of archive. info <archive> Technical information about archive. test, verify <archive> Test integrity of archive. extract <archive> Extract contents of archive. optimize <archive> Optimize archive. rebuild <archive> Rebuild archive. add <archive> <input> Add a file or directory. If a file is already in the archive it will not be added. replace <archive> <input> Replace a file or directory. If a file is already in the archive it will be overwritten. update <archive> <input> Update a file or directory. Files will only be added if they are newer than those already in the archive. remove-missing <archive> <input> Remove the files that are not in the specified inputs. remove <archive> <entry> Remove a file from the archive.
> gx-arc add --helpadd: Add a file or directory. If a file is already in the archive it will not be added.Usage: gx-arc add [options] <archive> <input>...Arguments: <archive> Path to ARC file. <input> Input files or directories.Options: --relative-to <relative-to> Specifies base directory (entry names will be generated relative to this path). [default: .] --format <1|3|auto|gd|tq|tqae|tqit> Archive file format. Non-automatic value required when you create new archive. Valid values are 1 or 3 or use game type tags. [default: auto] --compression-level <Fastest|Maximum|NoCompression> Compression level. Valid values from 0 or 'no' (no compression), 1..12 from 'fastest' to 'maximum'. [default: Maximum] --safe-write When enabled, avoid to perform destructive operations. [default: True] --preserve-case Entry names by default is case-insensitive. This option enables creating archives with preserved case. [default: False] --header-area-size <header-area-size> Size of header area. Default is 2048. --chunk-size <chunk-size> Chunk length. Default is 262144. -?, -h, --help Show help and usage information
>gx-arz --helpgx-arz: Glacie Database ToolUsage: gx-arz [options] [command]Options: --use-libdeflate Use libdeflate for zlib compression --log-level <Critical|Debug|Error|Information|Trace|Warning> Logging level [default: Information] --version Show version information -?, -h, --help Show help and usage informationCommands: list, ls <database> List contents of database info <database> Show information about database verify <database> Verify database integrity extract <database> Extract contents of database optimize <database> Optimize database build <database> <input> Build database from dbr files. This command is equivalent to update & remove-misssing comand. add <database> <input> Add records to database. If a file is already in the database it will not be added. update <database> <input> Update records in database. Files will only be added if they are newer than those already in the database. replace <database> <input> Replace records in database. If a file is already in the database it will be overwritten. remove-missing <database> <input> Remove the records that are not in the specified inputs.
>gx-arc extract --helpextract: Extract contents of archive.Usage: gx-arc extract [options] <archive>Arguments: <archive> Path to ARC file.Options: --output <output> Path to output directory. [default: .] --set-last-write-time, --set-timestamp Restore last write time file attribute from archive. [default: True] --use-libdeflate Use libdeflate for zlib compression -?, -h, --help Show help and usage information
>gx-arz build --helpbuild: Build database from dbr files. This command is equivalent to update & remove-misssing comand.Usage: gx-arz build [options] <database> <input>...Arguments: <database> Path to database (.arz) file <input> Input .dbr files or directories.Options: --definitions, --templates <definitions> Path to record definitions (templates). This value might be: directory with .tpl files, path to .arc or .zip file with template files or path to .arz database which will be used to as source of ephemeral record definitions. When this option is not specified, then <database> argument is used as record definition source. --output <output> Path to output database file. If not specified, input database will be replaced --relative-to <relative-to> Specifies base directory (record names will be generated relative to this path). [default: .] --format <auto|gd|tq|tqae|tqit> Archive file format. Non-automatic value required when you create new archive. Valid values are game type tags. [default: Automatic] --compression-level <Fastest|Maximum|NoCompression> Compression level. Valid values from 1..12 from 'fastest' to 'maximum'. [default: Maximum] --checksum Calculate checksums [default: True] -mp, --parallelize Use parallel decompression/compression [default: True] -mdop, --max-degree-of-parallelism <max-degree-of-parallelism> Max degree of parallelism. By default it is equal to number of logical processors. [default: -1] --safe-write When enabled, perform all operations over database in-memory, and write database content to disk only when done. This requires more memory, but database will not be corrupted if you break or cancel operation. When disabled - perform in-place database updates. By default it is enabled if you doesn't specify output path, and disabled if you specify it. [default: False] --preserve-case Record names by default is case-insensitive and stored in lower-case. This option enables creating records with preserved case. [default: False] --use-libdeflate Use libdeflate for zlib compression --log-level <Critical|Debug|Error|Information|Trace|Warning> Logging level [default: Information] -?, -h, --help Show help and usage information
C:\Games\_wrk\glacie-cli-0.3.0\gx-arz.exe update "C:\Games\Titan Quest\Database\database.arz" --relative-to="C:\Games\Titan Quest\wrk\Soulvizier_AERA v1.7b" "C:\Games\Titan Quest\wrk\Soulvizier_AERA v1.7b\records\item\merchants\greece\01_market_startingtown_general.dbr"pause
<gx-project> <source path="G:\Games\TQAE" /> <metadata path="G:\Games\TQAE" /></gx-project>
Quote from: lixiss on 16 October 2020, 04:01:12The issue with templates is that they are very often (or always ?) duplicates, but Custommaps\Art_TQX3\database\... templates do exist.
Quote from: soa on 17 October 2020, 17:13:26Quote from: lixiss on 16 October 2020, 04:01:12The issue with templates is that they are very often (or always ?) duplicates, but Custommaps\Art_TQX3\database\... templates do exist.Custommaps\Art_TQX3 surely doesnt exist... and there is no way to construct this folder, as it already merged and bundled as DLC. Templates bundled with game is just single templates folder, so it can't have multiple root, unless if it mapped with hacks. There is not a problem, unlike first error (you already fixed this stuff for SV-AERA).
It does exist, I had these templates installed automatically with ArtManager. I haven't done any specific hack or anything.I also have original templates in ...My Games\Titan Quest - Immortal Throne\Working\Database\Templates.
Quote from: soa on 17 October 2020, 19:31:49It does exist, I had these templates installed automatically with ArtManager. I haven't done any specific hack or anything.I also have original templates in ...My Games\Titan Quest - Immortal Throne\Working\Database\Templates.I got you point, and even rechecked just now. TQAE 2.9's ArtManager "install" just Working\Database\Templates folder, and nothing more. It just extract Toolset\Templates.arc in this location and do nothing more. More over, "Art_TQX3" keyword exist only in Editor.exe and PSEditor.exe, and I believe there is just artifacts of development. There is no exist any reason to reference same record classes (i'm called usually them types) by different template names (and as already say, there is already handled internally, so this piece will not actually disturb).Add: Thanks for feedback. This topic looks as dead and no one read it.
Maybe I'm wrong then, and I copied the templates there myself (most subtle hack ever) because I wanted AM to compile without errors after Atlantis release. And I didn't changed the database because I didn't know if there was a good reason for this change.Another possibility is that ArtManager has been updated since Atlantis release and no longer install them in Art_TQX3.Because when I look at 2.10 game version (beta for controller), it appears the devs now see Art_TQX3 templates as something not wanted.There are 191 Art_TQX3 templates in 2.9 patch and only 20 in 2.10 (maybe 0 for the real release ?).
Add: Thanks for feedback. This topic looks as dead and no one read it.
QuoteAdd: Thanks for feedback. This topic looks as dead and no one read it.This project seems great actually.
I'd love to try your tool, but these codes look intimidating (as i have zero knowledge in this stuff).
Do you plan making an exe version with interface for the future, more "user friendly"? Or there already is, but I have to build it somehow?
What you mean by codes? Do you mean you don't know how to deal with command-line tools? If you can call original "archiveTool", then calling this tools is not harder. Sorry, there is still no exist any documentation, aside from few posts here. However, there is always exist space to answer questions here or at github issues or directly. :-)Anyway, for clearness, glacie-cli-0.3.1-alpha.2-win-x64 - there is "self-contained" bundle, e.g. it self-sufficient, e.g. you doesn't need to install anything (like .net runtime) to run executables from it, and it contains gx-arc.exe and gx-arz.exe.