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] 3 4 ... 6

Author Topic: [0.97a-RC11] Planetary Shield: Access Control (1.6)  (Read 137810 times)

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #15 on: May 04, 2020, 07:58:30 PM »

Updated to version 1.2; this fixes a number of relatively subtle bugs (and also loses compatibility with Starsector 0.9).
Logged
Wyvern is 100% correct about the math.

Outlander

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #16 on: January 07, 2021, 11:49:42 AM »

Would it be possible to add an option to switch the shield on/off without shutting it down completely? That was the impression I had of the mod when I read the the name for the first time, so I was a little disappointed when that was not the case.

Lorewise, turning it on when there's a clear military threat to the colony and turning it off when it's over would make more sense than having it on all the time, given that such a massive shield must consume untold amounts of energy just to keep it running and having a permanently red sky must be unsettling and unsightly for many colonists. As for gameplay, it would make the structure more dynamic than just having it constructed or not. Even the upkeep cost could change depending on how long the shield was activated but, since I know nothing about modding, I don't know how feasible that is.

The mod as it is already makes the shield more interesting than a simple but massive boost to ground defense strength, so it's not like I'm complaining. Thanks for your efforts.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #17 on: January 07, 2021, 01:40:10 PM »

Gameplay-wise, I don't think that's a good idea - it'd be an extra thing to manage for relatively minimal gain; it's not like the shield generator costs much to maintain. (Plus the always-on nature of it is kindof the justification for several of the effects I added to it...)

If that bothers you, just assume that it's one of those things where most of the time & energy cost is involved in the initial startup transients and that it'd take a month to spool back up after a complete shutdown of the system.

I could, though, see an alternative planetary shield mod that puts it on 'auto' - turning off the visual effect when there are no hostile fleets nearby - or even one that did add an outright on-off switch combined with increased effectiveness and a resource cost to turn it on.

Still, thank you for the commentary! Nice to know this old thing is still seeing use. (Even if, uh, with the current bugged state of Pather cells, it's a bit less useful than it was back in 0.9...)
Logged
Wyvern is 100% correct about the math.

Outlander

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #18 on: January 07, 2021, 04:00:06 PM »

To be honest, the main reason I suggested the switch function is appearance. Constantly having a red bubble around a planet takes away from its beauty, in particular when you have installed a terraforming mod and end up missing the gradual visual changes to the colony because you don't want to miss out on the shield's functionality. All the other aspects I mentioned were things I thought of after to make the change more interesting.
« Last Edit: January 07, 2021, 05:13:01 PM by Outlander »
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #19 on: January 07, 2021, 07:17:45 PM »

Ahh, that makes sense.

Well, adding an on/off switch is not a trivial effort... but just changing the shield graphic a bit is.

Here's how you'd do it: go into my mod, and dig down to data/scripts/wyv/PlanetaryShield.java - open that up with a text editor. (You may have issues if you're on windows and using its basic text editor, because its basic text editor is poorly programmed. I suggest Notepad++ if you're on windows.)

Find these two lines:
Code
		planet.getSpec().setShieldThickness(0.1f);
planet.getSpec().setShieldColor(new Color(255,255,255,175));
And play around with changing the numbers - specifically, the fourth number in setShieldColor should be a transparency value; modifying that ought to let you make the shield less visible (or even invisible, if you prefer.)
Logged
Wyvern is 100% correct about the math.

Chairman Suryasari

  • Captain
  • ****
  • Posts: 378
  • The Deployer of John Lennon's.
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #20 on: January 08, 2021, 05:40:07 AM »

This mod is great for normal playthrough but it can render planetary shield completely useless in starfarer mode because of growth penalty.
Logged
"Kids under 13 shouldn't have access to the internet. if 10yo me were on tumblr and read about suicide and depression 5 hours a day, every day, god knows i would jump off a bridge if my parents ever yell at me."

-Some random Youtube comment on video about Sonic OC.

Outlander

  • Ensign
  • *
  • Posts: 15
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #21 on: January 09, 2021, 11:41:31 AM »

Ahh, that makes sense.

Well, adding an on/off switch is not a trivial effort... but just changing the shield graphic a bit is.

Here's how you'd do it: go into my mod, and dig down to data/scripts/wyv/PlanetaryShield.java - open that up with a text editor. (You may have issues if you're on windows and using its basic text editor, because its basic text editor is poorly programmed. I suggest Notepad++ if you're on windows.)

Find these two lines:
Code
		planet.getSpec().setShieldThickness(0.1f);
planet.getSpec().setShieldColor(new Color(255,255,255,175));
And play around with changing the numbers - specifically, the fourth number in setShieldColor should be a transparency value; modifying that ought to let you make the shield less visible (or even invisible, if you prefer.)

First time I do anything related to code. The pressure is on.

Spoiler
[close]
Logged

FutureMunk

  • Ensign
  • *
  • Posts: 5
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #22 on: April 03, 2021, 12:00:31 PM »

Hi

This is my first post on this forum, so here goes..

Will there be an update of this mod to the current version? - I'm about to enter the colony-building phase, and having some extra options or effects with avoiding infiltration of the colony would be a serious plus. Also, played with this mod some time ago, and thoroughly ejoyed it - so, in any case, thanks!
Logged
Saw the Ssethzentach video, liked it, and here I am...

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: [0.9.1a] Planetary Shield: Access Control (1.2)
« Reply #23 on: April 03, 2021, 12:25:44 PM »

Hm... I hadn't actually given much thought to updating this for 0.95, but... some of the reasons for it to exist are still around.

It's not going to be quite as simple as a straight port, though; the interactions with free port status, for example, are entirely unneeded now that bribing expeditions has a story point cost.

Then again, if you're using AI cores extensively, that's going to attract hegemony inspectors, who also now need story point bribes, so maybe just keeping the positive traits and discarding the drawbacks would be okay?

...I'll think about it.

Edit: Having now thought about it, here are my conclusions:
1: There's currently a bug where AI & item use does not contribute to pather interest. I'll update this mod for 0.9.5 once that's been fixed.
2: It'll still swap the shield generator to a flat ground defense bonus (values may not remain quite the same - I'll have to double-check what makes sense now that colonies are limited to size 3-6.)
3: The partial mitigation of the meteor impacts condition will be unchanged.
4: The accessibility penalty and growth penalty will be removed.
5: Pather Interest defense values will be adjusted - in what direction remains to be seen. If installable items trend towards having high pather interest generation, then I may increase the base no-AI-core protection level. Or I might leave that as-is and put a decent chunk of pather interest protection into the story-point upgrade option? I'll see what feels right to me.
6: I may also add some level of import demand to the industry; if I do it'll likely be a small amount of heavy machinery and supplies, and a larger amount of volatiles or fuel (though, uh, not up to the insane 10 demand on certain vanilla items), with the goal of making it so you don't just default to getting the shield's full benefit without investing in some level of supporting infrastructure.
« Last Edit: April 14, 2021, 01:25:57 PM by Wyvern »
Logged
Wyvern is 100% correct about the math.

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: [0.95a-RC15] Planetary Shield: Access Control (1.2)
« Reply #24 on: May 01, 2021, 10:40:36 AM »

