1. Dismiss Notice
  2. GOG.com logo

    Thanks to YOUR votes, GOG.com now sells:
    - Sea Dogs - Sea Dogs: Caribbean Tales
    - Sea Dogs: City of Abandoned Ships

    Vote now to add Pirates of the Caribbean to the list!

    Dismiss Notice
  3. Under the Crossbones Podcast

    A Pirate Podcast with Interviews
    Music, Comedy and all things Pirate!

    - Episode Guide - About - Subscribe -
    - Twitter - Facebook - iTunes - Android -
    - Youtube - Fill the Coffers -

    Dismiss Notice
  4. New Horizons logo

    Quick links for PotC: New Horizons
    - Download latest version
    - Wiki - FAQ - Report bugs here
    - ModDB profile

  5. GOF logo

    Quick links for AoP2: Gentlemen of Fortune 2
    - Downloads and info
    - Historical Immersion Supermod
    - ModDB Profile

Dismiss Notice
New to the forum?
Please take a moment to read our Welcome Message and Forum Rules.

POTC Vanilla Running in 2.8 COAS Engine

Discussion in 'POTC: New Horizons Mod' started by ChezJfrey, Dec 28, 2016.

  1. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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.
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
  2. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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:

    [​IMG]
    [​IMG]

    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: Jan 1, 2017
  3. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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...
     
    Pieter Boelen likes this.
  4. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    67,098
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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

    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

    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

    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
     
  5. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    672
    Gender:
    Male
    Congratulations ! :onya

    Brand New Year - Brave New World :bow
     
  6. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    Now Age of Pirates: Caribbean Tales
    [​IMG]
    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.
     
  7. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    67,098
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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
     
  8. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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.
     
  9. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    67,098
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    Doesn't seem quite necessary, but if you enjoy making that work, go for it! :cheeky
     
  10. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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.
     
  11. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    67,098
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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
     
  12. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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.
     
    Pieter Boelen likes this.
  13. Pieter Boelen

    Pieter Boelen (Not So) Old Seadog Staff Member Administrator Storm Modder Hearts of Oak Donator

    Joined:
    Nov 11, 2004
    Messages:
    67,098
    Gender:
    Male
    Occupation:
    Maritime Research: Project Engineer (Analysis)
    Location:
    Wageningen, The Netherlands
    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
     
  14. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    672
    Gender:
    Male
    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).
     
    Pieter Boelen likes this.
  15. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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.
     
    Pieter Boelen likes this.
  16. pedrwyth

    pedrwyth Privateer Storm Modder

    Joined:
    Jan 8, 2015
    Messages:
    672
    Gender:
    Male
    Sure no problem, here is my current save directory take your pick. :drunk
     

    Attached Files:

    • SAVE.7z
      File size:
      687.4 KB
      Views:
      29
  17. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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.
     
    Pieter Boelen likes this.
  18. Pillat

    Pillat Sea Demon Storm Modder

    Joined:
    Mar 26, 2012
    Messages:
    1,221
    Occupation:
    Student
    Location:
    Germany
    Those screenshots are probably just the alpha-channel. You can remove it with e.g. XNView
     
  19. LarryHookins

    LarryHookins Buccaneer Staff Member Storm Modder

    Joined:
    May 20, 2006
    Messages:
    2,369
    Location:
    Texas
    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
     
  20. ChezJfrey

    ChezJfrey Freebooter Storm Modder

    Joined:
    Apr 24, 2015
    Messages:
    268
    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.
     

Share This Page