Skip to content

Commit 32046c2

Browse files
committed
Updated the README file
1 parent b915f4c commit 32046c2

File tree

1 file changed

+30
-47
lines changed

1 file changed

+30
-47
lines changed

README.md

Lines changed: 30 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,24 @@ Data from MHW are stored in files named `chunk*.bin`, those files are compressed
1414

1515
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`.
1616

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.
1818

1919
## The library
2020

2121
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.
2222

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+
2325
### Package processors
2426

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.
2628

2729
Many `IPackageProcessor` type are already provided:
2830

2931
- Base processors:
3032
- `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.
3335
- Specific processors:
3436
- `ArmorPackageProcessor`: Loads armor pieces.
3537
- `CraftPackageProcessor`: Loads information required for equipment craft and upgrades.
@@ -53,54 +55,35 @@ One can reuse the base processors to implement new ones.
5355

5456
### Builders
5557

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.
5759

5860
- `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.
63-
- `BowWeaponBuilder`: Builds bows.
64-
- `ChargeBladeWeaponBuilder`: Builds charge blades.
65-
- `DualBladesWeaponBuilder`: Builds dual blades.
66-
- `GreatSwordWeaponBuilder`: Builds great swords.
67-
- `GunlanceWeaponBuilder`: Builds gunlances.
68-
- `HammerWeaponBuilder`: Builds hammers.
69-
- `HuntingHornWeaponBuilder`: Builds hunting horns.
70-
- `InsectGlaiveWeaponBuilder`: Builds insect glaives.
71-
- `LanceWeaponBuilder`: Builds lances.
72-
- `LongSwordWeaponBuilder`: Builds long swords.
73-
- `SwitchAxeWeaponBuilder`: Builds switch axes.
74-
- `SwordAndShieldWeaponBuilder`: Builds swords and shields.
75-
- `WeaponTreesBuilder`: Builds weapon tree names.
76-
77-
Inheritance chain of weapon builders is as follow:
78-
79-
```
80-
+ WeaponBuilderBase
81-
|
82-
|--+ MeleeWeaponWeaponBuilderBase
83-
| |
84-
| |--+ GreatSwordWeaponBuilder (GreatSword)
85-
| |--+ ChargeBladeWeaponBuilder (ChargeBlade)
86-
| |--+ SwordAndShieldWeaponBuilder (SwordAndShield)
87-
| |--+ SwitchAxeWeaponBuilder (SwitchAxe)
88-
| |--+ LongSwordWeaponBuilder (LongSword)
89-
| |--+ LanceWeaponBuilder (Lance)
90-
| |--+ InsectGlaiveWeaponBuilder (InsectGlaive)
91-
| |--+ HuntingHornWeaponBuilder (HuntingHorn)
92-
| |--+ HammerWeaponBuilder (Hammer)
93-
| |--+ DualBladesWeaponBuilder (DualBlades)
94-
| \--+ GunlanceWeaponBuilder (Gunlance)
95-
|
96-
|--+ BowWeaponBuilder (Bow)
97-
|
98-
\--+ BowgunWeaponBuilder (LightBowgun, HeavyBowgun)
99-
```
61+
- `MeleeWeaponWeaponBuilderBase`: Base builder for all melee weapon builders.
62+
- `ChargeBladeWeaponBuilder`: Builds charge blades.
63+
- `DualBladesWeaponBuilder`: Builds dual blades.
64+
- `GreatSwordWeaponBuilder`: Builds great swords.
65+
- `GunlanceWeaponBuilder`: Builds gunlances.
66+
- `HammerWeaponBuilder`: Builds hammers.
67+
- `HuntingHornWeaponBuilder`: Builds hunting horns.
68+
- `InsectGlaiveWeaponBuilder`: Builds insect glaives.
69+
- `LanceWeaponBuilder`: Builds lances.
70+
- `LongSwordWeaponBuilder`: Builds long swords.
71+
- `SwitchAxeWeaponBuilder`: Builds switch axes.
72+
- `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.
10083

10184
### Core types
10285

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.
10487

10588
# Terms of use
10689

0 commit comments

Comments
 (0)