Mod has been updated for 0.95.
Logged
Wyvern is 100% correct about the math.

darkond2100

  • Ensign
  • *
  • Posts: 12
    • View Profile
Re: [0.95a-RC15] Planetary Shield: Access Control (1.2)
« Reply #25 on: May 01, 2021, 01:57:55 PM »

Mod has been updated for 0.95.
Woo! Which options did you choose to go with?
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: [0.95a-RC15] Planetary Shield: Access Control (1.2)
« Reply #26 on: May 01, 2021, 02:40:16 PM »

Mod has been updated for 0.95.
Woo! Which options did you choose to go with?
The OP's been edited to say what the mod does now, but quick summary: No more accessibility or growth penalty; free port toggle still disables the pather interest reduction effect; pather interest reduction increased slightly - we've got a lot more interest from installable items now that there's one for every industry; ground defense bonus reduced to better match the values we're seeing with colony sizes limited to three-to-six.
Logged
Wyvern is 100% correct about the math.

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
Re: [0.95a-RC15] Planetary Shield: Access Control (1.3)
« Reply #27 on: May 06, 2021, 02:10:34 AM »

There's apparently an interaction where the mod crashes with Industrial Evolution:
java.lang.NullPointerException
    at data.scripts.wyv.PSModPlugin.onEnabled(PSModPlugin.java:47)
    at com.fs.starfarer.campaign.ModAndPluginData.notifyRunningWithMod(Unknown Source)
    at com.fs.starfarer.campaign.save.CampaignGameManager.o00000(Unknown Source)
    at com.fs.starfarer.title.TitleScreenState.dialogDismissed(Unknown Source)
    at com.fs.starfarer.ui.Oo0O.dismiss(Unknown Source)
    at com.fs.starfarer.ui.impl.o0oO.dismiss(Unknown Source)
    at com.fs.starfarer.campaign.save.J.actionPerformed(Unknown Source)
    at com.fs.starfarer.ui.newnew.buttonPressed(Unknown Source)

Apparently Industrial Evolution's Academy market (id IndEvo_academyMarket is non-null enough to appear in econ.getMarketsCopy() and be iterated over, but econ.getMarket(market.getId()) returns null. Not sure why this would happen, but a null check is trivial to do at least.
Logged

Wyvern

  • Admiral
  • *****
  • Posts: 3786
    • View Profile
Re: [0.95a-RC15] Planetary Shield: Access Control (1.3)
« Reply #28 on: May 06, 2021, 07:57:14 AM »

Huh. Yeah, that looks like it should be a simple fix.

I don't currently have the time to test said fix, but I've got a speculative version 1.4 up if someone else wants to give that a whirl.

Edit: ...Oop, missed a layer of null-checking. Speculative version 1.4, take two now exists instead.
« Last Edit: May 06, 2021, 01:59:52 PM by Wyvern »
Logged
Wyvern is 100% correct about the math.

ProtonBomb

  • Ensign
  • *
  • Posts: 10
    • View Profile
Re: [0.95a-RC15] Planetary Shield: Access Control (1.3)
« Reply #29 on: May 06, 2021, 01:28:11 PM »

I just tested your 1.4 hotfixes and it doesn't work, the game still crashes.

[attachment deleted by admin]
« Last Edit: May 06, 2021, 01:37:17 PM by ProtonBomb »
Logged
Pages: 1 [2] 3 4 ... 6