Pages

Wednesday, December 12, 2012

Gruntz REZ Patcher 1.0.0

It's the first version of the application used to modify REZ files based on patches. You provide a list of patches which program then analyzes and modifies the contents of the original REZ package.

Gruntz REZ Patcher is intended to finally make Gruntz a moddable game! To some extent at least.

Since it's the first working version of the program, you're likely to encounter some of the bugs. When this happens, report them in the comment section below this post alongside ideas for new features and constructive feedback in general. I don't think there's a need for a special place for it at this very moment, maybe I'll think of it later.
Pierwsza wersja programu do modyfikowania plików REZ w oparciu o patche, lub "łatki", jak kto woli. Podaje się listę patchy, które program następnie analizuje i na ich podstawie dodaje lub nadpisuje pliki w oryginalnym pliku REZ.

Program stworzony z myślą o modowaniu gry Gruntz! Przynajmniej w jakimś stopniu.

Nie ukrywam, że w związku z tym, że jest to pierwsza wersja programu, błędy mogą występować. Jak ktoś coś znajdzie, można je zgłosić w komentarzach pod tym postem, jak również pomysły na nowe funkcje programu lub inne konstruktywne uwagi. Nie wiem czy jest sens tworzyć w tym celu jakieś osobne miejsce, najwyżej później się coś wymyśli.

DownloadPobierz
Gruntz REZ Patcher 1.0.0 (1.45MB)



Poniżej zrzuty ekranu podczas dodawania nowego tilesetu "Virtual Reality" autorstwa Zu i efekt końcowy:
Below are the screenshots of the addition of the custom tileset "Virtual Reality" by Zu:




Kiedy wydałem "pierwszą" wersję 0.1.0, obiecałem zająć się GUI, żeby program był chociaż w jakimś stopniu "użytkowalny". Ostatecznie nowy program nie ma jednak nic wspólnego z pierwowzorem, który niefortunnie nazwałem właśnie "Gruntz REZ Patcher", a nie "Gruntz REZ Packer", co by było trochę bardziej ... adekwatne do jego prawdziwej funkcji. Bywa.

Krótka instrukcja obsługi i opis działania:
Przed patchowaniem program robi kopię zapasową oryginalnego pliku REZ w folderze z samym programem. Później traktuje go jako "bazę" podczas patchowania. Plik kopii zapasowej ma nazwę "BACKUP.REZ". Program jest podzielony niejako na dwie "części" - pierwsza lista na górze, zatytułowana Pool, to podręczna lista z patchami, z których chcesz korzystać. Żeby patch był uwzględniony podczas patchowania, musi znaleźć się na dolnej liście o nazwie Patches. Patche w tej liście są odczytywane z góry na dół (w razie konfliktów pliki z patchy najniżej mają "priorytet"). Szybki sposób na dodanie patchy do tych list to ich przeciągnięcie na okno z programem.

Patchami póki co mogą być pliki z rozszerzeniem *.zip albo *.grp. Te drugie to w istocie nic innego, jak archiwum w formacie ZIP, program jednak interpretuje go w nieco inny sposób. Szuka w archiwum pliku patch.txt - plik ten zawiera dodatkowe informacje o patchu, jak autor i nazwa własna patcha. Informacje te program później wyświetla w nagłówkach obu list. Żeby program odczytał plik patch.txt, ten musi być na szczycie hierarchii w archiwum (czyli nie może być w żadnych innych podkatalogach).

Przykładowa zawartość pliku patch.txt:

When I had released the first version 0.1.0, I promised I would take care of a proper, even the simplest GUI to make the program user friendly. Well, it turned out the current release, even though it's got a GUI, has nothing to do with the original 0.1.0. I should have named it "Gruntz REZ Packer" or something alike and reserve the name "Gruntz REZ Patcher" for a version that actually does patch anything whatsoever. Ah well, should have thought of that sooner.

A brief manual and the way the program works:
The program creates a backup copy of the original REZ file before it patches it for obvious reasons. Later on it treats the backup copy as the base for patching. It's placed in the folder where the application is located. The program is split into two functional parts: the top list named Pool is a workspace of some sorts used for stashing the patches we're working with. The bottom one named Patches is the list of patches that actually are included when building a new, altered version of a REZ file. They are read in order from top to bottom (in case of file conflicts between patches, the lower a patch is, the higher priority it's got). A quick way to add new patches to those lists is to simply drag them onto a program from Explorer window.

As of now patches can have *.zip or *.grp extensions. The latter is in fact a ZIP archive, however it's interpreted in a slightly different way. The program looks for a patch.txt file in a top directory of the archive and when found, reads detailed patch information included (author and a patch name). This data is viewed in both lists when a program is up and running.

For future reference for modders, here's an example of how patch.txt file should look like:

2 comments:

  1. when i drag the grp file.it does nothing.when i click new patch and select the grp file and apply and click patch.it says cannot find archive rip.grp please help

    ReplyDelete
  2. The program has its quirks unfortunately. I've written it quite a long time ago and sadly didn't have it properly tested. My bad, sorry for that.

    Regarding no effect when drag & dropping: make sure you drop the file into the TOP list box, and not the bottom one. Only then it should be properly added to the pool. And then just select the item in the list corresponding to your patch and click "Apply".

    While the problem above is rather by design, the next one is obviously a bug everyone should be aware of: when you add a patch to the pool by the "New Patch ..." button, the Gruntz REZ Patcher may sometimes misbehave and not load the GRP/ZIP file properly. It's rather easy to tell when this happens: the new list item in the top listbox (the pool) will have RED background then. The red color indicates the error. I don't yet know what the cause is, though it seems it might be somehow related to the name of the GRP/ZIP file. Two possible solutions: either try renaming the GRP file to anything else and retry, or try drag & dropping the GRP/ZIP file into the top listbox (see above); I've never had any problems when drag & dropping files into the pool.

    I'll modify the article accordingly some time later, listing any errors I'll be able to find in near future and any possible fixes. Cheers

    ReplyDelete