Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Author Topic: [0.98a-RC7] Whisper's Techmining Alterations  (Read 11774 times)

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
[0.98a-RC7] Whisper's Techmining Alterations
« on: March 05, 2023, 01:08:29 AM »

From what I can see Alex has not made changes to TechMining in the (0.98) release.

This should still be relevant for releases:

* 0.95.x
* 0.96.x
* 0.97.x
* 0.98.x (stress-testing completed)

Whisper's Techmining Alterations
(version 4)


Now up on NexusMods

Characteristics:

* Techmining is a structure, not infrastructure (since it doesn't benefit the faction/planet directly)
* A ruins degradation (excavating?) percentage
* Add seamlessly to existing techmining in an existing game (make a save first - if you want to uninstall you will need to revert to this save)
* Initial chance to immediately receive a special item
* Progress bar towards a guaranteed item (unless the ruins degrade too far)
* High first-finds value
* Decent ongoing finds value
* All finds based upon the Ruins size (1-4, Scattered-Vast) and Colony size (3+)
** A Ruins 1 * Colony 3 gives 3x the average basic ruins value
** A Ruins 4 * Colony 6 gives 24x the average basic ruins value
** Add +25% for an Alpha AI Core, +15% for a Beta AI Core, +5% for a Gamma AI Core
** Add +25% for spending Story Points
* Unusual planets (gas giants, inimical, irradiated, jungle, toxic) and worthwhile ore conditions (any organic, any volatile, decent ore/rare ore) give extra drops
* Decivilized/Saturation-Bombed base-game planets do not give Special Items, just a bunch more of domestic stuff
* AI-controlled planets do not give the AI anything

Example image showing the % decay/excavation and progress towards the next Special Item:


Example images for first find with Ruins 4 (Vast) * Colony 3 (with a setting so that it doesn't give the player metals):



"Wait, what? It doesn't give the player metals?"

Correct, that is one of the configurable options.

Configurable Options:

The settings.json file is highly configurable to the player's taste. I have set what I consider to be a reasonable set of returns, tweak to your heart's content.

(Note: Breaking your game by doing any of this is on your head.)

The "mods/WhisperTechminingAlteration/data/config/settings.json" file (all of these may be changed "on the fly"):
Code
{
  ##############################################################
  # Settings for Whisper's Techmining Alteration
  # Tweak at your own risk
  ##############################################################

  # the monthly rate at which ruins decay by size of ruins
  "wta_ruins_decayrate_scattered": 0.97,
  "wta_ruins_decayrate_widespread": 0.98,
  "wta_ruins_decayrate_expansive": 0.99,
  "wta_ruins_decayrate_vast": 0.995,
 
  # the cutoff point (%) below which no more special items are found
  "wta_ruins_speciallimit_scattered": 0.9,
  "wta_ruins_speciallimit_widespread": 0.85,
  "wta_ruins_speciallimit_expansive": 0.8,
  "wta_ruins_speciallimit_vast": 0.75,
 
  # whether to drop metals at all (default true)
  "wta_drop_metals": true,
 
  # the base credit value of ordinary drops (multiplied by ruins size and colony size)
  "wta_ruinsvalue_basic" : 4000,
  "wta_ruinsvalue_goods" : 3000,
  "wta_ruinsvalue_other" : 2000,
 
  # the first-find multiplier
  "wta_firstfind_bonus" : 10,
 
  # whether spending special points has the ruins *not* decay (default false, if set to true will always stay at 99.99% decay rate)
  "wta_specialpoints_nodecay": false,
 
  # whether the player wants to ruins to *not* decay (default false, if set to true will always stay at 99.99% decay rate)
  "wta_ruins_nodecay": false,
 
  # whether to write to logfile (default false)
  "wta_logging": false,
 
  # the Tech-mining finds bonuses for Alpha, Beta and Gamma cores
  "wta_alphacore_finds_bonus": 0.25f,
  "wta_betacore_finds_bonus": 0.15f,
  "wta_gammacore_finds_bonus": 0.05f,
}

FAQ / Special Notes:

Q: Just a weeee bit over the top for a big ruins and large colony?
A: I fully-expect players to hold off on a Vast Ruins planet, grow a Size 6 Colony, then go all-in with a Techmining structure + Alpha AI Core + Story Points. They deserve the massive returns that they're going to get. Enjoy.

Q: Yeah but that's way too much!
A: Tone your copy down in the settings.json then. Is why I exposed all those settings.

Q: Okay, but why a no metals option?
A: Because by the time of colonizing, in my view the player cannot be bothered carting 10k metals to market to get (if they're lucky) 30 credits per. A whopping great total of 300k credits at best...pfui. That kinda low-grade stuff goes onto the open market and helps pay the workers in the Techmining structure.

Q: So why drop metals by default?
A: Because that's the default of the existing Techmining. Players can change it if they want.

Q: So how many special items can be retrieved...?
A: In theory: infinite. (If the ruins are set to not decay.)
In practice: 2-3 for Scattered Ruins, up to 10-12 for Vast Ruins. It's a little bit random and AI Core/Story Points will increase the progress towards finding the item(s).

Note: The base-game drops are increased and will also include Special Items, so sometimes 2 items will drop at the same time. One was progressively searched out, the other was randomly found.

Credits / Inspiration:

Better Colonies
Slightly Better Tech Mining
Alex's post on having a progress-bar towards finding Special Items
Thoughts by BigBrainEnergy and Megas (and probably others - it was a while back)
Mod help from Alex
Mod help from RuddyGreat
Mod help/permissions from Wyvern
« Last Edit: April 12, 2025, 01:33:15 AM by WhisperDSP »
Logged

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #1 on: March 05, 2023, 01:08:47 AM »

Placeholder in case I need it.

sanya02

  • Lieutenant
  • **
  • Posts: 78
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #2 on: March 05, 2023, 04:30:37 AM »

Why didn't you like the finished mod?

"id": "yunrutechmining",
    "name": "Slightly Better Tech-Mining",
    "author": "Yunru",
    "version": "2022-09-30",
    "description": "Removes fuel and supplies as loot options from Tech-Mining. Also adds an exhuastion tracker to the tooltip.",
    "gameVersion": "0.95.1a-RC6",
   "jars":["jars/YunruIndustries.jar"]
Logged

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #3 on: March 05, 2023, 08:21:56 AM »

Why didn't you like the finished mod?

"id": "yunrutechmining",
    "name": "Slightly Better Tech-Mining",
    "author": "Yunru",
    "version": "2022-09-30",
    "description": "Removes fuel and supplies as loot options from Tech-Mining. Also adds an exhuastion tracker to the tooltip.",
    "gameVersion": "0.95.1a-RC6",
   "jars":["jars/YunruIndustries.jar"]

I want the supplies etc.

Oni

  • Captain
  • ****
  • Posts: 394
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #4 on: March 05, 2023, 10:51:39 AM »

Nice, now I don't have to manually change Techmining into a structure anymore.  8)

Make sure to keep an eye on it's interaction with mods that force it back to an industry (Better Colonies for example).... also might want to look into separating techmining from the usual scaling that Story Point investment causes on colonies (ie doubling every time) so it has a flat cost no matter what other investments you've made... or so it refunds some of your SP when it's inevitably depleted and destroyed. If you haven't already.
« Last Edit: March 05, 2023, 11:14:46 AM by Oni »
Logged

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #5 on: March 05, 2023, 11:25:29 AM »

Players running Better Colonies and SBTM don%u2019t need this mod at all.

It should work okay with Nexerelin - assuming that I got it coded correctly. (I don%u2019t run that mod so cannot check for myself. Hopefully the author/s haven%u2019t touched the TechMining.)

Changing the structure back to infrastructure (in another mod) would probably break this, since I%u2019m using custom code. If this loads after other mods it should (as I understand it, you pro modders  correct me if I%u2019m wrong) override them/take precedence.

Story point investment%u2026I%u2019m not sure how Alex has coded that. I hadn%u2019t thought of someone tearing it down. For this, Vast Ruins and Size 6 Colony would provide Special Items regularly for about 26 months. With an Alpha+SP the regular items / blueprints / weaponry drops would be good for up to 10 years ingame (decay drops to 26% + 50% bonus). There would still be the occasional Special Item drop in there too.

-edit-

Of course, players can always set the industry costs to 1 point per: https://fractalsoftworks.com/forum/index.php?topic=26018.0
« Last Edit: March 05, 2023, 01:30:00 PM by WhisperDSP »
Logged

P4NTH3R27

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #6 on: April 29, 2023, 02:52:11 AM »

Hey, just wanted to give a heads up that there's a crash bug in the mod.

In the wta_TechMining.java file, you set wta_ruins_speciallimit_extensive and the settings.json calls for wta_ruins_speciallimit_expansive, which was making my game crash.

As a side note, I have no idea why this didn't crash my game until now, because I'd relaunched the game a few times even after building a tech mining structure and actively exploring.
It happened twice before I fixed it, and I have no clue why it started being an issue now when it was fine earlier.
Logged

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #7 on: June 02, 2023, 06:17:28 PM »

Hey, just wanted to give a heads up that there's a crash bug in the mod.

In the wta_TechMining.java file, you set wta_ruins_speciallimit_extensive and the settings.json calls for wta_ruins_speciallimit_expansive, which was making my game crash.

As a side note, I have no idea why this didn't crash my game until now, because I'd relaunched the game a few times even after building a tech mining structure and actively exploring.
It happened twice before I fixed it, and I have no clue why it started being an issue now when it was fine earlier.

Thanks for that, and yes late to the party. Real-life is busy.

I've put my newer version up on Nexus for download: https://www.nexusmods.com/starsector/mods/93/

Since I've done some fairly extensive changes, it'll probably be a new-game fix - or continue using your fix above.

Spicerub

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #8 on: June 03, 2023, 12:28:43 AM »

Reckon this will work added to an existing 0.96 save?
Logged

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #9 on: January 20, 2024, 06:40:54 PM »

Reckon this will work added to an existing 0.96 save?

I checked, it should work - from what I can see in the release notes Alex hasn't touched the TechMining in 0.96.x (yet).

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #10 on: January 20, 2024, 06:48:41 PM »

Updated to version 2.0 of Whisper's Techmining Alterations.

There are several changes with this version, I suggest that you complete your game before upgrading.

If you *really want to upgrade* then I suggest the following process:

i/ Save a new copy of your game
ii/ Deconstruct all TechMining on all of your planets
iii/ Upgrade (keep a copy of the old version of WTA)
iv/ Play the new copy and reconstruct TechMining on your planets
v/ If there are issues, revert to an earlier save and the older version of WTA

Changes made:

i/ The value of the drops has been reduced in the "settings.json" file:

Code
  # the base credit value of ordinary drops (multiplied by ruins size and colony size)
  "wta_ruinsvalue_basic" : 4000, <<< was 5000
  "wta_ruinsvalue_goods" : 3000, <<< was 4000
  "wta_ruinsvalue_other" : 2000, <<< was 3000
ii/ Blueprints and modspecs can be found even if the character already knows them. I realized that just because a character knows a blueprint or modspec, doesn't mean that it cannot be found again when doing a deep-dive into the ruins - the concept of there being only one ever in the entire sector makes no sense. Now you can find duplicates - happy selling!

iii/ Sometimes you just don't have an Alpha AI core to throw onto your techmining structure. Never fear, Beta and Gamma AI cores will work also - though not as well as an Alpha AI core, of course:

* Alpha AI Core - 25% bonus
* Beta AI Core - 15% bonus
* Gamma AI Core - 5% bonus

iv/ The bonuses given by an Alpha/Beta/Gamma AI core can be configured in the "settings.json" file:

Code
  # the Tech-mining finds bonuses for Alpha, Beta and Gamma cores
  "wta_alphacore_finds_bonus": 0.25f,
  "wta_betacore_finds_bonus": 0.15f,
  "wta_gammacore_finds_bonus": 0.05f,
v/ The finds increase bonuses given by Beta/Gamma AI cores will be displayed correctly in the TechMining structure's tooltip.
« Last Edit: January 20, 2024, 06:50:41 PM by WhisperDSP »
Logged

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.95.1a-RC6] Whisper's Techmining Alterations
« Reply #11 on: March 24, 2025, 03:46:46 AM »

Stress-testing has located a silly logic-bug on my part. I have corrected in my test-save and am currently continuing play, to be certain that the fix doesn’t cause save-game corruption.

The process of finding the logic-bug was:
* decivilize all planets in Aztlan
* settle the entire system
* grind Chicomoztoc and Couatl to size 6
* Tech-Mining!
* first-find included a Synchnotron Core, when it should not have

(Worlds deciv’d by the player are not eligible to find special items, they would have already been found.)
« Last Edit: March 24, 2025, 02:00:25 PM by WhisperDSP »
Logged

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.97a-RC11] Whisper's Techmining Alterations
« Reply #12 on: April 01, 2025, 06:00:06 PM »

Updated on Nexus Mods to version 3, for StarSector 0.97a-RC11

About to start stress-testing against 0.98 version.

WhisperDSP

  • Captain
  • ****
  • Posts: 324
    • View Profile
Re: [0.98a-RC7] Whisper's Techmining Alterations
« Reply #13 on: April 12, 2025, 01:05:18 AM »

Updated on Nexus Mods to version 4, for StarSector 0.98a-RC7

Updated and tested against StarSector 0.98a-RC7

Testing included:
* 17 colonies
* 4 TechMining buildings
* Using Story Points
* Removing a TechMining building
* Removing a TechMining building which had been improved with Story Points
* Shifting the destination of TechMining finds

And a whole bunch of testing the various options. I hammered it pretty thoroughly, to the point of having way more stuff (including Special Items) than I know what to do with.

Xavier

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: [0.98a-RC7] Whisper's Techmining Alterations
« Reply #14 on: April 23, 2025, 09:16:42 PM »

Just an FYI, causes a CTD at the end of a month if you have tech mining on a station. Admittedly this is not something that would occur normally, but in my specific case I have ruins on an Astropolis which I am tech mining.

Log gives the impression that it's because of a null return when trying to figure out what type of planet it is. It should be simple enough to implement code to handle a null return. (Do not trust this, I have no idea what I'm talking about)

