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

About Maelstrom engine

Someone else pointed out this "glitch" but since I've never actually seen the original game, I have no idea what's wrong, so I asked...never got a reply. I'm going to assume it's the black boxes, which are the shadow offsets and from what I can see in the interface .ini files, they are deliberate for all I know. The defaultnode.ini is a direct copy of what I downloaded, so the TEXTBUTTON configs are exactly the same. Since POTC does not have this large offset, I decided to compare the INTERFACE\shadow.tga.tx file that is specified and the one from NH is vastly different, and huge, compared to the one from POTC. So I renamed the one in NH (to keep it for backup, if desired) and copied over the POTC file. The menu now has very subtle, small shadow offsets, which maybe is what the "glitch" was? Anyway, I'll throw it in the next NH update and people can take a look. But honestly, these are the types of things I'm really not usually interested in tracking down...if something is clearly broken, and someone gives me the info, I'll see if there's a way to tweak things in order to remain somewhat compatible with older features, if it's feasible. But something like this is easily remedied by people more familiar with the original NH, which I don't have because I also don't have the POTC engine either; I only have original 2.8 COAS on cd.

Thanks Jeffrey, you are the man! With Maelstrom engine, New Horizons could be a pearl. But no one seems to be working on it. It has so many potential, I get crazy frame rates with no crashes and the graphics are way better.
 
I managed to fix this, but I'm still looking how to fix ship name and crew offset.

ta7ubEr.png
 
@ChezJfrey
maybe you could help me here, since I tried to "update" Maelstrom New Horizons to the latest version, I basically swaped all the changed code with WinMerge from the original New Horizons, and tried to leave everything that looked like a change for porting. But, as I almost thought, the game wont start anyway. Maybe you got an idea about these two errors:

Code:
COMPILE ERROR - file: Loc_ai\LAi_groups.c; line: 534
Invalid Expression
COMPILE ERROR - file: Loc_ai\LAi_groups.c; line: 534
missed ')'

Refers to this code, that got added for the porting - I didnt change anything there:
Code:
//#20190717-01
void resetGroupRel()
{
   aref aGrp, qGrp;
   makearef(aGrp, LAi_grp_relations.savedata);
   int num = GetAttributesNum(aGrp);
   for(int i = 0; i < num; i++)
   {
       aref atr = GetAttributeN(&aGrp, i);
       if(sti(atr.curState) != LAI_GROUP_ENEMY_INT) continue;        //line 534
       if(sti(atr.isactive) == 0)
           atr.curState = LAI_GROUP_NEITRAL_INT;
   }
}

2nd error would be this:

Code:
COMPILE ERROR - file: utils.c; line: 2653
Invalid Expression
COMPILE ERROR - file: utils.c; line: 2653
Undeclared identifier: GetConvertStr

refers to this code- that wasnt changed at all:

Code:
string  xiDStr(string _str) // ïðîñòî ñîêðàùåíèå
{
   return GetConvertStr(_str, "DialogSource.txt");
}

And about the CTDs.. you changed this:
Code:
ResetSoundScheme()

everywhere for this:

Code:
ResetSound()

may a CTD occur, if there is any file, which didnt get this replacement? Because, as posted earlier here, I get some CTDs when changing locations with sound schemes. If those CTDs occur, you can clearly hear, that the game resets the sound scheme to 3d World Map.
 
@ChezJfrey
maybe you could help me here, since I tried to "update" Maelstrom New Horizons to the latest version, I basically swaped all the changed code with WinMerge from the original New Horizons, and tried to leave everything that looked like a change for porting. But, as I almost thought, the game wont start anyway. Maybe you got an idea about these two errors:

Code:
COMPILE ERROR - file: Loc_ai\LAi_groups.c; line: 534
Invalid Expression
COMPILE ERROR - file: Loc_ai\LAi_groups.c; line: 534
missed ')'

Refers to this code, that got added for the porting - I didnt change anything there:
Code:
//#20190717-01
void resetGroupRel()
{
   aref aGrp, qGrp;
   makearef(aGrp, LAi_grp_relations.savedata);
   int num = GetAttributesNum(aGrp);
   for(int i = 0; i < num; i++)
   {
       aref atr = GetAttributeN(&aGrp, i);
       if(sti(atr.curState) != LAI_GROUP_ENEMY_INT) continue;        //line 534
       if(sti(atr.isactive) == 0)
           atr.curState = LAI_GROUP_NEITRAL_INT;
   }
}

