olavstornes / modbuddy Goto Github PK
View Code? Open in Web Editor NEWMod buddy is a mod manager created with extensibility in mind
License: GNU General Public License v3.0
Mod buddy is a mod manager created with extensibility in mind
License: GNU General Public License v3.0
Presets are a bit crude as of now.
Before it grows a tad too big, main.py
should split out it's gui-related things and the application logic.
main.py
into it's own file/class.Ui
-class' sole responsibillity is GUI-related tasks, such as binding events and calling functionsIf enabled and after committing a new set of mods, a separate profile should be made.
YYYY-MM-DD-HHMMSS
)Some how the linking of the mods I am loading into the mods
directory from the ModBuddy .mods
directory is resulting in this games java compiling to fail with a bad absolute path from .mods
as /./mods/
for the mods. I flailed a bit by trying to escape the \.
in the ModBuddy json file. XD
java.lang.RuntimeException: Error loading [data/missions/kayse_NoSuchOrg_test/descriptor.json] resource, not found in [
/home/alan-cugler/Games/starsector/starsector_linux-0.95.1a-RC6/starsector/./mods/slightly better techmining,
/home/alan-cugler/Games/starsector/starsector_linux-0.95.1a-RC6/starsector/./mods/adjusted sector v0.4.2,
/home/alan-cugler/Games/starsector/starsector_linux-0.95.1a-RC6/starsector/./mods/another portrait pack,
/home/alan-cugler/Games/starsector/starsector_linux-0.95.1a-RC6/starsector/./mods/apex design collective,
/home/alan-cugler/Games/starsector/starsector_linux-0.95.1a-RC6/starsector/./mods/ss-armaa,
/home/alan-cugler/Games/starsector/starsector_linux-0.95.1a-RC6/starsector/./mods/battletech portrait pack,
/home/alan-cugler/Games/starsector/starsector_linux-0.95.1a-RC6/starsector/./mods/captainslog
...
I am currently testing switching out .mods/
with a non-hidden directory such as modbuddy/
to see if the period is really somehow being treated as its own directory.
Loading mods is now a one-way street, which could possibly be a bad thing if the folder isn't empty at the start.
What are the steps needed to delete meta data for a profile and for deleting a game from ModaBuddy? Currently, I reset the whole application by deleting everything in the games
directory and deleting the settings.json
.
It would be better for testing and maybe user organization if the games
directory was for saving base things about each game added, and then a profile
directory for each profile made. I am assuming a bit of metadata to tag which game each profile goes to. This may or may not result in deprecating the settings.json
file, which is my goal because its nice to delete just files rather than edit them for resetting an application.
This question/suggest are just that, you may have design choices in mind that want to stick to the current file architecture.
Given that applying mods only links them to its corresponding place, a disabled mod doesn't mean "delete this mod" as of now.
Tightly related with #1
Text content from prompts and such seems to clutter the codebase a bit. Extract them outside
The path
field is helpful when trying to remember where the source files are coming from, but most of the time this text is adding eye fatigue. it would be nice to make the path column toggle-able, and start out minimized (ex: "/path/to/f..."), and have the name
column fully expanded as that is for informative when deciding which mods I am trying to use.
Linux is case sensitive on files, while windows-platforms aren't, creating a possible problem with mods that don't follow file casings as strictly.
Hi,
I know you're going to polish it anyways, but it might be good to know that the program doesn't even start here.
(Arch Linux with Python 3.9.2, pyqt5-5.15.3-2, pyqt5-sip-12.8.1-3 - both pyqt5 components are installed via package management, not via pip)
On an initial launch I get this error:
$ LC_ALL=C ./main.py
Traceback (most recent call last):
File "/tmp/ModBuddy/./main.py", line 290, in <module>
window = Ui()
File "/tmp/ModBuddy/./main.py", line 47, in __init__
self.update_game_combobox()
File "/tmp/ModBuddy/./main.py", line 80, in update_game_combobox
for x in GAME_PRESET_FOLDER.iterdir():
File "/usr/lib/python3.9/pathlib.py", line 1149, in iterdir
for name in self._accessor.listdir(self):
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/ModBuddy/games'
When I create the missing games directory manually this one:
$ LC_ALL=C ./main.py
Traceback (most recent call last):
File "/tmp/ModBuddy/./main.py", line 290, in <module>
window = Ui()
File "/tmp/ModBuddy/./main.py", line 50, in __init__
self.update_fileview()
File "/tmp/ModBuddy/./main.py", line 133, in update_fileview
path = str(Path(mod_path).parent)
File "/usr/lib/python3.9/pathlib.py", line 1071, in __new__
self = cls._from_parts(args, init=False)
File "/usr/lib/python3.9/pathlib.py", line 696, in _from_parts
drv, root, parts = self._parse_args(args)
File "/usr/lib/python3.9/pathlib.py", line 680, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Did I forget something obvious?
If you need anything else for a proper bug report please let me know.
After modifications, a dirty bit should be set to indicate unsaved changes.
Should fire off when:
Also consider some UX for this as well
I am using ModBuddy for Linux game modding. Currently been playing StarSector alot, and the three main archives that are used by the modding community are: zip
, rar
, and 7z
. In ModBuddy, shutil
seems to cover zip
files and tar
balls. I recommend\request expanding the archive supported types to as many as possible as many different games will have modding communities using different compression tools.
Lines 267 to 276 in f049634
I recommend replacing the above with something like the below:
for archive in archives[0]:
suff = Path(archive).suffix
folder_name = Path(archive).stem
target_folder = Path(default_mod_folder) / folder_name
try:
patoolib.extract_archive(archive, outdir=target_folder)
except FileNotFoundError:
mod_home = Path(target_folder)
mod_home.mkdir()
patoolib.extract_archive(archive, outdir=target_folder)
else:
self.add_mod(target_folder)
I think my code is crap at the moment so I know the above proposed solution doesnt fully work or look pythonic. The main reason for switching to patool|patoolib
is it does all the work for managing just about every archive type there is.
The mods starting base content
variable strikes me as something that should be hidden from the user as it is always required to be loaded first so mods can then make layered changes on those files. That being said this was missing from multiple scrub testing runs, and it took me three hours to figure out it was missing from the mods list.
Lines 222 to 224 in f049634
When looking at where the error was coming from, I realized a null value for the base content path seems silly since the path is available in the game_mod_folder
variable. So not knowing which one of my testing resets messed up the mods dictionary leads me to ask if target_folder
should be set to the game_mod_folder
and not extracted from the mod_list
dictionary?
Lines 39 to 44 in f049634
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.