• 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!

Age of Pirates 2 COAS and GOF - JLB version

ChezJfrey

Freebooter
Storm Modder
I think I inadvertently posted my first submission to a hidden forum Storm Coding...reposting if that is the case.

Fairly tested on WinXP, Win7 and Win8, with no known issues to this point. It is also Large Address Aware, to boost the app's RAM ability, if needed.

Assumes one already has the RESOURCE files from either AoP COAS or GOF. Also suggest applying the AoP.Patch.zip or the GOF1.2.Patch.zip to the existing directory of the original of either of these versions as in some cases, they contain some either missing or fixed RESOURCE files. I have only done these for COAS and GOF 1.2 as prior to a few days ago, they were the only versions I had ever used. The patch .zips also contain any Program script file fixes made along the way, but this new compilation has its own set, with the same fixes, but other minor changes needed for some renamed library script functions in certain cases. Thus, these contain all Program .c files each game needs, but applying the patch files to bolster any RESOURCE directory files of the originals will be helpful if one is pointing this game to those existing RESOURCEs.

The easiest way to test, without corrupting the original game, is to simply extract these files into a folder like C:\AoPGame\Age of Pirates 2, or C:\AoPGame\GOF, modify the start.ini directory paths to the original game in certain entries such as RESOURCE and/or SOUNDS.

Refer to the ReadMe.txt for details, and check the start.ini within the download for an example.

If trying AoP 2 COAS, you must use the supplied sounds directory. For some reason, the newer FMOD being used would not play the music .ogg files. Though they were perfectly fine and usable by VideoLAN. However, simply using VLAN to 'convert' them from .ogg to .ogg (LOL, I know, exact same format) worked for FMOD. So I did that to all the COAS .ogg music files (they are unchanged from the original in all other respects) and that is also why that particular download is so large; you will have to point this to its own sounds directory.

In GOF 2.5 Super, if choosing Original scheme, not all music will likely work with the FMOD version I used due to the issue described above. I experienced that problem with the music and revamping .ogg files with VLAN did the trick, but I only included those reworked files in my AoP COAS .zips (hence the size discrepancy).

There are two versions of each (except 2.0 and 2.5), one to run original DirectX 8 and the other runs DirectX 9. If you have any of these games, you can give this compilation of the engine source a try and feel free to provide any feedback; it should operate as normal, but hopefully with some improved stability.

GOF & AoP COAS Files: https://mega.nz/#F!WtMDgRxK!hbeUg86kGLlQAqvWRNwTqg

AOP2.Patch. = patch files for vanilla COAS with fixes
GOF1.2Patch = patch files for GOF 1.2 with fixes
AoPTest.zip = Our source compiled vanilla COAS in DirectX 8
AoPTestDX9.zip = Our source compiled vanilla COAS in DirectX 9
GOF1.2Test.zip = Our source compiled GOF 1.2 in DirectX 8
GOF1.2TestDX9.zip = Our source compiled GOF 1.2 in DirectX 9
GOF 2.0 = GOF2TestDX9.zip in DirectX 9
GOF 2.5 Supermod = GOF2.5SModTestDX9.zip in DirectX 9
 
The main Storm Coding forum is not hidden, if I recall correctly.
 
I was confused there. The subforum to that subforum is hidden. But the subforum itself isn't.
Does that sound confusing yet? o_O

LOL, like I said...I wasn't sure...so a double post. I realize double-posts are often considered unseemly, so feel free to eliminate one of the threads if they are both visible to the general.
 
I suppose we can go with this one...

Now check this!

Ever try full screen mode in COAS and its offspring?

full_screen = 1

Alt-tab to another app window, then alt-tab back, and crash, right?

I just uploaded a new DX9 version (so far, only works in that version)

Change start.ini to full_screen, launch, alt-tab to another app window, then alt-tab back. No crash?

It’s not perfect and a work in progress. Still some glitches with some textures not always working right, and sometimes shaders. I’ve not yet figured it completely, but the hardest part to overcome looks resolved. Heckuva lot closer than it used to be!
 
POTC coming soon...running under the compiled source:

