Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(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.

are these script errors affecting the original NH game in Storm engine 2.0 or they only affect Maelstrom engine?

They should be a problem no matter what engine.  If these are not presenting errors in 2.0, then I can only guess the script code I was supplied is not the same.

All the scripts are from the original New Horizons mod from theri official site. So I guess it works that way. Now that it is running Maelstrom, is it possible to implement the blood like in Storm engine 2.8?

(1 edit)

Just as an example for TempQuestEnemy.c.  The code in characters_init.c tries to dynamically load a .c file, and dynamically call a function:

if (FindFile("PROGRAM\Characters\init", "*.c", fname) != "") {
        if (LoadSegment("Characters\init\" + fname)) {
            call func(&n);
            UnloadSegment("Characters\init\" + fname);
        }
}

In the case of the problem, fname is "TempQuestEnemy.c" and func = "CreateTempQuestEnemyCharacters".  So it will try to call that function after it loads the .c file.  But in that TempQuestEnemy.c file, there is no function in the script I have from you.  It looks like this:

int CreateTempQuestEnemy(int n)

Notice that it is the wrong name, and also does not pass a reference type for &n, but rather an int n.  It should look like this:

void CreateTempQuestEnemyCharacters(ref n)

What happens with that original script is nothing happens and an error is logged that it can't find function CreateTempQuestEnemyCharacters in TempQuestEnemy.c.  That is not a porting problem and should not work no matter if it is Storm 2.0, Storm 2.8 or Maelstrom.

This is interesting, but makes sense since a lot of people worked on that mod. I will check the original program folder as soon as I get home.

(1 edit)

This PROGRAM folder is from original New Horizons mod for 2.0 engine. I compared it and it has 2.547 files, while the one I have now has 4.393. Is it possible that some files are obsolete?

https://mega.nz/file/9DQ0gZKa#mdfJ3ekLJuMaOYZkq5HTprotUmRwk3VZlC-aF2hLCtA

Obsolete files don't hurt anything if the references to them are removed from #include and they are never run.  So obsolete files, even with errors, don't cause problems.

I started over with clean PROGRAM folder from NH 2018 build, fixed the libriary syntax erros. The game starts, loads the PA! splash video and then just black screen. Error log shows this:

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'LanguageGetDefaultLanguage' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'GetSaveDirectory' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'GetProgramDirectory' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'GetResourceDirectory' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_MakeNode' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_DeleteNode' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_WindowShow' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_WindowDisable' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_IsWindowEnable' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_WindowAddNode' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'DialogAssembleStr' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'DialogAddParamToStr' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_StoreNodeLocksWithOff' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_RestoreNodeLocks' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_IsKeyPressed' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'XI_RegistryExitKey' not declared

COMPILE ERROR - file: interface\utilite.c; line: 16

native function 'AddControlTreeNode' not declared

RUNTIME ERROR - file: battle_interface\loginterface.c; line: 31

Can't create class: ActionIntrface

RUNTIME ERROR - file: ships\ships_init.c; line: 210

Invalid function call

RUNTIME ERROR - file: ships\ships_init.c; line: 210

function 'InitShips' stack error

(2 edits)

If you start over, then you have to compare the old, working 2016 version, every file, that works for Maelstrom to the new one and add, remove, change the relevant parts again.  You have to add the new native function declarations that exist in Maelstrom, but not Storm 2.0, you have to remove the native function declarations that no longer exist in Maelstrom, change those SendMessage statements that don't have the correct parameters because they changed from 2.0 to 2.8, you have to modify all the LogInterface, BattleInterface and flag things that don't work the same, the sound messages/calls that are different, etc. 


There are literally hundreds of lines that need to change.

Ok, so I fixed a few files. Now I get this in error log:

COMPILE ERROR - file: interface\utilite.c; line: 28

native function 'LanguageGetDefaultLanguage' not declared

COMPILE ERROR - file: interface\utilite.c; line: 28

native function 'GetSaveDirectory' not declared

COMPILE ERROR - file: interface\utilite.c; line: 28

native function 'GetProgramDirectory' not declared

COMPILE ERROR - file: interface\utilite.c; line: 28

native function 'GetResourceDirectory' not declared

COMPILE ERROR - file: interface\utilite.c; line: 28

native function 'AddControlTreeNode' not declared

RUNTIME ERROR - file: ships\ships_init.c; line: 210

Invalid function call

RUNTIME ERROR - file: ships\ships_init.c; line: 210

function 'InitShips' stack error

When I simply remove this line:

#library "script_interface_functions"

it makes hundreds of other errors. I don't have any idea what it does and what to do with it... :/

(1 edit)

For instance, referring to my other post about comparing, that utilite.c file from the 2016 NH needed some changes to work with 2.8 and Maelstrom, where these lines needed add:

native string DialogAssembleStr(string idStr, string paramStr);
native string DialogAddParamToStr(string oldParamStr, string paramID, string paramValue);
native void XI_MakeNode(string sIniFileName, string sNodeType, string sNodeName, int nPriority); 
native void XI_DeleteNode(string sNodeName); native bool XI_IsWindowEnable(string sWindowName); 
native void XI_WindowShow(string sWindowName, int bShowStatus); 
native void XI_WindowDisable(string sWindowName, int bDisableStatus); 
native void XI_WindowAddNode(string sWindowName, string sNodeName); 
native int XI_StoreNodeLocksWithOff(); native void XI_RestoreNodeLocks(int nStoreCode); 
native bool XI_IsKeyPressed(string key_name); // key_name = {"shift","control","alt"} 
native void XI_RegistryExitKey(string key_name);

And this line needed change:

#library "script_interface_functions"

I just checked this original Program, and there is libriary error everywhere. Omg

The #libriary was valid in all Storm versions.  I could not handle the spelling error, so changed it in Maelstrom.  That is something that does need to change when porting to Maelstrom.