• 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 Leveling: Sudden Huge Amounts of XP Gained

think it does.
Problem is that the auto skill system probably looks to the way you contribute the skill points. And for merchant captains this is set up altough not used as far as I know.... Check officers.c to check it.
Maybe put all the contributions on 1 and check if that helps, that would distribute the skills evenly
 
All three captain types have all skills set to 0 in Officers.c.
But I got weirdness even for Hornblower and he gets player type Navigator at the beginning of the game.
So I don't know what's up there....

But for sure I would very much prefer to NOT have to dive into this one.
You have been doing a lot of reworking on the skill/perks systems so you know much better what you're looking for.

Also, this Nations Relations thing I'm working on now is a crazy huge task by the looks of it.
Better I don't distract myself too much for a while.... :facepalm
 
I will look into it a bit later. Was planning on checking it already, guess i just have to do it sooner.
 
okay going trough the code I see there are 3 different functions to choose perks for a character and 2 to give XP and 4 to add skills etc. So I started on rewriting that already. Will continue tomorrow to make sure we have only 1 system in place for this. After thats done I can see if I can find any problems with it, but it will probably require a lot of testing also ...
 
okay going trough the code I see there are 3 different functions to choose perks for a character and 2 to give XP and 4 to add skills etc. So I started on rewriting that already. Will continue tomorrow to make sure we have only 1 system in place for this. After thats done I can see if I can find any problems with it, but it will probably require a lot of testing also ...
We've got a lot of testing ahead of us anyway, so we're just going to have to deal with it.
Indeed ONE system for ONE thing is so much nicer than having a gazillion of them! :cheeky
 
Working on it. Found all different functions for XP gain etc now. I will try to upload a version which at least uses the same functions round 5 pm today. Then I'm going to take a look at the perks assignment for the autoskill and hope to have an version later today where everything is managed well....
I'm adding debug messages everywhere so expect some thing popping up on screen now and then...
 
Okay I rewrote the leveling part for normal leveling but now if there is no skill assigned but auto skill is still active... it should pick the right skill to level. So that's next.
After that I need to make sure that in the right cases a nice perk is selected.
After that I need to write a function which will take a character trough multiple level ups if he is made at a specific level ...

Still much todo but we're getting there and the code is starting to look nice and clean. I can now actually see what is happening.
 
I ended up rewriting almost the whole auto leveling system .....
It's not done yet, I still need to do the perk assignement, but you can already check it out now.
Just remember no character gets any perks assigned at the moment. That's the next step which I will do tomorrow.

Please have a look at it. From what I can tell I accedently increased the loadingspeed for different area's quite a bit :p. Altough I haven't checked the performance on sea.

The 4 button works again at least. And officer and character you encounter have skillpoints assigned to them.
I think I also improved the way the skills are assigned automaticly to you....
All skill assigmend is now done by 1 function. So there is no need for the AUTOSKILL check before giving xp anymore. It's all managed in the function itself.
For now I just took the old funtions and redirect them to the new one with the right settings so I dont have to change all other files....
 
Last edited:
@Pieter Boelen please winmerge these files in your version and see if it causes any problems.
Tomorrow evening I will finish it.
 
I won't be able to check it out until this evening, I'm afraid.
Even then, I'll be able to merge it, but I've got my own stuff to finish too.
Hopefully I can get something operational for that tonight too.
 
Ok, I will make sure I got this part done tonight. Hopefully we can then make a new installer to test some stuff :).
 
Question for other people:

What should happen if you gain skills for fencing but you are fencing level 10 already.
I'd say the XP should be divided by something and added to the other skills then, but I would like your opinions.

Reminder for self: Check the init function to change the xp increase per time period. to make it day dependend and add a real 1 to 4 % increase
 
Last edited:
Hopefully we can then make a new installer to test some stuff :).
Before the Friday is what I'm aiming for. :yes

What should happen if you gain skills for fencing but you are fencing level 10 already.
I'd say the XP should be divided by something and added to the other skills then, but I would like your opinions.
I'd say don't assign that XP to any skill at all.
If you are already the world's biggest fencing expert, you wouldn't learn Sailing because you continue to do fencing, right?

If anything, DON'T increase your skill values but DO increase the points needed for the next level.
By still increasing the player level, so would many non-player characters, making the later game more challenging.
But that part is debatable. :cheeky

Reminder for self: Check the init function to change the xp increase per time period. to make it day dependend and add a real 1 to 4 % increase
I'm not sure I follow your thoughts there. With period, you don't mean one of the six time periods, right?
Or are you thinking to increase all skills with 1-4% every day, regardless of whether you use them or not? That skips the intention of the Auto Skill System, doesn't it?

