Skip to content
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

Is there a way to add new images into the archive (or rename current ones)? #112

Open
Djweish opened this issue Sep 5, 2023 · 1 comment

Comments

@Djweish
Copy link

Djweish commented Sep 5, 2023

*pylivemaker version: 1.0.4
*Python version: 3.10.6
*Operating System: Windows
*LiveMaker game: トライアド・リリーティア

Description

I'd like to translate the name of enemy attacks in the game, but the game also uses those strings to find the images that go with the attacks. As a simplification, imagine there's a variable X equal to a string I've translated to "Sword Slash"; then the game will nicely display the text "Enemy used Sword Slash!" but it will look for Sword Slash.gal as the image that goes with it, instead of the original Japanese name of the image.

What I Did

I can rename the images or create new ones with my new names, but of course they don't get inserted into the archive when I patch the game. Is there a way to add new images to the archive? Or rename images within the archive?

@pmrowla
Copy link
Owner

pmrowla commented Sep 6, 2023

It's technically possible to do using the underlying pylm livemaker.archive module using the write() function (this will require writing your own python script). But this is not currently supported in lmpatch because the LM archive contains some fields for each file where I do not know what they actually do. lmpatch only supports replacing an existing file (with no rename) since we can preserve the old fields in the patched archive. (I don't know what those fields are because it was not necessary to reverse engineer them to get patching existing files working)

If you write your own python script or modify lmpatch to insert new files with write(), those fields will be filled with zeroed bytes instead of the "correct" value that the LM engine expects. This may or may not matter depending on your particular game and LM engine version (meaning there's no guarantee that the patched exe would actually work properly)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants