• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

POTC Vanilla Running in 2.8 COAS Engine

ChezJfrey

Freebooter
Storm Modder
Bulk of game works. The sky was terrible. You could see the seams, some empty white boxes, etc. and too much had changed there, so I just copied/pasted the entire sky weather from a COAS mod; that was the quickest fix.
oump8o.jpg

9iaaaa.jpg

o0qqfo.jpg

1zzs85s.jpg

2yyrq53.jpg

ebbxpd.jpg

14crvac.jpg

jsiv6r.jpg

34t3g2u.jpg

2i1jghs.jpg

2vuilh5.jpg

10pr7lw.jpg

i6lgrs.jpg
 
All character/ship/item screens. Interacting in store, shipyard, tavern. Various battle/land interface icons. Fighting on land. World Map. Sailing open sea, ship battles/boarding. I even left Oxbay and discovered Redmond (stock intro), and ported at Redmond. All the major mechanics of the game work so far.

There are undoubtedly still some bugs that might reside in various places of the quests/scripts, but the majority of the mechanics work perfectly. I suspect any further problems are simply a fix in the Program script code as that has been almost all the issue to this point...the back end still supports most of what the old game did and didn't require much attention.

Given these were all script changes (only one minor glitch I found in the back-end that needed a recompile, but that was poor error handling that was undiscovered during my COAS/GOF work because it involves something those games don't use anymore...deprecated, but POTC does and the feature still exists -- that clunky keyboard screen for renaming ship), the game should work exactly the same in my DirectX 9 compile of the game since they use the exact same RESOURCE/Program files, with only a few minor tweaks in some technique files. Sure enough, it does:

11bhhqb.jpg

315d7wk.jpg


So now, I have one set of 2.8 'engine' executables (either DirectX 8 set or DirectX 9 set) that runs COAS, (and its mod flavors such as GOF 1.2, GOF 2.0) and POTC...all in one.
 
Last edited:
P.S.

From http://www.piratesahoy.net/threads/age-of-pirates-ii-piratesahoy-edition.16966/page-4

I don't expect we'll ever be able to adapt the engine for PotC, but at least if we get this to compile for CoAS, it'd mean there'd be no holds barred for CoAS development at least.

That was backwards...the engine needed no adapting. Merely changes to the script/moddable portion of the game. And from start to working copy took less than 30 hours of work. Coulda had this years ago...
 
That sounds really great, @ChezJfrey!
It would be quite incredible if the best of all games could be merged together. What an amazing thing that would be! :bow

The sky was terrible. You could see the seams, some empty white boxes, etc. and too much had changed there, so I just copied/pasted the entire sky weather from a COAS mod; that was the quickest fix.
Sounds like a perfect solution to me. For the PotC Build Mod, we replaced pretty much all of the skies as well, if I remember correctly.
No need to keep using the old low-detail stuff, is there? :cheeky

only one minor glitch I found in the back-end that needed a recompile, but that was poor error handling that was undiscovered during my COAS/GOF work because it involves something those games don't use anymore...deprecated, but POTC does and the feature still exists -- that clunky keyboard screen for renaming ship
That's indeed VERY clunky! I was so happy when the great @NathanKell replaced that in the PotC Build Mod with the ability to just type with the actual keyboard.
I think that on-screen thing was needed in PotC because it was released for XBOX as well.
Of course nobody cares about that anymore these days.... :rofl

P.S.
From http://www.piratesahoy.net/threads/age-of-pirates-ii-piratesahoy-edition.16966/page-4

That was backwards...the engine needed no adapting. Merely changes to the script/moddable portion of the game. And from start to working copy took less than 30 hours of work. Coulda had this years ago...
If only we would have had someone who could make that work!
Which we didn't at the time. Glad to see you're managing it now though! :onya
 
Now Age of Pirates: Caribbean Tales
155jmeo.jpg

Since the one program runs them all, thought it would be nice to simply allow for a command line switch for which one to play. Then a simple shortcut, with start.exe -COAS for instance would play AoP COAS, start.exe -POTC...etc. So I did it. Just added the following to the end of start.ini:
[POTC]
program_directory = Program.POTC
resource_directory = RESOURCE.POTC
ini_directory = RESOURCE.POTC\INI
sound path = RESOURCE.POTC\sounds
save_directory = SAVE.POTC

[COAS]
program_directory = Program.aop
resource_directory = C:\Playlogic\Age of Pirates 2\RESOURCE
ini_directory = C:\Playlogic\Age of Pirates 2\RESOURCE\INI
sound path = C:\Playlogic\Age of Pirates 2\RESOURCE\sounds
save_directory = SAVE.aop

[GOF]
program_directory = Program.GOF
resource_directory = C:\Playlogic\GOF\RESOURCE
ini_directory = C:\Playlogic\GOF\RESOURCE\INI
sound path = C:\Playlogic\GOF\RESOURCE\sounds
save_directory = SAVE.GOF

[GOF2]
program_directory = Program.GOF2
resource_directory = C:\Playlogic\GOF2\RESOURCE
ini_directory = C:\Playlogic\GOF2\RESOURCE\INI
sound path = C:\Playlogic\GOF2\RESOURCE\sounds
save_directory = SAVE.GOF2

[GOF25]
program_directory = Program.GOF25
resource_directory = C:\Playlogic\GOF25\RESOURCE
ini_directory = C:\Playlogic\GOF25\RESOURCE\INI
sound path = C:\Playlogic\GOF25\RESOURCE\sounds
save_directory = SAVE.GOF25

[ERAS]
program_directory = Program.ERAS
resource_directory = C:\Playlogic\ERAS\RESOURCE
ini_directory = C:\Playlogic\ERAS\RESOURCE\INI
sound path = C:\Playlogic\ERAS\RESOURCE\sounds
save_directory = SAVE.ERAS

[CT]
program_directory = Program.CT
resource_directory = E:\Age of Pirates - Caribbean Tales\RESOURCE
ini_directory = E:\Age of Pirates - Caribbean Tales\RESOURCE\INI
sound path = E:\Age of Pirates - Caribbean Tales\RESOURCE\sounds
save_directory = SAVE.CT

The bracketed subgroups can be whatever name you wish, as well as the program directory names, but for simplicity and so they stay grouped together, I just used Program dot names to correspond to the group name. But to get the desired result, the command switch must match whatever you make the group name. And of course the needed files are actually present where you indicate.

start.exe with nothing runs the default as normal.
start.exe -COAS runs AoP 2
start.exe -GOF runs 1.2 version
start.exe -CT runs Age of Pirates: Caribbean Tales
...etc.

The resource and sounds and save dirs were easy. However, the Program directory was a difficulty. Unfortunately, that Program path is actually stored as a data point in the game save state, and when a save is loaded, but the Program path (which in my case was always the default), was now different and if they happen to contain different code sets, then all sorts of problems... But, eventually figured a workaround and now I can get away with it.
 
So you've got physically one single executable starting various different games?
Not sure how practical that is (I don't mind having one executable in each game version), but it's interesting for sure. :onya
 
So you've got physically one single executable starting various different games?
Not sure how practical that is (I don't mind having one executable in each game version), but it's interesting for sure. :onya

Yes, the whole point of this was to make it work. Like I mentioned, the disparate Program folders was a bit of a task to get working as it should due to some internals that make it difficult.

But the next move, is to throw a game selection menu up...click which one you want, and launch the selected version. Working on it.
 
But the next move, is to throw a game selection menu up...click which one you want, and launch the selected version. Working on it.
Doesn't seem quite necessary, but if you enjoy making that work, go for it! :cheeky
 
Doesn't seem quite necessary, but if you enjoy making that work, go for it! :cheeky

But why wouldn't it be necessary or superfluous?

Scenario 1: Same executables can run all of the games, but you have 7 different copies of them, all in separate directories. Then, a bug is fixed, or performance improved...or whatever. You download the new and have to remember to extract/copy those files in all 7 places in order to achieve the benefit of the newer version. If you forget one, it is older/different than the new/improved executable, maybe still susceptible to problems that were fixed.

Or, Scenario2: You have one place, download and extract the one, done; every instance of the game will receive the improvement.

One game, to rule them all.
 
But why wouldn't it be necessary or superfluous?
I just figured if you have all three games installed, you can have three different shortcuts on your desktop to choose between them, instead of choosing from within the ENGINE.
You'll need to have them in three separate folders anyway, because they use different PROGRAM and RESOURCE folders.

I was just thinking, with the amount of complex things you're trying to sort out, this is one that users could at least work around.
It may be a bit more work for them, but it's doable at least. If they'd want to, they could even use a Batch script of sorts to update all their game versions in one go.

But indeed, if you have a lot of different copies and there is an update, the user does need to update each of them.
And of course, this is YOUR project. And if you want to make that work, then by all means do so! :woot
 
I was just thinking, with the amount of complex things you're trying to sort out, this is one that users could at least work around.

Amount of complex things? But I thought that was already done...refer here: POTC Vanilla Running in 2.8 COAS Engine | PiratesAhoy! :)

And with Caribbean Tales also working, I think I'm pretty much done. I already noticed from KK's issue here WIP - Age of Pirates PA! Edition kk from 2016.06.28 | PiratesAhoy! that screenshots weren't working correctly for him. In my own, WinXP was fine, but a move to Win7 showed similar non-working screenshots, which an internet search shows this was a common theme among other games when a user upgraded to Win7...screenshots went black, just like ours; I already modified and resolved that. Nothing else pressing as all known bugs are solved at the moment.

So I'm moving on to other facets. With this latest feature, I think it is time to focus on further playtesting to iron out any last details.
 
Amount of complex things? But I thought that was already done...refer here: POTC Vanilla Running in 2.8 COAS Engine | PiratesAhoy! :)
Oh, I thought you meant there were still some rough edges to be smoothed out.
Must have misunderstood.

I wonder how things should progress from here though. I can't imagine many people will want to play the unmodded PotC, even on the new engine.
But of course that IS fairly important to be able to sort out whatever issues still remain. :facepalm

Of course the "ideal" thing to happen is to get all the good stuff of the PotC Build Mod running in your modified Storm 2.8 engine as well.
Even then though, as great as our mod is, it is ALSO quite messy. Ideally it should all be redone, correctly, from the ground up.
Yet that requires an amount of work that I can barely even imagine! :shock
 
With this latest feature, I think it is time to focus on further playtesting to iron out any last details.

I can't imagine many people will want to play the unmodded PotC, even on the new engine.
But of course that IS fairly important to be able to sort out whatever issues still remain. :facepalm

As it happens I am part way through a "replay" of vanilla unmodded POTC at the moment - so assuming it is save game compatible and @ChezJfrey is willing to upload the necessary script changes somewhere, I'm game to give it my attention (even if I have to do it on my win7 machine given my troubles with win 10 alluded to elsewhere).
 
As it happens I am part way through a "replay" of vanilla unmodded POTC at the moment - so assuming it is save game compatible and @ChezJfrey is willing to upload the necessary script changes somewhere, I'm game to give it my attention (even if I have to do it on my win7 machine given my troubles with win 10 alluded to elsewhere).

I'd like to go a little further in the game to be sure I've got most things taken care of before I put those out there. What would be interesting is to find out about compatibility. I never played the game until this effort, so have no original save versions. If you don't mind, give me a save from the original and I can try it out beforehand and we will know if they are/are not compatible.
 
If you don't mind, give me a save from the original and I can try it out beforehand and we will know if they are/are not compatible.
Sure no problem, here is my current save directory take your pick. :drunk
 

Attachments

  • SAVE.7z
    687.4 KB · Views: 146
Sure no problem, here is my current save directory take your pick. :drunk

Nope. At the first load save screen, they are all shown as 'Bad Save' and there is no option to even attempt a load. So the stock game saves are incompatible with this version. Not surprising since they most certainly changed the binary format of how the games are saved in 2.8 and the old files with wrong header bits are not recognized and invalid for loading.
 
Amount of complex things? But I thought that was already done...refer here: POTC Vanilla Running in 2.8 COAS Engine | PiratesAhoy! :)

