Skip to content

Commit 153092d

Browse files
committed
- v0.5.0 pre-release commit.
- Changes to method docs. - Updated all instances of "VBP" to "VBPatcher". Signed-off-by: schlopp96 <[email protected]>
1 parent 1c104c8 commit 153092d

File tree

3 files changed

+50
-29
lines changed

3 files changed

+50
-29
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# VBP
1+
# VBPatcher
22

33
> Valheim BepInEx Patcher
44
55
---
66

77
## About
88

9-
- The Valheim BepInEx Patcher _**(VBP)**_ is a personal script created to solve the weird automatic version downgrading of the BepInEx modding tool.
9+
- The Valheim BepInEx Patcher _**(VBPatcher)**_ is a personal script created to solve the weird automatic version downgrading of the BepInEx modding tool.
1010

1111
- For me, this is generally caused by the Vortex mod manager automatically downloading what it perceives to be the "necessary" files for modding.
1212

@@ -16,17 +16,17 @@
1616

1717
### Using PIP _(Recommended)_
1818

19-
- To install VBP using `pip`, enter the following:
19+
- To install VBPatcher using `pip`, enter the following:
2020

2121
```python
2222
pip --user install VBPatcher
2323
```
2424

2525
### Manual Installation _(**NOT** Recommended)_
2626

