It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
Yeagersmash: Would you mind trying this with the Ultima IV Upgrade Patch and seeing if your method works on your machine or what tweaks are needed to get it to work?

http://ultima4.ultimacodex.com/ultima-4-upgrade/
I'm not in front of the Mac right now. However, I did download & look at it, and I can tell you right now it won't work. While SETM.EXE is a MS-DOS executable which may work, avpatch.exe is a PE32 executable (Windows). That's obviously not going to run in Boxer/DOSBox. The original page for that looks to be The Moongates - Ultima IV Upgrade. On that page:
What You Need
You must have the game Ultima IV from Origin Systems, Inc. running under Windows 95 or higher. The patched version will not run in straight DOS.
That last sentence would seem to be an issue even if it was installed.
Actually, the sticky mentions you need some other files for Non-Windows OSes. I should have time to take a closer look at it later.
There's also XU4 - Ultima IV Rebuilt. Not sure how that is on bugs vs the original, or how it runs in current versions of OS X.
avatar
Yeagersmash: Would you mind trying this with the Ultima IV Upgrade Patch and seeing if your method works on your machine or what tweaks are needed to get it to work?

http://ultima4.ultimacodex.com/ultima-4-upgrade/
avatar
Gydion: I'm not in front of the Mac right now. However, I did download & look at it, and I can tell you right now it won't work. While SETM.EXE is a MS-DOS executable which may work, avpatch.exe is a PE32 executable (Windows). That's obviously not going to run in Boxer/DOSBox. The original page for that looks to be The Moongates - Ultima IV Upgrade. On that page:

What You Need
You must have the game Ultima IV from Origin Systems, Inc. running under Windows 95 or higher. The patched version will not run in straight DOS.
avatar
Gydion: That last sentence would seem to be an issue even if it was installed.
Actually, the sticky mentions you need some other files for Non-Windows OSes. I should have time to take a closer look at it later.
There's also XU4 - Ultima IV Rebuilt. Not sure how that is on bugs vs the original, or how it runs in current versions of OS X.
Check this out. I just found this (didn't know it existed). I am anxious to try it out.

http://ultima4.ultimacodex.com/replacement-for-avpatch/

EDIT: Well, I tried it and it doesn't seem to work, but I probably did it wrong... Maybe you'll have more luck than I... :(
Post edited April 09, 2019 by Yeagersmash
There is one more idea I had to try... I was going to try running Pix Patcher in a Wineskin and then using that to Patch my Mac versions of the games. Problem is, Winery does not recognize the .exe for Pix Patcher as an install exe... Doh... It's one brick wall after another... I have been determined to get this to work, but I keep run into problems and/or some of this is just outside my technical ability. Is anyone able to help?
Post edited April 12, 2019 by Yeagersmash
avatar
Yeagersmash: There is one more idea I had to try... I was going to try running Pix Patcher in a Wineskin and then using that to Patch my Mac versions of the games. Problem is, Winery does not recognize the .exe for Pix Patcher as an install exe... Doh... It's one brick wall after another... I have been determined to get this to work, but I keep run into problems and/or some of this is just outside my technical ability. Is anyone able to help?
GIT GUD

Pssh, Pix Patcher. I started to look at the PDAR patches before I become busy with other things. They look quite ideal for your use case. The mods are pre-applied after patching. PDAR is a python script; the source version anyway. (which means cross-platform). Though he may have only tested it on Windows.
Bad news: The python script doesn't run under python 2.7.x.

Good news: I fixed the one line with the error. I also hacked up a main as I was running this as a module under Linux. Listing the archive contents worked. Applying the mod worked!

Bad news: When I tried this on the Mac it ran, but threw a different error when trying to create new files. This was with a newer version of python 2.7.x.

I had a bit of additional time earlier today:
Good news: My main desktop has the same version of 2.7.x (IIRC, 2.7.16). Simply commenting out _verify_dest_dir, which broke for some reason in newer 2.7.x, avoids the error. I then applied the one U4 PDAR archive to a copy of the Mac install. Copied that back to the Mac and had working Music & the new graphics + font.

I will wait until I run this all on the Mac before declaring success as it surprised me once already. I'll cleanup the existing U4 installs and start with a fresh one from the DMG, apply the minimal fixes to the PDAR script, likely just the two lines, and mod the GOG install. At which point it will be ready to run as-is with how GOG's already launching it. I expect to get to this some hours from now.

Now, personally I would just go for the fixes and the music patch. Though the music patch isn't available separately via PDAR.
Post edited April 13, 2019 by Gydion
avatar
Yeagersmash: There is one more idea I had to try... I was going to try running Pix Patcher in a Wineskin and then using that to Patch my Mac versions of the games. Problem is, Winery does not recognize the .exe for Pix Patcher as an install exe... Doh... It's one brick wall after another... I have been determined to get this to work, but I keep run into problems and/or some of this is just outside my technical ability. Is anyone able to help?
avatar
Gydion: GIT GUD

Pssh, Pix Patcher. I started to look at the PDAR patches before I become busy with other things. They look quite ideal for your use case. The mods are pre-applied after patching. PDAR is a python script; the source version anyway. (which means cross-platform). Though he may have only tested it on Windows.
Bad news: The python script doesn't run under python 2.7.x.

Good news: I fixed the one line with the error. I also hacked up a main as I was running this as a module under Linux. Listing the archive contents worked. Applying the mod worked!

Bad news: When I tried this on the Mac it ran, but threw a different error when trying to create new files. This was with a newer version of python 2.7.x.

I had a bit of additional time earlier today:
Good news: My main desktop has the same version of 2.7.x (IIRC, 2.7.16). Simply commenting out _verify_dest_dir, which broke for some reason in newer 2.7.x, avoids the error. I then applied the one U4 PDAR archive to a copy of the Mac install. Copied that back to the Mac and had working Music & the new graphics + font.

I will wait until I run this all on the Mac before declaring success as it surprised me once already. I'll cleanup the existing U4 installs and start with a fresh one from the DMG, apply the minimal fixes to the PDAR script, likely just the two lines, and mod the GOG install. At which point it will be ready to run as-is with how GOG's already launching it. I expect to get to this some hours from now.

Now, personally I would just go for the fixes and the music patch. Though the music patch isn't available separately via PDAR.
Woah... I must admit that I do not understand everything you've said above, but it sounds awesome! The thing is, Pix Patcher is for all Ultimas and not just Ultima IV. So, I am hoping it will help me patch some of the others such as Ultima V, which I have also struggled to patch. Your solution is a pretty big one if you can make it available to the community for Mac users. I thank you for taking the time to work on this and am looking forward to see your final results!
Remove any old/partially modded U4 installs.
Do a clean install of U4 from the DMG. Copy to $HOME/Desktop.

Portable Ultima Patches
Download Portable Ultima Patches: Ultima 1-6 to $HOME/Downloads.
Download PDAR Source Code (ZIP) to $HOME/Downloads (alternatively the repo is on GitHub)

Unzip Ultima_PDAR_Patches.zip.
Unzip jpenney-pdar-33b6140.zip to e.g. $HOME/code or the like.

Edit $HOME/code/jpenney-pdar-33b6140/pdar/archive.py
Change line 38 (spaces not +):
++++PDAR_MAGIC, int(parse_version(PDAR_VERSION)._version[1][0]), 0)
GOG forum butchers whitespace. Replace the four '+' with four spaces. Whitespace is significant in Python.

Edit $HOME/code/jpenney-pdar-33b6140/pdar/patcher.py
Add a '#' to the start of line 253, near the end of the file. I.E.:
# self._verify_dest_dir(path)
That's actually four spaces, but the whole line is commented so it doesn't matter either way.

In Terminal run the following to install PDAR:
cd $HOME/code/jpenney-pdar-33b6140/
python setup.py sdist
pip install dist/pdar-0.9.5b0.tar.gz
You may need python2/pip2 instead if you have both Python 2 & 3 installed. You will need some version of Python 2.7.x as the script is for Python 2. The pip command should also install the bsdiff dependency. The pdar command should now be available from Terminal.

Read the $HOME/Downloads/Ultima_PDAR_Patches/patches.txt file. It has brief descriptions of the patches. Now go back and read it again to be sure which patches you want.

Ultima4.U4-1.01.U4Upgrade-1.3.Hythloth_Fix.pdar is the all-in-one patch for U4. To apply it in Terminal run, all on one line:
pdar apply $HOME/Downloads/Ultima_PDAR_Patches/Ultima4.U4-1.01.U4Upgrade-1.3.Hythloth_Fix.pdar $HOME/Desktop/Ultima\ 4.app/Contents/Resources/Ultima\ IV-\ Quest\ of\ the\ Avatar.boxer/C.harddisk
Adjust for different paths if you used them. The game is now modded and will run as such with the normal GOG launcher.

The other Ultima patches, e.g. the one for Ultima 5, can be applied similarly via pdar apply; just with different paths.
avatar
Yeagersmash: Your solution is a pretty big one if you can make it available to the community for Mac users. I thank you for taking the time to work on this and am looking forward to see your final results!
Actually, that would be Xarton Dragon and those who made the actual mods.
Attachments:
archivepy.png (449 Kb)
patcherpy.png (431 Kb)
Post edited April 15, 2019 by Gydion
avatar
Gydion: Remove any old/partially modded U4 installs.
Do a clean install of U4 from the DMG. Copy to $HOME/Desktop.

Portable Ultima Patches
Download Portable Ultima Patches: Ultima 1-6 to $HOME/Downloads.
Download PDAR Source Code (ZIP) to $HOME/Downloads (alternatively the repo is on GitHub)

Unzip Ultima_PDAR_Patches.zip.
Unzip jpenney-pdar-33b6140.zip to e.g. $HOME/code or the like.

Edit $HOME/code/jpenney-pdar-33b6140/pdar/archive.py
Change line 38 (spaces not +):

++++PDAR_MAGIC, int(parse_version(PDAR_VERSION)._version[1][0]), 0)
avatar
Gydion: GOG forum butchers whitespace. Replace the four '+' with four spaces. Whitespace is significant in Python.

