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

Included in Build Reduce Amount of Double Initialization on Start New Game

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
This is mostly a performance issue.
You probally noticed starting a new game takes quite some time, if you check the compile.log you will see why, a lot of things happen twice.
This is cause first everything is initialized but after that a load command is called which does another reinit, so actually you are waiting for both making a game and loading it, this shouldn't be needed. I understand this is cause some things else aren't initialized right but might be worth looking in some time.
 
I'm running on a pretty bad ass computer and even I have to wait about half a minute so yes it takes to long, hence I post it here so someone can look at it.

if someone wants to start on this please check the following:
check the function InitGame() in seadogs.c and remove all commands which are also called in NewGame_continue().

also check the function BS_Reinit()to see what it does. this one is called on the start of the game (before the main menu). I guess there is a bit to much in this function to. just comment stuff and see if you can still set a new game and load a game (some things are needed for the new game menu, but maybe the function should be called only for this interface?)
 
I have to wait about half a minute so yes it takes to long
What?! Do you know the time I need? I need 7 minutes to start a new game.:mad:
I know I have an old computer. But, when I start a new game in Elder scroll IV: Oblivion(with some mods I added) I need very less time
 
If nobody else will look at this I will take a look at it probally before the end of the year.
 
If I recall, the Reinit code was written to have both a "full" and "simple" mode.

There are a bunch of things that need to be initialized when the game itself is started, because they're needed by the Select Storyline interface.
After that, these same things may need to be initialized again for period-correctness depending on the chosen storyline.
 
If I recall, the Reinit code was written to have both a "full" and "simple" mode.

There are a bunch of things that need to be initialized when the game itself is started, because they're needed by the Select Storyline interface.
After that, these same things may need to be initialized again for period-correctness depending on the chosen storyline.
yeah but it now looks like after the selection of the storyline they are first initialized all again and then corrected. maybe the wrong reinit is called or something is going wrong there.
 
I hope you can optimize a bit the process :unsure
Fortunately, this doesn't occur when we load a savegame otherwise I think I would have abandoned to mod this game.:facepalm
 
Changed to "Feature Request" since this is not technically a bug.
 
Continued from here: http://www.piratesahoy.net/threads/various-storyline-start-errors.24423/

@Jack Rackham: How about the compile.log in your own game version? Do you have these messages too?
Turns out this issue was introduced between Beta 2.5 and Beta 3.
However, if I move the Beta 2.5 version of the WoodesRogers folder into my Beta 3.3 WIP folder, the problem remains.
So it must be in some WoodesRogers related code outside its own storyline folder. That narrows it down at least a little bit. :facepalm
 
Last edited:
WoodesRogers start:

Yes I got

WARNING!!! Item id = bladep2 not implemented
WARNING!!! Item id = pistolb1 not implemented
WARNING!!! Item id = bladep6 not implemented
etc etc
in compile.log

nothing in error.log

in system.log:

Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 1144
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 1100
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 1056
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 1012
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 968
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 924
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 880
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 836
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 792
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 748
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 704
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 660
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 616
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 572
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 528
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 484
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 440
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 396
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 352
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 308
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 264
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 220
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 176
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 132
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 88
Leak: 'C:\PROJECTS\DRIVE_V2\XINTERFACE\NODES\xi_strcollection.cpp' line 209, size 44

which looks a little more of those bad guys than usual?
 
Well because I was looking trough it here is a list of all things happening when you start a new game in the order they happen.
The one is bold is causing the errors cause the quest items aren't yet initialized while the characters are already initializing.

NEW GAME
GetLanguageParameters();
DeleteEntities();

NEW GAME CONTINUE
InitPerks();
InitOfficerTypes();//ASVS
InitBaseInterfaces();
InitPeriods();
SaveGlobalOptions();
NationsInit();
CharactersInit();
ShipsInit();
InitGame();

INIT GAME
InitStores();
InitSound();
DeleteSeaEnvironment();
InitTownTable(true);
LocationInit();
IslandsInit();
wdmInit();
DialogsInit();
InitTeleport();
InitParticles();
InitItems();
ReloadProgressUpdate();
QuestsInit();
SeaAIGroupsInit();
InitQuestMapEncounters();
InitLandRandomEncounters();
ReloadProgressUpdate();
ResetQuestMovie();
LoadGlobalOptions();
InitModels(true);
Alias_Init();
InfoShowSetting();

NEW GAME CONTINUE REST
Reinit(true, false);

REINIT
InitPerks();
TownNamesReinit();
Preprocessor_Init();
InitNoSaveMod();
InitEncounters();
SetRumourDefaults(true);
StoreInit();
GetInterfaceParameters();
InitLocalization();
FindBlankCharSlot();
FindBlankLocSlot();

NEW GAME CONTINUE LAST
InitTownNationalities(); // PB
InitRelations();
InitGroups();
InitIslandSmuggling();
initCargos(5);
StartStoryLine();
CleanStorylineObject(); // KK
UpdateSkillModifiers(GetMainCharacter());
 
I have tried to increase almost every number I could find in items.h No difference.
 
Is anyone going to look into those Woodes Rogers errors or should I see what I can do this evening?
 
@Pieter Boelen and @Levis
I noticed earlier that some equipped "weapons" in WoodesRogers did not show up. Fixed a few I found
when testing the storyline. So the not implemented items are those that are given to characters from gamestart.

Now if the reason is as Levis says, characters are inititiated before items, has this been changed sometime? :confused:
Because earlier this worked fine. :yes
 
The bug was introduced between Beta 2.5 and Beta 3. Will have a look at the initialization order between those and see if it is the same or different.
 
I can tell you that "Woodes Rogers" works under some version of Beta 3, probably Beta 3.1, possibly an early version of Beta 3.3 - I'm not sure now which one was installed when I played "Woodes Rogers". It definitely wasn't Beta 2.5 because I never even looked at Build 14 before Beta 3.0 had been released! And it wasn't Beta 3.2 because I only tried that once, playing the "Assassin" story, then lost interest due to all the added stuff which messed it up and reverted to Beta 3.1. There may or may not have been such error messages, I didn't look at the log file, but I did manage to play the "Woodes Rogers" quest to completion.
 
Those missing items are not quest breaking but it's sure better with them visible. It makes of course something to
the balance of some fights too.

Wow you played it through. :onya
 
As far as I could tell, while these items are reported as missing in compile.log, they actually ARE there when you need them.
So probably this makes no difference. I'd still like to address it though, because it does indicate something isn't going quite right behind the scenes.
 
Well because I was looking trough it here is a list of all things happening when you start a new game in the order they happen.
The one is bold is causing the errors cause the quest items aren't yet initialized while the characters are already initializing.
Checking seadogs.c and Reinit.c between Beta 2.5 and Beta 3, indeed there are a LOT of changes related to initialization code.
I think Beta 3 is the first version where I managed to include a lot of Pirate_KK's last work, which was quite some substantial stuff.
It isn't very surprising that this could have caused some unexpected things along the line.

That being said, the order between character and item initialization was not actually changed. So that's a bit odd. :confused:
 
Back
Top