Editing to add more information relating to the station (In case it matters). See spoiler below.
Spoilers for Secrets of the Frontier
Specifically, the station is Hallowhall Astropolis, in orbit of Hallowhall in the Mia's Star system. Which is quite close west-northwest of the core worlds (Yellow star). SOTF has built in functionality to restore the Astropolis, so I'm unsure if this same issue would happen with TASC restored/constructed stations or a player controlled vanilla station. Ruins were added via console commands from the console commands mod because I'm a little Cheaty Mc-Cheaterface.
[close]

Error from starsector.log:
Log Entry
11338012 [Thread-2] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException: Cannot invoke "com.fs.starfarer.api.campaign.PlanetAPI.isGasGiant()" because the return value of "com.fs.starfarer.api.campaign.econ.MarketAPI.getPlanetEntity()" is null
java.lang.NullPointerException: Cannot invoke "com.fs.starfarer.api.campaign.PlanetAPI.isGasGiant()" because the return value of "com.fs.starfarer.api.campaign.econ.MarketAPI.getPlanetEntity()" is null
   at data.scripts.wta_industry.wta_TechMining.generateCargoForGatheringPoint(wta_TechMining.java:679)
   at com.fs.starfarer.api.impl.campaign.CoreScript.doCustomProduction(CoreScript.java:1000)
   at com.fs.starfarer.api.impl.campaign.CoreScript.reportEconomyMonthEnd(CoreScript.java:1102)
   at com.fs.starfarer.campaign.CampaignEngine.reportEconomyMonthEnd(Unknown Source)
   at com.fs.starfarer.campaign.econ.reach.ReachEconomyStepper.doEndOfMonthStuff(Unknown Source)
   at com.fs.starfarer.campaign.econ.reach.ReachEconomyStepper.nextFrame(Unknown Source)
   at com.fs.starfarer.campaign.econ.Economy.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.base/java.lang.Thread.run(Unknown Source)
