pmrowla / pylivemaker

Python package for manipulating LiveMaker game resources
https://pylivemaker.readthedocs.io/en/latest/
GNU General Public License v3.0
63 stars 16 forks source link

patches currently not distributable #43

Open pmrowla opened 4 years ago

pmrowla commented 4 years ago

Related to #2

Currently, a translated game must be patched manually with lmpatch, and the only way to share the translation is to distribute the entire patched game.

This is bad, and we need to have a method of distributing translation patches that can be shared separately from the game itself. Users should be required to acquire the original game on their own. This distributed patch should also not require the end-user to manually install python (basically it will need to be a pyinstaller generated exe containing lmpatch)

basically, we just need a tool that does:

  1. compare final translated & lmpatch-ed copy of the game archive, with the original game archive
  2. generate new "patch-files" archive, containing only the modified files
    • probably will also need to include an lmar strip-ed copy of the exe as well, assuming that things like context menu strings from the exe have been hexedited and should go with the translation patch
  3. export <gamename>_patch.exe that includes patch-files archive and can be distributed to users

When users put patch.exe in their game directory it will

  1. look for original game exe or archive
  2. back up original game
  3. run lmpatch using files from the patch-files archive (and the hexedited exe)
pmrowla commented 4 years ago

@H0R1Z0N not sure what you were planning on doing regarding the AGLS patch, do you have any thoughts on this?

H0R1Z0N commented 4 years ago

It's and it's not really the case. IDK if the tool was generating the game.ext or it was already existing. I would say the i was going to bundle the exe, the lsb file and folder who are neccessary for the translation. Anaheim need the game.dat file to work. I would say the best way would be to make a exe who patch the exe and decompress the lsb file or the to be able to make a compressed package of the lsb translation and other change that you load and that archive's loaded inside the game folder, the archive's inside the exe who patch the exe and unload that archive in the installation folder. Personally, i would say, sure the risk of copyright issue's a major issue... but most of those game are very old. I saw Fan-na licensed an english translation to Sekai Project for a commercial project (and really look to be livemaker). Personally, this is not the first project i did in a very grey zone at risk of C&D (My normal online name's HerbalNekoTea but i cannot remember the email i used to register it here (used it for like 3 website max)). In the end, if it come to it, i was probably planning to not release the patch only this time for the nyaa release but put the patch only on my website. I know too well that if i fuck up something, i got a few min to hour to fix it for a 1.1 before superelmo or erogedownload got your patch immortalised has the final version. Most people pirate prepatched ready to use copy, me included, even commercial one. The industry was already kinda collapsing on itself way before corona, so corona's only accelerating the decline of the localiser due to mismanagement of the CEO of those localiser. (Buying a $25K USD space ship in space citizen by the Sekai Project CEO in example.)

pmrowla commented 4 years ago

I get that doujin game circles arent going to go after anyone for pirating things, and the fact is that livemaker itself is now abandonware since the jp company that made it closed down. But imo people should still be encouraged to throw some money towards the original creators, especially for things that are actually available for non-jp audiences to purchase (like AGLS on en dlsite).

Having an actual patch also makes it easier for updating things as well, since the users don't have to re-DL the entire game every time there's small bugfixes made to a translation.

H0R1Z0N commented 4 years ago

Like i said, once superelmo and erogedownload got their pirate copy online, this could be considered the last version that anybody would use, since that's what people will all download.

Stefan311 commented 4 years ago

As a fan of... lets say... special games I have seen (and played) many japanese games. Japan seems the only producer of this kind of games. None of them came as combination "original game" + "translation patch". All of them were pirated or freeware. Even if I think one game would be worth of paying (the most were not!), it would be very hard to buy such a game. Seems most of this games are made for japanese market only. Mindset: Who cares about that stupid ugly foreigners?

In my opinion, creating this kind of translation patcher would be a thing of low profit and high effort.

pmrowla commented 4 years ago

fwiw I have been contacted by groups doing actual licensed translations of a few livemaker projects, so I still think having an actual patching mechanism is something that should be done eventually, but I guess it is not high priority for now

although I think in most cases those groups ended up deciding it would probably be easier to just port their entire games to renpy

pmrowla commented 4 years ago

also worth noting, LM does have their own patcher that we could just use. It's just a basic exe w/an appended LM archive, and it patches an existing game directory w/the contents of the patch archive

I think it might only work w/games that use the installer though

KimchiTea commented 4 years ago

For the patch I released, I used xdelta UI to compare the original file to the one with all my changes patched in, and distributed the .xdelta file with instructions. I think that's a pretty straightforward way to do it; at least, I only got one comment from someone who was confused.

kiraio-moe commented 1 year ago

@pmrowla Found a way to distribute translation patch without sharing a huge damn exe file. Apparently, LM support playing the striped exe and the game archive. I have been tested it and work.

But, it's requires the client to extract the game themself and put the striped exe and patch there. I think it's not a big deal, we just need pylivemaker lmar functionality distributed alongside the patch.

This should fix #2

Found the hint from this guy: https://gitgud.io/Princess_Sacrifice_Translation/Princess_Sacrifice_translation/-/blob/528c5c28b690dfcc50ff0f9d37114677ac244fb1/tools/Livemaker%203%20What%20do%20-%20The%20short%20guide.txt#L61

Edit: Can anyone build an exe for pylivemaker lmar functionality? I try to use PyInstaller, but no luck. Don't know much about Python. For now, I distribute the game patch and GARbro (pretty small, < 10 MB) for user to extract the exe.

Steps to reproduce

lmar x -i gal -o game game.exe
lmar strip game.exe game-strip.exe

lm-game

Settings Location

Language for non-Unicode programs: Control Panel > Clock and Region > Region > Administrative tab.

non-unicode-language

Region and Time Zone: Windows Settings > Time and Language.

pmrowla commented 1 year ago

I've considered getting pyinstaller builds set up before, but I just don't have enough time to work on pylm right now

EliEron commented 1 year ago

@pmrowla Found a way to distribute translation patch without sharing a huge damn exe file. Apparently, LM support playing the striped exe and the game archive. I have been tested it and work.

But, it's requires the client to extract the game themself and put the striped exe and patch there. I think it's not a big deal, we just need pylivemaker lmar functionality distributed alongside the patch.

Just for future reference it's worth noting that you don't actually need to strip the exe, LM will prioritize unpacked files even if it has conflicting files embedded in the exe or in a split archive. At least that's the case with all of the games I've tested, which includes both LM2 and LM3 games.

So unless you've made changes to the exe itself that requires you to share it, you should be able to distribute the patch by just bundling up the actual modified files and asking people to drop them in the game's root folder, or whatever folder they belong in. No file extraction needed.

kiraio-moe commented 1 year ago

Just for future reference it's worth noting that you don't actually need to strip the exe, LM will prioritize unpacked files even if it has conflicting files embedded in the exe or in a split archive. At least that's the case with all of the games I've tested, which includes both LM2 and LM3 games.

So unless you've made changes to the exe itself that requires you to share it, you should be able to distribute the patch by just bundling up the actual modified files and asking people to drop them in the game's root folder, or whatever folder they belong in. No file extraction needed.

Thanks for the information. This behaviour also found on Kirikiri engine.