Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: [1] 2

Author Topic: [0.9.1a] Relaxed Logistics.  (Read 11080 times)

ShadowDragon8685

  • Ensign
  • *
  • Posts: 45
    • View Profile
[0.9.1a] Relaxed Logistics.
« on: June 25, 2019, 06:33:52 AM »

Do you ever find it annoying and unfun that the AI does not have to worry about logistic concerns?

I did. Frankly, I got tired of it when I noticed that the AI never, ever, spends so much as one OP on a Logistic mod like Expanded Fuel Tanks, or Augmented Drive Field. They certainly don't bother to strap Surveying Gear onto their ships. They don't actually have fuel concerns; you will never actually escape a determined AI fleet by outspending them in fuel. Ever wondered how a bounty hunter ever chased you into the outer rim with two Paragons and an entire fleet of cruisers and destroyers with one Dram tanker?

It's because they have literally no logistical concerns. They spawn, and make a beeline for you like some kind of implacable ghost fleet. Well, that bugs the hell out of me, because it means I either have to handicap my non-combat game, or handicap my combat game.

At least, I thought, I could relax things a little, so I made this handy-dandy little mod. Well, actually it's two mods:

Relaxed Logistics halves the OP cost of all Logistics modifications; Eased Logistics reduces them by 20%. In both of them, Frigates and Destroyers round uneven numbers down, while Cruisers and up round up.

This mod incorporates Sundiving 1.1, meaning that it recategorizes Solar Shielding as not-a-logistics mod, which reduces CR damage from being in a Coronal environment to nothing. As it is not-a-logistics-mod, it no longer occupies one of two precious Logistics Mods hullmod slots, but also receives no price break.

This mod also recategorizes Militarized Subsystems as not-a-logistics-mod; as with Solar Shielding, this means it no longer occupies one of two precious Logistics Mods hullmod slots, but also receives no price break.

I checked some of the more popular mods (well, the ones I use, anyway,) and this should not be incompatible with any of them. It's also unlikely to matter for AI fleet comp, since as I said, they do not actually fit any of these mods that I have ever seen. If some mod causes that to happen, what most likely will happen is that the AI will receive the same OP cost break the player does, and will autofit themselves to suit.

[attachment deleted by admin]
Logged

Ubiquity

  • Ensign
  • *
  • Posts: 1
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #1 on: July 11, 2019, 06:23:24 PM »

I've a question for you if you'll indulge me:

In regards to changing the two from being logistic mods, what values did you have to change - and where? Or was it as simple as removing the aforementioned tag from the .csv file? Ergo being the method of adding the logistic limit to others?
Logged

ShadowDragon8685

  • Ensign
  • *
  • Posts: 45
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #2 on: July 20, 2019, 03:39:14 PM »

It is not that simple.

First, you must make a mod with the appropriate full lines in a hull_mods.csv in the appropriate folder; Yourmod/data/logistics

You'll have to add the LOGISTICS tag to the uiTags cell in the csv, but that will only matter for the shipyard UI! It won't actually change the hullmod to be a Logistics hullmod, it'll only make it be treated as such in the shipyard.

Second, you must also copy the relevant hullmod.java to that folder as well! This may even require that you crank open starfarer.api.zip and get at the files that were baked-in to Starsector!

Then you'll have to have the right gaggle of Imports at the top. Importing a class you don't use won't matter, so for safety's sake just make sure that all of the following lines appear, and if they don't, copy them. Here's all the lines you need, or may need:

Code
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;
import com.fs.starfarer.api.impl.campaign.ids.Stats;
import com.fs.starfarer.api.combat.BaseHullMod;

THEN

There will be a line which begins "Public Class". It will look something like this:

Code
public class SolarShielding extends BaseHullMod {
...
}

You're going to want to change that so that instead of "extends BaseHullMod" it "extends BaseLogisticsHullMod"

And that should let you reclassify a non-Logistics hullmod to a Logistics hullmod.
Logged

Sanrai

  • Ensign
  • *
  • Posts: 38
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #3 on: August 08, 2019, 08:53:19 PM »

Hey, your mod has the same problem as with sun diving where it doesn't actually decrease corona damage as much as it says on the tin. Here is the solution I came up with:

