Fractal Softworks Forum

Starsector => Mods => Topic started by: float on January 26, 2022, 10:26:20 PM

Title: [0.97a] Officer Extension (0.6.7)
Post by: float on January 26, 2022, 10:26:20 PM
Officer Extension
(https://img.shields.io/github/downloads/qcwxezda/Starsector-Officer-Extension/total?style=for-the-badge&label=download) (https://github.com/qcwxezda/Starsector-Officer-Extension/releases/latest/download/Officer.Extension.zip)  (https://img.shields.io/github/v/release/qcwxezda/Starsector-Officer-Extension?display_name=tag&sort=semver&style=for-the-badge&label=source) (https://github.com/qcwxezda/Starsector-Officer-Extension)

Overhauls the officer selection dialog, adding additional features:

(https://i.imgur.com/cyLmocK.png)

Features:

Manage more officers
  • Manage as many officers as you'd like. Hire new officers regardless of how many are currently under your command.
  • The 8 officer limit (10 with officer management) still applies -- however, it only applies to officers in command of a ship. Officers not in command of a ship do not count toward your officer limit.
[close]

Suspend officers
  • Suspend officers in your fleet for an upfront fee equal to twelve times their monthly salary.
  • Suspended officers cannot be assigned to any ship and must be paid 10% of their standard salary.
  • Suspended officers can be reinstated at any time for no cost.
  • Does not apply to mercenaries or AI cores.
Screenshot
(https://i.imgur.com/SZiShPU.png)
[close]
[close]

Demote officers
  • Select skill icons directly from an officer’s skills panel to prime them for removal. Then remove those skills by demoting that officer. This causes the officer to lose levels equal to the number of skills forgotten.
  • Demoting an officer requires a story point and grants 100% bonus experience.
  • Officers cannot be demoted below level 1.
  • Does not apply to mercenaries or AI cores.
Screenshot
(https://i.imgur.com/GV34JZl.png)
[close]
[close]

Additional menu options
  • Undo your most recent assignments. This may fail if you suspend, dismiss, or fully integrate officers or AI cores beforehand.
  • Filter officers by skills or by custom user-defined tags. Officers that don't have the selected skills or tags will be hidden from the selection panel.
  • Sort officers, which will sort officers in your fleet in the following order: unassigned mercenaries, assigned mercenaries, unassigned non-mercenary officers, assigned non-mercenary officers, suspended officers. Officers in the same category are sorted by level, followed by name.
Screenshot
(https://i.imgur.com/eVIu95z.png)
[close]
[close]

Miscellaneous QoL
Sorts officer payroll in the income tab by pay, followed by officer name for officers with equal pay. This applies to suspended officers as well.

Screenshot
(https://i.imgur.com/YFcVquX.png)
[close]

Upon interacting with another fleet, displays that fleet's commander's combat skills, including fleet-wide skills.

Screenshot
(https://i.imgur.com/06M6IWM.png)
[close]

Level 7 cryopod officers will maintain their maximum level and number of elite skills even if you demote them or remove their elite skills via the retrain option. Like normal officers, they can no longer be retrained if they have fewer than their maximum allowed number of elite skills.
[close]

Additional notes:

Show

  • Safe to add to or remove from an existing save file.
  • Inspiration to modify the core UI directly (rather than making yet another rule-based interaction dialog or possibly a new intel tab) derived from andylizi's  Planet Search  (https://fractalsoftworks.com/forum/index.php?topic=23229.0) and  Dialog Minimap  (https://fractalsoftworks.com/forum/index.php?topic=23199.0) mods.
[close]

Version history:

Show
0.6.7:  Here  (https://github.com/qcwxezda/Starsector-Officer-Extension/releases/tag/v0.6.7)
0.6.6:  Here  (https://github.com/qcwxezda/Starsector-Officer-Extension/releases/tag/v0.6.6)
0.6.5:  Here  (https://github.com/qcwxezda/Starsector-Officer-Extension/releases/tag/v0.6.5)
0.6.4:  Here  (https://github.com/qcwxezda/Starsector-Officer-Extension/releases/tag/v0.6.4)
0.6.3:  Here  (https://github.com/qcwxezda/Starsector-Officer-Extension/releases/tag/v0.6.3)
0.6.2:  Here  (https://github.com/qcwxezda/Starsector-Officer-Extension/releases/tag/v0.6.2)
0.6.1:
- Fixed issue where zip folder was empty
- Tentative fix for bug when FleetEncounterContext is different from 0.97a-RC11 version, should improve flexibility for different Starsector versions
0.6.0:
- Suspended officers no longer count for battle bonus XP calculation
- Officer promotion candidate intel event is no longer locked when vanilla officer cap is reached
- No longer uses a custom officer level-up plugin, instead sets max level and max elite skills values in the officer's local memory
- Added handling for "unremovable" skills via tag "officerextension_unremovable"
- Disabled demotion if officer is not leveled up
- Tentative fix for possible NPE when getOtherSideCombined is null
0.5.0:
- Just update Starsector version to 0.96a-RC6 and make sure nothing broke as a result
0.4.3:
- Reset game pause state on load
- Fix NoSuchMethodException issue on Linux machines
0.4.2:
- Add a field for persistent tags for filtering officers in the mod settings. Persistent tags will always be shown before any other custom-defined tags and will be shown even if you don't have any officers with that tag.
- Change all getMemory to getMemoryWithoutUpdate. This should fix crash bugs for officers with empty rank, post, name, etc.
0.4.1:
- Overhaul the "edit tags" feature. Now allows you to add tags individually as well as select from a list of all custom-defined tags.
- Add filters for personality and the "exceptional sleeper pod" status
- Allow filtering for elite versions of skills
- Sorting now takes number of elite skills into account
0.4.0:
- Change officer count so that only assigned officers count against your limit
- Add undo, filter, sort features in the selection menu
- Allow hiring of officers regardless of current number in fleet
- Allow special cryopod officers to regain lost levels and elite skills
- Suspending an officer now costs 12x their monthly salary (up from 10x). Suspended officers receive 10% pay (down from 25%).
- More detailed revisions in README
0.3.1:
- Added two new configurable settings: SP cost to demote officers, and whether the fleet commander skills panel should be split between personal and admiral skills.
- The fleet commander skills display will now display info for the enemy fleet in an ongoing battle, regardless of which fleet you clicked on.
- Renamed the "forget" buttons to "demote"
- Fixed an issue with the ReflectionEnabledClassLoader where it wasn't checking for findLoadedClass before calling findClass
- Various typo fixes and clarifications
0.3.0: initial release
[close]
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers
Post by: Jaghaimo on January 27, 2022, 02:37:24 AM
Wish you released it yesterday. Had been finding so many officers in a pod (4 in 2 systems) that I kept on dismissing my normal level 1 ones (early game).

Fantastic thing.
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers
Post by: Ruddygreat on January 27, 2022, 06:31:42 AM
ooooohhhhhhh, fancy!
I'll definitely download this, if only for the admiral skill overview
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers
Post by: shoi on January 27, 2022, 09:45:28 AM
the admiral skill list is a great addition
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers
Post by: SCC on January 27, 2022, 10:09:39 AM
Would it be possible to make enemy commander's combat skills and fleetwide skills show up in separate tabels, or to make demoting an officer not cost story points?
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: float on January 27, 2022, 02:53:37 PM
@Jaghaimo, Ruddygreat, shoi:
Thanks for the positive feedback!

Would it be possible to make enemy commander's combat skills and fleetwide skills show up in separate tabels, or to make demoting an officer not cost story points?

Funnily enough, I did have a version where the commander's combat and admiral skills were separated, but I didn't like that the "combat-related skills" text panel showed up twice, so I got rid of it. I added a setting for that now.

And in the original version, demoting officers cost nothing, suspending officers cost nothing, and reinstating officers cost a story point. When I playtested with those settings, I found demotion to actually be very powerful, especially in the late game where it's not too much of a hassle to grind back lost officer levels -- they basically become free rerolls at that point. I then found that the suspension feature wasn't really useful when you could just "reroll" officer skills. So yeah, that's why I decided to switch it up to the current system. Regardless, I added a setting for the number of story points demoting an officer should cost. It defaults to 1 for the reason I just mentioned, but you can set it to 0 in the mod settings, if you'd like.
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: Sundog on January 27, 2022, 05:02:42 PM
This is great! I was working on something similar, but I don't think it would've turned out as well as this. Wholesale replacement of the officer gui was the right call for sure. Well done!
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: Jaghaimo on January 28, 2022, 04:23:22 AM
Since we demote officers (level down), could you also replace vanilla text of "Level up!" with "Promote"?

Also suspend officer while neat for cost management (let's suspend unused ones until I need them later on), is weak from officers-over-limit QoL point: need to suspend weakest to sub it with the "weakest" one.

What I'd love you (actually vanilla) to do would be: only active officers (assigned to ships) count towards the "Officers: X/Y" count. So I can have 20 unsuspended ones (paying full wage), but can only assign 8 (or 10 with skills) at the given time.

Then there's this awkward thing with being able to retrain officers from a pod, but not officers that has been given elite skills (button is greyed out, could be replaced by "retrain" instead.

Finally, even if the above is not possible or done, it would be neat for suspended (and if the above is done, also unassigned) officers to learn a fraction of XP (they technically observe battles from inside the ship) - think of internship behaviour :)

Cheers!
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: float on January 28, 2022, 11:06:19 AM
This is great! I was working on something similar, but I don't think it would've turned out as well as this. Wholesale replacement of the officer gui was the right call for sure. Well done!

Thank you!

What I'd love you (actually vanilla) to do would be: only active officers (assigned to ships) count towards the "Officers: X/Y" count. So I can have 20 unsuspended ones (paying full wage), but can only assign 8 (or 10 with skills) at the given time.
Cheers!

Isn’t this functionally identical to if suspending officers were free? Since you could suspend every officer and only reinstate the ones that you wanted to put on ships. If the issue is that suspending officers costs too much, you can change it in the settings, but I do think there should be some cost associated with it. Maybe it’s a little too high right now — I could tone it down.

I think to do it the way you suggested would require a complete rewrite of the officer selection dialog. The main issue being that the first 8 (or 10) panels in the list are the only assignable ones, and this check seems to be recalculated every frame (the obfuscated officer panel class has an unobfuscated isPastMax method that is probably getting called every frame). I could extend the officer panel class with my own implementation and overwrite the isPastMax method, but the class name is obfuscated, so I would have extend it at runtime in order to avoid using the obfuscated name. Since there’s no way to dynamically extend classes at runtime (barring bytecode manipulation, but I really don’t think packaging something like bytebuddy with a mod would be a great idea), for now setting the suspension cost to 0 will have to do.

Then there's this awkward thing with being able to retrain officers from a pod, but not officers that has been given elite skills (button is greyed out, could be replaced by "retrain" instead.
Cheers!

I don’t understand this, could you elaborate, possibly with a screenshot? What button is greyed out?

Finally, even if the above is not possible or done, it would be neat for suspended (and if the above is done, also unassigned) officers to learn a fraction of XP (they technically observe battles from inside the ship) - think of internship behaviour :)

Interesting idea, though in the first scenario it would be odd for suspended officers to gain XP but unassigned officers not to. And unassigned officers (in fact, even assigned officers, if their ship doesn’t get deployed) not getting XP is just part of the base game behavior, which I don’t want to stray too far from.

Thank you for all the feedback!
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: Jaghaimo on January 29, 2022, 12:38:12 PM
Suspending vs changed logic:

- Suspending would be used to reduce long term cost of unused officers. Say you found several level 5/7 pod officers that you have no immediate use - suspend for now, maybe use later.
- Changing logic of officers count would only be used to swap an active officer with a bottom list officer (that's currently "over the limit"). All it really needs is to be able to drag an officer over the limit to be above the officer that's unassigned. Yes, this is currently possible with "unassign -> suspend -> assign new one", but the added QoL here would be doing it in bulk. Personally, I don't mind credit cost, but to pay a story point for that is too much.

Don't sweat too much, I'll make a mod for myself that lets me drop my extra officers at any colony (they will never disappear, and will just need rehire - I will call it furlough scheme).


Officers from a pod:
 
Normal officers have "Make skills elite" button that costs story point. Officers from a pod (both level 5 and 7) come with Elite skill(s), and can be retrained at will (instead of "Make skills elite" they have "Retrain" button in its place).

Now what I would expect vanilla to do (and it doesn't) is when I make a skill elite on a normal officer - for that button to disappear and "Retrain" button to be shown. Instead, we have greyed out "Make skills elite".

It is slightly more complex than that, as you can pick skills that will increase the number of Elite skills available (so that button could become usable again). Perhaps replace location of "Mentor" with retrain (only becomes active when you have at least one Elite skill)?


Suspended / officers over limit gaining XP:

They are all on board (assuming as a crew) of some ships (flagship?). Flavour wise they could be performing some duties, say comms officer, navigation officer, and thus gaining a bit of XP. This is wanted in order so that we can level up a "second set" of officers, as sometimes you may want to play with different fleets (SO fleet, carrier heavy, low tech derelict fleet), and would like to avoid cheating via Console Commands.
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: float on January 29, 2022, 01:15:25 PM
Suspending vs changed logic:
- Changing logic of officers count would only be used to swap an active officer with a bottom list officer (that's currently "over the limit"). All it really needs is to be able to drag an officer over the limit to be above the officer that's unassigned. Yes, this is currently possible with "unassign -> suspend -> assign new one", but the added QoL here would be doing it in bulk. Personally, I don't mind credit cost, but to pay a story point for that is too much.

I agree this isn't ideal, but there is no story point cost -- it only costs credits to suspend an officer, whereas demoting an officer (reducing their skills) costs a story point. Now that you mention this behavior, though, it *is* a bit odd and annoying. I've been looking at andylizi's mods and found out that he was able to extend an obfuscated class by extending a dummy class instead and modifying the bytecode specifically for the extended class's name at runtime prior to loading the class, which is really clever. I could do something like that, though I feel like I'd want to get his permission because it's definitely not something that I would have thought of on my own.

Although, if I do implement your suggestion, I have the feeling that suspending officers will just be useless, since I don't think officers' salary is high enough to really care about suspending them, especially when you have colonies churning out hundreds of thousands of credits a month...

Now what I would expect vanilla to do (and it doesn't) is when I make a skill elite on a normal officer - for that button to disappear and "Retrain" button to be shown. Instead, we have greyed out "Make skills elite".

You're probably encountering this because vanilla only allows max level officers to be retrained. Officers from a pod are max level when you get them so they can be immediately retrained. Normal officers, in addition to needing to be max level, must also have all available elite skills before they can be retrained. If both criteria are met, the the "make skills elite" button turns into a "retrain" button. I don't mind the max level requirement, but the elite skills requirement is imo just bad because it means that if you have cybernetic augmentation and officer training, you need to spend 4 story points on an officer before you can retrain them (which itself costs yet another story point).
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: Jaghaimo on January 29, 2022, 02:00:10 PM
Thanks for explaining in details. This is actually my first 0.95.1a play through (yes, I mod too much) so wasn't aware of exact ins and outs :)
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: Ruddygreat on January 29, 2022, 04:53:23 PM
where does the "demote" button show up?
i've got an officer to level 5, but they've only got the options to suspend / dismiss / retrain

Spoiler
(https://cdn.discordapp.com/attachments/815735963090944010/937147554381037588/screenshot143.png)
[close]

could this have anything to do w/ adding the mod to an ongoing save?
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: float on January 29, 2022, 06:50:55 PM
where does the "demote" button show up?
i've got an officer to level 5, but they've only got the options to suspend / dismiss / retrain

Spoiler
(https://cdn.discordapp.com/attachments/815735963090944010/937147554381037588/screenshot143.png)
[close]

could this have anything to do w/ adding the mod to an ongoing save?

Click on a skill icon to prime it for removal (it will become translucent). If at least one skill is primed for removal, and the officer isn’t capable of leveling up, the suspend button should change into a demote button.
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: Ruddygreat on January 30, 2022, 05:43:55 AM

<my post>


Click on a skill icon to prime it for removal (it will become translucent). If at least one skill is primed for removal, and the officer isn’t capable of leveling up, the suspend button should change into a demote button.

ooooohohhhhhhhhhhhhh, that's cool as hell (and I never would've guessed it)
you should update the "demote officers" section of the op with that, the way it's laid out implies to me that there'll be a demote button that pops up a similar thing to the vanilla "retrain" menu
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: Farlarzia on January 30, 2022, 06:01:46 AM
Hello - I was just wondering if this mod will correctly work for high level officers above the usual level cap - I.E I find one of those fancy level 7 officers, they have terrible skills. If I drop their level, can I bring them back to 7?
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: float on January 30, 2022, 08:39:34 AM
You know, I’m actually not sure, considering I’ve never found one with this mod active and don’t know how to spawn one. Feel free to save, try it, and report back with the results.

One thing I do know is that because suspended officers aren’t actually in your fleet, skill effects like officer training and cybenetic augmentation don’t apply, so e.g if you demote a suspended officer who has 2 elite skills by making that officer lose an elite skill, you won’t be able to add another elite skill until you reinstate them.

By the way, if you do encounter an issue with the high level cryopod officers, it would be really helpful if you could upload your save file and enabled_mods.json (just prior to obtaining the officer would be ideal, but any save with the officer would work too!), so that I don’t have to scan an entire system looking for one to test on.

ooooohohhhhhhhhhhhhh, that's cool as hell (and I never would've guessed it)
you should update the "demote officers" section of the op with that, the way it's laid out implies to me that there'll be a demote button that pops up a similar thing to the vanilla "retrain" menu

Done, hopefully it’s clearer now.
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: Ruddygreat on January 31, 2022, 11:10:49 AM
You know, I’m actually not sure, considering I’ve never found one with this mod active and don’t know how to spawn one. Feel free to save, try it, and report back with the results.

One thing I do know is that because suspended officers aren’t actually in your fleet, skill effects like officer training and cybenetic augmentation don’t apply, so e.g if you demote a suspended officer who has 2 elite skills by making that officer lose an elite skill, you won’t be able to add another elite skill until you reinstate them.

By the way, if you do encounter an issue with the high level cryopod officers, it would be really helpful if you could upload your save file and enabled_mods.json (just prior to obtaining the officer would be ideal, but any save with the officer would work too!), so that I don’t have to scan an entire system looking for one to test on.

just tested this and yep, level 7 officers can't level up any more if you demote them
however, level 7 officers do have this in their bit in the save file (cba to upload my whole file rn), hopefully this helps
Code
<e>
<st>$exceptionalSleeperPodOfficer</st>
<bp>true</bp>
</e>
Title: Re: [0.95.1a] Officer Extension -- suspend and demote officers (0.3.1)
Post by: float on February 01, 2022, 01:37:30 PM
just tested this and yep, level 7 officers can't level up any more if you demote them
however, level 7 officers do have this in their bit in the save file (cba to upload my whole file rn), hopefully this helps
Code
<e>
<st>$exceptionalSleeperPodOfficer</st>
<bp>true</bp>
</e>

Thanks for finding that flag! Upon testing myself, I believe that this is vanilla behavior. You can actually confirm this yourself as follows: retrain an "exceptional cryopod" officer and deselect some elite skills (but don't reassign them). After you confirm the retraining, try to retrain again -- you'll see that the maximum number of elite skills has gone down.

Internally, this is because of how OfficerLevelUpPluginImpl.getMaxEliteSkills works. You can see the code here:

Code
public int getMaxEliteSkills(PersonAPI person) {
int bonus = 0;
if (person != null) {
MutableCharacterStatsAPI stats = person.getFleetCommanderStats();
if (stats != null) {
bonus = (int) stats.getDynamic().getMod(Stats.OFFICER_MAX_ELITE_SKILLS_MOD).computeEffective(0);
}
}
return (int) Global.getSettings().getFloat("officerMaxEliteSkills") + bonus;
}
It is only considering the OFFICER_MAX_ELITE_SKILLS_MOD of the officer's fleet commander -- that's you, the player. This is the same for the max level calculation. I searched around and found no mention of any special behavior with the $exceptionalSleeperPodOfficer flag enabled.
Since I think this is a bug, I'll try to find a way to fix it for the next update (which, by the way, will be rather big, and should be coming soon).

Edit:
0.4.0 is up. @Jaghaimo: I ended up finding a ... let's say very interesting ... way of implementing the feature you requested where only assigned officers would count toward the officer limit. Turns out the officer's panel in the dialog has its own flag for whether an officer is a mercenary, so turning that flag on causes it to disregard any "is past max" checks while not actually affecting the underlying officer.
Title: Re: [0.95.1a] Officer Extension (0.4.0)
Post by: Ruddygreat on February 03, 2022, 02:23:40 AM
oh wow, this custom tag stuff is really impressive!

Though I do have 2 main suggestions for you -

otherwise it's all v slick, I've got a few tiny gripes with the UI but i'll need to play some more to figure out what i actually have to say about it
Title: Re: [0.95.1a] Officer Extension (0.4.0)
Post by: float on February 03, 2022, 07:47:42 AM
oh wow, this custom tag stuff is really impressive!

Though I do have 2 main suggestions for you -
  • Since you can make a button for each custom tag, can you extend that to the "edit tags" menu & add buttons to automatcally put tags in?
  • Can you add a set of premade tags for specialisations that aren't covered by specific skils (like "level 7", "Armour", "Frigate" etc (or a field in the settings file where we can add them ourselves)), it's a small thing but not having to remake them every save is a nice timesaver

otherwise it's all v slick, I've got a few tiny gripes with the UI but i'll need to play some more to figure out what i actually have to say about it

Thanks for the feedback!

I’ll see what I can do about your first suggestion. It should be possible with some finessing.

As for your second suggestion, I was thinking of adding premade tags for personality and the exceptional cryopod status, but I’m not sure what you mean by having premade tags for e.g frigate and armor. How would I tell whether an officer counts as a “frigate” or “armor” officer? These seem like good custom tag candidates but imo wouldn’t work well as a premade tag (people can have differing opinions on what exactly constitutes a good officer for frigates, etc.).
Title: Re: [0.95.1a] Officer Extension (0.4.0)
Post by: Ruddygreat on February 03, 2022, 08:46:55 AM
As for your second suggestion, I was thinking of adding premade tags for personality and the exceptional cryopod status, but I’m not sure what you mean by having premade tags for e.g frigate and armor. How would I tell whether an officer counts as a “frigate” or “armor” officer? These seem like good custom tag candidates but imo wouldn’t work well as a premade tag (people can have differing opinions on what exactly constitutes a good officer for frigates, etc.).

Ah, I probably didn't explain myself correctly
I meant more as an extension of the custom tag buttons thing - don't assign them from anything that's inherent to the officer (excl. personality & exceptional status, those are a good idea), instead add a set of fairly generic tags & allow the user to assign them on their own (without / before setting up manual, specific tags).

hopefully this makes more sense
Title: Re: [0.95.1a] Officer Extension (0.4.0)
Post by: float on February 03, 2022, 09:12:37 PM
Updated to v0.4.1:
- Overhaul the "edit tags" feature. Now allows you to add tags individually as well as select from a list of all custom-defined tags.
- Add filters for personality and the "exceptional sleeper pod" status
- Allow filtering for elite versions of skills
- Sorting now takes number of elite skills into account

Ah, I probably didn't explain myself correctly
I meant more as an extension of the custom tag buttons thing - don't assign them from anything that's inherent to the officer (excl. personality & exceptional status, those are a good idea), instead add a set of fairly generic tags & allow the user to assign them on their own (without / before setting up manual, specific tags).
I understand now. I still didn't end up implementing this, and here's why:
- Consider the list of all possible "common" user-defined tags that someone might want to add (all ship sizes, low-high tech, all faction names, etc. etc.) If I were to enumerate all of them as pre-defined custom tags, we'd be looking at a very, very big scroll bar. And it's likely that each playthrough would only use a small subset of those tags.
- It only saves typing each tag once per save, since once you type that tag once it appears as a possible selection when editing tags for all other officers (with the new 0.4.1 interface overhaul).
Title: Re: [0.95.1a] Officer Extension (0.4.1)
Post by: Jaghaimo on February 04, 2022, 01:18:47 AM
I think what Ruddy is asking for is the ability to define them in a csv file (or json if we want to add colors to them etc). Your mod would come with either an empty file, or a file with some basic tags that target a rather generic use-case. The externalization via this file would allow the power user to tailor the list to their liking.

Edit: thanks for the update, much appreciated your support version checker. If you could also include a direct link in your version file, it would allow Mod Manager to auto-update your mod. See: https://github.com/jaghaimo/starpocalypse/blob/master/assets/starpocalypse.version
Title: Re: [0.95.1a] Officer Extension (0.4.1)
Post by: float on February 04, 2022, 08:23:04 AM
I think what Ruddy is asking for is the ability to define them in a csv file (or json if we want to add colors to them etc). Your mod would come with either an empty file, or a file with some basic tags that target a rather generic use-case. The externalization via this file would allow the power user to tailor the list to their liking.

Edit: thanks for the update, much appreciated your support version checker. If you could also include a direct link in your version file, it would allow Mod Manager to auto-update your mod. See: https://github.com/jaghaimo/starpocalypse/blob/master/assets/starpocalypse.version

Sure, I can do that, won’t take much time to implement a “persistent tags” field in the mod settings.

Never heard of Mod Manager. Are you involved in its development? If so, can you modify the script to obtain the download link directly from the “releases” Github API?

Example GET request:
 https://api.github.com/repos/qcwxezda/Starsector-Officer-Extension/releases/latest  (https://api.github.com/repos/qcwxezda/Starsector-Officer-Extension/releases/latest)

The browser download link is under assets/browser_download_url. I wish Nexerelin’s version checker did this as well, e.g by parsing the tag name. It would be a huge QoL upgrade to not have to manually update external version files.

Edit: made a request under that mod.
Title: Re: [0.95.1a] Officer Extension (0.4.1)
Post by: Ruddygreat on February 04, 2022, 11:33:56 AM
I think what Ruddy is asking for is the ability to define them in a csv file (or json if we want to add colors to them etc). Your mod would come with either an empty file, or a file with some basic tags that target a rather generic use-case. The externalization via this file would allow the power user to tailor the list to their liking.

Edit: thanks for the update, much appreciated your support version checker. If you could also include a direct link in your version file, it would allow Mod Manager to auto-update your mod. See: https://github.com/jaghaimo/starpocalypse/blob/master/assets/starpocalypse.version

Sure, I can do that, won’t take much time to implement a “persistent tags” field in the mod settings.

yep, was asking for exactly this, thanks! (and thanks Jag for clarifying!)

Title: Re: [0.95.1a] Officer Extension (0.4.2)
Post by: float on February 06, 2022, 09:56:14 AM
Updated to 0.4.2:
- Add a field for persistent tags for filtering officers in the mod settings. Persistent tags will always be shown before any other custom-defined tags and will be shown even if you don't have any officers with that tag.
- Change all getMemory to getMemoryWithoutUpdate. This should fix crash bugs for officers with empty rank, post, name, etc.

Note that I don't have and have never used the secrets of the frontier mod (thanks Histidine for identifying the incompatibility), so this fix is untested (but should work based on the crash log I saw). If there are still issues with special officers will empty properties, please let me know by replying to this forum thread.
Title: Re: [0.95.1a] Officer Extension (0.4.2)
Post by: starman13 on February 08, 2022, 05:09:29 PM
Thanks for this mod.

I've noticed that after installing the mod that the game no longer starts paused when loading a save. I tested with no other mods installed and the same thing happens.
Title: Re: [0.95.1a] Officer Extension (0.4.2)
Post by: float on February 09, 2022, 12:20:20 PM
Thanks for this mod.

I've noticed that after installing the mod that the game no longer starts paused when loading a save. I tested with no other mods installed and the same thing happens.

Thanks for finding this! I checked and you're right -- this mod is unsetting the game's paused state on the first frame, which is something I didn't even notice had changed. I've fixed this in dev.
Title: Re: [0.95.1a] Officer Extension (0.4.2)
Post by: TheLaughingDead on February 23, 2022, 06:30:18 PM
Any reason this mod isn't on the Mod Index page? It's great!
Title: Re: [0.95.1a] Officer Extension (0.4.2)
Post by: pearagon on March 31, 2022, 05:18:04 PM
Any reason this mod isn't on the Mod Index page? It's great!

It's still a work in progress.
Title: Re: [0.95.1a] Officer Extension (0.4.2)
Post by: Chairman Suryasari on April 13, 2022, 04:21:03 PM
The mod crash the game when I try to load the officer UI in the Linux version of the game I don't know if Mac or Windows have this issue or not.

Quote
568447 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: com.fs.starfarer.coreui.CaptainPickerDialog.getListOfficers()Lcom/fs/starfarer/coreui/o0o0;
java.lang.NoSuchMethodError: com.fs.starfarer.coreui.CaptainPickerDialog.getListOfficers()Lcom/fs/starfarer/coreui/o0o0;
at officerextension.CoreScript.injectCaptainPickerDialog(CoreScript.java:146)
at officerextension.CoreScript.advance(CoreScript.java:123)
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.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Title: Re: [0.95.1a] Officer Extension (0.4.2)
Post by: float on April 17, 2022, 02:20:47 PM
The mod crash the game when I try to load the officer UI in the Linux version of the game I don't know if Mac or Windows have this issue or not.

Quote
568447 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NoSuchMethodError: com.fs.starfarer.coreui.CaptainPickerDialog.getListOfficers()Lcom/fs/starfarer/coreui/o0o0;
java.lang.NoSuchMethodError: com.fs.starfarer.coreui.CaptainPickerDialog.getListOfficers()Lcom/fs/starfarer/coreui/o0o0;
at officerextension.CoreScript.injectCaptainPickerDialog(CoreScript.java:146)
at officerextension.CoreScript.advance(CoreScript.java:123)
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.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Ahh, my bad, that was due to Linux and PC versions of the game having different obfuscation seeds, so the return type of getListOfficers (a base game method) was different between Linux and PC. I released a fix for this.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Surgeol on April 21, 2022, 05:37:06 AM
When I'm trying to open the F menu, game will throw an error and crash(with only this mod activaed)
I don't know why this happened  :P
Here is the log
75146 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Renderer's graphics object not found
java.lang.RuntimeException: Renderer's graphics object not found
   at officerextension.ui.Button.getText(Button.java:82)
   at officerextension.FleetPanelInjector.getAutoAssignButton(FleetPanelInjector.java:212)
   at officerextension.FleetPanelInjector.advance(FleetPanelInjector.java:44)
   at officerextension.CoreScript.advance(CoreScript.java:101)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
[close]
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: float on April 21, 2022, 09:21:37 AM
When I'm trying to open the F menu, game will throw a error and crash(with only this mod activaed)
I don't know why this happened  :P
Here is the log
75146 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Renderer's graphics object not found
java.lang.RuntimeException: Renderer's graphics object not found
   at officerextension.ui.Button.getText(Button.java:82)
   at officerextension.FleetPanelInjector.getAutoAssignButton(FleetPanelInjector.java:212)
   at officerextension.FleetPanelInjector.advance(FleetPanelInjector.java:44)
   at officerextension.CoreScript.advance(CoreScript.java:101)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
[close]

That’s odd. Can you let me know:

- what version of the game you’re on (e.g. 0.95.1a RC6 or 0.95 RC15)
- what OS you’re using
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Surgeol on April 21, 2022, 09:10:19 PM
When I'm trying to open the F menu, game will throw a error and crash(with only this mod activaed)
I don't know why this happened  :P
Here is the log
75146 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Renderer's graphics object not found
java.lang.RuntimeException: Renderer's graphics object not found
   at officerextension.ui.Button.getText(Button.java:82)
   at officerextension.FleetPanelInjector.getAutoAssignButton(FleetPanelInjector.java:212)
   at officerextension.FleetPanelInjector.advance(FleetPanelInjector.java:44)
   at officerextension.CoreScript.advance(CoreScript.java:101)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
[close]

That’s odd. Can you let me know:

- what version of the game you’re on (e.g. 0.95.1a RC6 or 0.95 RC15)
- what OS you’re using
I'm using 0.95.1a RC6, and running it at windows 10(21H2)
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: float on April 22, 2022, 11:26:33 AM
I'm unable to reproduce this error. Just to be clear, is it happening every time you press F, or just occasionally/rarely?

Only thing that I can think of is that you've renamed base game packages, maybe? It's looking for something in the package "com.fs.graphics", so if you renamed that or it's not there, you'd get this error.

Try replacing the jar file in Officer Extension/jars with the attached one, it changes the way the mod looks for that object.



[attachment deleted by admin]
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Surgeol on April 22, 2022, 05:27:32 PM
I'm unable to reproduce this error. Just to be clear, is it happening every time you press F, or just occasionally/rarely?

Only thing that I can think of is that you've renamed base game packages, maybe? It's looking for something in the package "com.fs.graphics", so if you renamed that or it's not there, you'd get this error.

Try replacing the jar file in Officer Extension/jars with the attached one, it changes the way the mod looks for that object.
The same error still occurs, thanks for your reply though.
Eh, I found you are right.
I'm using the Starsector Chineses Translation (https://github.com/TruthOriginem/Starsector-0951-Localization) version, which replaced some base game packages with translated ones.
And I made a test, the error is indeed caused by this.
Here are the steps to reproduce the bug
  • Prepare a copy of the original game.
  • Download the translation files (https://github.com/TruthOriginem/Starsector-0951-Localization/archive/refs/heads/main.zip) and decompress it.
  • Copy all of the files in ..\Starsector-0951-Localization-main\localization, paste them into ..\Starsector\starsector-core(select replace if some files already exists).
  • install the mod and start a new game, click F, boom.
[close]
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: float on April 23, 2022, 03:01:24 PM
Yeah, this mod isn't going to support the Chinese translation pack anyway regardless of the weird error message, which after some testing I believe is due to the Chinese version either using a different class for button objects or modifying existing buttons (i.e. changing them to a wrapper class). In addition to modifying all of the core Starsector files, the translation pack translates button text to Chinese (obviously). This mod finds buttons and such by reading their text (i.e. it reads the "level up" text from the level up button), so it was never going to work.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: mlight9 on April 26, 2022, 08:04:41 PM
How can I delete a tag?
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: float on April 28, 2022, 05:37:41 PM
How can I delete a tag?

Right now the only way to delete a tag is to remove it from all officers that have it (you can easily do this by filtering officers with the tag).
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Chairman Suryasari on May 11, 2022, 05:09:41 AM
Sorry to bother you, but I wanna to ask, will this mod add feature to display all skill selections when leveling up officer? I hate when my low tech can get skill that I don't use like Energy Mastery or defensive skill like armor skill, I love playing it reckless with a focus on out damaging the enemy fleet.

Thanks!
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: float on May 11, 2022, 05:34:06 PM
Sorry to bother you, but I wanna to ask, will this mod add feature to display all skill selections when leveling up officer? I hate when my low tech can get skill that I don't use like Energy Mastery or defensive skill like armor skill, I love playing it reckless with a focus on out damaging the enemy fleet.

Thanks!

That’s what demoting officers is for. It allows you to reroll skills that you were forced into picking (or that officers already had when you hired/found them). It’s not free, though, since you have to spend story points and re-level them, but I prefer it that way. Having officer skill selection be based on relevance to the ship/weapons that officer is using is an interesting idea, though.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: intrinsic_parity on May 14, 2022, 06:09:52 PM
Do suspended officers factor into bonus XP calculations? IIRC non-assigned officers do.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: float on May 15, 2022, 10:46:10 AM
Do suspended officers factor into bonus XP calculations? IIRC non-assigned officers do.

Yes, they do. If you have a lot of suspended officers you will probably not be getting much bonus xp, unless you also don’t have many ships in your fleet (the maximum number of officers counted towards “combat difficulty” is capped by the number of ships you have). This is all done in one of the core game files, which is of course oblivious to modded officer statuses.

Edit: I did actually play around with changing battle difficulty computations, but ultimately decided that it wasn’t worth it because the file that it’s done in (FleetEncounterContext) also has a lot of other functions that other mods might want to override, and two mods that override that same file would likely be incompatible.

A PluginPick<FleetEncounterContext> would be a nice solution to have.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: TheHZDev on July 15, 2022, 09:00:21 AM
Sir, can you allow me to update this mod with Chinese localization to the Chinese Starsector Forum(https://fossic.org)?
I has solved the problem that this mod will raise error in Chinese Game.
Thank you very much.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: sanya02 on August 08, 2022, 07:02:34 AM
202654 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Could not find the "idle officers: x" text in the fleet info panel
java.lang.RuntimeException: Could not find the "idle officers: x" text in the fleet info panel
   at officerextension.FleetPanelInjector.replaceNumIdleOfficersLabel(FleetPanelInjector.java:177)
   at officerextension.FleetPanelInjector.advance(FleetPanelInjector.java:46)
   at officerextension.CoreScript.advance(CoreScript.java:101)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Space Cowboy on August 14, 2022, 09:03:30 AM
This mod is amazing. Would you be able to add a feature to change officer portraits by any chance? I often turn down perfectly good officers because they have the same portrait as another officer in my fleet.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Oni on August 14, 2022, 10:40:03 AM
This mod is amazing. Would you be able to add a feature to change officer portraits by any chance? I often turn down perfectly good officers because they have the same portrait as another officer in my fleet.
The VIC faction has ways of changing Captain portraits.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: float on September 07, 2022, 09:53:28 AM
202654 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Could not find the "idle officers: x" text in the fleet info panel
java.lang.RuntimeException: Could not find the "idle officers: x" text in the fleet info panel
   at officerextension.FleetPanelInjector.replaceNumIdleOfficersLabel(FleetPanelInjector.java:177)
   at officerextension.FleetPanelInjector.advance(FleetPanelInjector.java:46)
   at officerextension.CoreScript.advance(CoreScript.java:101)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)

Hmm… this could be caused by a translation pack or similar. The way the mod gets UI elements is flimsy and definitely not ideal but it’s the only solution for things not exposed in the API.

This mod is amazing. Would you be able to add a feature to change officer portraits by any chance? I often turn down perfectly good officers because they have the same portrait as another officer in my fleet.

The base game already has a system in place for that, I believe. Officers have a portrait pool that depletes based on the portraits you already have, with duplicates being allowed only affer that pool has been exhausted.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: TheHZDev on September 08, 2022, 04:54:47 AM
What happened recently, you disappeared from the forum for months without a reply?
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: SamMAVRS on September 11, 2022, 11:00:28 PM
Hey there Mod Master,
i keep getting this Error. cant for the life of me figure out whats up. Really trying to do my next run with you mod.
Code
74628 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [officerextension.plugin.OfficerExtension]
java.lang.RuntimeException: Error loading [officerextension.plugin.OfficerExtension]
at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: officerextension.plugin.OfficerExtension
at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: float on September 13, 2022, 06:46:45 AM
Hey there Mod Master,
i keep getting this Error. cant for the life of me figure out whats up. Really trying to do my next run with you mod.
Code
74628 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [officerextension.plugin.OfficerExtension]
java.lang.RuntimeException: Error loading [officerextension.plugin.OfficerExtension]
at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: officerextension.plugin.OfficerExtension
at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

Try deleting the entire Officer Extension folder and reinstalling.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Stormy Fairweather on September 18, 2022, 08:25:05 PM
Been trying to figure out the point of suspending officers. you pay 12 months salary up front in exchange for a 90% reduction in their monthly pay... so that over the course of a year you pay 110% of what you would have otherwise in exchange for... what? you can already hire over cap thanks to the mod, it does the opposite of saving you money, and really just seems an entirely pointless feature. what am i missing?
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Dadada on September 19, 2022, 06:39:47 AM
Been trying to figure out the point of suspending officers. you pay 12 months salary up front in exchange for a 90% reduction in their monthly pay... so that over the course of a year you pay 110% of what you would have otherwise in exchange for... what? you can already hire over cap thanks to the mod, it does the opposite of saving you money, and really just seems an entirely pointless feature. what am i missing?
Do you want to re-level your specialized officers once you change your fleet composition for the fifth time? It is handy to have different officers for different ships and ship types... The investment in time and story points for another batch of officers is uhhhh... Aaand how much do officers not suspended cost per month? ;)
E: So once a year passes... And what about 2 super level 7 officers you find in the exploration phase 3 cycles before you start ehh make a proper fleet?
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Stormy Fairweather on September 19, 2022, 11:23:32 AM
you didnt answer my question. when you suspend an officer, you pay MORE than you would have otherwise for zero benefit. this mod ALREADY allows you to recruit over 8 officers, you just cant have more than 8 assigned. but when you suspend your officers you pay their salary for a year in advance (so you already are paying as much as you would have otherwise right there, except you are paying it up front) and then you ALSO pay an additional 10% per month to these guys you already paid for a year.

you dont need to suspend officers to recruit over cap. you dont save money suspending them. being suspended confers no functional benefit, and costs more.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: cytokine on September 20, 2022, 05:36:44 AM
Hey, this is just what I've been looking for. Works great. And you even have an option for adjusting the fee for suspending officers; I couldn't tell that from the description. One minor suggestion: I have the "suspendOfficerCostMultiplier" set to zero, but I still have to confirm suspension despite it costing nothing. Would it be possible to skip the conformation popup if the cost is zero, or disable it with a bool option? Swapping out ten officers only takes half a minute so it would just be a tiny improvement, but still. Anyhow, a vanilla-tier mod!
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Dadada on September 20, 2022, 06:01:36 AM
I had the wrong impression that you still could _not_ swap officers gained over the officer limit of x on ships once you hit your limit (like in vanilla) despite being able to hire more officers with the mod, so I booted up the game to test the functions of this mod, so apparently you can freely switch all officers you currently have with this mod, so that argument, my argument with the officer rotation for different fleet compositions falls flat, except for the money saving part over time x, that is still correct. You break almost even once you hit 13 months and start saving money once you paid the reduced salary for month 14.

you dont need to suspend officers to recruit over cap.
That is correct
you dont save money suspending them. being suspended confers no functional benefit, and costs more.
You do save money after a certain period, you break almost even after 13 months (12 months upfront and 1,3 months of salary over 13 months), so once you pay for month 14 you start saving money... So what is left: You save long term, while I personally really don't care or need that feature, it would or could, in theory, save me a lot of dosh if I find usable officers in the exploration phase, especially if I only explore and don't fight which means I do not need officers, and depending on my mood the (pure) exploration phase may easily take several cycles.

In the end it all depends on the play style (for the current run). ;)
E: fix'd*
E: fix'd2
E3: So in short: You don't need the feature, I most likely don't need the feature but as you and I know, you start saving after a period of time so the feature is not without use, in fact there are certainly people out there who find it useful, and I'd wager the mod maker is one of them. ;)
E33: The feature is also somewhat in line with storing stuff at abandoned stations and I love abandoned stations, at least before I get my colonies.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Stormy Fairweather on September 20, 2022, 07:12:38 AM
for some reason i had assumed the suspension only lasted one year.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Damonvi on September 21, 2022, 08:04:30 AM
I'd love to see an "unbalanced" addition to this mod, where you can increase the max cap of deployed officers, turned off by default of course, and only enabled and adjusted in the json files.

I completely understand the significance of balance by not having this feature, but it would still be cool to have it as an option.

I've tried to dive into the base game settings to see if I could increase the amount of bonus officers from the skills, but I don't think I looked deep enough to find where I could change it.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: cytokine on September 22, 2022, 01:23:36 AM
I'd love to see an "unbalanced" addition to this mod, where you can increase the max cap of deployed officers, turned off by default of course, and only enabled and adjusted in the json files.

I completely understand the significance of balance by not having this feature, but it would still be cool to have it as an option.

I've tried to dive into the base game settings to see if I could increase the amount of bonus officers from the skills, but I don't think I looked deep enough to find where I could change it.
Why not just raise baseNumOfficers?
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: DanzyDanz on October 03, 2022, 11:17:26 PM
FYI, Quality Captain borks the filter UI
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Damonvi on October 05, 2022, 08:20:28 PM
I'd love to see an "unbalanced" addition to this mod, where you can increase the max cap of deployed officers, turned off by default of course, and only enabled and adjusted in the json files.

I completely understand the significance of balance by not having this feature, but it would still be cool to have it as an option.

I've tried to dive into the base game settings to see if I could increase the amount of bonus officers from the skills, but I don't think I looked deep enough to find where I could change it.
Why not just raise baseNumOfficers?

it seems silly to increase the base number, when there's skills that add 4 more officer slots in vanilla. i feel like this mod could/should adjust those skill perks to be much more than +2, so as to only modify officer cap when this mod is enabled.

so rather than doing a base amount change that changes [6+2+2=10] to something like [12+2+2=16], you get something like [6+6+6=18]. there's still work involved in increasing your officer cap, but you get a higher officer cap later on.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: jercar on October 12, 2022, 04:27:02 PM
I've been having problems getting the mod to work when I put it in a mod pack the game stops working and it says the cause is the plugin file.
any idea how to fix it
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: MrNage on November 10, 2022, 10:14:36 AM
Have you ever thought about the concept of "retiring" your officers? Once they reach max level (if weren't already), spend SP to permanently send them off with a lump-sum pension/severance in exchange for bonus experience. Though you can't do it as soon as they capped: once your officers max, they either have to stay in your fleet for a set number of days (recorded) or they accrue enough enemy Fleet Points in battles (that they participated in; personal kills may not be necessary), whichever comes first. Additional considerations include whether (or how many times) you have mentored/demoted/retrained them, and whether they are level 5+.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: StriderGunship on January 29, 2023, 04:37:42 AM
Can I demote cryopod officers? Or they'll lose extra levels and elite skills?

P.S. Can you also add a version that allows you to edit officer skills the same way you can with AI core officers if it's possible?
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Rambo615 on February 25, 2023, 12:11:07 PM
Can I demote cryopod officers? Or they'll lose extra levels and elite skills?

P.S. Can you also add a version that allows you to edit officer skills the same way you can with AI core officers if it's possible?

Pretty  sure it screws  them, they  won't  get the 7th skill again.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Remimi on March 16, 2023, 02:48:30 PM
I think this is borked on officer promotion, it's listed as x/<whatever your current limit is>, and you can't promote

Looking in the javadocs here https://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/impl/campaign/intel/PromoteOfficerIntel.html (https://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/impl/campaign/intel/PromoteOfficerIntel.html) how would you override the check and re-enable the button?

Sorry, new here and my java's rusty
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: Gilgamesh on March 22, 2023, 05:44:55 PM
I think this is borked on officer promotion, it's listed as x/<whatever your current limit is>, and you can't promote

Looking in the javadocs here https://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/impl/campaign/intel/PromoteOfficerIntel.html (https://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/impl/campaign/intel/PromoteOfficerIntel.html) how would you override the check and re-enable the button?

Sorry, new here and my java's rusty

I ran into an issue that may be related to this where I couldn't promote captains after I got to level 40 with this mod and the mod "A New Level (Of Confidence, and Power) a Max Level Increasing Mod v2.1" activated. It seems I was able to resolve it after deactivating another mod called "Quality Captains: A Skill Rework v1.1.1". I think that the issue was some sort of unique interaction between three mods as when I had just "Officer Extension" activated and gave myself max levels, I was still able to promote captains and no issue when I reactivated A New Level.

I will post if the issue comes back as it's not like I was testing thoroughly here so I may have missed something.
Title: Re: [0.95.1a] Officer Extension (0.4.3)
Post by: organicmeme on April 15, 2023, 03:52:48 PM
Officers are not spawning with nor gaining leadership skills anymore. I don't know if it's a vanilla thing as I hadn't played in a good while. Or is this mod at fault?
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on May 05, 2023, 11:30:17 AM
(Just updated the version number for 0.96a compatibility, doesn't seem like anything broke as a result)

Officers are not spawning with nor gaining leadership skills anymore. I don't know if it's a vanilla thing as I hadn't played in a good while. Or is this mod at fault?
Vanilla thing

I think this is borked on officer promotion, it's listed as x/<whatever your current limit is>, and you can't promote

Looking in the javadocs here https://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/impl/campaign/intel/PromoteOfficerIntel.html (https://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/impl/campaign/intel/PromoteOfficerIntel.html) how would you override the check and re-enable the button?

Sorry, new here and my java's rusty
Oh I see, you mean the "officer promotion candidate" event. Yeah, I kind of forgot that even existed.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Liral on May 09, 2023, 09:35:17 PM
Hey float,

I would have more fun if this mod had an Officers Aboard mode removing the assigned officer limit, and I wonder if the other users would enjoy it.  To keep overall player power the same, officers would cost less money but level up more slowly with every level.  Do you find the idea feasible?

Liral
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on May 09, 2023, 09:42:27 PM
Hey float,

I would have more fun if this mod had an Officers Aboard mode removing the assigned officer limit, and I wonder if the other users would enjoy it.  To keep overall player power the same, officers would cost less money but level up more slowly with every level.  Do you find the idea feasible?

Liral

If I understand correctly, what you want is already available in the base game via settings.json. “baseNumOfficers” is what you’re looking for, I believe. Just set it to something like 1000.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Liral on May 09, 2023, 09:53:54 PM
If I understand correctly, what you want is already available in the base game via settings.json. %u201CbaseNumOfficers%u201D is what you%u2019re looking for, I believe. Just set it to something like 1000.

That's the first third of my suggestion: I want to put an officer on every ship, reduce officer pay to keep the same overall cost, and slow officer leveling to maintain power balance with enemy fleets.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on May 09, 2023, 10:14:49 PM
That's the first third of my suggestion: I want to put an officer on every ship, reduce officer pay to keep the same overall cost, and slow officer leveling to maintain power balance with enemy fleets.

Well the obvious balancing lever would be to make enemy fleets similarly uncapped in number of officers, which I’m sure baseNumOfficers already does. And for the second part, not sure what you’re aiming for. Do you mean, e.g. want to pay, say, 10k credits per month on officers regardless of the amount, so if you have 5 officers you pay each 2k/month and if you have 50 officers you pay each 200/month? That seems arbitrary and it makes more sense to me to at if you field more officers, you incur greater upkeep. Also not really sure how slowing officer leveling maintains power balance considering that they still reach max level eventually. Regardless, there’s probably an officer xp multiplier somewhere in settings.json.

So my understanding then is that you’d like to have very large fleets with upwards of 30 officers, but find the cost unmanageable? Actually, I’m pretty sure base officer pay and officer pay gain per level are also in settings.json, so you could just reduce them.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Liral on May 10, 2023, 06:15:42 AM
Well the obvious balancing lever would be to make enemy fleets similarly uncapped in number of officers, which I’m sure baseNumOfficers already does.

Well, that's good news. I'll see if it does!

Quote
And for the second part, not sure what you’re aiming for. Do you mean, e.g. want to pay, say, 10k credits per month on officers regardless of the amount, so if you have 5 officers you pay each 2k/month and if you have 50 officers you pay each 200/month? That seems arbitrary and it makes more sense to me to at if you field more officers, you incur greater upkeep.

Not quite.  More like reduce officer costs by about 27-33% because a fleet has 30 ships and the player used to have at most 8-10 officers, so a full set of officers would cost the same as before.

Quote
Also not really sure how slowing officer leveling maintains power balance considering that they still reach max level eventually. Regardless, there’s probably an officer xp multiplier somewhere in settings.json.

Eventually being the key word.  Most player runs end early, from what I have seen, so slowing leveling would meaningfully reduce total officer power.  That said, if enemy fleets would have similar officer counts, this lever might be unnecessary.

Quote
So my understanding then is that you’d like to have very large fleets with upwards of 30 officers, but find the cost unmanageable? Actually, I’m pretty sure base officer pay and officer pay gain per level are also in settings.json, so you could just reduce them.

I want the player and enemies to have an officer aboard every ship, but, expecting the cost to be unmanageable and worrying having too many total skills too early might overwhelm other gameplay features, I thought slowing level progress might help delay that effect until and unless the player stuck with leveling 30 officers over a long time.  Fixed, exponentially distributed per-officer level caps could work too, though!

Also, I want to know why Alex capped deployed Officers at 8-10 rather than letting the player have an officer for every ship and balancing accordingly.  I figure the answer is obvious but just don't know.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on May 10, 2023, 08:39:40 AM
I want the player and enemies to have an officer aboard every ship, but, expecting the cost to be unmanageable and worrying having too many total skills too early might overwhelm other gameplay features, I thought slowing level progress might help delay that effect until and unless the player stuck with leveling 30 officers over a long time.  Fixed, exponentially distributed per-officer level caps could work too, though!

Also, I want to know why Alex capped deployed Officers at 8-10 rather than letting the player have an officer for every ship and balancing accordingly.  I figure the answer is obvious but just don't know.

For the first part, you could do something like making it so that the XP you gain from a battle is duplicated and distributed evenly across all officers rather than each officer getting their own XP (I’m not actually sure how vanilla calculates the XP each officer gets from combat). That’s quite niche and would be outside of the scope of this mod, but it shouldn’t be too hard to implement for your own mod.

For the second part, I have a feeling the officer cap is partly due to how Alex wanted the deployment point cap to be separate from fleet size. Prior to 0.95, I believe your deployment cap at the start of combat (between 40% and 60% of total DP size in the in-game settings) was based purely on your fleet’s DP value, so it ended up just being a matter of how big a fleet you were able to field. Now, your initial DP cap is based on number and quality of officers, which means having a very large fleet DP-wise isn’t as useful. Uncapping officers would have a similar effect to the pre-0.95 version, disproportionately favoring fleets with a large number of ships for initial DP purpose, since each ship would presumablly have an officer.

Ultimately I think it’s the mentality of always being able to improve your fleet by just adding more ships, vs having “optimal” fleets that don’t rely on sheer numbers.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Liral on May 10, 2023, 09:56:57 AM
For the first part, you could do something like making it so that the XP you gain from a battle is duplicated and distributed evenly across all officers rather than each officer getting their own XP (I’m not actually sure how vanilla calculates the XP each officer gets from combat). That’s quite niche and would be outside of the scope of this mod, but it shouldn’t be too hard to implement for your own mod.

Hm, I should investigate the option.

Quote
For the second part, I have a feeling the officer cap is partly due to how Alex wanted the deployment point cap to be separate from fleet size. Prior to 0.95, I believe your deployment cap at the start of combat (between 40% and 60% of total DP size in the in-game settings) was based purely on your fleet’s DP value, so it ended up just being a matter of how big a fleet you were able to field. Now, your initial DP cap is based on number and quality of officers, which means having a very large fleet DP-wise isn’t as useful. Uncapping officers would have a similar effect to the pre-0.95 version, disproportionately favoring fleets with a large number of ships for initial DP purpose, since each ship would presumablly have an officer.

Ultimately I think it’s the mentality of always being able to improve your fleet by just adding more ships, vs having “optimal” fleets that don’t rely on sheer numbers.

Oh, I see.  I wonder if the officer DP rule introduced in 0.95 effectively flattens and lowers the DP caps of large fleets and, if so, whether that rule could be changed to accommodate higher officer counts.  For example, it might allocate bonus DP from a pool by the proportion of the total levels of the officers of the fleets.  For example, if you had 20 officer-levels while the enemy had 10, then the total would be 30, of which your officer levels would be 2/3 while the enemy's would be 1/3; accordingly, you would get 2/3 of the DP bonus pool while the enemy would get 1/3.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: 5thYL on August 03, 2023, 07:48:37 PM
Hi,

First gonna say I love OE a lot, probably one of the best utility mods ever made. Mostly cause how integrated it is with the base UI.

And I forked a version from your source that adds the ability to increase maximum levels of individual officers with story points here:
https://github.com/5thYL/Starsector-Officer-Extension

Am I allowed to release it on discord and forum? With all the due credits and license of course!

Though if you have any interest in merging it into the main branch that'd be even better. If that's the case I will even add in the settings json the option to disable my button and set it as disabled by default to keep the base mod aligned with vanilla.

Thanks for the mod again!
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on August 04, 2023, 09:04:52 PM
Am I allowed to release it on discord and forum? With all the due credits and license of course!

Sure, just make sure to link back here and make the source code publicly available.

Though if you have any interest in merging it into the main branch that'd be even better. If that's the case I will even add in the settings json the option to disable my button and set it as disabled by default to keep the base mod aligned with vanilla.

Your work looks interesting, but Officer Extension is intended to be a QoL mod. I think allowing players to increase officers' level cap doesn't really fall under QoL, sorry!
Title: Re: [0.96a] Officer Extension (0.5)
Post by: 5thYL on August 04, 2023, 09:11:06 PM
Am I allowed to release it on discord and forum? With all the due credits and license of course!

Sure, just make sure to link back here and make the source code publicly available.

Though if you have any interest in merging it into the main branch that'd be even better. If that's the case I will even add in the settings json the option to disable my button and set it as disabled by default to keep the base mod aligned with vanilla.

Your work looks interesting, but Officer Extension is intended to be a QoL mod. I think allowing players to increase officers' level cap doesn't really fall under QoL, sorry!

Got it! Thanks a ton! Will 100% link back here, my source is also already up on github as one of your forks inheriting your licenses and stuff!
It'll forever stay in the modding forum.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: 5thYL on August 04, 2023, 10:45:01 PM
https://fractalsoftworks.com/forum/index.php?topic=27754
Here's the forum post, kinda eh... stole your formatting as well... hope that's fine lol.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: DecoyGrenadeOut on August 18, 2023, 12:06:18 PM
Is the enemy officer's fleetwide skills there from the base game, or did the mod add those?
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on August 22, 2023, 10:04:13 AM
Is the enemy officer's fleetwide skills there from the base game, or did the mod add those?

If you mean the interface that shows the enemy commander's skills, that's from this mod. If you mean enemy fleets having fleetwide skills, that's from the base game -- it's just not displayed anywhere in vanilla.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Soviet Tom Bombadil on August 28, 2023, 03:37:41 PM
I don't think this mod plays nicely with the mod that unlocks the entire skillset for customization during officer promotions, like they're fighting for the same real estate.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on August 28, 2023, 04:02:40 PM
I don't think this mod plays nicely with the mod that unlocks the entire skillset for customization during officer promotions, like they're fighting for the same real estate.

Never heard of that mod, but if it’s using reflection to access the officer panel chances are they’re incompatible.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Soviet Tom Bombadil on September 01, 2023, 03:17:03 PM
Got on the computer I use for Starsector and sifted through the mods until I remembered the name, it's just called More Officer Skills, by Chyvachok - must have been running a bootleg and forgot, the forum page hasn't been updated since 2020 so not sure how it made its way into my modlist lol.


I don't think this mod plays nicely with the mod that unlocks the entire skillset for customization during officer promotions, like they're fighting for the same real estate.

Never heard of that mod, but if it’s using reflection to access the officer panel chances are they’re incompatible.

Correction: It was updated by the original dev, his thread on the forum is just dead - it's available on the Discord and Nexusmods.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Ash and dust on September 10, 2023, 05:48:35 PM
3891757 [Thread-7] INFO  sound.oo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOO  - Cleaning up music with id [faction_generic_market_01_neutral_var01.ogg]
3891970 [Thread-10] INFO  sound.oo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOO  - Creating streaming player for music with id [faction_generic_market_01_neutral_var01.ogg]
3891970 [Thread-10] INFO  sound.H  - Playing music with id [faction_generic_market_01_neutral_var01.ogg]
3893817 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Renderer's graphics object not found
java.lang.RuntimeException: Renderer's graphics object not found
    at officerextension.ui.Button.getText(Button.java:82)
    at officerextension.FleetPanelInjector.getAutoAssignButton(FleetPanelInjector.java:212)
    at officerextension.FleetPanelInjector.advance(FleetPanelInjector.java:44)
    at officerextension.CoreScript.advance(CoreScript.java:101)
    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.o00000(Unknown Source)
    at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
This issue occurs when using the latest version of the mod as well as the latest version of the unofficial mod: clicking on the Fleet management interface causes the game to crash
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on September 10, 2023, 08:17:56 PM
Are you running a translation pack or another UI overhaul mod? If so, it’s not compatible. (For Chinese language pack specifically I think someone already posted a patched version on fossic.)

 Otherwise, what’s your mod list?
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Ash and dust on September 11, 2023, 05:01:36 AM
Are you running a translation pack or another UI overhaul mod? If so, it%u2019s not compatible. (For Chinese language pack specifically I think someone already posted a patched version on fossic.)

 Otherwise, what%u2019s your mod list?
https://backup1.fossic.oss.jnxyp.cn/forum/202309/11/195955egfqgqlgpgt2dpty.jpg
https://backup1.fossic.oss.jnxyp.cn/forum/202309/11/195958t2rv2vvukvovv23u.jpg
https://backup1.fossic.oss.jnxyp.cn/forum/202309/11/200002eou774h8475i7oz5.jpg
https://backup1.fossic.oss.jnxyp.cn/forum/202309/11/200005r4r5zlgh4j9u3cgi.jpg
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on September 11, 2023, 10:23:09 AM
Can you disable Officer Extension and post a picture of the officer selection screen or fleet screen?

(Again, this mod is not compatible with the Chinese language pack, if you're using that.)
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Ash and dust on September 12, 2023, 04:55:09 AM
Can you disable Officer Extension and post a picture of the officer selection screen or fleet screen?

(Again, this mod is not compatible with the Chinese language pack, if you're using that.)
Ok, I will disable this Mod until the Chinese forum translator can update it to support 0.96;
 Here's how I repeat the error situation.
I just finished creating a new game and then I click on the bottom left corner from left to right for the second (Fleet Management)
https://backup1.fossic.oss.jnxyp.cn/forum/202309/12/193832rhhah852cmgbhoh8.jpg
The game immediately freezes and crashes, and this error message pops up.
https://backup1.fossic.oss.jnxyp.cn/forum/202309/12/193823mgd401gbdewc7cyc.png

[Game log]

88780 [Thread-7] INFO  sound.oo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOO  - Cleaning up music with id [campaign_noncore_part1.ogg]
88905 [Thread-10] INFO  sound.oo0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOO  - Creating streaming player for music with id [campaign_noncore_part1.ogg]
88905 [Thread-10] INFO  sound.H  - Playing music with id [campaign_noncore_part1.ogg]
90644 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Renderer's graphics object not found
java.lang.RuntimeException: Renderer's graphics object not found
   at officerextension.ui.Button.getText(Button.java:82)
   at officerextension.FleetPanelInjector.getAutoAssignButton(FleetPanelInjector.java:212)
   at officerextension.FleetPanelInjector.advance(FleetPanelInjector.java:44)
   at officerextension.CoreScript.advance(CoreScript.java:101)
   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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)



Title: Re: [0.96a] Officer Extension (0.5)
Post by: AtlanticAccent on September 15, 2023, 07:58:38 AM
Hi,

Your reflection work was one of the original inspirations for me to get into messing with officers and UI.

One thing I'd like to request in the name of cross-mod compatibility is the ability to prevent certain skills from being "demotable". In my case, I'm (mis)using the skill system to represent non-skill/skill-adjacent concepts[1]. In vanilla, there is already a way to indicate that a skill is unremovable by adding
Code
"unremovable" : true
to the .skill file. This can be retrieved in code through SkillSpecAPI.isPermanent(). I should note that no vanilla skill makes use of this but it is still handled correctly by the game.

Additionally, you can add arbitrary tags to skills in their entry in the skill_data.csv file. If it's not too much trouble, I'd like to propose adding a tag that Officer Extension recognises as opting a skill out from being demotable, for cases where the skill author does not want to use the permanent field in the skill file.

These changes would effectively require adding some filtering on the list returned by getSkillButtons (https://github.com/qcwxezda/Starsector-Officer-Extension/blob/a1837b01ef4ecd3f12d59458300491b510b5ba94/src/officerextension/ui/OfficerUIElement.java#L202) in injectSkillButtons (https://github.com/qcwxezda/Starsector-Officer-Extension/blob/a1837b01ef4ecd3f12d59458300491b510b5ba94/src/officerextension/CoreScript.java#L351).

Happy to discuss this in a proper issue on GitHub or a PR if you'd like.

[1]
Spoiler
In my mod I call them Conditions, the most prominent being Injuries that temporarily remove a skill from an officer when they are, naturally, injured. Source: https://github.com/atlanticaccent/price-of-command/ (https://github.com/atlanticaccent/price-of-command/)
[close]
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on September 16, 2023, 10:09:46 AM
Thanks for the info.

I'll see if I can make Officer Extension ignore permanent skills. Is there a reason why you want Officer Extension to have a not-demotable tag separate from "isPermanent"? Seems to me like they'd be functionally equivalent. Can you elaborate on how exactly the base game handles unremovable skills, considering that there isn't a way to remove skills in vanilla in the first place?

Edit: I've tried adding
Code
"unremovable": true
to a couple of .skill files, and it doesn't seem to work at all. I can still remove "unremovable" skills, both on players and on officers. Either I'm not adding this snippet in the right place, or the feature has been fully deprecated. I can still make a custom tag for officer-permanent conditions, though. In fact, it's only a couple of lines of code.

Edit 2: Ok, added handling of an "officerextension_unremovable" tag to dev, if you'd like to test compatibility before release feel free to download the jar from the github repo.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Wyvern on November 27, 2023, 05:51:25 PM
Hey, just got an exception seemingly from this mod:
Code
292725 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at officerextension.FleetListener.reportShownInteractionDialog(FleetListener.java:37)
at com.fs.starfarer.campaign.CampaignEngine.reportShowInteractionDialog(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.showInteractionDialog(Unknown Source)
at tecrys.svc.world.notifications.NotificationBase.showNotification(NotificationBase.kt:20)
at tecrys.svc.world.notifications.NotificationBase.showIfRequested(NotificationBase.kt:28)
at tecrys.svc.world.notifications.NotificationShower.advance(NotificationShower.kt:61)
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.super(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Was not triggered by anything obvious; I was just flying through hyperspace back towards the core when, boom, game dead.

Reloading and taking a similar course a second time did not replicate the crash.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on November 27, 2023, 07:30:53 PM
Thanks for the report, looking at it I see the only way this could happen is if a fleet's getBattle is not null but getBattle().getOtherSideCombined is null. Seems like an odd crash... could it be that the fleet you were fighting against didn't exist or didn't have any ships?

I'll add some additional null checks, though I suspect this is some funky mod fleet. What exactly is tecrys?

Edit: if you're still getting the crash try downloading the latest jar from the github repo and let me know if that fixes it, here: https://github.com/qcwxezda/Starsector-Officer-Extension/tree/main/jars (https://github.com/qcwxezda/Starsector-Officer-Extension/tree/main/jars)
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Wyvern on November 27, 2023, 07:52:03 PM
Ahh, so weird mod interaction, that'd do it. Tecrys would presumably be the Symbiotic Void Creatures mod; I've reported this issue in that mod's thread as well, here (https://fractalsoftworks.com/forum/index.php?topic=28010.msg417460#msg417460). Thanks for the information on what's likely causing it; that should help Tecrys fix up their mod, too.

(Edit: To clarify: I wasn't even fighting anything when this crash went down, just cruising along through hyperspace with nothing in sight.)

Will go ahead and download the jar, though given the apparent rarity of this bug- well, if it happens again, I'll let you know; all I can do there. Thanks for the fast fix!
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Groobus on December 17, 2023, 01:10:44 PM
Hi!  So, a small thing I noticed in this mod is that you cannot add an officer from an officer promotion event (Where you can spend a story point to get an officer form your crew after a battle) if you are above the vanilla officer limit. Is there any way this could be added? Awesome mod btw!

Edit: Also noticed the same thing with the Luddic Pather bar event where you can spend a story point to have them join you.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Rafs on December 23, 2023, 06:09:00 AM
Hi!  So, a small thing I noticed in this mod is that you cannot add an officer from an officer promotion event (Where you can spend a story point to get an officer form your crew after a battle) if you are above the vanilla officer limit. Is there any way this could be added? Awesome mod btw!

Edit: Also noticed the same thing with the Luddic Pather bar event where you can spend a story point to have them join you.

This is also the case with alternate sources of officers from other mods like Wingcom and Ashes of The Domain.
Would be nice some added support for those if the modders allow it since it's way less of a time waster than going around every single market.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: adskayaskovoroda on January 18, 2024, 11:45:38 PM
Hey! Love the mod. There is a small problem tho - an event where you can promote some crew to officer. It's still shows vanilla interpretation of the limit
In example I have 7 officers in total but only 1 is piloting a ship
Dunno, seems kinda unimportant, but still
Title: Re: [0.96a] Officer Extension (0.5)
Post by: Cryovolcanic on February 11, 2024, 07:17:39 AM
An issue with Officer Extension as of 0.97a - if you suspend officers, they still count towards the overall XP value of your fleet. If you permanently dismiss them, they no longer count.

If you are carrying around a lot of suspended officers, you are crippling your XP gain.
Title: Re: [0.96a] Officer Extension (0.5)
Post by: TheLaughingDead on February 19, 2024, 06:16:21 PM
An issue with Officer Extension as of 0.97a - if you suspend officers, they still count towards the overall XP value of your fleet. If you permanently dismiss them, they no longer count.

If you are carrying around a lot of suspended officers, you are crippling your XP gain.
How did you update the version to work with 0.97a?

EDIT: Figured it out, just changing the game version in mod_info.json did it
Title: Re: [0.96a] Officer Extension (0.5)
Post by: float on March 05, 2024, 07:56:14 PM
Hey! Love the mod. There is a small problem tho - an event where you can promote some crew to officer. It's still shows vanilla interpretation of the limit
In example I have 7 officers in total but only 1 is piloting a ship
Dunno, seems kinda unimportant, but still

An issue with Officer Extension as of 0.97a - if you suspend officers, they still count towards the overall XP value of your fleet. If you permanently dismiss them, they no longer count.

If you are carrying around a lot of suspended officers, you are crippling your XP gain.

Thanks for the reports, these are fixed now.
Title: Re: [0.97a] Officer Extension (0.6)
Post by: Polite Pufferfish on March 05, 2024, 11:13:26 PM
Hello. I wanted to let you know that the zip file currently (03/06/2024) in your github is completely empty. Spooked me real good when my save file crashed after trying to update.

When using what is available in the source zip, I get the following error whenever I attempt to initiate combat with anything:

[Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "officerextension.UtilReflection.getField(Object, String)" is null
java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "officerextension.UtilReflection.getField(Object, String)" is null
   at officerextension.FleetListener.modifyDifficultyCalculator(FleetListener.java:46) ~[?:?]
   at officerextension.FleetListener.reportShownInteractionDialog(FleetListener.java:69) ~[?:?]
   at com.fs.starfarer.campaign.CampaignEngine.reportShowInteractionDialog(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.CampaignState.startEncounterInvolvingPlayerFleet(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.BaseLocation.advance(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.StarSystem.advance(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source) ~[port_obf.jar:?]
   at com.fs.state.AppDriver.begin(Unknown Source) ~[port.common_obf.jar:?]
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher.super(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source) ~[port_obf.jar:?]
   at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]

I hope this helps you. This is a delightful mod that I would love to continue using. Thank you for producing and maintaining it.
Title: Re: [0.97a] Officer Extension (0.6)
Post by: Blacknsilver on March 06, 2024, 07:03:06 AM
I'm also getting an error while using the 0.6.0 version of the mod. 0.5.0 works fine.
Title: Re: [0.97a] Officer Extension (0.6)
Post by: float on March 06, 2024, 07:30:04 AM
Woah, you're right, the zip file is empty. It's 170 bytes now... I always check my file sizes and I'm certain it was in the KBs when I uploaded it yesterday. This happened with another mod too where the jar file mysteriously disappeared when I uploaded it to GitHub, pretty strange behavior.

@Blacknsilver,
I can't reproduce this bug. Just to be clear, you are on Starsector 0.97a-RC11, correct? This could happen if you're using an older Starsector version, if FleetEncounterContext is different there.


@Polite Pufferfish,
Can you be more specific about the nature of the bug you're encountering and how it's being triggered?

Edit: added a hotfix to address the empty zip folder issue and to apply a tentative fix for older SS versions / versions where FleetEncounterContext is different, which would potentially cause the issue Blacknsilver mentioned.
Title: Re: [0.97a] Officer Extension (0.6.1)
Post by: Tyrialian on March 06, 2024, 10:56:06 AM
Just reporting the crashed log.

4658903 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:57)
   at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:36)
   at java.lang.reflect.Field.get(Field.java:393)
   at officerextension.FleetListener.modifyDifficultyCalculator(FleetListener.java:55)
   at officerextension.FleetListener.reportShownInteractionDialog(FleetListener.java:71)
   at com.fs.starfarer.campaign.CampaignEngine.reportShowInteractionDialog(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.startEncounterInvolvingPlayerFleet(Unknown Source)
   at com.fs.starfarer.campaign.BaseLocation.advance(Unknown Source)
   at com.fs.starfarer.campaign.StarSystem.advance(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.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
Title: Re: [0.97a] Officer Extension (0.6.1)
Post by: float on March 06, 2024, 11:26:55 AM
Just reporting the crashed log.

4658903 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:57)
   at sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:36)
   at java.lang.reflect.Field.get(Field.java:393)
   at officerextension.FleetListener.modifyDifficultyCalculator(FleetListener.java:55)
   at officerextension.FleetListener.reportShownInteractionDialog(FleetListener.java:71)
   at com.fs.starfarer.campaign.CampaignEngine.reportShowInteractionDialog(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.startEncounterInvolvingPlayerFleet(Unknown Source)
   at com.fs.starfarer.campaign.BaseLocation.advance(Unknown Source)
   at com.fs.starfarer.campaign.StarSystem.advance(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.super(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)

This seems to only be possible if an earlier exception happened with a null FleetEncounterContext. Can you look through your log and see if there are any other stack traces? It'd also be helpful to know when and how this crash occurred as I can't reproduce it.

Edit: I have theorized a possible way this could happen: if a mod is using its own extension of FleetInteractionDialogPluginImpl. Hotfixed.
Title: Re: [0.97a] Officer Extension (0.6)
Post by: Polite Pufferfish on March 06, 2024, 12:04:10 PM
Can you be more specific about the nature of the bug you're encountering and how it's being triggered?

The bug was happening whenever I encountered a hostile fleet. The moment the game tried to bring up the dialogue options, it would crash.

Whatever you've done, this crash is no longer happening.

Thank you for your timely response.
Title: Re: [0.97a] Officer Extension (0.6.1)
Post by: Iwe Eri on March 06, 2024, 12:14:20 PM
Hi, the hotfix crashes the game on startup.

Error log:
56446 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [officerextension.campaign.CryopodAwareOfficerLevelUpPlugin]
java.lang.RuntimeException: Error loading [officerextension.campaign.CryopodAwareOfficerLevelUpPlugin]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source) ~[port_obf.jar:?]
   at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]
Caused by: java.lang.ClassNotFoundException: officerextension.campaign.CryopodAwareOfficerLevelUpPlugin
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:183) ~[janino-3.0.12.jar:?]
   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592) ~[?:?]
   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
   ... 2 more
Title: Re: [0.97a] Officer Extension (0.6.1)
Post by: float on March 06, 2024, 12:30:33 PM
Hi, the hotfix crashes the game on startup.

Error log:
56446 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.RuntimeException: Error loading [officerextension.campaign.CryopodAwareOfficerLevelUpPlugin]
java.lang.RuntimeException: Error loading [officerextension.campaign.CryopodAwareOfficerLevelUpPlugin]
   at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source) ~[port_obf.jar:?]
   at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]
Caused by: java.lang.ClassNotFoundException: officerextension.campaign.CryopodAwareOfficerLevelUpPlugin
   at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:183) ~[janino-3.0.12.jar:?]
   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592) ~[?:?]
   at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) ~[?:?]
   ... 2 more

Delete the entire Officer Extension mod folder, then redownload the mod. CryopodAwareOfficerLevelUpPlugin has been removed.
Title: Re: [0.97a] Officer Extension (0.6.1)
Post by: Iwe Eri on March 06, 2024, 12:33:30 PM


Delete the entire Officer Extension mod folder, then redownload the mod. CryopodAwareOfficerLevelUpPlugin has been removed.

I see, thank you very much
Title: Re: [0.97a] Officer Extension (0.6.1)
Post by: Blacknsilver on March 06, 2024, 09:26:29 PM
0.6.2 seems to have fixed the issue for me. I am on 0.97 RC11, btw.
Title: Re: [0.97a] Officer Extension (0.6.4)
Post by: Xex on March 09, 2024, 07:14:05 PM
Crashing when entering or exiting combat.

337815 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ClassCastException: class officerextension.campaign.ModifiedFleetEncounterContext cannot be cast to class exerelin.campaign.battle.NexFleetEncounterContext (officerextension.campaign.ModifiedFleetEncounterContext and exerelin.campaign.battle.NexFleetEncounterContext are in unnamed module of loader java.net.URLClassLoader @75678e0a)
java.lang.ClassCastException: class officerextension.campaign.ModifiedFleetEncounterContext cannot be cast to class exerelin.campaign.battle.NexFleetEncounterContext (officerextension.campaign.ModifiedFleetEncounterContext and exerelin.campaign.battle.NexFleetEncounterContext are in unnamed module of loader java.net.URLClassLoader @75678e0a)
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.restoreOrigCaptain s(NexFleetInteractionDialogPluginImpl.java:69) ~[?:?]
   at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl.backFromEng agement(FleetInteractionDialogPluginImpl.java:616) ~[starfarer.api.jar:?]
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.backFromEngagement(NexFleetInteractionDialogPluginImpl.java:87) ~[?:?]
   at com.fs.starfarer.campaign.CampaignState.prepare(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source) ~[port_obf.jar:?]
   at com.fs.state.AppDriver.begin(Unknown Source) ~[port.common_obf.jar:?]
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher.super(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source) ~[port_obf.jar:?]
   at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]
Title: Re: [0.97a] Officer Extension (0.6.4)
Post by: float on March 09, 2024, 09:19:01 PM
Crashing when entering or exiting combat.

337815 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ClassCastException: class officerextension.campaign.ModifiedFleetEncounterContext cannot be cast to class exerelin.campaign.battle.NexFleetEncounterContext (officerextension.campaign.ModifiedFleetEncounterContext and exerelin.campaign.battle.NexFleetEncounterContext are in unnamed module of loader java.net.URLClassLoader @75678e0a)
java.lang.ClassCastException: class officerextension.campaign.ModifiedFleetEncounterContext cannot be cast to class exerelin.campaign.battle.NexFleetEncounterContext (officerextension.campaign.ModifiedFleetEncounterContext and exerelin.campaign.battle.NexFleetEncounterContext are in unnamed module of loader java.net.URLClassLoader @75678e0a)
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.restoreOrigCaptain s(NexFleetInteractionDialogPluginImpl.java:69) ~[?:?]
   at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl.backFromEng agement(FleetInteractionDialogPluginImpl.java:616) ~[starfarer.api.jar:?]
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.backFromEngagement(NexFleetInteractionDialogPluginImpl.java:87) ~[?:?]
   at com.fs.starfarer.campaign.CampaignState.prepare(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source) ~[port_obf.jar:?]
   at com.fs.state.AppDriver.begin(Unknown Source) ~[port.common_obf.jar:?]
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher.super(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source) ~[port_obf.jar:?]
   at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]

Well, that's annoying. OK, I think at this point I'll just accept that the modified battle difficulty computation stuff won't be compatible with Nex or any other mod that uses its own FleetEncounterContext. If you have Nex, you'll have to deal with suspended officers causing you to potentially lose battle XP.
Title: Re: [0.97a] Officer Extension (0.6.4)
Post by: Xex on March 09, 2024, 10:47:18 PM
Crashing when entering or exiting combat.

337815 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ClassCastException: class officerextension.campaign.ModifiedFleetEncounterContext cannot be cast to class exerelin.campaign.battle.NexFleetEncounterContext (officerextension.campaign.ModifiedFleetEncounterContext and exerelin.campaign.battle.NexFleetEncounterContext are in unnamed module of loader java.net.URLClassLoader @75678e0a)
java.lang.ClassCastException: class officerextension.campaign.ModifiedFleetEncounterContext cannot be cast to class exerelin.campaign.battle.NexFleetEncounterContext (officerextension.campaign.ModifiedFleetEncounterContext and exerelin.campaign.battle.NexFleetEncounterContext are in unnamed module of loader java.net.URLClassLoader @75678e0a)
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.restoreOrigCaptain s(NexFleetInteractionDialogPluginImpl.java:69) ~[?:?]
   at com.fs.starfarer.api.impl.campaign.FleetInteractionDialogPluginImpl.backFromEng agement(FleetInteractionDialogPluginImpl.java:616) ~[starfarer.api.jar:?]
   at exerelin.campaign.battle.NexFleetInteractionDialogPluginImpl.backFromEngagement(NexFleetInteractionDialogPluginImpl.java:87) ~[?:?]
   at com.fs.starfarer.campaign.CampaignState.prepare(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.BaseGameState.traverse(Unknown Source) ~[port_obf.jar:?]
   at com.fs.state.AppDriver.begin(Unknown Source) ~[port.common_obf.jar:?]
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher.super(Unknown Source) ~[port_obf.jar:?]
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source) ~[port_obf.jar:?]
   at java.base/java.lang.Thread.run(Thread.java:1575) [?:?]

Well, that's annoying. OK, I think at this point I'll just accept that the modified battle difficulty computation stuff won't be compatible with Nex or any other mod that uses its own FleetEncounterContext. If you have Nex, you'll have to deal with suspended officers causing you to potentially lose battle XP.

I appreciate the quick fix! I'm sorry things aren't working out how you wanted. Great mod!
Title: Re: [0.97a] Officer Extension (0.6.5)
Post by: Selfcontrol on March 10, 2024, 05:33:18 AM
Hi.

The changes made to skills in version 0.97 and to officers (the introduction of "templates") lead to numerous bugs when trying to respec a level 7 officer. In 0.97, level 7 officers are using the new template system and they have 5 elite skills (while a normal officer can only reach level 6 -with Officer Training- with a maximum of 3 elite skills -with Officer Training and Cybernetic Augmentation-).

Trying to demote a level 7 officer (to respecialize him) causes him to lose between 1 or 5 (!) maximum elite skills forever, regardless of the skills the player already possesses. However, this bug has some quirks to it : the number of elite skills you lose forever depends on the already elite skills you made the officer forget.

1. Exemple 1 : my legendary officer has 5 elite skills and 2 non elite skills. I make him only forget his 2 non elite skills. He still has a maximum of 5 elite skills ;
2. Exemple 2 : same officer. I make him forget his 2 non elite skills and 1 elite skill. Because I made him forget 1 elite skill, he will now have a maximum of 4 elite skills even though I leveled him up to 7 again (lost 1 elite skill forever) ;
3. Exemple 3 : same officer. This time, I make him forget 2 non elite skills and 3 elite skills. He will now have a maximum of 2 elite skills max.

Trying to circumvent this bug by first making all elite skills non elite through retraining and then demoting the officer, also doesn't work. As soon as you do this, your officer sort-of loses his "legendary" property and he becomes a regular officer with only 1 elite skill (with a maximum level 7). You can still get 2 extra elite skills with Officer Training and Cybernetic Augmentation, but you cannot get back to a maximum of 5 elite skills.
Title: Re: [0.97a] Officer Extension (0.6.5)
Post by: float on March 10, 2024, 09:31:27 AM
Hi.

The changes made to skills in version 0.97 and to officers (the introduction of "templates") lead to numerous bugs when trying to respec a level 7 officer. In 0.97, level 7 officers are using the new template system and they have 5 elite skills (while a normal officer can only reach level 6 -with Officer Training- with a maximum of 3 elite skills -with Officer Training and Cybernetic Augmentation-).

Trying to demote a level 7 officer (to respecialize him) causes him to lose between 1 or 5 (!) maximum elite skills forever, regardless of the skills the player already possesses. However, this bug has some quirks to it : the number of elite skills you lose forever depends on the already elite skills you made the officer forget.

1. Exemple 1 : my legendary officer has 5 elite skills and 2 non elite skills. I make him only forget his 2 non elite skills. He still has a maximum of 5 elite skills ;
2. Exemple 2 : same officer. I make him forget his 2 non elite skills and 1 elite skill. Because I made him forget 1 elite skill, he will now have a maximum of 4 elite skills even though I leveled him up to 7 again (lost 1 elite skill forever) ;
3. Exemple 3 : same officer. This time, I make him forget 2 non elite skills and 3 elite skills. He will now have a maximum of 2 elite skills max.

Trying to circumvent this bug by first making all elite skills non elite through retraining and then demoting the officer, also doesn't work. As soon as you do this, your officer sort-of loses his "legendary" property and he becomes a regular officer with only 1 elite skill (with a maximum level 7). You can still get 2 extra elite skills with Officer Training and Cybernetic Augmentation, but you cannot get back to a maximum of 5 elite skills.
Thanks for the report, fixed this. Also added a console command to locate said level 7 officers, mostly for my own use so that I can actually test them properly, but I think players may find this command helpful as well.
Title: Re: [0.97a] Officer Extension (0.6.6)
Post by: delta4873 on March 18, 2024, 07:47:24 PM
Really enjoy the mod so far, would it be possible to get a button to unassign all officers currently assigned to ships?
Title: Re: [0.97a] Officer Extension (0.6.6)
Post by: Rudragun on March 24, 2024, 09:48:09 AM
Love this mod. Would like if you could also change how many skills an officer could select from upon level-up as I would prefer to have all skills available than promote/demote until I get the one I need.
Title: Re: [0.97a] Officer Extension (0.6.6)
Post by: float on April 04, 2024, 06:51:38 PM
Really enjoy the mod so far, would it be possible to get a button to unassign all officers currently assigned to ships?
Don't think I can fit such a button anywhere, maybe an invisible hotkey could be possible. Are you aware that you can quickly unassign an officer by right-clicking its portrait in the fleet screen?

Love this mod. Would like if you could also change how many skills an officer could select from upon level-up as I would prefer to have all skills available than promote/demote until I get the one I need.
I'd consider it but it does feel more cheaty than QoL. It also defeats the purpose of the demotion system if you could manufacture the perfect officer every time, as there'd be no benefit to removing select skills over just hiring a new officer knowing that they can learn whatever you want.
Title: Re: [0.97a] Officer Extension (0.6.7)
Post by: cesuoking on April 05, 2024, 06:26:59 PM
After 0.67, the locate lvl7 officers command no longer give any results. I updated the mod in the middle of a playthrough, could this cause the problem?
Title: Re: [0.97a] Officer Extension (0.6.7)
Post by: float on April 05, 2024, 09:13:52 PM
After 0.67, the locate lvl7 officers command no longer give any results. I updated the mod in the middle of a playthrough, could this cause the problem?
I'm not noticing any difference on my end. I can still locate exceptional officers as usual. (FWIW, the only thing about that code that changed between the two versions is that I refactored it somewhere else, and I changed the return type, nothing that should have any effect on its output whatsoever).
Title: Re: [0.97a] Officer Extension (0.6.7)
Post by: cesuoking on April 06, 2024, 03:27:36 PM
After 0.67, the locate lvl7 officers command no longer give any results. I updated the mod in the middle of a playthrough, could this cause the problem?
I'm not noticing any difference on my end. I can still locate exceptional officers as usual. (FWIW, the only thing about that code that changed between the two versions is that I refactored it somewhere else, and I changed the return type, nothing that should have any effect on its output whatsoever).

That's strange, since I checked the save file xml and I can't find a single string mentioning the cryopod officer. I created a new game and it's normal in that one.