Two thoughts:
- If possible, it would be nice if the old system of manually assigning skill points remains a possibility (though I don't know if anyone still uses that)
- How doable would it be to change the range of the skills from 1-10 to 1-100? That would make it even harder to gain full skills.
This second part is purely hypothetical, though. Just something I've been wondering about, but not sure if we should indeed do it.
 
Before the Friday is what I'm aiming for. :yes

I'd say don't assign that XP to any skill at all.
If you are already the world's biggest fencing expert, you wouldn't learn Sailing because you continue to do fencing, right?
Hmmm true ....

If anything, DON'T increase your skill values but DO increase the points needed for the next level.
By still increasing the player level, so would many non-player characters, making the later game more challenging.
But that part is debatable. :cheeky
I've already made it harder, in the past the amount of XP you had to gain for a level was the same for each level, altough your experience became more or less depending on your rank. Now the xp required for a skill is the same as the XP required for a level (divided by the amount of skillpoints you get per level which is now set at 2).
This means if you start at level 1 and you would only level fencing you should be able to reach level 10 for fencing in 5 levels.
In practise it means you need to get round level 50 to have all skills maxed out. All perks will max out at level 100. If it goes to fast we could easily changed the amount of skillpoints per level to 1.
The system is set up in a way you should be able to level the same amount in both the old and new system.

I'm not sure I follow your thoughts there. With period, you don't mean one of the six time periods, right?
Or are you thinking to increase all skills with 1-4% every day, regardless of whether you use them or not? That skips the intention of the Auto Skill System, doesn't it?
This is about other characters. I dont know if anyone knew but all characters in the game level up the more you see them. I want to improve on this a little bit because now it's mostly a prove of concept from what I see. It does work, but it only checks if you saw the character more then a day ago, and if so it will get 1 to 4 % of the experience needed to levelup. This is not fair ofcourse for some characters which you might see more often etc. So I want to take into account the days which are passed since you last saw him or her. Also now the system doesn't remember the old checkdata if he doesn't get experience, so if you see a specific character 2 a day he wont never get any experience.
Improvements on this system is what mostly increased the loading time between area's because in the past there was a loop trough all characters in this while it wasn't needed.

Two thoughts:
- If possible, it would be nice if the old system of manually assigning skill points remains a possibility (though I don't know if anyone still uses that)
Like I said before it actually does work again right now
- How doable would it be to change the range of the skills from 1-10 to 1-100? That would make it even harder to gain full skills.
This second part is purely hypothetical, though. Just something I've been wondering about, but not sure if we should indeed do it.
I think changing the MAX SKILL parameter should do the trick already because I programmed everything dependable on those kind of paramters, but I would need to check that when I'm back home. Problem I could see is that probably some calculations will use functions like
(11-Skill)*multiplier
or something like that ...
What we could do maybe is make it look like it goes higher but still have it internally show 0 till 10 ...
So for example when it goes from 0 till 100 all skills from 0 till 10 will show internally like skill 1 and after 10 it becomes 2 etc...
 
I think changing the MAX SKILL parameter should do the trick already because I programmed everything dependable on those kind of paramters, but I would need to check that when I'm back home. Problem I could see is that probably some calculations will use functions like
(11-Skill)*multiplier
or something like that ...
What we could do maybe is make it look like it goes higher but still have it internally show 0 till 10 ...
So for example when it goes from 0 till 100 all skills from 0 till 10 will show internally like skill 1 and after 10 it becomes 2 etc...
The best solution is to also have MAX SKILL in such instances, but I can imagine that being a tough job to find and replace as I doubt it can be done automatically.
Can the skill be changed to a float? So if you have MAX_SKILL at 100, then each skill is 0.1 instead of 1?
 
The best solution is to also have MAX SKILL in such instances, but I can imagine that being a tough job to find and replace as I doubt it can be done automatically.
Can the skill be changed to a float? So if you have MAX_SKILL at 100, then each skill is 0.1 instead of 1?
That should be possible yes.
If sti() returns a rounded number if a float is inputed this could solve it indeed :).
 
If sti() returns a rounded number if a float is inputed this could solve it indeed :).
Otherwise "makeint" and "makefloat" are also available.

I'm not sure if doing this is actually necessary or even a good idea, though. That is more up to the players to decide.
For now, you shouldn't need to spend much time and effort on it; as long as we might be able to do it in the future if we want.
 
Nothing I've done or will do will make it harder to do it at least :p.
I'm going home in a few minutes so hopefully I'll be able to get this done quickly, I only need to do the perk assignment and I have experience with that :p.
 
Okay I will explain it later.
Some thing you need to know:

- On first entry of an location there might be a bit longer loading time cause all character are checked for the auto level system, some things are set so this can go faster later. The next time you enter this location you wont notice it anymore. And overall location loading time is still down it seems.
- The reinit and first init for a savegame takes a bit longer cause I have to set up some things so I can find them easier in order to have a performance gain there also.

- If you set the DEBUG_EXPERIENCE to 1 or higher in Leveling.c all character will get an extra dialog option to show theire skills and abilities. Note that when you use this you might be able to escape from dialogs where you shouldn't escape from so only use it for testing.

- All character now have perks assigned to them and skills. The skill distributions is also more realistic, so you won't find a character anymore with 10 in commerce and all other skills empty. Ofcourse you can still find one with 8 in commerce and all others on 2 or 3, but that sounds more realistic to me.

Please let me know how this plays and if the skill progression and level progression is good or that it should be tweaked a bit more.

I still need to do some more work on it, but in theory this should work and it has at least all the functions the other system did too.

included this fix too:http://www.piratesahoy.net/threads/...nal-wip-for-testing.24817/page-36#post-513256

YOU NEED A NEW SAVEGAME

new version:
http://www.piratesahoy.net/threads/sudden-huge-amounts-of-xp-gained.24829/page-4#post-513570
 
Last edited:
Back
Top