So, I did more testing and can only come to one conclusion.

Corona's are an eldritch horror we can never understand.

"public static final float CORONA_EFFECT_REDUCTION = 0.0f;" is the line in the mod that controls how strong the mod is. You can find it in datas\hullmods\solarshielding.java. You can edit this file with any decent text editor, I recommend notepad++. I tried setting this value to increasingly smaller negatives with only some results until I flipped it to over -8.99. I don't know if this was some oversight in my testing, or if my computer was just being a ***, but only after that did coronas start healing me, and by a lot. I tuned it back and found that -2.9 seems to be the golden zone where coronas only do the barest bit of CR damage. You'll want to turn off repairing while in a sun's field to prevent bleeding supply like crazy, as every ship in your fleet constantly spends a full repair tick of supply when you are the barest sliver below max CR. Please note, moving around seems to have some kind of effect, and for some reason, while Sun flares push you away, and generally do more damage, being right by the base of one can cause a very minor heal. Also, don't use emergency burn and go straight at the sun, you'll punch right through and the middle of the sun WILL start healing you CR. Surprisingly, nebula damage seems to still work as intended.

I theorize that there is actually a second damage type being emitted by the sun that is only being countered by the healing the corona is doing. Now, a really cool mod to add to this would be something that disables ship repairing while in coronas, making gameplay a little more seamless, and it honestly makes sense that you can't perform repairs while next to a sun. Your ship might be sun-proof, but I doubt the spacesuits are.

Oh, and by the way, "if (index == 0) return "" + (int) Math.round((1f - CORONA_EFFECT_REDUCTION) * 100f) + "%";" is the line determing what the mod description shows on your ship. If leftalone after my modification it will list as 390% but you can change it to "if (index == 0) return "" + (int) Math.round(100f) + "%";" Or how it's going to look in my game, "if (index == 0) return "NEARLY " + (int) Math.round(100f) + "% (Terms and conditions may apply)";".
Logged

Sarissofoi

  • Captain
  • ****
  • Posts: 405
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #4 on: August 18, 2019, 02:49:48 AM »

Interesting.
Great job.

Drokkath

  • Captain
  • ****
  • Posts: 281
  • Xenophilic Mutant Commando
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #5 on: August 29, 2019, 08:20:53 PM »

I'd be more interested in a mod that increases the logistical hull mod limit of 2 to something to my liking, like 8+. I hate that limit of 2 and it kinda killed my drive to play this game.
I love having almost all of the hullmods installed on my ships since I first played the game years back, 0.9 ruined the fun for me with that fetid limitation and prompted me to rely even more on my own heavily modified/customized standalone ships which have more than 2 dock/logistic hullmods perma-installed/built-in.

I don't play games to feel limited, I play games to feel unlimited. Hence why I love cheating.
Logged
For I dipt in to the future, far as my gazer eye could see; Saw the vision of the world, and all the wonder that would be.

Kreldin Foxclaw

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #6 on: August 29, 2019, 08:33:48 PM »

I too would love to see a mod that increases the cap on the number of logistics hullmods (or removes the cap entirely) since I feel that OP, and thus having to choose between combat or logisitics upgrades for any given ship, is a liming enough factor as it is.
Logged

ArnaudB

  • Ensign
  • *
  • Posts: 24
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #7 on: August 31, 2019, 02:27:42 AM »

I'd be more interested in a mod that increases the logistical hull mod limit of 2 to something to my liking, like 8+. I hate that limit of 2 and it kinda killed my drive to play this game.
I love having almost all of the hullmods installed on my ships since I first played the game years back, 0.9 ruined the fun for me with that fetid limitation and prompted me to rely even more on my own heavily modified/customized standalone ships which have more than 2 dock/logistic hullmods perma-installed/built-in.

I don't play games to feel limited, I play games to feel unlimited. Hence why I love cheating.
You can do that with a simple setting.ini edit. Look for:

"maxLogisticsHullmods":2

Then change the number to whatever you want.
Logged

Kreldin Foxclaw

  • Ensign
  • *
  • Posts: 13
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #8 on: September 02, 2019, 12:02:32 AM »

Much appreciated, thankyou.
Logged

