Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Ok, so changing the code in CharacterUtilite.c now loads the scene, but after loading to shore, it crashes again. At least now I have log in error logs which says:

RUNTIME ERROR - file: sea_ai\AIShip.c; line: 189

Can't create class: Flg3

RUNTIME ERROR - file: sea_ai\AIShip.c; line: 196

Can't create class: Pnt3

RUNTIME ERROR - file: sea_ai\AIShip.c; line: 205

Can't create class: PFg2

RUNTIME ERROR - file: sea_ai\AIShip.c; line: 212

Can't create class: PPn2

RUNTIME ERROR - file: sea_ai\AIShip.c; line: 221

Can't create class: QFg2

RUNTIME ERROR - file: sea_ai\AIShip.c; line: 228

Can't create class: QPn2

RUNTIME ERROR - file: sea_ai\AIShip.c; line: 235

Can't create class: FFg3

(1 edit)

When they made New Horizons, they copied the modules\rigging.dll a bunch of times, then used a HexEditor to change the class name inside the .dll binary file.  As a favor to allow Maelstrom to possibly be used similarly, I added features to rigging that would emulate the same behavior, but it requires different scripting and also modification to rigging.ini; I am not going to hex-edit the .dll files like they did, but instead provide the functionality that they were trying to achieve, but in a more proper manner, through features inside the engine/modules.

Use a visual file difference tool (like WinMerge) to compare that AIShip.c to the modified one we supply.  Also compare the RESOURCE\INI\rigging.ini the same way and make the same changes in our version to the New Horizons version.

There are also similar issues with the LogInterface, where the original engine only allowed one instance of it, but New Horizons copied the .dll and hex edited it.  So I added a way to achieve that too.  This is why you need to compare all files in two versions and find the changes needed to make it work for Maelstrom (both programs, INI files and in some cases RESOURCE files that need to be moved to different directories).

If they had one more programmer like you, they would've finished porting New Horizons long time ago. Instead, we independent enthusiats have to do it for them. I have used winmerge and replaced a few scripts with the AiShip.c that your provided with your ported New Horizons and now it goes past the Loading screen and the games starts fine. I have noticed though that it skips the video that loads when starting Free Play and Sea Hawk storyline about Oxbay being attacked. So it just skips it but it works. In your current port (from 2016) it shows the video. I will have to check that as well. Also I have no success in fixing the spyglass. When you press Ctrl key in first sail mode, nothing happens. I can see that the ispyglass.c file is there in Battleinteface folder, so it's not missing.

Here's the fixed AIShip.c file (but not completely checked with WinMerge):

https://mega.nz/file/BKwg1QiT#MqvbXa9Iv0xndj79akSbT3-cF3zmaRK5UfGokz4yvFs

Just look at those graphics with Maelstrom Engine:

You're doing well.

For the telescope, it looks like a parameter needs to be removed from both the function implementation in ispyglass.c for both void TelescopeInitParameters() and void setTelescopeInitParameters(aref arItmScope) and also remove the extra parameter from wherever it is called from, like CharacterUtilite.c setTelescopeInitParameters(&Telescope,arItm); and sea.c TelescopeInitParameters(&Telescope);

I removed those lines, but still no luck with telescope. Nothing happens.

The following things are broken now:

telescope

Credits button in Main Menu does not show up credits video (on your 2016 build it shows up, so that's broken at the moment)

Starting a New Game with Nathaniel Hawk and Free Play game don't show initial video which is called Storm.wmv located in Resource\Videos (in your 2016 build this also works, so it's broken at the moment)

Upload the revised scripts you have and I can review them.

(1 edit)

https://mega.nz/file/Eahw1aya#7aKKtnkTmMwiTIFqhbMV6ITQ5XSTOF_KYjj0yeo_VVM

This is what I have so far. Bugs that came up and didn't exist in 2016 build that you provided are the following:

telescope

Credits button in Main Menu does not show up credits video (on your 2016 build it shows up, so that's broken at the moment)

Starting a New Game with Nathaniel Hawk and Free Play game don't show initial video which is called Storm.wmv located in Resource\Videos (in your 2016 build this also works, so it's broken at the moment)

When I press SPACE button in World map, nothing happens, neither at open sea neither at ship encounters (this also works in your 2016 build)

When I want to fire ship cannons in 3rd person or 1st person mode, nothing happens (I checked cannonballs and gunpowder).

I'm also uploading the updated RESOURCES folder for you to have if needed.

Looking at the code, there is an option in New Horizons to disable/enable videos in InternalSettings.h.  Set it to value 1:

#define ENABLE_VIDEOS                     1

I made some various changes, but I still can't load a FreePlay game because the location doesn't load due to missing location model elements.  But it should probably fix your telescope.  As for the other stuff, it might be options similar to the video, but I am unfamiliar with New Horizons options and what they all might do.

Program.zip from:  https://mega.nz/folder/DtcEmR6C#pjia47ERTPh1EoLClQMfOg

RESOURCES folder is uploading, at 80% now.

Thanks for the tweaks and sorry for the trouble. Now it's working like before, except that at world map only going to the sea alone works when pressing SPACE key. Other actions like ship encounter and joining a fight don't work when pressing SPACE key. 

https://mega.nz/file/JL5FxCTa#GaOdEY-dvG1euzNl3lA6x6ny_VO6_X3LC4Jg5S82xBA

This is Resources folder

Unfortunately it didn't fix telescope. Can it be related to the fact that in original NH mod and POTC you press Ctrl key only one time to activate the telescope, and pressing it again deactivates it.

(1 edit)

I don't know.  I started a game, but do not have a telescope, so I can't check.  But there are tons of errors and frankly, I'm not even sure how the game can even play properly, given the script code I see.  They made a global ref pchar variable, but in all the functions, they instead assign a local pchar variable.  Then, in some of the scripts where they try to use pchar, but in those cases didn't make a local var, the global pchar they try to use in those instances is invalid.  I fixed that by assigning the global pchar in seadogs.c, which fixed most of that, but now I see some index out-of-bounds errors in AIShip.c and flags.c, and missing references in MAXIMUS_Functions.c.  They have a wrong function name in TempQuestEnemy.c, which also has the wrong parameter type, wrong return value for their dynamic call.  I'm done trying to fix their script problems, because these have nothing to do with the port to the new engine, but rather mistakes in their code.

The global vs. local pchar is why the worldmap engagement screen did not present.  Anyway, here is what I have:

https://mega.nz/folder/DtcEmR6C#pjia47ERTPh1EoLClQMfOg

File is NH2018.zip and it contains only some changed files.