extend README.md
This commit is contained in:
parent
b2733b4b95
commit
2941c0e403
86
README.md
86
README.md
@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
Generates Distribution .json files which are required by the SPT-AKI/Server to spawn loot.
|
Generates Distribution .json files which are required by the SPT-AKI/Server to spawn loot.
|
||||||
|
|
||||||
# Setup
|
## Setup
|
||||||
|
|
||||||
|
### Creating config file and setting folders
|
||||||
|
|
||||||
Requires a config.yaml in /config defining dump and target folders as well as a location for 7z.exe
|
Requires a config.yaml in /config defining dump and target folders as well as a location for 7z.exe
|
||||||
|
|
||||||
@ -34,4 +36,84 @@ config:
|
|||||||
loose:
|
loose:
|
||||||
# known quest items per map for validation
|
# known quest items per map for validation
|
||||||
forced_yaml: forced_loose.yaml
|
forced_yaml: forced_loose.yaml
|
||||||
````
|
````
|
||||||
|
|
||||||
|
### Installing Python
|
||||||
|
|
||||||
|
1) Install python 3.9 https://www.python.org/downloads/release/python-3910/ to your preferred path
|
||||||
|
2) Create a virtual environment and requirements in the LootDistributionGenerator's main folder
|
||||||
|
|
||||||
|
`````shell
|
||||||
|
PS C:\LootDistributionGenerator> C:\pythonpath\python.exe -m venv .\venv
|
||||||
|
`````
|
||||||
|
|
||||||
|
Your dir should now look like
|
||||||
|
````commandline
|
||||||
|
📦LootDistributionGenerator
|
||||||
|
┣ 📂config
|
||||||
|
┃ ┣ 📜config.yaml
|
||||||
|
┃ ┣ 📜forced_loose.yaml
|
||||||
|
┃ ┣ 📜forced_static.yaml
|
||||||
|
┃ ┗ 📜map_directory_mapping.yaml
|
||||||
|
┣ 📂src
|
||||||
|
┃ ┣ 📜loose_loot.py
|
||||||
|
┃ ┣ 📜static_loot.py
|
||||||
|
┃ ┗ 📜tarkov_items.py
|
||||||
|
┣ 📂venv
|
||||||
|
┃ ┣ 📂Include
|
||||||
|
┃ ┣ 📂Lib
|
||||||
|
┃ ┣ 📂Scripits
|
||||||
|
┃ ┗ 📜pyenv.cfg
|
||||||
|
┣ 📜01_process_dump_data.py
|
||||||
|
┗ 📜02_loot_generator_parallel.py
|
||||||
|
````
|
||||||
|
|
||||||
|
Activate the python virtual environment and install the requirements
|
||||||
|
|
||||||
|
`````shell
|
||||||
|
PS C:\GAMES\SPT_AKI_Dev\LootDistributionGenerator> .\venv\Scripts\activate
|
||||||
|
(venv) PS C:\GAMES\SPT_AKI_Dev\LootDistributionGenerator> pip install -r .\requirements.txt
|
||||||
|
`````
|
||||||
|
|
||||||
|
Now the program should be ready to use.
|
||||||
|
|
||||||
|
|
||||||
|
## Use
|
||||||
|
|
||||||
|
Always activate the virtual environment when you use the tool. Also, make sure the locations in the *config.yaml* are
|
||||||
|
set correctly for your system.
|
||||||
|
|
||||||
|
### Preparing and archiving new dumps
|
||||||
|
|
||||||
|
The LootDistribution generator will care for archiving dumps. It creates two 7z archives with the used dumps (currently
|
||||||
|
loot and bot jsons)
|
||||||
|
|
||||||
|
- archives/target_folder/loot_filename
|
||||||
|
- archives/target_folder/bot_filename
|
||||||
|
|
||||||
|
a third archive is created which will contain all the dumps
|
||||||
|
|
||||||
|
- archives/backup_file
|
||||||
|
|
||||||
|
When you receive new dumps you place them in
|
||||||
|
|
||||||
|
- archives/source_folder
|
||||||
|
|
||||||
|
and run
|
||||||
|
|
||||||
|
````shell
|
||||||
|
(venv) PS C:\GAMES\SPT_AKI_Dev\LootDistributionGenerator> python .\01_process_dump_data.py
|
||||||
|
````
|
||||||
|
|
||||||
|
now all the files in *source_folder* will be appended to their corresponding archives.
|
||||||
|
|
||||||
|
### Creating the LootDistribution files for the server
|
||||||
|
|
||||||
|
When the archives are ready, run
|
||||||
|
|
||||||
|
````shell
|
||||||
|
(venv) PS C:\GAMES\SPT_AKI_Dev\LootDistributionGenerator> python .\02_loot_generator_parallel.py
|
||||||
|
````
|
||||||
|
|
||||||
|
The program will process the dumps to generate the loot files and stores them directly in the correct place
|
||||||
|
in your SPT-AKI server development folder specified in *server/location* in the config.yaml
|
Loading…
x
Reference in New Issue
Block a user