s-modding the pirate way
0.7.x is not save-compatible with 0.6.x and earlier. Not safe to disable.
Features:
- All AI fleets will be blessed with a number of s-mods. Bigger fleets will get more. Ships with officers receive a bigger share of fleet's s-mod pool depending on the officer's level.
- s-mods on enemy ships don't disappear when the ship is recovered.
- Adding s-mods with story points is no longer possible, unless you have a skill that raises the cap
There's a few knobs in the config files to turn. Please refer to README.md or README.txt in mod's directory for all the gory details. You can change relative probabilities of s-modding any given hullmod, prevent s-modding of undesirable hullmods and s-mod numbers (and distribution).
Current version (https://gitlab.com/mpevnev/trophy-smods/uploads/b899ac388140730a15c92c0f4a7ae518/trophysmods.zip), sources (https://gitlab.com/mpevnev/trophy-smods), release history (https://gitlab.com/mpevnev/trophy-smods/-/releases).
Changelog:
Spoiler
0.7.2:
Spoiler
- The mod now honors "no_build_in" tag, except for Safety Overrides.
- Added "trophysmods_ignore" tag - modders who wish to make a hullmod non-s-moddable can put it on the hullmod and Trophy S-mods will skip it.
0.7.1:
Spoiler
- Compatibility settings for Apex Design Collective, preventing a crash (unless you're already screwed by 0.7.0).
0.7.0:
Spoiler
- Proper 0.95.1a support - that is, configured weights of new hullmods.
- A more stable s-mod selection for each ship
0.6.0:
Spoiler
- 0.95.1a support.
- New algorithm for selecting s-mods (every release has this line, doesn't it?). It allows customizing s-mod pool consumption down to individual hullmods.
- Much smoother probability curves of receiving N hullmods given a varying share of s-mod pool.
- Documentation (automatically generated) of all configuration files.
0.5.0:
Spoiler
- Hullmod tags and categories (which are exactly the same thing, but are defined externally by the mod) can now influence hullmod weights when selecting hullmods to s-mod. There are two sides to this. The first is global settings in the root of "randomized_picks.json" ("tag_affinities" and "category_affinities"), which apply to all hullmods that have a corresponding tag/category. The second is per-hullmod settings under keys "categories" and "tags" in the "affinities" map, which examine the tags and categories of other hullmods on the ship and modify the weight if those match.
- The mod can now merge several JSON files into its main config using about the same rules Starsector goes by when merging mod JSONs. Files providing compatibility with other mods now reside in `data/config/trophysmods/compat`. Please note that the list of files to merge is hard-coded, dropping an extra file there will not work.
0.4.2:
Spoiler
- Fixed unintentional rarity of s-modding common hullmods.
0.4.1:
Spoiler
- Automated Commands compatibility.
- Fixed detection of fighter slots.
0.4.0:
Spoiler
- s-mod pool is calculated based on fleet's DP and d-mods, and distributed based on officer levels.
- A different algorithm for s-mod selection. It should produce more varied and interesting loadouts. It is also aware of more s-moddable hullmods than the core autofit plugin.
0.3.1:
Spoiler
- Corrected version in mod_info
0.3.0:
Spoiler
- s-mods on enemy ships no longer disappear upon recovery. In other words the mod should finally somewhat work.
- Fixed a crash when adding s-mods to Mess fleets from HMI (and similar fleets).
0.2.0:
Spoiler
- Sensible s-mod combinations via piggybacking on the autofitter (thanks to Jahgaimo and BreenBB for the suggestion)
- s-mod distribution across a fleet depends on each ship's DP (suggested by Arcagnello)
- s-mod generation is a lot more aggressive. High-end fleets should have total s-mods in double digits
- Config changes on an old save should actually work now
Thoughts on mod's current state
Spoiler
I like it. The new s-mod distributing algorithm produces enough s-mods to make most fleets vaguely intersting, while also throwing in real eye-catchers every now and then. I think I'll experiment with raising the s-mod cap.
Ramblings Rationale:
Spoiler
I'm not entirely happy with s-mods costing story points. Adding them early is all right, since bonus XP helps getting them back in a reasonable time, and losses don't hurt too much. However, in the late game with each SP being worth a million XP bonus XP doesn't do much to alleviate the grind. Even worse, my playstyle late-game mostly focuses on exploration rather than combat, slowing the natural SP gain even more. I can go out of my way and fight, but I don't exactly have an incentive. It also makes me either overly cautious, never picking a fight I know I can't win without major losses, or sucker-punches me after taking a risk and being beaten (while still having a blast in-combat, mind you) by saying "now grind N million XP with a weakened fleet, mate".
This mod is not exactly a solution. It won't change the fact that losing battles sucks, and losing s-mods triples the suck. This mod is an experiment. I want to try and trigger my roguelike player's mentality of "RNG giveth and RNG taketh away" wrt s-mods by making them, essentially, loot. I also hope it'd give me an extra incentive to fight big human fleets and take risks.
(yes, I have just copied the README)
Got a crash in Opuntia system from HMI, seems like it caused by this mod judging from logs.
Spoiler
762587 [Thread-3] INFO trophysmods.SmodAddingListener - Inflating fleet Small Swarm
762588 [Thread-3] INFO trophysmods.SmodAddingListener - Fleet's s-mod pool: 9.88
762588 [Thread-3] INFO trophysmods.SmodAddingListener - Adding 0 smods (expected number: 1.6099999) to ship OBJ 1095 (Enforcer (Mess) class Machine Gun Medium Droneship)
762588 [Thread-3] INFO sound.oo0O - Cleaning up music with id [015.ogg]
762600 [Thread-7] INFO sound.oo0O - Cleaning up music with id [023.ogg]
762896 [Thread-9] INFO sound.oo0O - Creating streaming player for music with id [023.ogg]
762897 [Thread-9] INFO sound.OooO - Playing music with id [023.ogg]
763032 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.api.plugins.impl.CoreAutofitPlugin.doFit(CoreAutofitPlugin.java:323)
at trophysmods.SmodAddingListener$SmoddingInflater.forceFit(SmodAddingListener.java:151)
at trophysmods.SmodAddingListener$SmoddingInflater.inflate(SmodAddingListener.java:138)
at com.fs.starfarer.campaign.fleet.CampaignFleet.inflateIfNeeded(Unknown Source)
at com.fs.starfarer.campaign.ai.TacticalModule.hasEnoughStuffAround(Unknown Source)
at com.fs.starfarer.campaign.ai.TacticalModule.advance(Unknown Source)
at com.fs.starfarer.campaign.ai.ModularFleetAI.advance(Unknown Source)
at com.fs.starfarer.campaign.fleet.CampaignFleet.advance(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.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Played a bit with different ways to calculate s-mod pool size and distribute it. Officers + DP for pool size feels bad: however many s-mods everyone else gets, Hegemony gets more. DP for both pool size and distribution is really bad: a Paragon can pretty much always provide itself max s-mods, and when it can't it can leech them off the rest of the fleet (see spoiler below). I think I'll go with DP for pool size and prioritize ships with officers when distributing - the reverse of the current scheme. It looks reasonable at a first glance at least. I won't make a new version out of this alone, I'd like to sort out the lack of variety as well for the next release. But here's an unversioned in-development archive if you wish to try it while I'm mucking about with other things: link (https://gitlab.com/mpevnev/trophy-smods/-/jobs/1356985051/artifacts/browse/out/mod/zip/dest/).
Yeees, this is fine. This is perfectly fine. Nothing wrong with 5 s-mods on a Paragon in a random heavy patrol:
Spoiler
(https://i.postimg.cc/TwFVhSBm/screenshot-2021-06-17-T22-19-37-1.png)
Crashes to desktop upon trying to start a new game (fatal: null).
52578 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain - java.lang.NullPointerException
0.6.0 is out. This is the final release for the foreseeable future (I will be fixing any crashes, though). I kind of run out of steam somewhere in the early autumn, but hate to just let the stuff I'd already finished by that point to go to waste.
There's compatibility with 0.95.1a-RC6, documentation of configuration files, a somewhat fine-grained ability to configure how much s-mod pool a hullmod is worth, and a nicer relationship between pool share and expected number of s-mods (see the plot below).
Spoiler
This plot assumes 5 s-mods max, 0.21 s-mod pool per DP, and that the ship is the entire fleet, so its pool share is exactly DP * 0.21. An interesting thing about this is that none of the probabilities are ever zero (well, except at 0 DP). You can crank the max to 10 or 20 and it won't become a godmod playthrough automatically, only with a 0.1% probability. The old function was less smooth and with a hard cutoff.
(https://i.postimg.cc/NFKgfn0C/0-21-per-dp.png) (https://postimg.cc/ctNqFXwf)
as i was the one reporting that crash, here is how i solved (manually)
to blacklist `cswp_remnants_derelict_bps` in the trophysmod based on
> **Note**: the weight must be positive for a hullmod to be s-modded, you can use this to blacklist certain hullmods if you wish.
with file `trophysmods\data\config\trophysmods\compat\cswp_remnants_derelict_bps.json`
containing
{
"tag-affinities" : {
"cswp_assume_direct_control" : {
"base" : -1000
}
}
}
posting this just in case someone else runs into same problems but of course i would prefer some more universal compatibility for hullmods and mods utilizing them