Closed MrNooberDude closed 1 year ago
is there any more output than that?
Nope. Don't know why it happened other than maybe a different version of JDK screwing up.
what apk version are you using?
12.5.0 (I downloaded it from APK Pure, might that be the issue?)
Can you try an older version, e.g 12.3 and see if you still get the error
Still got the error. maybe it's an error with the directory based on how it's looking for the extracted
folder when the only other folder is original_extracted
.
can you send the script that you are using?
Here it is!
from tbcml.core import (
CountryCode,
GameVersion,
Apk,
GamePacks,
Mod,
ModEdit,
CatFormType,
Cat,
CatForm,
)
# Choose the country code
cc = CountryCode.EN
# Choose a game version
gv = GameVersion.from_string("12.6.0")
# Get the apk
apk = Apk(gv, cc)
apk.download_apk()
apk.extract()
# Download server files data
apk.download_server_files()
apk.copy_server_files()
# Get the game data
game_packs = GamePacks.from_apk(apk)
# Create a mod id, or use an existing one
mod_id = Mod.create_mod_id()
# Create a mod, not all information is required
mod = Mod(
name="Test Mod",
author="Test Author",
description="Test Description",
mod_id=mod_id,
mod_version="1.0.0",
password="test",
)
# Define cat information
cat_id = 0
cat_form_type = CatFormType.FIRST
# Create a form
form = CatForm.create_empty(cat_id, cat_form_type)
# Set the form's name to "Test Cat"
form.name = "Test Cat"
# Create a cat
cat = Cat.create_empty(cat_id)
# Set the form
cat.set_form(cat_form_type, form)
# Create a mod edit
mod_edit = ModEdit(["cats", cat_id], cat.to_dict())
# Add the mod edit to the mod
mod.add_mod_edit(mod_edit)
# Add the mod to the game packs
apk.load_mods([mod], game_packs)
# open the apk folder in the file explorer (optional)
apk_folder.open()
Still got the error. maybe it's an error with the directory based on how it's looking for the
extracted
folder when the only other folder isoriginal_extracted
.
Is there an apk in that folder?
the apk is there along with the original_extracted
folder, but thats it. could you maybe give me the apk that works for you?
what file size is the apk?
151,593kb
is there anything in the original_extracted folder?
Yeah, its just the apk opened up like a zip. Guessing that's intentional.
Ok, so I tried updating to the newest version and got this:
[######################################################################] 100% (159.89 MB/159.89 MB) Failed to extract APK: Input file (C:\Users\gatli\AppData\Roaming\tbcml\APKs\12.6.0en\jp.co.ponos.battlecatsen-original.apk) was not found or was not readable.
Traceback (most recent call last):
File "C:\Users\gatli\Desktop\BCU\Battle Cats\TBCModLoader-1.0.0\script.py", line 25, in <module>
apk.download_server_files()
File "C:\Users\gatli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tbcml\core\io\apk.py", line 636, in download_server_files
sfh = core.ServerFileHandler(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gatli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tbcml\core\server_handler.py", line 27, in __init__
self.game_versions = self.find_game_versions()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gatli\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\tbcml\core\server_handler.py", line 199, in find_game_versions
raise ValueError("Could not find libnative.so")
ValueError: Could not find libnative.so
doesC:\Users\gatli\AppData\Roaming\tbcml\APKs\12.6.0en\jp.co.ponos.battlecatsen-original.apk exist?
didn't before because I didn't realize that it didn't put the file there. After I got an version 12.6.1 apk, I put it there, and once again it failed to extract because the extracted
folder didn't exist.
tried creating my own extracted
folder but it deleted it for some reason
i'll boot up my windows vm and see if i can replicate the issues
alright then 👍
So... It's been a bit. Have you made any progress?
No, not really. I couldn't replicate the issue on windows unfortunately. I'm not really sure how to fix it
Alright then. I'll try doing it through a VM. Thanks for the help though!
Here's the log.
Is there something I either did wrong or is this a bug?