-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple versions and romhacks for the same title id. #52
base: main
Are you sure you want to change the base?
Support multiple versions and romhacks for the same title id. #52
Conversation
before checking Github/gametdb
Adds banners for two romhacks for Pokemon Platinum that both use the same ID "CPU" as the main game.
a gamecode.txt may be usefull for custom titles etc.
I think ROM hacks should explicitly be one region only. Renegade Plat for example only applies to CPUE, Moon Black 2 only applies to IREO, and otherwise. As far as I'm aware, this is the case for pretty much ALL ROM hacks out there. If there happens to be a ROM hack that provides multiple regions, then we can just do it separately. (As is the case for normal ROMs too, if there are multiple regions, then we make a specific directory for that region. So we can take advantage of this and explicitly only use that region, this way it wouldn't confuse it in the 3-letter version. To make this easier, we should probably provide some way to show which files actually exist in the |
I added a directory list in JSON format: https://github.com/YANBForwarder/assets/blob/main/assets.json It could use some improvement, but maybe it helps here? |
I thought about that too, but wasn't sure that there aren't any. If hack assets are guaranteed to only go in the 4-letter folders there could be some redundant assets, but I guess thats not the worst. It would be necessary to simplify the code. |
We can get to deduplication when we get there. For now, I'm not terribly worried. I'll say just do 4 letters, since multi-region ROM hacks are the anomaly rather than the norm. |
Tbh I'm not too familiar with JSON handling, but I can see how this would help, especially with actually finding all versions. What do you think about the way the folders are set up currently (CPU.1, CPU.2 ...)? I thought about having them inside of the original CPU folder, but I figured that it is easier to use the way they are now. |
Alright, shouldn't take too long. Maybe tomorrow though, my midterms are coming up as well and this was a welcome distraction today. |
This will definitely need some work over at the assets repo, since we should add descriptions for the ROM hacks etc. We should abstract the "is there a ROM hack present?" checks in the assets side over that json file. json in python is pretty easy, it's just a I'll have to think on how the directory structure is going to work. |
f026f0d
to
42b1ece
Compare
42b1ece
to
905142b
Compare
Hi,
this allows the generator to select between multiple versions of assets for the same title id, in cases such as romhacks or PAL games that have different banners per language.
To create a version for Pokemon Platinum [CPU_], the assets would need to be saved in the repo as "CPU.1", "CPU.2" etc.
Each of these added versions also needs a "description.txt" file which contains as name for the version (e.g. "Pokemon - Renegade Platinum") that can be displayed to the user. The assets would just be called "CPU.png" and "CPU.wav" again to not cause any trouble. In the future the description.txt could also be used for custom titles for romhacks.
How it currently works is that before downloading anything from Github, the repo is checked for a one of these versions. Since downloading directly from Github is not really the cleanest method, this currently needs the numbers to be consecutive (or only skip one at the most) and start at 1. This means if the first version would be (for whatever reason) CPU.5, it would not be detected. Versions for both the short "CPU" and the long "CPUE" are detected at the same time.
If a different version is detected, the user is presented with a simple selection menu to choose what he wants (including default ofc). If the custom version only provides a banner, the sound will be downloaded from the regular version.
I had to change all the links in the generator.py to point to my fork in order to test stuff and have also uploaded two versions of Platinum for that purpose, this would obv have to be changed to point to the main asset repo.
The main problem with the way this is currently implemented is that it breaks the GUI, since the user input to select a version is mandatory. I could change this so that versions are only checked if an argument is passed, but I think checking versions should eventually become default behaviour.
Idk how this should work with #50, probably just trust the user :D