Edit $HOME/code/jpenney-pdar-33b6140/pdar/patcher.py
Add a '#' to the start of line 253, near the end of the file. I.E.:

# self._verify_dest_dir(path)
avatar
Gydion: That's actually four spaces, but the whole line is commented so it doesn't matter either way.

In Terminal run the following to install PDAR:

cd $HOME/code/jpenney-pdar-33b6140/
python setup.py sdist
pip install dist/pdar-0.9.5b0.tar.gz
avatar
Gydion: You may need python2/pip2 instead if you have both Python 2 & 3 installed. You will need some version of Python 2.7.x as the script is for Python 2. The pip command should also install the bsdiff dependency. The pdar command should now be available from Terminal.

Read the $HOME/Downloads/Ultima_PDAR_Patches/patches.txt file. It has brief descriptions of the patches. Now go back and read it again to be sure which patches you want.

Ultima4.U4-1.01.U4Upgrade-1.3.Hythloth_Fix.pdar is the all-in-one patch for U4. To apply it in Terminal run, all on one line:

pdar apply $HOME/Downloads/Ultima_PDAR_Patches/Ultima4.U4-1.01.U4Upgrade-1.3.Hythloth_Fix.pdar $HOME/Desktop/Ultima\ 4.app/Contents/Resources/Ultima\ IV-\ Quest\ of\ the\ Avatar.boxer/C.harddisk
avatar
Gydion: Adjust for different paths if you used them. The game is now modded and will run as such with the normal GOG launcher.

