You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-47Lines changed: 30 additions & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,22 +14,24 @@ Data from MHW are stored in files named `chunk*.bin`, those files are compressed
14
14
15
15
In order to decrypt and decompress the `.bin` files, use [WorldChunkTool][world-chunk-tool]. It produces files named `chunk*.pkg`, which are the input for `MHWMasterDataUtils`.
16
16
17
-
Note that [WorldChunkTool][world-chunk-tool] also propose to extract the `.pkg` files (input tons of small files) but this is not required, since `MHWMasterDataUtils` directly works on `.pkg` for more convenience.
17
+
Note that [WorldChunkTool][world-chunk-tool] also propose to extract the `.pkg` files (outputs tons of small files) but this is not required, since `MHWMasterDataUtils` directly works on `.pkg` for more convenience. Moreover, extraction of the inner files is an extremely long process.
18
18
19
19
## The library
20
20
21
21
The main project is `MHWMasterDataUtils`, and the main types are the ones inheriting from `IPackageProcessor`, the `PackageReader` and all types in the `MHWMasterDataUtils.Builders` namespace.
22
22
23
+
You can have a look at the project `MHWMasterDataUtils.Exporter` to see how to use the library, this is a good sample project.
24
+
23
25
### Package processors
24
26
25
-
The `PackageReader` type exposes only a constructor and a `Run` method. The constructor takes an optional logger and a collection of `IPackageProcessor`, which are the one doing all the hard work. The `Run` method takes a path, where is will look for all the `.pkg` files and run the `IPackageProcessor`s over those files, in order from the latest the oldest.
27
+
The `PackageReader` type exposes only a constructor and a `Run` method. The constructor takes an optional logger and a collection of `IPackageProcessor`, which are the one doing all the hard work. The `Run` method takes a path, where is will look for all the `.pkg` files and run the `IPackageProcessor`s over those files, in order from newest to oldest.
26
28
27
29
Many `IPackageProcessor` type are already provided:
28
30
29
31
- Base processors:
30
32
-`PackageProcessorBase`: Provides a default implementation for non-critical `IPackageProcessor` methods (can be replaced by interface default implementation when C# 8 becomes mainstream)
31
-
-`SimpleListPackageProcessorBase`: Provides an implementation to load entries of a custom type based on a common pattern, as a list of entries. Duplicates or older entries are accumulated.
32
-
-`SimpleMapPackageProcessorBase`: Provides an implementation to load entries of a custom type based on a common pattern, as a dictionary of entries. Duplicates or older entries are skipped.
33
+
-`ListPackageProcessorBase`: Provides an implementation to load entries of a custom type based on a common pattern, as a list of entries. Duplicates or older entries are accumulated.
34
+
-`MapPackageProcessorBase`: Provides an implementation to load entries of a custom type based on a common pattern, as a dictionary of entries. Duplicates or older entries are skipped.
33
35
- Specific processors:
34
36
-`ArmorPackageProcessor`: Loads armor pieces.
35
37
-`CraftPackageProcessor`: Loads information required for equipment craft and upgrades.
@@ -53,54 +55,35 @@ One can reuse the base processors to implement new ones.
53
55
54
56
### Builders
55
57
56
-
The "builders" are types that use intermediate data parsed by `IPackageProcessor`s to produce high level data, such as data exported to JSON files. They do not inherit from any type. However, builders for weapon are still organized in type hierarchy.
58
+
The "builders" are types that use intermediate data extracted by `IPackageProcessor`s to produce higher level data, such as data exported to JSON files. They do not inherit from any type. However, builders for weapons and armors are still organized in type hierarchy.
57
59
58
60
-`WeaponBuilderBase`: Base builder for all weapon builders.
59
-
-`MeleeWeaponWeaponBuilderBase`: Base builder for all melee weapon builders.
60
-
-`ItemsBuilder`: Builds items.
61
-
-`SkillsBuilder`: Builds skills.
62
-
-`BowgunWeaponBuilder`: Builds heavy and light bowguns.
- `SwordAndShieldWeaponBuilder`: Builds swords and shields.
73
+
-`BowWeaponBuilder`: Builds bows.
74
+
-`BowgunWeaponBuilder`: Builds heavy and light bowguns.
75
+
-`EquipmentBuilderBase`: Base builder for equipment.
76
+
-`ArmorPieceEquipmentBuilder`: Builds heads, chests, arms, waists and legs.
77
+
-`CharmEquipmentBuilder`: Builds charms.
78
+
-`ItemBuilder`: Builds items.
79
+
-`SkillBuilder`: Builds skills.
80
+
-`WeaponTreeNameBuilder`: Builds weapon tree names.
81
+
-`ArmorSeriesBuilder`: Builds armor series names.
82
+
-`JewelBuilder`: Builds jewels.
100
83
101
84
### Core types
102
85
103
-
The project contains a project named `MHWMasterDataUtils.Core`, which holds the high level types required to load exported data. The reason this library is lose-coupled with the rest is because it is allows to load this assembly in tools without loading all the rest, package processors, builders and other "offline" stuffs.
86
+
The solution contains a project named `MHWMasterDataUtils.Core`, which holds the high level types required to load exported data. The reason for this library to be lose-coupled from the rest is because it is allows to load this assembly in tools without loading all package processors, builders and other "offline" stuffs.
0 commit comments