Apogee_Freak

  • Lieutenant
  • **
  • Posts: 51
  • Are you hiding the blueprints under your farms?
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #9 on: September 02, 2019, 10:40:20 PM »

Does the AI even rely on fuel, supplies, and cargo capacity, or can it simply fly in a single direction without qualms? How much work would it be to make it so? Or is that something Alex left out intentionally for balancing purposes?
Logged

Innominandum

  • Commander
  • ***
  • Posts: 166
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #10 on: September 03, 2019, 01:33:25 AM »

Does the AI even rely on fuel, supplies, and cargo capacity, or can it simply fly in a single direction without qualms? How much work would it be to make it so? Or is that something Alex left out intentionally for balancing purposes?

AI relying on actual in-game resources is a concept frowned upon since pretty much DOS times. You just need to consider how many fleets are out there flying around, doing fleety things in your sector. After you have done this consideration look at your poor cpu, i assume its 4 core, 8 threaded, now take a look at your 2 cats, then take a look at your 2 dogs, now back to the cats, i think one of your dogs just shredded your favorite sofa while you were looking at the cats.  Now imagine your pets pushing a minecart, full of iron ore, up a slope, ... this whole pets pushing minecarts thing doesn't make much sense, does it now? And that's exactly my point.

As for how much effort it would take to implement this, start by imagining a beached whale ...

Honestly it wouldn't take that much effort (relative) to implement this but, it being terrible for performance is an understatement. 
Currently, in starsector, if you take a look at fleet compositions you can see that even the smallest fleets employ supply ships like freighters and tankers and that's pretty much starsectors way of handling that issue.
« Last Edit: September 03, 2019, 01:41:47 AM by Hastur »
Logged
"The early worm catcheth the bird."

Apogee_Freak

  • Lieutenant
  • **
  • Posts: 51
  • Are you hiding the blueprints under your farms?
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #11 on: September 03, 2019, 08:02:17 AM »

Honestly it wouldn't take that much effort (relative) to implement this but, it being terrible for performance is an understatement. 
Currently, in starsector, if you take a look at fleet compositions you can see that even the smallest fleets employ supply ships like freighters and tankers and that's pretty much starsectors way of handling that issue.

So, would something like forcing the AI to spawn with logistic hullmods be a better way of balancing than having everyone's processor fry itself?
Logged

Innominandum

  • Commander
  • ***
  • Posts: 166
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #12 on: September 03, 2019, 09:22:57 AM »

So, would something like forcing the AI to spawn with logistic hullmods be a better way of balancing than having everyone's processor fry itself?
What if i told you that those supply ships in the AI-Fleet actually had Logistic Hull mods, not that they have them, or do they, i mean how would you know that they have them or they don't ? I mean if its a problem of combat balance, you could always look out for a quick refit place before combat, there a presets in the refit screen that you can adapt.

That sounds like a whole loooot of work, open up starfarer.api.zip and search for FleetfactoryV3 to get a better overview. 
Logged
"The early worm catcheth the bird."

Mitroll

  • Ensign
  • *
  • Posts: 20
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #13 on: September 03, 2019, 10:55:46 AM »

Well, I don't think it's impossible to keep track of AI fleets' logistics without frying the CPU. It's supposedly a feature of the up-and-coming game Bannerlord, that all AI factions and warbands will have their food and morale needs simulated.

I think that it's really cool when the AI is playing the same game as the player. Having to manage things like fuel and supplies is a hundred times more fun when you don't feel like you're the only one in the universe that has to.

If it could be added as a mod, I'd install that in a heartbeat. It sounds like a lot of work though, since the bots will need to become "aware" of their fuel and supplies, or else we're going to be getting a whole lot more distress signals.
Logged

Innominandum

  • Commander
  • ***
  • Posts: 166
    • View Profile
Re: [0.9.1a] Relaxed Logistics.
« Reply #14 on: September 03, 2019, 11:06:50 AM »

If it could be added as a mod, I'd install that in a heartbeat. It sounds like a lot of work though, since the bots will need to become "aware" of their fuel and supplies, or else we're going to be getting a whole lot more distress signals.
Well lets say, hypothetically, all those fleets in your current starsector session, suddenly become aware of their fuel and supply needs ... what would change ?
Logged
"The early worm catcheth the bird."
Pages: [1] 2