The other Ultima patches, e.g. the one for Ultima 5, can be applied similarly via pdar apply; just with different paths.
avatar
Yeagersmash: Your solution is a pretty big one if you can make it available to the community for Mac users. I thank you for taking the time to work on this and am looking forward to see your final results!
avatar
Gydion: Actually, that would be Xarton Dragon and those who made the actual mods.
Woah, this is awesome. Just trying to figure out what lines to edit here. So, what line is line 38? When I look at the code and count 38 lines, it doesn't look like something I should change... Do I start counting right from the top (seems like some comments are at the top of the file) or somewhere else?
Post edited April 14, 2019 by Yeagersmash
avatar
Yeagersmash: Woah, this is awesome. Just trying to figure out what lines to edit here. So, what line is line 38? When I look at the code and count 38 lines, it doesn't look like something I should change... Do I start counting right from the top (seems like some comments are at the top of the file) or somewhere else?
I added some post-edit pictures of the files to post 21, archive.py & patcher.py. In TextEdit I believe Command-L will pop up a message box where you can type in the line number. It will then scroll & highlight the line for you. Easy way to find the correct line.
Post edited April 15, 2019 by Gydion
avatar
Yeagersmash: Woah, this is awesome. Just trying to figure out what lines to edit here. So, what line is line 38? When I look at the code and count 38 lines, it doesn't look like something I should change... Do I start counting right from the top (seems like some comments are at the top of the file) or somewhere else?
avatar
Gydion: I added some post-edit pictures of the files to post 21, archive.py & patcher.py. In TextEdit I believe Command-L will pop up a message box where you can type in the line number. It will then scroll & highlight the line for you. Easy way to find the correct line.
Thanks very much for this. Your pics along with XCode helped me edit the correct lines. One thing I ran into was that the PDAR source was only available in .zip (.tar.gz was "Access Forbidden"), so I had to adjust your code for it to work. All went well until the last step which was to actually apply the patch. For some reason, the code is not working to apply the Patch. I am getting the following message: "PDAR: Command Not Found". Not sure what I am doing wrong? I have Python 3.7 installed and everything is in the correct location and worked up to this point?
avatar
Yeagersmash: Thanks very much for this. Your pics along with XCode helped me edit the correct lines. One thing I ran into was that the PDAR source was only available in .zip (.tar.gz was "Access Forbidden"), so I had to adjust your code for it to work.
Good that you have it edited. If you actually look I stated to use the zip version, PDAR Source Code (ZIP), up there. I also suggested unzipping the PDAR source to "e.g. $HOME/code". Which is what I assumed for the other commands, but you simply adjust the paths if you put it somewhere else.
avatar
Yeagersmash: All went well until the last step which was to actually apply the patch. For some reason, the code is not working to apply the Patch. I am getting the following message: "PDAR: Command Not Found". Not sure what I am doing wrong? I have Python 3.7 installed and everything is in the correct location and worked up to this point?
Allow me to quote myself:
avatar
Gydion: You may need python2/pip2 instead if you have both Python 2 & 3 installed. You will need some version of Python 2.7.x as the script is for Python 2. The pip command should also install the bsdiff dependency. The pdar command should now be available from Terminal.
I don't know where your Python 3 install is from, but Mojave ships with 2.7.something. Use python2 in place of python and pip2 instead of pip in the commands. As again it's a Python 2 script. It will not run in Python 3.
There is a caveat in that I have both Python 3.x and Python 2.7.16 via Homebrew on that machine (likely as dependencies for something or other). Homebrew has it setup so that pip2 install works fine with regular user permissions and the install location is in PATH.
I'm not sure how the OS X Python is setup. Pay attention to the pip2 install to see if it complains about permissions. The command will be lowercase pdar, but if it isn't recognized then you have to track down where pip2 installed it to. You are getting there though.
Post edited April 17, 2019 by Gydion
avatar
Yeagersmash: Thanks very much for this. Your pics along with XCode helped me edit the correct lines. One thing I ran into was that the PDAR source was only available in .zip (.tar.gz was "Access Forbidden"), so I had to adjust your code for it to work.
avatar
Gydion: Good that you have it edited. If you actually look I stated to use the zip version, PDAR Source Code (ZIP), up there. I also suggested unzipping the PDAR source to "e.g. $HOME/code". Which is what I assumed for the other commands, but you simply adjust the paths if you put it somewhere else.
avatar
Yeagersmash: All went well until the last step which was to actually apply the patch. For some reason, the code is not working to apply the Patch. I am getting the following message: "PDAR: Command Not Found". Not sure what I am doing wrong? I have Python 3.7 installed and everything is in the correct location and worked up to this point?
avatar
Gydion: Allow me to quote myself:
avatar
Gydion: You may need python2/pip2 instead if you have both Python 2 & 3 installed. You will need some version of Python 2.7.x as the script is for Python 2. The pip command should also install the bsdiff dependency. The pdar command should now be available from Terminal.
avatar
Gydion: I don't know where your Python 3 install is from, but Mojave ships with 2.7.something. Use python2 in place of python and pip2 instead of pip in the commands. As again it's a Python 2 script. It will not run in Python 3.
There is a caveat in that I have both Python 3.x and Python 2.7.16 via Homebrew on that machine (likely as dependencies for something or other). Homebrew has it setup so that pip2 install works fine with regular user permissions and the install location is in PATH.
I'm not sure how the OS X Python is setup. Pay attention to the pip2 install to see if it complains about permissions. The command will be lowercase pdar, but if it isn't recognized then you have to track down where pip2 installed it to. You are getting there though.
Thanks so much! I got this to work, although I did run into some more troubles. I did have to install Python 2.7. I then re-ran the previous commands and things looked a bit different (looked better). I did run into a lot of trouble with installing the patch, though, but I found out it is because GOG names the game very trickily. The have a subscript "TM" at the end of the name with a space after that. The space was what was screwing me all up... It was very frustrating because the patch kept saying invalid path even after I checked things over and over... Once I added the space (had to figure out the syntax to do that), it worked... Man this was tough for a rookie like me, but I got it. Now to try this with Ultima V and the others. Thanks again!
So, Ultima V was even trickier because, for some reason, GOG installs an app within an app... No idea what it does this, but here is the command I had to use to get it to work.

pdar apply $HOME/Downloads/Ultima_PDAR_Patches/Ultima5.Exodus_Upgrade-1.0.pdar $HOME/Downloads/Ultima\ 5.app/Contents/Resources/game/Ultima\ 5.app/Contents/Resources/Ultima\ 5.boxer/C\ ULTIMA5.harddisk

I actually copied my app to my downloads folder instead of my desktop since I use the cloud and it puts my desktop stuff on the cloud. I was confused how to get it to point to it probably, so I just put it in my downloads. Something important to mention for others who may run into the same issue. In any case, the above command worked for me. Only other issue is that the patch does not seem to apply unless I run the .boxer shortcut as opposed to the app and, then, I have to tell it to run the ultima5.com. Not sure how to get it to run it when I run the app?