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: 3 Skill choices for Officer possible?  (Read 2617 times)

FreedomFighter

  • Commander
  • ***
  • Posts: 176
    • View Profile
3 Skill choices for Officer possible?
« on: January 19, 2018, 03:46:09 AM »

I'm wondering if the game or UI even support that. I have had bad pick on Officer skill choice, and need to ditch them several time before so i been thinking if they get 3 skills choices would help.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: 3 Skill choices for Officer possible?
« Reply #1 on: January 19, 2018, 08:02:14 AM »

IIRC if you return a different number of skills in a custom implementation of OfficerLevelupPlugin, the UI and officer-spawning code *should* support it, though I haven't actually tested that. The plugin is pointed to via settings.json -> plugins -> officerLevelUp, btw.
Logged

FreedomFighter

  • Commander
  • ***
  • Posts: 176
    • View Profile
Re: 3 Skill choices for Officer possible?
« Reply #2 on: January 19, 2018, 08:50:43 PM »

I see. Seem like i need to get API method on this. Too dumb to write the entire API on my own. Maybe i consult with API request thread.

Code
package data.scripts.plugins;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.impl.campaign.OfficerLevelupPluginImpl;

public class OfficerLevelupPluginImpl implements OfficerLevelupPlugin {

public int pickLevelupSkills (int level) {
return 3;
}
}

My little understanding got me this far but i believe this isn't the right method to do it.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: 3 Skill choices for Officer possible?
« Reply #3 on: January 20, 2018, 09:17:20 PM »

Look at com.fs.starfarer.api.impl.campaign.OfficerLevelupPluginImpl (in starfarer_api.zip), pickLevelupSkills method. Change this so the list it returns has three entries instead of only two.

(For compiling this into a mod that the game can reference, look up one of the tutorials on the forum.)
Logged

FreedomFighter

  • Commander
  • ***
  • Posts: 176
    • View Profile
Re: 3 Skill choices for Officer possible?
« Reply #4 on: January 20, 2018, 10:37:14 PM »

Look at com.fs.starfarer.api.impl.campaign.OfficerLevelupPluginImpl (in starfarer_api.zip), pickLevelupSkills method. Change this so the list it returns has three entries instead of only two.

(For compiling this into a mod that the game can reference, look up one of the tutorials on the forum.)

These two?
http://fractalsoftworks.com/forum/index.php?topic=10057.0
http://fractalsoftworks.com/forum/index.php?topic=6809.0
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: 3 Skill choices for Officer possible?
« Reply #5 on: January 20, 2018, 10:49:53 PM »

Yeah, those are what you want. (Can't specifically vouch for them though, since I don't use IntelliJ)

You'll also need to set up a mod folder with a mod_info.json later. Any mod available can give you an example to start with.
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 405
    • View Profile
Re: 3 Skill choices for Officer possible?
« Reply #6 on: May 06, 2018, 01:45:23 AM »

So any progress?