Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Aptitude and skill point tweaking  (Read 2324 times)

rada660

  • Captain
  • ****
  • Posts: 277
    • View Profile
Aptitude and skill point tweaking
« on: November 10, 2013, 06:33:33 PM »

I do believe you can tweak on how many aptitude and skill points you gain per level...

In "LevelupPluginImpl.java" I thought it would be that :

Spoiler
   public int getAptitudePointsAtLevel(int level) {
      if (level % 2 == 0) return 1;
      return 0;
   }

   public int getSkillPointsAtLevel(int level) {
      return 2;
   }
[close]

The first one checking : at every 2 level, add one point

The second being : At every level add 2 points.


Well I THINK it is. But I tried changing the numbers and it did nothing when I leveled up.

So I have my doubts it not that after all.

If it's really not it, where can I tweak it? But if it is. Why doesn't it does the trick?
« Last Edit: November 10, 2013, 06:40:17 PM by rada660 »
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Aptitude and skill point tweaking
« Reply #1 on: November 10, 2013, 09:39:22 PM »

Did you start a new game to test your changes?
Logged
Please check out my SS projects :)
Xeno's Mod Pack

rada660

  • Captain
  • ****
  • Posts: 277
    • View Profile
Re: Aptitude and skill point tweaking
« Reply #2 on: November 11, 2013, 04:02:28 PM »

Did you start a new game to test your changes?

I did tried, no success.

I do run the Exerelin mod, but I checked the mod itself and it doesn't affect the skill and aptitude point gain as far as I know.

Unless I missed it.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Aptitude and skill point tweaking
« Reply #3 on: November 11, 2013, 07:50:20 PM »

Well... if building something like this, I'd strongly recommend that you build / test it in isolation first. 

This code worked just fine for me:
Spoiler
Code: java
package data.scripts.plugins;

import com.fs.starfarer.api.plugins.LevelupPlugin;

public class LevelupPluginImpl implements LevelupPlugin {

public int getAptitudePointsAtLevel(int level) {
return 1;
}

public int getSkillPointsAtLevel(int level) {
return 4;
}


public long getXPForLevel(int level) {

if (level <= 1) return 0;

float p1 = 10;
float p2 = 35;

float f1 = 1f;
float f2 = Math.min(1, Math.max(0, level - p1) / 5f);
float f3 = Math.max(0, level - p2);

float p1level = Math.max(0, level - p1 + 1);
float p2level = Math.max(0, level - p2 + 1);
float mult1 = (1f + (float) level) * 0.5f * (float) level * 1f;
float mult2 = (1f + (float) p1level) * 0.5f * (float) p1level * 0.25f;
float mult3 = (1f + (float) p2level) * 0.5f * (float) p2level * 2f;

float base = 500;

float r = f1 * mult1 * base +
      f2 * mult2 * base +
      f3 * mult3 * base;

return (long) r;
}

}
[close]
Logged
Please check out my SS projects :)
Xeno's Mod Pack