Jump to content

Science finder/degrading solar panels request


Souptime

Recommended Posts

1 hour ago, Souptime said:

@Clamp-o-Tron Just wondering, will it be compatible with modded panels?

Yes, that’s what’s taking so much time. The patch @JadeOfMaar posted above works fine!

Jade- while I have you pinged, can you take a look at the patch (https://github.com/Clamp-o-Tron/KSP-Decaying-Solar-Panels/tree/Commit-1). Your patch works fine, but my modification doesn’t and I’m not sure why.

Link to comment
Share on other sites

@Clamp-o-Tron At line 12 when you first add the decayingPanelsType key, you should remove the @ prefix. That prefix means it's already there (as if added by another mod) and you're changing it then.

Side note: Remove the :FINAL pass markers. That's very bad practice because of how powerful :FINAL is. Don't allow that habit to form and grow. I honestly think you shouldn't need to use :AFTER or :FINAL at all. The only mod that could interfere with your patches is Kopernicus and it recently stopped its practice of renaming the solar panel module.

If you indeed need to use :AFTER or :FINAL, consider using :FOR[zDecayingPanels].

I'll inspect those float curves when I can, and fix their tangents for you if they need it.

Edited by JadeOfMaar
Link to comment
Share on other sites

@Souptime here’s a beta!!! (Sorry about the delay, IRL problems and distractions got me)

https://github.com/Clamp-o-Tron/KSP-Decaying-Solar-Panels
 

No release yet, I’ll make one when I can make a .zip, for now just ctrl-c the text in the file. If there are any problems/suggestions ping me. Actual release (w/thread) by Tuesday.

Link to comment
Share on other sites

5 hours ago, Clamp-o-Tron said:

@Souptime here’s a beta!!! (Sorry about the delay, IRL problems and distractions got me)

https://github.com/Clamp-o-Tron/KSP-Decaying-Solar-Panels
 

No release yet, I’ll make one when I can make a .zip, for now just ctrl-c the text in the file. If there are any problems/suggestions ping me. Actual release (w/thread) by Tuesday.

Nice! thanks for making it! although can you credit me for the idea and the forum thread?

Link to comment
Share on other sites

@Clamp-o-Tron Souptime just wants a mention in the README. Help'em out. :)As for your float curves, I fixed them. They looked pretty nasty as I expected.

Spoiler

// For untagged parts 
@PART[*]:HAS[#decayingPanelsType[untouched]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 5 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 1600 0.7 -0.0005699227 -0.0005699227
			key = 2128 0 -0.002092093 -0.003286385
		}
	}
}
// For quick-decaying parts
@PART[*]:HAS[#decayingPanelsType[quickDecay]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 2/3 of a year.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 600 0.7 -0.0009103774 -0.0009103774
			key = 1130 0 -0.001673671 -0.003286385
		}
	}
}
// For short decay
@PART[*]:HAS[#decayingPanelsType[shortDecay]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 1.5 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 1280 0.7 -0.0003940862 -0.0003940862
			key = 2544 0 -0.0007354842 -0.003286385
		}
	}
}
// For medium decay
@PART[*]:HAS[#decayingPanelsType[mediumDecay]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 3 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 2560 0.7 -0.0001970431 -0.0001970431
			key = 5088 0 -0.0003707644 -0.003286385
		}
	}
}
// for long-lived parts
@PART[*]:HAS[#decayingPanelsType[longLived]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 7 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 5936 0.7 -8.42318E-05 -8.42318E-05
			key = 11872 0 -0.0001291483 -0.003286385
		}
	}
}
// for super long-lived parts
@PART[*]:HAS[#decayingPanelsType[superLongLived]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 15 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 12720 0.7 -3.929088E-05 -3.929088E-05
			key = 25448 0 -0.003214139 -0.003286385
		}
	}
}

 

Also, add OSE Workshop to your recommended mods list. I'm pretty sure you don't want to ship a decaying solar panel in a KIS box. It might still decay in there. OSE Workshop allows you to build individual parts in-flight and deposit them into KIS.

Edited by JadeOfMaar
Link to comment
Share on other sites

3 hours ago, Souptime said:

Nice! thanks for making it! although can you credit me for the idea and the forum thread?

 

2 hours ago, JadeOfMaar said:

@Clamp-o-Tron Souptime just wants a mention in the README. Help'em out. :)As for your float curves, I fixed them. They looked pretty nasty as I expected.

  Reveal hidden contents


// For untagged parts 
@PART[*]:HAS[#decayingPanelsType[untouched]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 5 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 1600 0.7 -0.0005699227 -0.0005699227
			key = 2128 0 -0.002092093 -0.003286385
		}
	}
}
// For quick-decaying parts
@PART[*]:HAS[#decayingPanelsType[quickDecay]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 2/3 of a year.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 600 0.7 -0.0009103774 -0.0009103774
			key = 1130 0 -0.001673671 -0.003286385
		}
	}
}
// For short decay
@PART[*]:HAS[#decayingPanelsType[shortDecay]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 1.5 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 1280 0.7 -0.0003940862 -0.0003940862
			key = 2544 0 -0.0007354842 -0.003286385
		}
	}
}
// For medium decay
@PART[*]:HAS[#decayingPanelsType[mediumDecay]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 3 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 2560 0.7 -0.0001970431 -0.0001970431
			key = 5088 0 -0.0003707644 -0.003286385
		}
	}
}
// for long-lived parts
@PART[*]:HAS[#decayingPanelsType[longLived]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 7 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 5936 0.7 -8.42318E-05 -8.42318E-05
			key = 11872 0 -0.0001291483 -0.003286385
		}
	}
}
// for super long-lived parts
@PART[*]:HAS[#decayingPanelsType[superLongLived]]:FOR[zDecayingPanels]
{
	@description ^= :$: <br><color="orange">Solar cells decay completely after 15 years.</color>
	@MODULE[ModuleDeployableSolarPanel]
	{
		// time is in 24 hour days; 1 = 4 Kerbin days
		// number of days you want, div by 4, for stock scale Kerbin time
		timeEfficCurve
		{
			key = 0 1 0 0
			key = 12720 0.7 -3.929088E-05 -3.929088E-05
			key = 25448 0 -0.003214139 -0.003286385
		}
	}
}

 

Also, add OSE Workshop to your recommended mods list. I'm pretty sure you don't want to ship a decaying solar panel in a KIS box. It might still decay in there. OSE Workshop allows you to build individual parts in-flight and deposit them into KIS.

All that’s done, on GitHub

Link to comment
Share on other sites

The patch could be broken. I’ll take a look. (I uninstalled it because solar panels are kind of broken with kopernicus at the moment, and I’m working on a plugin to the the same thing but with more capabilities)

No, it shouldn’t say anything in flight, you just have to see the output decrease.

Link to comment
Share on other sites

  • 1 month later...
On 8/7/2020 at 1:01 AM, Clamp-o-Tron said:

The patch could be broken. I’ll take a look. (I uninstalled it because solar panels are kind of broken with kopernicus at the moment, and I’m working on a plugin to the the same thing but with more capabilities)

No, it shouldn’t say anything in flight, you just have to see the output decrease.

did you look at it

Link to comment
Share on other sites

  • 10 months later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...