24odp2w.jpg

2ufsuiq.jpg
 
Is that PotC running on the Storm 2.8 engine? :shock

What did you have to change to get that working?
 
Is that PotC running on the Storm 2.8 engine? :shock

What did you have to change to get that working?

Why yes it is POTC in 2.8 :)

I haven't taken exact notes, but so far a few slight tweaks in seadogs.c, globals.c, battle_interface/utils.c, characters/CharacterUtile.c, CONTROLS/controls.c, RESOURCE/INI/TEXTS/language.ini and a few message parameters needed an addition. So far, it's only gotten so far as the other character in that new game opening scene walks up to my character, but what I assume to be a text dialog that should next present, it does not display...still a work in progress and my guess is some of the text dialog messages will need a tweak.

But, I've put that endeavor on hold because my son just discovered that the Peter Blood prison scene is broken in Windows 8. I confirmed on my other son's Win 8 machine and it turns out, it's the video. In fact, I had disabled the opening videos in all my games and if reenabled, all video displays are broken in Win 8. It works in XP, Win7, but not Win8. My wife has Win10, so today I'm going to install and try that to see if that OS has any problem. However, even if isolated to Win8, I may have to redo the videos to not use ddraw, like it always has. I've never changed any of that code, but apparently compiling in newer Visual Studio introduces some sort of ddraw incompatibility with Win8, as the original game still using ddraw doesn't cause Win8 an issue. I tried pointing it at the oldest ddraw and amstream libs that I have, but still no go. I'm going to change the video output to use something like Media Foundation or dshow. As soon as I wrap that up and it works in all 4 of the OS I have access to (XP, Win7, Win8 and Win10), I'll get back on this POTC thing...just for kicks.
 
Nice. Given your sterling work on re-compiling source for AOP and its various guises (and other fixes too) I suspect you will get there with POTC. So the next question is how far are you from releasing a DX9 test? :8q
 
Nice. Given your sterling work on re-compiling source for AOP and its various guises (and other fixes too) I suspect you will get there with POTC. So the next question is how far are you from releasing a DX9 test? :8q

Given I have not changed anything in the back-end source, just the moddable Program .c code, and moved a few things around in Resources, and added some extra info in INI, to get it to work with 2.8, once this is working, it will auto-magically work in DX9 as well, as there is no difference in the Program/RESOURCE between my DX8 and DX9 executable versions (only the back-end code is different to handle the implementation of some different function calls to DX9).

POTC so far:

I can sail the world map.
See the various character screens, ship, relations, etc.
Shop store.
Shop shipyard.

The sea is missing, worldmap clouds are funky, dialog background is funky...all due to either shader code missing, or in the case of the dialog background, wrong texture map coordinates to use.

The changes so far have been fairly trivial...some files are required to be in a certain spot, but they aren't there in POTC. Some SendMessage functions are wrong because they added/changed parameters to send from POTC to COAS. Merely add the missing parameters. Example:

POTC SendMessage(&worldMap, "llssf", MSG_WORLDMAP_CREATEENC_MER, type, nationShipName, islandName, kSpeed);
COAS SendMessage(&worldMap, "lsssff", MSG_WORLDMAP_CREATEENC_MER, nationShipName, from, to, kSpeed, timeOutInSec);


Must change the 2nd parm to match what 2.8 expects "lsssff", then remove type parm, add a blank from/to parm, and a random number for timeout as last parameter.

Screen shots:
idtb1h.jpg

a9lfo8.jpg

2mzjjeu.jpg

2r4gyab.jpg

so8unm.jpg

2q99tti.jpg

33eonqf.jpg
 
Last edited:
Simple for dialog and sea fix. Just had to copy over the dialog.tga.tx file from COAS to get it to look right and copy over one sea shader file from COAS.

15euxkp.jpg

2yn5wz9.jpg
 
Given I have not changed anything in the back-end source .... once this is working, it will auto-magically work in DX9 as well, as there is no difference in the Program/RESOURCE between my DX8 and DX9 executable versions

Even more better - and with the continuing screen shots progress - leaps and bounds springs to mind.
 
Back
Top