[close]

Otherwise love the mod! Would love some more options when it comes to customizing what tech mining gives you. Being able to enable/disable things other than metals would be great. Specifically, I play with a lot of mods, and tech mining tends to give me an ungodly amount of weapons and blueprints, and being able to disable that would be nice. Along with other items tech mining gives you like supplies, fuel, heavy machinery, transplutonics, etc, etc. A temporary workaround for disabling most stuff apart from special items like colony items, weapons and BPs is to just set the tech mining values in the settings to 0 for all 3 categories.

Having a look at drop_groups.csv, would it be easier to tag each item rather than having a bunch of groups? E.G. Supplies could be tagged with wta_ruins_sized, wta,ruins_dangerous, wta_ruins_mining3, etc. Could make it easier for end user customization since you won't have to have a thousand groups for all the combinations of customization options. Again, I know absolutely nothing when it comes to this, so this may be terrible advice.

Also, including special items added by other mods would be nice, currently the mod only seems to pull from the predefined wta_special_any pool. Base game has the item groups rare_tech and rare_tech_low, you might be able to just grab the list of items from those? I would assume that other mods colony items and such would have those tags.
« Last Edit: April 24, 2025, 09:15:17 PM by xavieraiden »
Logged
ANZ 98.1 Certified Absolute Creature

ISO 27001 Certified: "Doesn't Know What's Going On"

HACCP Advisory: May Contain Traces of Caesium-137 and Strontium-90

ARPANSA RPS-S1 Noncompliant