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

Mod Release Performance increase for leveling system

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
This mod improves the performance of the leveling system in a few ways:

- The calculation of needed experience for different skills etc is now cached, so it's only calculated once and then looked up in a table.
- Perks are only picked after the init of a character is done so they are all picked at once to speed up the process
- If all perks for a certain category can't be picked then the category will be skipped to speed up the process.

These changes should have a notable effect on the game. The loading time was reduced by so much that for now I've disabled almost all post init so the stutter you have when entering an area the first time should be a lot less if not gone completly.

You can download included zip and extract it to your POTC main folder (it's only tested with the may 19th release from this post) .

If you use this mod with one of my other released mods please check if files overlap and if so use a program like winmerge to make sure everything is included
 

Attachments

  • Leveling Improvement.zip
    16.5 KB · Views: 141
I've given this a test. It doesn't seem to cause any trouble, but it doesn't seem to do any good either. Loading times from selecting storyline up to spawning in your cabin, and from ship deck to Speightstown port, appear unchanged. So are the pauses which occur when groups of fantoms are spawned by quest code.

Since it's only one file, it can easily be put back if it does cause trouble. So I'll include it in the next update. Then, if anyone reports a problem that could be associated with the new leveling code, I'll put back the existing version.
 
These changes should have a notable effect on the game. The loading time was reduced by so much that for now I've disabled almost all post init so the stutter you have when entering an area the first time should be a lot less if not gone completly.
I've given this a test. It doesn't seem to cause any trouble, but it doesn't seem to do any good either.
Huh, that doesn't seem to match up? :confused:
 
I think the effects are mostly noticable on weaker hardware. I run POTC from my hard disk on purpose and often with a slightly trotheled CPU to actually see differences. Also if you are using an FPS limiter chances are you also wont notice.
Ah; alright then...
 
I run PoTC from a hard disc as well, and I don't have a FPS limiter. However, the PC has pretty decent performance and if the purpose of the change in "leveling.c" was to reduce stutter when you first enter a scene, I wouldn't notice any difference because I've never seen that stutter. What I do notice is a pause when a lot of fantom characters spawn in some quests, and that has not changed with the new "leveling.c".
 
I think the effects are mostly noticable on weaker hardware. I run POTC from my hard disk on purpose and often with a slightly trotheled CPU to actually see differences. Also if you are using an FPS limiter chances are you also wont notice.
Yep, I think I did see a difference on my laptop with Intel Graphics.
While on my desktop I probably won't notice it due to it being powerful enough to negate it.
 
I run PoTC from a hard disc as well, and I don't have a FPS limiter. However, the PC has pretty decent performance and if the purpose of the change in "leveling.c" was to reduce stutter when you first enter a scene, I wouldn't notice any difference because I've never seen that stutter. What I do notice is a pause when a lot of fantom characters spawn in some quests, and that has not changed with the new "leveling.c".
yup noticed that too. I do hope that this should decrease the time of the pause.
 
Update:
I've given this a test. It doesn't seem to cause any trouble...
That turns out not to be true. I loaded up an old savegame intending to have a bit more fun with an advanced campaign, then tried to save game when I'd finished, and the game crashed leaving an unusable save. This wasn't a random crash, it was consistent - when I loaded up any of my older savegames and tried to save again, the game crashed with an unusable save. When I put back the earlier version of "leveling.c" and tried again, I could save game without any trouble.

Anyone who is having problems due to a PC with modest performance, particularly low frame rate when entering an area for the first time, should download and try this new "leveling.c" from the top of this thread. If people report that it does indeed improve performance, I'll put the new "leveling.c" into the update and change the version number so that a new game is enforced. Otherwise I'll stick with the earlier version of "leveling.c" so that anyone with a game in progress can continue it.
 
Update:

That turns out not to be true. I loaded up an old savegame intending to have a bit more fun with an advanced campaign, then tried to save game when I'd finished, and the game crashed leaving an unusable save. This wasn't a random crash, it was consistent - when I loaded up any of my older savegames and tried to save again, the game crashed with an unusable save. When I put back the earlier version of "leveling.c" and tried again, I could save game without any trouble.

Anyone who is having problems due to a PC with modest performance, particularly low frame rate when entering an area for the first time, should download and try this new "leveling.c" from the top of this thread. If people report that it does indeed improve performance, I'll put the new "leveling.c" into the update and change the version number so that a new game is enforced. Otherwise I'll stick with the earlier version of "leveling.c" so that anyone with a game in progress can continue it.
I can provide a version which at least will still have the "levelcache" function. That shouldn't impact the saving or anything. It just stores the calculated experience levels needed so the complex calculation doesn't have to be done every time.
 
Back
Top