2nd error would be this:

Code:
COMPILE ERROR - file: utils.c; line: 2653
Invalid Expression
COMPILE ERROR - file: utils.c; line: 2653
Undeclared identifier: GetConvertStr

refers to this code- that wasnt changed at all:

Code:
string  xiDStr(string _str) // ïðîñòî ñîêðàùåíèå
{
   return GetConvertStr(_str, "DialogSource.txt");
}

And about the CTDs.. you changed this:
Code:
ResetSoundScheme()

everywhere for this:

Code:
ResetSound()

may a CTD occur, if there is any file, which didnt get this replacement? Because, as posted earlier here, I get some CTDs when changing locations with sound schemes. If those CTDs occur, you can clearly hear, that the game resets the sound scheme to 3d World Map.

Updating to the latest version would be awesome.
Here is the updated Battleinterface with fixed ship icons.
 

Attachments

  • BattleInterface.c
    119.9 KB · Views: 243
@ChezJfrey
maybe you could help me here, since I tried to "update" Maelstrom New Horizons to the latest version, I basically swaped all the changed code with WinMerge from the original New Horizons, and tried to leave everything that looked like a change for porting. But, as I almost thought, the game wont start anyway. Maybe you got an idea about these two errors:

Code:
COMPILE ERROR - file: Loc_ai\LAi_groups.c; line: 534
Invalid Expression
COMPILE ERROR - file: Loc_ai\LAi_groups.c; line: 534
missed ')'

Refers to this code, that got added for the porting - I didnt change anything there:
Code:
//#20190717-01
void resetGroupRel()
{
   aref aGrp, qGrp;
   makearef(aGrp, LAi_grp_relations.savedata);
   int num = GetAttributesNum(aGrp);
   for(int i = 0; i < num; i++)
   {
       aref atr = GetAttributeN(&aGrp, i);
       if(sti(atr.curState) != LAI_GROUP_ENEMY_INT) continue;        //line 534
       if(sti(atr.isactive) == 0)
           atr.curState = LAI_GROUP_NEITRAL_INT;
   }
}

2nd error would be this:

Code:
COMPILE ERROR - file: utils.c; line: 2653
Invalid Expression
COMPILE ERROR - file: utils.c; line: 2653
Undeclared identifier: GetConvertStr

refers to this code- that wasnt changed at all:

Code:
string  xiDStr(string _str) // ïðîñòî ñîêðàùåíèå
{
   return GetConvertStr(_str, "DialogSource.txt");
}

And about the CTDs.. you changed this:
Code:
ResetSoundScheme()

everywhere for this:

Code:
ResetSound()

may a CTD occur, if there is any file, which didnt get this replacement? Because, as posted earlier here, I get some CTDs when changing locations with sound schemes. If those CTDs occur, you can clearly hear, that the game resets the sound scheme to 3d World Map.

#1: Look for where LAI_GROUP_ENEMY_INT is defined...See Loc_ai\LAi_defines.c, is it there?

#define LAI_GROUP_FRIEND_INT 1
#define LAI_GROUP_NEITRAL_INT 2
#define LAI_GROUP_ENEMY_INT 3

#2 Don't know, but when missing the preprocessor #defines, sometimes later compile errors in the log are erroneous, so fix the LAi_defines.c and this GetConvertStr error might go away. Another trick if it persists, is to comment out the offending line (like make it return _str; //GetConvertStr(....)) and sometimes the new compile errors will tell you the real source, fix those, then remember to go back and uncomment this line.

#3 I only replaced ResetSoundScheme() because most of those same files and use of ResetSoundScheme were changed to ResetSound() in COAS, so I just followed suit, presumably because it both calls ResetSoundScheme and also ensures the script variables for music and such get handled too? I don't know, but I didn't do it due to CTDs, because I really never play this, so didn't even know location changes cause them. I would need a save file and instructions where to change locations to troubleshoot the CTD.
 
How easy is it to install and get the Maelstrom engine to work?

I will add that some people find the install doc instructions difficult to follow, so I will add the very short version...

The idea was for just one set of .exe/.dll files to run all the games. So rather than copy the .exe/.dll files into all the separate game folders, create multiple shortcuts, where the Target points to the .exe to run (DX8 32 bit, DX9 32 bit or DX9 64 bit), then the Start in: value of the shortcut to the specific game/mod version. There are some examples supplied in the download, but if you don't use the same paths as the install doc describes, you alter them. Examples:


