-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
14 changed files
with
213 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,11 @@ __pycache__/ | |
database/ | ||
movie/ | ||
sound/ | ||
Test.py | ||
dist/ | ||
build/ | ||
*.spec | ||
|
||
Test.py | ||
*.spec | ||
Run.exe | ||
PriconneUtils.exe | ||
*.ico |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,51 @@ | ||
# Priconne Utils | ||
|
||
Scripts written in Python to get the master.db, BGM files, L2D, UB Cutin, etc. from the game Princess Connect! Re: Dive JP Server. Made in Windows 10, so it might not work as intended on other OSs. | ||
Scripts written in Python to get the master database, BGM files, L2D, UB Cutin, etc. from the game Princess Connect! Re: Dive JP Server. Made in Windows 10, so it might not work as intended on other OSs. | ||
|
||
|
||
## Requirements | ||
|
||
- Internet Connection (obviously) | ||
- [Python 3.x](https://www.python.org/downloads/) | ||
- Requests library for Python `pip install requests` | ||
- [acb2wavs (for audio files)](https://github.com/hozuki/libcgss) | ||
- [UsmToolkit (for video files)](https://github.com/MightyZanark/UsmToolkit) | ||
- [FFmpeg (for audio files and UsmToolkit)](https://ffmpeg.org/download.html) | ||
- [.NET 3.1 Core Runtime (for UsmToolkit)](https://dotnet.microsoft.com/en-us/download/dotnet/3.1/runtime) | ||
|
||
Note: If you don't already have FFmpeg installed, then you can just do it from UsmToolkit. UsmToolkit have a command to download FFmpeg. | ||
|
||
|
||
## How to Use | ||
|
||
1. Well first of all, install all the requirements, won't work without it. | ||
2. If you haven't already, add Python, UsmToolkit, and FFmpeg to PATH in System Variables. If you don't know how to do that then check out the later section. Additionally, if you got FFmpeg from UsmToolkit, then as long as UsmToolkit is in PATH, you are good to go. | ||
3. If you got everything set up already, then you can double click on `Run.py` to run the script. After running, a window will pop up and there are instructions there as well. | ||
4. | ||
2. If you haven't already, add acb2wavs, UsmToolkit, and FFmpeg to PATH in System Variables. If you don't know how to do that then check out the later section. Additionally, if you got FFmpeg from UsmToolkit, then as long as UsmToolkit is in PATH, you are good to go. | ||
3. Don't forget to download the executable from [latest](https://github.com/MightyZanark/PriconneUtils/releases/latest). | ||
4. If you got everything set up already, then you can double click on `PriconneUtils.exe` to run the program. After running, a window will pop up and there are instructions there as well. | ||
5. Type the option that you would like to do, upper/lowercases doesn't matter. | ||
6. After the program runs the option you selected, it will ask you if you want to continue on to another option or to stop. Just write a simple `y` (yes) or `n` (no) as indicated. | ||
7. And that is it. The L2D, cutin, etc will be saved in a folder created right where the `PriconneUtils.exe` file is, so if you don't want to bother moving the output files elsewhere later, make sure to place the executable where you want it. | ||
|
||
|
||
## How to Add to PATH (Windows 10) | ||
|
||
1. Open up the search bar and search for `system variables`, `Edit the system environment variables` should appear so click on it. | ||
2. A window called `System Properties` should open and you should be in the `Advanced` tab. | ||
3. At the very bottom, there should be a button called `Environment Variables...`, click that. | ||
4. Another window called `Environment Variables` should open up. There are 2 section in it, the upper part is the variables for the **CURRENT USER**, while the bottom part is for the **WHOLE SYSTEM** (or ALL USER). You can choose whether you like Python, UsmToolkit, and FFmpeg to be available to only the **CURRENT USER** or to **ALL USER**. | ||
4. Another window called `Environment Variables` should open up. There are 2 section in it, the upper part is the variables for the **CURRENT USER**, while the bottom part is for the **WHOLE SYSTEM** (or ALL USER). You can choose whether you like acb2wavs, UsmToolkit, and FFmpeg to be available to only the **CURRENT USER** or to **ALL USER**. | ||
5. After you decided which one you want to edit, find the variable called `Path` (not `PATHEXT`), select it, and press `Edit` or double click it. That should open up yet another window. | ||
6. In that window, there should be all kinds of options like `New`, `Edit`, `Browse`, `Delete`, etc. To add Python and UsmToolkit to it, press `New`. | ||
7. Copy and paste the full path of Python and UsmToolkit, and by full path I meant something like this `C:\Users\user\AppData\Local\Programs\Python\Python39\`. At the end of it, you should have something along this line | ||
6. In that window, there should be all kinds of options like `New`, `Edit`, `Browse`, `Delete`, etc. To add acb2wavs and UsmToolkit to it, press `New`. | ||
7. Copy and paste the full path of acb2wavs and UsmToolkit, and by full path I meant something like this `D:\libcgss-win-x86-vc14.2-0.3.7.89\bin\x86\Release` (acb2wavs). At the end of it, you should have something along this line | ||
|
||
![Image of completed path](./path.png) | ||
|
||
I have FFmpeg as a separate line because I already have FFmpeg installed way before I have UsmToolkit, but if you don't have both and you downloaded FFmpeg from UsmToolkit command, then you just need to have UsmToolkit in `Path` and it will work just fine. | ||
|
||
If this still wasn't clear, you can contact me through Discord from [Priconne Unofficial Server](https://discord.gg/priconne), if you're not from the server, chances are I will just ignore your DM/friend req. My tag is **MightyZanark#0138**. | ||
|
||
|
||
## Building | ||
|
||
If you want to modify and build the program yourself, you will need: | ||
- [Python 3.9.6](https://www.python.org/downloads/) | ||
- Requests `pip install requests` | ||
- Pyinstaller `pip install pyinstaller` | ||
|
||
After installing those, you can just run the `build.bat` file under the scripts folder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import os, re | ||
|
||
CUR_DIR = os.getcwd() | ||
|
||
# DBCheck constants | ||
CONFIG_FILE = os.path.join(CUR_DIR, 'config.json') | ||
DB_DIR = os.path.join(CUR_DIR, 'database') | ||
MAX_TEST = 20 | ||
TEST_MULTIPLIER = 10 | ||
|
||
|
||
# Movie constants | ||
MOVIE_URL = 'http://prd-priconne-redive.akamaized.net/dl/pool/Movie' | ||
MOVIE_DIR = os.path.join(CUR_DIR, 'movie') | ||
MOVIEMANIFEST = os.path.join(DB_DIR, 'moviemanifest') | ||
|
||
L2D_DIR = os.path.join(MOVIE_DIR, 'l2d') | ||
L2D_NAME = re.compile('character_\d+_000002\.usm') | ||
|
||
CUTIN_DIR = os.path.join(MOVIE_DIR, 'cutin') | ||
CUTIN_NAME = re.compile('cutin_\d+\.usm') | ||
|
||
SUMMON_DIR = os.path.join(MOVIE_DIR, 'summon') | ||
SUMMON_NAME = re.compile('character_\d+_000001\.usm') | ||
|
||
EVENT_DIR = os.path.join(MOVIE_DIR, 'event') | ||
EVENT_NAME = re.compile('story_5\d{5}[7-9]0[1-2]\.usm') | ||
|
||
MOVIE_TYPES = { | ||
'dir': { | ||
'cutin': CUTIN_DIR, | ||
'l2d': L2D_DIR, | ||
'summon': SUMMON_DIR, | ||
'event': EVENT_DIR | ||
}, | ||
'name': { | ||
'cutin': CUTIN_NAME, | ||
'l2d': L2D_NAME, | ||
'summon': SUMMON_NAME, | ||
'event': EVENT_NAME | ||
} | ||
} | ||
|
||
|
||
# Sound constants | ||
SOUND_URL = 'http://prd-priconne-redive.akamaized.net/dl/pool/Sound' | ||
SOUND_DIR = os.path.join(CUR_DIR, 'sound') | ||
SOUNDMANIFEST = os.path.join(DB_DIR, 'sound2manifest') | ||
|
||
BGM_DIR = os.path.join(SOUND_DIR, 'bgm') | ||
BGM_NAME = re.compile('bgm_.+\.(acb||awb)') | ||
|
||
SOUND_TYPES = { | ||
'dir': { | ||
'bgm': BGM_DIR | ||
}, | ||
'name': { | ||
'bgm': BGM_NAME | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.