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

Fixed Improving loadtime

Or did you just start a new game? What I noticed is that the load times are OK at the beginning.
But when I get more ships and officers, it becomes worse.
Try the console switch(3) test I suggested above.
 
This test takes 1 minute for me.
How much is it normally at the beginning of the game? 1 minute does sound like longer than usual.
I used to be able to wait for it, but now I might as well go check the forum on my phone while it's loading. :facepalm
 
I will add some speedtest code to the loading because the things i changed should be affected by characters in the Scene. the amount of officers etc you have shouldn't matter.
 
I will add some speedtest code to the loading because the things i changed should be affected by characters in the Scene. the amount of officers etc you have shouldn't matter.
The worst I noticed was loading from shore to sea at Barbados with 4 ships and a bunch of extra officers.
Add the 3 quest ships plus coast raiders, that would be a lot of characters.

I saw you're calling the "UpdateSkillModifiers" on each location reload now.
That is something I'm intending to rewrite already so that the modifiers are updated EXCLUSIVELY when a character gets or loses an actual skill item.
That should get us past looping through all characters and then all skills and then all skill items on each reload, right?
 
The worst I noticed was loading from shore to sea at Barbados with 4 ships and a bunch of extra officers.
Add the 3 quest ships plus coast raiders, that would be a lot of characters.

I saw you're calling the "UpdateSkillModifiers" on each location reload now.
That is something I'm intending to rewrite already so that the modifiers are updated EXCLUSIVELY when a character gets or loses an actual skill item.
That should get us past looping through all characters and then all skills and then all skill items on each reload, right?
That should help indeed.
I will move the code to the item function and see how that works
 
I will move the code to the item function and see how that works
And I'll see about rewriting it so that it does ONLY what is needed and nothing more.
So it shouldn't harm performance for non-skill items and even for skill ones would updated only the skills that it actually affects.
 
I'm working on it but for some reason I'm getting an stack overflaw in the system.log now and I can't load the game. I changed things back to when I could load it but it doesn't work. Let's hope rebooting works.
 
That's weird! Revert to the current Beta 4 code and WinMerge your changes back in?
Clear out save and options files if need be?
 
That's weird! Revert to the current Beta 4 code and WinMerge your changes back in?
Clear out save and options files if need be?
tried clearing out the saves and option already. didn't make a difference
To make it even weirder it seems that some of the gametypes do work. I was testing with assasin and I can't open a game in assasin anymore but I could do with jean lafitte. But now I got a error in that one also ...
Sometimes the error happens at the second pass trough the character array and sometimes it happens when updating the towns ... its very weird... I think it has something to do with events doind weird stuff.
I'm trying to set up an event for something and I guess this fucks it up. but even commenting all code makes it do weird stuff.... So I'm almost thinking some things are stored somewhere and read from again...
 
Okay I just did a complete reinstall and only transfered 2 changes which I did all the way back today to fix the levels of characters and I get the stack overflaw again instantly (didn't check without).
So I think something is really messed up here ....
 
Going to take a little break first while my laptop does a defrag and scans etc maybe that works.
Else I will move to my desktop.
What I'm trying to achieve is this:

Now all characters are checked during the load and everything is set right (levels and perks etc),
I'm trying to determine the distance this character is to the start position of the main characters. And characters within a certain range will still be checked during the load. But the others will be done during the runtime to save loading time. They will only increase 1 level at the time with a certain amount of time in between. So by the time you reach them they should be checked and set up right. but this way I can spread the load better.

Now let's hope when I try to set this up again I wont destroy the game again.
 
The fix for leveling is included in this file. It should also bring back the quick loading times.
Please let me know if they are acceptable again now. (especially test a boarding scenario)
I'm going to sleep now. When I wake up again I will take a look at the things @Pieter Boelen did for the skills. I think I can use the system I have in place now to work along side this.

I still want to fix some of the other calles which go trough all characters. I might be able to make it even faster that way. But I think this goes a long way already :).
 

Attachments

  • LoadingFix.zip
    55.6 KB · Views: 112
So what exactly needs initializing on those reloads anyway?
For the skills, I can think of nothing that needs doing specifically on a reload because nothing can be reassigned or updated inbetween starting and finishing the reload anyway....
 
So what exactly needs initializing on those reloads anyway?
For the skills, I can think of nothing that needs doing specifically on a reload because nothing can be reassigned or updated inbetween starting and finishing the reload anyway....
True, the only way it could happen is when xp is given on a quest reload. But the that will fix it.
 
True, the only way it could happen is when xp is given on a quest reload. But the that will fix it.
The quest reload function doesn't give XP, so either that XP would be given prior to or after the reload.
For skills, my intention is to update the various numbers AT the time they're needed (or possibly when you specifically ask for it).
So I do still wonder: What specifically needs updating on a reload? I feel like I'm misunderstanding something here.... :oops:
 
The quest reload function doesn't give XP, so either that XP would be given prior to or after the reload.
For skills, my intention is to update the various numbers AT the time they're needed (or possibly when you specifically ask for it).
So I do still wonder: What specifically needs updating on a reload? I feel like I'm misunderstanding something here.... :oops:
The first time an character is loaded the perks and skills etc are checked and the xp is set right. After that is doesnt need that anymore. Except for fantoms, they need to be set each time. I moved this to the runtime now. Only very close ones are check during load and when you are boarding they are all checked.
Also the auto level system gives characters some xp each time you visit an area.
 
The first time an character is loaded the perks and skills etc are checked and the xp is set right. After that is doesnt need that anymore. Except for fantoms, they need to be set each time. I moved this to the runtime now. Only very close ones are check during load and when you are boarding they are all checked.
Also the auto level system gives characters some xp each time you visit an area.
Interesting! A lot has changed over the past few months.
Once all the big things have been addressed, I'm really looking forward to playing through a storyline to see what "beast we've wrought". :cheeky
 
Back
Top