And with Caribbean Tales also working, I think I'm pretty much done. I already noticed from KK's issue here WIP - Age of Pirates PA! Edition kk from 2016.06.28 | PiratesAhoy! that screenshots weren't working correctly for him. In my own, WinXP was fine, but a move to Win7 showed similar non-working screenshots, which an internet search shows this was a common theme among other games when a user upgraded to Win7...screenshots went black, just like ours; I already modified and resolved that. Nothing else pressing as all known bugs are solved at the moment.

So I'm moving on to other facets. With this latest feature, I think it is time to focus on further playtesting to iron out any last details.

Those screenshots are probably just the alpha-channel. You can remove it with e.g. XNView
 
I second the alpha channel idea. I was getting black screen shots when viewed with IrfanView that showed up fine in Photoshop. Since I had to convert from TGA to JPG anyway, that was fine. And JPG didn't have an alpha channel. :)

Hook
 
I second the alpha channel idea. I was getting black screen shots when viewed with IrfanView that showed up fine in Photoshop. Since I had to convert from TGA to JPG anyway, that was fine. And JPG didn't have an alpha channel. :)

Hook

Yeah, it was just odd that the code to create the TGA screenshot was fine in WinXP, but that same code, merely run on Win7, all of a sudden produced that issue with the alpha channel. I had to slightly adjust the code doing the bit shifting for TGA to also address that alpha channel issue. It now works, but again strange that it worked, but then suddenly didn't with the slight platform OS change. My goal was to not force a user to use other means to get a viewable shot, but rather just have it come out right away.
 
Back
Top