ERAS 2 Shortcut:
Target: C:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_64bit\Maelstrom.exe
Start in:C:\Maelstrom\games\gentlemen-of-fortune-historical-eras-module-2 (path with Program/Resource folders)

ERAS 2 Config Shortcut (this is slightly different, where target is Config.exe plus the first parameter is the path to mod)
Target: C:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_64bit\Config.exe "C:\Maelstrom\games\gentlemen-of-fortune-historical-eras-module-2"
Start in: C:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_64bit

GOF 1.2 Shortcut
Target: C:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_64bit\Maelstrom.exe
Start in:C:\Maelstrom\games\gentlemen-of-fortune-12

GOF 1.2 Config Shortcut
Target: C:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_64bit\Config.exe "C:\Maelstrom\games\gentlemen-of-fortune-12"
Start in: C:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_64bit

Also, if you have old save games from COAS or GOF, they will still load properly and should still be compatible with their respective mods...this is not true for CT, or POTC mods, only the COAS based ones offered.
 
I keep getting the following error at the moment (see attachments). Below is the Engine and Game directories followed by each of the exe paths.

Engine location
E:\Maelstrom\gentlemen-of-fortune-maelstrom-engine

Direct X version path
E:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_32bit

Game location
E:\Maelstrom\games\gentlemen-of-fortune-2

Config exe paths
E:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_32bit\Config.exe "E:\Maelstrom\games\gentlemen-of-fortune-2"
E:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_32bit

Maelstrom GOF 2.0 exe
E:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_32bit\Maelstrom.exe
E:\Maelstrom\games\gentlemen-of-fortune-2

Oh yeah and the start ini
firstlaunch = 0

