Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: More Officer Skills  (Read 6000 times)

Alec

  • Ensign
  • *
  • Posts: 13
    • View Profile
More Officer Skills
« on: September 11, 2019, 12:34:25 PM »



Let's you set the amount of skill to learn when an officer levels up.
Default value increases from 2 skills to 3. You can set it to show up all the skills if you want to.

More Officer Skills v0.1.0\data\config\settings.json "MOSAmountOfSkillOptions": 3;

Download link.
Logged

Ed

  • Captain
  • ****
  • Posts: 438
    • View Profile
Re: More Officer Skills
« Reply #1 on: September 11, 2019, 01:02:32 PM »

This is VERY good
I hate when i get no choice but to give my Paragon officer carrier skills
Logged
Check out my ships

Dwarden

  • Commander
  • ***
  • Posts: 148
    • View Profile
Re: More Officer Skills
« Reply #2 on: September 11, 2019, 02:49:44 PM »

got crash at new game start

Spoiler
1048663 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.OfficerLevelupPluginImplMod.pickLevelupSkills(OfficerLevelupPluginImplMod.java:148)
   at com.fs.starfarer.rpg.OfficerData.makeSkillPicks(Unknown Source)
   at com.fs.starfarer.rpg.OfficerData.levelUp(Unknown Source)
   at com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.createOfficer(OfficerManagerEvent.java:381)
   at com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.createOfficer(OfficerManagerEvent.java:346)
   at com.fs.starfarer.api.impl.campaign.fleets.FleetFactoryV3.addCommanderAndOfficer s(FleetFactoryV3.java:866)
   at com.fs.starfarer.api.impl.campaign.fleets.FleetFactoryV3.createFleet(FleetFactoryV3.java:375)
   at com.fs.starfarer.api.impl.campaign.fleets.EconomyFleetRouteManager.createTradeR outeFleet(EconomyFleetRouteManager.java:587)
   at com.fs.starfarer.api.impl.campaign.fleets.EconomyFleetRouteManager.spawnFleet(EconomyFleetRouteManager.java:447)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.spawnAndDespawn(RouteManager.java:614)
   at com.fs.starfarer.api.impl.campaign.fleets.RouteManager.advance(RouteManager.java:572)
   at com.fs.starfarer.api.impl.campaign.CoreScript.advance(CoreScript.java:126)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.save.CampaignGameManager.super(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
   at com.fs.starfarer.ui.N.dismiss(Unknown Source)
   at com.fs.starfarer.ui.newui.o0oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.dismiss(Unknown Source)
   at com.fs.starfarer.ui.newui.Objectsuper.advanceImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.advance(Unknown Source)
   at com.fs.starfarer.ui.v.advanceImpl(Unknown Source)
   at com.fs.starfarer.ui.o00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.advance(Unknown Source)
   at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

maybe collision with "Skill Rework" http://fractalsoftworks.com/forum/index.php?topic=14502.msg237235#msg237235
but not sure
« Last Edit: September 11, 2019, 03:31:56 PM by Dwarden »
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 259
    • View Profile
Re: More Officer Skills
« Reply #3 on: September 12, 2019, 04:40:08 AM »

Amazing man.
That is what I wanted.

Agile

  • Commander
  • ***
  • Posts: 190
    • View Profile
Re: More Officer Skills
« Reply #4 on: September 18, 2019, 03:54:23 PM »

Is this save game compatible or do I need to start a new game?

Logged

Longsword01

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: More Officer Skills
« Reply #5 on: September 18, 2019, 04:21:53 PM »

It is save game compatible, but if you have a officer that is ready to level up before you install this mod it won't apply for that one level up (As I found out) but will apply to future level ups after that.
Logged

Agile

  • Commander
  • ***
  • Posts: 190
    • View Profile
Re: More Officer Skills
« Reply #6 on: September 19, 2019, 03:39:33 AM »

It is save game compatible, but if you have a officer that is ready to level up before you install this mod it won't apply for that one level up (As I found out) but will apply to future level ups after that.

Alright, thanks.
Logged

Crimson Sky Gaurdian

  • Captain
  • ****
  • Posts: 484
    • View Profile
Re: More Officer Skills
« Reply #7 on: September 26, 2019, 07:22:09 AM »

Somewhat randomly this will fail to work, and I'm unsure why.
It'll only list two options, and continue to only list those two until you pick one.
I don't think I've yet to see it only give two options back to back though.

EDIT: Just a theory, but did you limit it to only select skills that haven't been fully taken yet? It shows up most often after I've taken a skill to third level, so it could be selecting that one, then not showing it because it's already complete?
« Last Edit: September 26, 2019, 08:57:24 AM by Crimson Sky Gaurdian »
Logged

Alec

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: More Officer Skills
« Reply #8 on: October 01, 2019, 01:42:50 PM »

EDIT: Just a theory, but did you limit it to only select skills that haven't been fully taken yet? It shows up most often after I've taken a skill to third level, so it could be selecting that one, then not showing it because it's already complete?
Just increased the number of skill offered. Although I did have to add a few tidbits of code, but I don't think it would cause that.
Logged

Crimson Sky Gaurdian

  • Captain
  • ****
  • Posts: 484
    • View Profile
Re: More Officer Skills
« Reply #9 on: October 01, 2019, 04:46:52 PM »

If you raise it too high the game will start throwing null errors.
Had it happen reliably at 30, and rarely at 10, unfortunately.
Logged

Crimson Sky Gaurdian

  • Captain
  • ****
  • Posts: 484
    • View Profile
Re: More Officer Skills
« Reply #10 on: October 19, 2019, 12:22:27 AM »

Okay, just had it happen at something as low as 5, and this is the first time I've thought to check the log >.<
Code
1671189 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at data.scripts.OfficerLevelupPluginImplMod.pickLevelupSkills(OfficerLevelupPluginImplMod.java:148)
at com.fs.starfarer.rpg.OfficerData.makeSkillPicks(Unknown Source)
at com.fs.starfarer.rpg.OfficerData.levelUp(Unknown Source)
at com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.createOfficer(OfficerManagerEvent.java:381)
at com.fs.starfarer.api.impl.campaign.events.OfficerManagerEvent.createOfficer(OfficerManagerEvent.java:346)
at com.fs.starfarer.api.impl.campaign.fleets.FleetFactoryV3.addCommanderAndOfficers(FleetFactoryV3.java:866)
at com.fs.starfarer.api.impl.campaign.fleets.FleetFactoryV3.createFleet(FleetFactoryV3.java:375)
at com.fs.starfarer.api.impl.campaign.procgen.themes.RemnantStationFleetManager.spawnFleet(RemnantStationFleetManager.java:63)
at com.fs.starfarer.api.impl.campaign.fleets.SourceBasedFleetManager.advance(SourceBasedFleetManager.java:121)
at com.fs.starfarer.campaign.BaseLocation.advanceEvenIfPaused(Unknown Source)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
« Last Edit: October 20, 2019, 03:12:33 AM by Crimson Sky Gaurdian »
Logged

nilanthanimosus

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: More Officer Skills
« Reply #11 on: October 20, 2019, 06:23:50 AM »

This mod has a bug where a for loop does not use the variable for skill count near the bottom of OfficerLevelupPluginImplMod.java and is a hardcoded value, which causes a crash should you ever change the count of skills to choose at random (Typically when assigning an AI officer or other randomly generated in my case their random skills I believe).

Easy to fix, Im attaching what I changed to correct it should anyone wish to use this mod, I had found myself unable to post on the forums and forgot about this thread.

Just drop the attached file into \More Officer Skills v0.1.0\data\scripts\

I don't recall where though but I had moved around some logging and added some other logging (then commented it all out) - For the creator, there was a hard coded value in a for loop that needed to factor the skillsAmount variable if memory serves me.

[attachment deleted by admin]
« Last Edit: October 20, 2019, 06:27:29 AM by nilanthanimosus »
Logged

Crimson Sky Gaurdian

  • Captain
  • ****
  • Posts: 484
    • View Profile
Re: More Officer Skills
« Reply #12 on: October 20, 2019, 07:18:44 AM »

Line 184 iirc, it checks if it's less than 4, rather than less than or equal to the config value.

I was close, line 135 has
Code
if (result.size() < 4 && knownSkillCount < maxSkillsPerOfficer) {
instead of (as yours has)
Code
if (result.size() < (skillsAmount+1) && knownSkillCount < maxSkillsPerOfficer) {

EDIT: Changing just those still results in failure. Next up testing whether it was you adding
Code
if (!nonMaxedSkills.isEmpty()) {

EDIT 2: Yup, that stopped it from crashing. Not sure what other effects it'll have though, since it's in essence skipping an entire chunk of code.
« Last Edit: October 20, 2019, 10:45:36 AM by Crimson Sky Gaurdian »
Logged

DrPhat

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
Re: More Officer Skills
« Reply #13 on: October 22, 2019, 11:14:25 PM »

Oh my god this mod is a LIFESAVER! Combined with console mod where you can just type addofficer I have saved so much time. I find setting this mod to allow 9 different skills works best. Always pick the skills that you want to max first as well or you may still not get the skills you want if there are too many 1 or 2 point skill on screen you don't want to max.

PS there is a weird bug where accessing the inventory has a slight delay only when I have this mod installed. Turn it off on the current save and the bug goes away.
« Last Edit: October 22, 2019, 11:15:57 PM by DrPhat »
Logged

FrackaMir

  • Ensign
  • *
  • Posts: 20
    • View Profile
    • Email
Re: More Officer Skills
« Reply #14 on: January 09, 2020, 10:41:37 AM »

Oh my god this mod is a LIFESAVER! Combined with console mod where you can just type addofficer I have saved so much time. I find setting this mod to allow 9 different skills works best. Always pick the skills that you want to max first as well or you may still not get the skills you want if there are too many 1 or 2 point skill on screen you don't want to max.

PS there is a weird bug where accessing the inventory has a slight delay only when I have this mod installed. Turn it off on the current save and the bug goes away.

you sure about it? I turned it off after getting all the skills for the Officers and removed it from the mods entirely, but I still get a slight delay when opening the inventory, and it seems to gradually accumulate over time

Note that I installed this mod after installing every other mod and playing for a few days, I am using the Skills reworked mod too
Logged
Pages: [1] 2