27-
1. Download the project from [GitHub](https://github.com/schlopp96/VBP) and extract to location of choice.
27+
1. Download the project from [GitHub](https://github.com/schlopp96/VBPatcher) and extract to location of choice.
2828

29-
2. Open terminal and navigate to the extracted directory `"./path/to/VBP"`.
29+
2. Open terminal and navigate to the extracted directory `"./path/to/VBPatcher"`.
3030

3131
3. Use `pip install -r requirements.txt` to install necessary dependencies.
3232

@@ -40,7 +40,7 @@
4040

4141
- Each time your modding tool is opened to edit Valheim, your files will be downgraded again, so **you must run this script every time before playing!**
4242

43-
1. Open the script, which can be found inside the downloaded folder here: "VBP/src/patcher.py":
43+
1. Open the script, which can be found inside the downloaded folder here: "VBPatcher/src/patcher.py":
4444

4545
2. Once the script is run, you will be prompted to choose whether to install the latest available build, the latest available stable version of BepInEx patch, or _both_ to ensure the latest possible build available.
4646

@@ -65,7 +65,7 @@
6565
- **_Note that you can also find the latest bleeding-edge-builds of BepInEx [here](https://builds.bepis.io/projects/bepinex_be)._**
6666

6767
```python
68-
>>> from VBP import vbp
68+
>>> from VBPatcher import vbp
6969
>>> vbp()
7070
Welcome to the Valheim Bepinex Patcher!
7171

@@ -138,4 +138,4 @@
138138

139139
- If you have any questions, comments, issues, complaints, etc, feel free to contact me through my:
140140
- Email at: `[email protected]`.
141-
- Submit an issue on the project's [GitHub repository](https://github.com/schlopp96/VBP)
141+
- Submit an issue on the project's [GitHub repository](https://github.com/schlopp96/VBPatcher)

VBPatcher/main.py

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/usr/bin/env python3
2-
#@ ====================================================================================================== @#
3-
#> Valheim BepInEx Patcher <#
4-
#< Est. 10/24/21 >#
5-
#@ ====================================================================================================== @#
6-
#$ ====================================================================================================== $#
2+
73
import logging
84
from datetime import datetime
95
from os import chdir
@@ -31,7 +27,8 @@
3127

3228
#* Establish Logger:
3329
class vbp_Logger():
34-
"""Generater for application logging.
30+
"""Generates application loggers.
31+
3532
- Uses built-in Python `logging` module.
3633
"""
3734
def __init__(self, log_file: str, log_format: str = '[%(asctime)s - %(levelname)s] : %(message)s'):
@@ -109,8 +106,11 @@ def vbp() -> None | NoReturn:
109106
def stable_patch() -> None | NoReturn:
110107
"""Install latest BepInEx stable-build patch version to local directory.
111108
112-
:return: Installs BepInEx patch.
113-
:rtype: None
109+
---
110+
111+
Parameters:
112+
:return: Installs BepInEx patch.
113+
:rtype: None
114114
"""
115115
while True:
116116
logger.info(f'Displaying confirmation prompt to install BepInEx stable-release {b_stable} patch...')
@@ -135,8 +135,11 @@ def stable_patch() -> None | NoReturn:
135135
def BE_patch() -> None | NoReturn:
136136
"""Install latest BepInEx bleeding-edge patch version to local directory.
137137
138-
:return: Install bleeding-edge patch to BepInEx directory.
139-
:rtype: None
138+
---
139+
140+
Parameters:
141+
:return: Install bleeding-edge patch to BepInEx directory.
142+
:rtype: None
140143
"""
141144
while True:
142145
logger.info(f'Displaying confirmation prompt to install BepInEx bleeding-edge build {b_latest} patch...')
@@ -161,8 +164,11 @@ def BE_patch() -> None | NoReturn:
161164
def full_patch() -> None | bool:
162165
"""Install both available BepInEx patches in order of release (Stable -> Bleeding-Edge).
163166
164-
:return: Install both stable and bleeding edge patch builds in order of release to BepInEx directory.
165-
:rtype: None
167+
---
168+
169+
Parameters:
170+
:return: Install both stable and bleeding edge patch builds in order of release to BepInEx directory.
171+
:rtype: None
166172
"""
167173
while True:
168174
logger.info('Displaying confirmation prompt to install full-upgrade patch (install both stable and bleeding-edge builds in order of release)...')
@@ -188,8 +194,11 @@ def full_patch() -> None | bool:
188194
def promptStart() -> NoReturn | None:
189195
"""Prompt user to choose whether or not to start the game post-patch.
190196
191-
:return: Exits program or starts game.
192-
:rtype: NoReturn | None
197+
---
198+
199+
Parameters:
200+
:return: Exits program or starts game.
201+
:rtype: NoReturn | None
193202
"""
194203
while True:
195204
logger.info('Displaying start game prompt...')
@@ -216,8 +225,13 @@ def openValheim() -> int | None:
216225
- Will raise `TimeoutExpired` exception if executable doesn't start within 10 seconds.
217226
- Prevents program from freezing due to any errors encountered during launch process.
218227
219-
:return: Start game client.
220-
:rtype: int | None
228+
- Steam must be running to properly initialize launch process.
229+
230+
---
231+
232+
Parameters:
233+
:return: Start game client.
234+
:rtype: int | None
221235
"""
222236
try:
223237
logger.info('Starting Valheim...\n\n')
@@ -230,7 +244,11 @@ def openValheim() -> int | None:
230244

231245

232246
def patch(patchDir: Any, targetDir: Any, ver: Any) -> None:
233-
"""Apply `patchDir` to `targetDir`.
247+
"""Apply `patchDir` files to `targetDir` directory.
248+
249+
- Will overwrite existing files.
250+
251+
---
234252
235253
Parameters:
236254
:param patchDir: Directory containing patch files.
@@ -256,8 +274,11 @@ def patch(patchDir: Any, targetDir: Any, ver: Any) -> None:
256274
def exitPatcher() -> None | NoReturn:
257275
"""Exit the application and finalize log.
258276
259-
:return: Exits application.
260-
:rtype: None | NoReturn
277+
---
278+
279+
Parameters:
280+
:return: Exits application.
281+
:rtype: None | NoReturn
261282
"""
262283
logger.info(f'Exiting patcher...\n\n==> End of log...\n\n\n{_textborder}\n\n')
263284
return ex()

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
name='VBPatcher',
1010
version="0.5.0",
1111
description=
12-
'The Valheim BepInEx Patcher (VBP) is a personal script created to solve the weird automatic version downgrading of the BepInEx modding tool.',
13-
url='https://github.com/schlopp96/VBP',
12+
'The Valheim BepInEx Patcher (VBPatcher) is a personal script created to solve the weird automatic version downgrading of the BepInEx modding tool.',
13+
url='https://github.com/schlopp96/VBPatcher',
1414
author='schlopp96',
1515
author_email='[email protected]',
1616
license='GPL v3.0',

0 commit comments

Comments
 (0)