[[actions]
name = "Config GOF 2.0"
path = "E:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\DirectX9_32bit\Config.exe"
args = "E:\Maelstrom\games\gentlemen-of-fortune-2"

[[actions]
name = "GOF 2.0"
path = "E:\Maelstrom\gentlemen-of-fortune-maelstrom-engine\Maelstrom GOF 2.0.exe"
 

Attachments

  • error.jpg
    error.jpg
    14.2 KB · Views: 267
Last edited:
@ChezJfrey

Thanks, you are the best! I managed to get New Horizons started in the latest build version!!!
:ship

proof.jpg

(yeah I didn't take in your and @Mirsaneli fixes for the interfaces yet)


Altough, I had to comment out the line in utils.c - because I really don't know where this identifier should be declared. I probably overwrote it somewhere, like with the loc_ai (I didnt pay enough attention there - you clearly made a comment there which is a definite hint that this was a porting change :rumgone)

For testing the CTDs: Just take my save file if you still have it and try to quickly change between world map and 3d sailing, after a few tries you should experience that crash. Like I said, it will be acompanied by a music scheme change to world map music and either a sudden CTD or a 3D sailing without any response from the engine at all anymore.

@Luke159 can you post the exact error code in the error.log here?
 
@Pillat sadly there is no error in the log file. This is systems file

Maelstrom Engine™ 2.8.2 (32 bit)
Current dir: E:\Maelstrom\games\gentlemen-of-fortune-2
Loading modules (folder: modules\)...
45 loaded.
Reset...
Initializing CORE...
Creating atoms space: 128
done
Initializing complete
Unloading
DestroyWindow
PostDWindow
System exit and cleanup:
Mem state: User memory: 0 MSSystem: 0 Blocks: 0
 
@ChezJfrey

Thanks, you are the best! I managed to get New Horizons started in the latest build version!!!
:ship

View attachment 37780

(yeah I didn't take in your and @Mirsaneli fixes for the interfaces yet)


Altough, I had to comment out the line in utils.c - because I really don't know where this identifier should be declared. I probably overwrote it somewhere, like with the loc_ai (I didnt pay enough attention there - you clearly made a comment there which is a definite hint that this was a porting change :rumgone)

For testing the CTDs: Just take my save file if you still have it and try to quickly change between world map and 3d sailing, after a few tries you should experience that crash. Like I said, it will be acompanied by a music scheme change to world map music and either a sudden CTD or a 3D sailing without any response from the engine at all anymore.

@Luke159 can you post the exact error code in the error.log here?

Replace the shadow.tga.tx in Textures/Interfaces and report back if it fixed the black bars glitch in Main Menu.
Dropbox - shadow.tga.tx - Simplify your life
 
whats with the compile.log?

This is the error that now shows up

COMPILE ERROR - file: characters\LSC_Q2Utilite.c; line: 2091
Missing variable name

System log file attached as there are a bunch of things now showing up
 

Attachments

  • system.log
    12.1 KB · Views: 235
Last edited:
I know I might be jumping from topic to topic, but can we implement this code from New Horizons to GoF 1.2? I wanted to add a gunner shout when firing cannons. I tried, but I get a Script file syntax error...
PROGRAM/SeaAi/shipBortFire

//gunner shout JRH
if (JRH_GUNSOUNDS == 1 && IsMainCharacter(rCharacter) == true) {
//ballNumber = 0;
x = stf(rCharacter.ship.pos.x);
y = stf(rCharacter.ship.pos.y);
z = stf(rCharacter.ship.pos.z);
cannons_qty = GetCannonArcQty(rCharacter, GetQuadFromBort(bortName));
for (c = 0; c < cannons_qty; c++)
{
Play3DSound("gunner_shout", x, y, z);
}
}
 
@Pillat sadly there is no error in the log file. This is systems file

Maelstrom Engine™ 2.8.2 (32 bit)
Current dir: E:\Maelstrom\games\gentlemen-of-fortune-2
Loading modules (folder: modules\)...
45 loaded.
Reset...
Initializing CORE...
Creating atoms space: 128
done
Initializing complete
Unloading
DestroyWindow
PostDWindow
System exit and cleanup:
Mem state: User memory: 0 MSSystem: 0 Blocks: 0

Given that, I suspect it is not really finding, or able to read the start.ini file, because a couple things were skipped on init, which most likely occurs due to that inability. Also, how is it finding 45 modules, when there are only 42 provided? Your system.log would normally be this:

Maelstrom Engine™ 2.8.2 (32 bit)
Current dir: E:\Maelstrom\games\gentlemen-of-fortune-2
Loading modules (folder: modules\)...
42 loaded.
Reset...
Initializing CORE...
Creating atoms space: 128
done
Initializing complete
Starting DirectX 9
HARDWARE_VERTEXPROCESSING supported, Type = 1
Techniques: 24 shaders compiled.
Techniques: 234 techniques compiled.
Techniques: compiled by 615902627 ticks.
Using FMOD 00011020
Sound initialized ok !!!
FMOD: Speaker mode STEREO
Total logical: 4, Total cores: 2, Total physical: 1
SSE: On, MultiThreading: On
Unloading
DestroyWindow
PostDWindow
System exit and cleanup:
Mem state: User memory: 0 MSSystem: 0 Blocks: 0

They key part missing is this, which would happen if it can't find or read start.ini:

Starting DirectX 9
HARDWARE_VERTEXPROCESSING supported, Type = 1
Techniques: 24 shaders compiled.
Techniques: 234 techniques compiled.
Techniques: compiled by 615902627 ticks.
Using FMOD 00011020
Sound initialized ok !!!
FMOD: Speaker mode STEREO
Total logical: 4, Total cores: 2, Total physical: 1
SSE: On, MultiThreading: On

So is there really a start.ini file in your E:\Maelstrom\games\gentlemen-of-fortune-2 folder? Also, are you using the shortcut to directly launch the game, or are you attempting through the Itch client to launch from a GOF 2.0 button? If the Itch client, try the shortcut instead and report back. I see a flaw in your edits of the .toml file and that might explain a problem launching from there, but let's first figure out if you can launch it successfully.
 
No i'm using the shortcuts to directly launch the game and I have a start in file in the game directory attached below
 

Attachments

  • start.ini
    312 bytes · Views: 234
No i'm using the shortcuts to directly launch the game and I have a start in file in the game directory attached below

OK, this will probably do it. The file you attached looks like it was edited with the syntax used in the .itch.toml file if you wanted to modify and launch GOF from within their client. The start.ini provided for each mod looks very similar to the "old" .ini file for the games. I'm attaching the default one that comes with GOF 2.0 download. You can start with that, and it can still be edited through the Config.exe, or manually for screen size, etc.
 

Attachments

  • start.ini
    2.4 KB · Views: 262
Sadly the game doesn't load a popup saying "Fail to create program. Check the INI file or Program scripts file for syntax errors."
 

Attachments

  • system.log
    348 bytes · Views: 238
Back
Top