Jump to content

[1.11.x] AmpYear Main & Reserve Power Manager (v1.5.9.0) 22nd Feb 2021


JPLRepo

Recommended Posts

5 hours ago, vardicd said:

So I'm noticing that my command pods are getting duplicate Reserve Power stocks, but they aren't even amounts:

lp48xRg.jpg

The command pod above has 100RP, and 80RP units. Any idea why? Have removed the mod and done a complete re-install and the problem persists.

EDIT: ignore this, the Abreviations for Reserve Power and Replacement Parts {added by a different mod} are the same and I missed this. could have saved myself 2 hours of testing and reloading had I noticed this sooner. :(

Noticed you using arp mod there. Have you seen this pack: https://github.com/Olympic1/Icon_Packs_KSP/releases
It adds a bunch of icons for different resources.
Which has reminded me I thought I had one for AmpYear for arp already, but actually it's my DeepFreeze mod.
I'll do an icon for arp in next version and submit it to Olympic1 to include in his pack as well.

Link to comment
Share on other sites

On 3/10/2016 at 4:36 AM, vardicd said:

EDIT: ignore this, the Abreviations for Reserve Power and Replacement Parts {added by a different mod} are the same and I missed this. could have saved myself 2 hours of testing and reloading had I noticed this sooner.

IMHO, it shouldn't be ignored. I'm not sure where the responsibility lies, but the owners of AmpYear, Alternative Resource Panel and whoever owns Replacement Parts (EPL?? USI?) need to know so that the conflict can be resolved.  I've mentioned it in ARP.

Edited by Brigadier
Link to comment
Share on other sites

I'm not understanding something on the Dark-Side Calcs window.

I have a vessel with 3460 EC in batteries.  For Mun darkside at an orbit of 10km (arbitrary), the transit period is 15:50 and the EC required is 3726.  The EC produced is 0 (obviously) but the Deficit is 3726.  Why isn't the deficit reduced by the battery capacity?

Link to comment
Share on other sites

11 hours ago, Brigadier said:

IMHO, it shouldn't be ignored. I'm not sure where the responsibility lies, but the owners of AmpYear, Alternative Resource Panel and whoever owns Replacement Parts (EPL?? USI?) need to know so that the conflict can be resolved.  I've mentioned it in ARP.

Who's ignoring it??
Next Version will include ARP icons for ReservePower and Teflon..
lKXbIBI.png
You can always create your own as well. https://sites.google.com/site/kspalternateresourcepanel/home

11 hours ago, Brigadier said:

I'm not understanding something on the Dark-Side Calcs window.

I have a vessel with 3460 EC in batteries.  For Mun darkside at an orbit of 10km (arbitrary), the transit period is 15:50 and the EC required is 3726.  The EC produced is 0 (obviously) but the Deficit is 3726.  Why isn't the deficit reduced by the battery capacity?

Would this be better?
2VspPaZ.png

 

Link to comment
Share on other sites

1 hour ago, JPLRepo said:

Who's ignoring it??

That was not meant for you.:blush:  The person who first raised the issue had written that they were just going to live with it once they had figured out RP stood for two things.  I was very slow in responding.

Link to comment
Share on other sites

8 minutes ago, Brigadier said:

That was not meant for you.:blush:  The person who first raised the issue had written that they were just going to live with it once they had figured out RP stood for two things.  I was very slow in responding.

Oh ok. and is that screenshot to your liking regarding the DarkSide calcs?

Link to comment
Share on other sites

1 hour ago, JPLRepo said:

Would this be better?

Yes, much; thank you.  What I'm getting now is this.  The deficit doesn't seem to account for the batteries (required - produced - stored (- reserve?) = surplus/deficit, right?).  Am I missing something?

I'm trying to paste an image...it doesn't work.  What do I need to do other than uploading it to Imgur or Dropbox?

Edited by Brigadier
Link added for pic.
Link to comment
Share on other sites

1 minute ago, Brigadier said:

Yes, much; thank you.  What I'm getting now is this.  The deficit doesn't seem to account for the batteries (required - produced - stored (- reserve?) = surplus/deficit, right?).  Am I missing something?

I'm trying to paste an image...it doesn't work.  What do I need to do other than uploading it to Imgur or Dropbox?

That's because the current version does not take into account stored EC or stored ReservePower.
That screenshot I posted is a dev version I just whipped up an hour ago to include it. If that seems reasonable I'll include it in the next version.

Link to comment
Share on other sites

13 hours ago, JPLRepo said:

That's because the current version does not take into account stored EC or stored ReservePower.
That screenshot I posted is a dev version I just whipped up an hour ago to include it. If that seems reasonable I'll include it in the next version.

I added radio buttons so you can toggle the inclusion of the stored EC and ReservePower as well.
I'll fix the text alignment before next version.
FqrEpMH.png

 

Edited by JPLRepo
Link to comment
Share on other sites

An Update: Work continues on the expansion of the Emergency Shutdown Procedures.
I've implemented ability to store/save and remember part states (active/open/etc) when the Emergency Shutdown begins.
I've also implemented GUI update to allow setting for each part/module in each vessel in the Emergency Shutdown Procedure or not. Still need to implement persistence of this across game sessions (save/restore into save file) for each vessel.
Implemented Emergency Shutdown Procedure to use the new settings per part/module to automatically activate when an Emergency Shutdown begins and then restore it's pre-Emergency state once power is restored to the vessel (Emergency Shutdown cancelled).
You can change the setting before the Emergency Shutdown is cancelled (if you are fast enough ) and it will respect that setting.
Not ALL parts/modules are supported. Only Stock and supported mods (where I can change their state).
Here are the currently supported modules:

"ModuleDeployableSolarPanel", "ModuleWheel", "ModuleLight", "ModuleDataTransmitter", "ModuleReactionWheel", "ModuleResourceHarvester", "ModuleResourceConverter", // Stock Part Modules
"ModuleNavLight", // Aviation Lights Mod    
"Curved Solar Panel", //Near Future Solar Mod solar panels
"ModuleRTAntenna", //Remote Tech antennas
"SCANsat",  //SCANsat
"TacGenericConverter", //TAC-LS Converter units
"ModuleLimitedDataTransmitter" //Antenna Range Transmitters

RCS, SAS, Power Turn and the AmpYear and KabinKraziness Subsystems are all supported as well.

Pic of W.I.P.:

Spoiler

V1EvQqY.png

The first radio button titled "Calc" is whether the module is included in AmpYear power calculations (existing button in today's version).
The second radio button titled "ESP" is whether the module is included in Emergency Shutdown Procedures processing or not.
Unsupported modules, or modules that can't be changed have their radio buttons disabled for this option.

Looking for some feedback on what people think so far?
Do people feel the need to set default values of the modules themselves? (currently you can't, all the supported modules are defaulted to ON, or INCLUDE in ESP processing).

Edited by JPLRepo
Link to comment
Share on other sites

Hmmm...

SO I guess to answer your question, I would need one (or more) of my own aswered.. :)

So, first, is ESP activated manually, or automatically, or both?... If automatically, whats the trigger?... I would assume it would be once the EC either hits reserve, or zero levels... Or a user defined level?

Secondly, how/what triggers you back into a powered state?.... And what would be the thresh-hold power level?... I ask, because I imagine it would have to be high enough, that if everything that was on before, powers back up all at once, that it doesnt quickly send you back into ESP... Which means the whole thing would have to figure out the state of EVERYTHING, each items power consumption (and or generation?), then do calculations for when it would be safe to "turn everything back on", without going back into ESP in like 10 seconds... ??? ANd on the other hand, if say, there's a formula for having the threshold level for powering back up be, say, 200% of reserve power levels, or 200% of the time it takes for consumption to trigger ESP again, then obviously, you would have to wait, say 15 mins till its safe to power EVERYTHING, instead of just having to wait 2 mins, where the level is safe enough to just power a (manually) selected antenna...???

So I guess my vote would be for having BOTH methods available, manual and automatic... I'm sure there would be other cases, but MY main concern, would pretty much be just getting antennas activated first (I play RT ALWAYS), since being without comms pretty much results in a completely dead (unmanned) craft anyway, regardless of power levels, or what else might/might not be activated...

I guess if I just got comms back, then "I" would be able to prioritize what gets turned back on... Also, that might mean I would be able to get 1 or 2 HUGELY important things back on (like comms, or SAS, or life support), before having to wait for power levels to get high enough to power EVERYTHING, like nav lights, cabin lights, disco balls, the kTunes playing on the kPod, etc.... ???

Well, its late, I'm punchy, so I'm sorry for being longwinded, and possibly unclear... LOL

Whatever you decide JPL, I'm sure it will only benefit users... And it looks GOOD so far!  Thanx for all the work...

Edited by Stone Blue
Link to comment
Share on other sites

40 minutes ago, Stone Blue said:

Hmmm...

SO I guess to answer your question, I would need one (or more) of my own aswered.. :)

So, first, is ESP activated manually, or automatically, or both?... If automatically, whats the trigger?... I would assume it would be once the EC either hits reserve, or zero levels... Or a user defined level?

Secondly, how/what triggers you back into a powered state?.... And what would be the thresh-hold power level?... I ask, because I imagine it would have to be high enough, that if everything that was on before, powers back up all at once, that it doesnt quickly send you back into ESP... Which means the whole thing would have to figure out the state of EVERYTHING, each items power consumption (and or generation?), then do calculations for when it would be safe to "turn everything back on", without going back into ESP in like 10 seconds... ??? ANd on the other hand, if say, there's a formula for having the threshold level for powering back up be, say, 200% of reserve power levels, or 200% of the time it takes for consumption to trigger ESP again, then obviously, you would have to wait, say 15 mins till its safe to power EVERYTHING, instead of just having to wait 2 mins, where the level is safe enough to just power a (manually) selected antenna...???

So I guess my vote would be for having BOTH methods available, manual and automatic... I'm sure there would be other cases, but MY main concern, would pretty much be just getting antennas activated first (I play RT ALWAYS), since being without comms pretty much results in a completely dead (unmanned) craft anyway, regardless of power levels, or what else might/might not be activated...

I guess if I just got comms back, then "I" would be able to prioritize what gets turned back on... Also, that might mean I would be able to get 1 or 2 HUGELY important things back on (like comms, or SAS, or life support), before having to wait for power levels to get high enough to power EVERYTHING, like nav lights, cabin lights, disco balls, the kTunes playing on the kPod, etc.... ???

Well, its late, I'm punchy, so I'm sorry for being longwinded, and possibly unclear... LOL

Whatever you decide JPL, I'm sure it will only benefit users... And it looks GOOD so far!  Thanx for all the work...

Currently the Emergency Shutdown Procedures is fully autonomous.
There is a toggle in the Subsystems menu that allows you to turn it on or off.
There is currently no manual way of Activating the Subsystem.
It is automatically activated (if on) when ALL EC runs out on the vessel. This does NOT include ReservePower.
The changes I've got in DEV will then deactivate the support modules that have been selected in the PartsList and remember their pre-shutdown state.
When power has returned (yes currently this is a bit flawed, because it has no limit or time check, which I was going to implement) it will return any previously supported parts to their pre-shutdown state. I've been thinking about how best to implement this. Either adding additional priorities to the modules (more complex) or a simple timed mechanism (but to restore parts to active in what order).. so probably what's needed here is a combination of the two checking before activation of each module that there is enough EC to handle it (very tricky to do). Or perhaps the restart can be a completely manual process whereby you can bring up the parts list and activate them (with a button) one by one... Or in priority groups.
I'll look at the manual shutdown as another button.. Or perhaps a config setting so you can configure what EC level you want it to kick in, rather than zero.
 

Link to comment
Share on other sites

Progress Update, from Yesterday.
Emergency Shutdown Procedures now have a manual button to begin the procedures immediately.
There are now High.Medium.Low Priorities for all supported modules that can be assigned default values in the settings file.
You can override the default settings and assign priority to individual modules per vessel.
These priorities will be used to deactivate modules based on amounts set in the settings for low, medium, high priority modules.
I have not begun making changes for the startup, so that is next. I'm thinking of having the same system for a pre-defined amount of EC production/stored before the system starts up high priority modules, medium, low in that order.
I have made a lot of other behind the scenes coding changes to simplify things for the move to KSP 1.1.
I've also coded Tooltips on all the GUI screens.

Pic of WIP:
 

Spoiler

The button icons are placeholders. I have also coded ToopTips so when you hover over the buttons it tells you what they are for, etc.
The buttons from Left to right are: Include in Std AmpYear calculations, Include in Emergency Shutdown Procedure, High, Medium Low Priority setting.

4kPsvBb.png

 

 

Link to comment
Share on other sites

6 hours ago, JPLRepo said:

Progress Update, from Yesterday.
Emergency Shutdown Procedures now have a manual button to begin the procedures immediately.
There are now High.Medium.Low Priorities for all supported modules that can be assigned default values in the settings file.
You can override the default settings and assign priority to individual modules per vessel.
These priorities will be used to deactivate modules based on amounts set in the settings for low, medium, high priority modules.
I have not begun making changes for the startup, so that is next. I'm thinking of having the same system for a pre-defined amount of EC production/stored before the system starts up high priority modules, medium, low in that order.
I have made a lot of other behind the scenes coding changes to simplify things for the move to KSP 1.1.
I've also coded Tooltips on all the GUI screens.

Pic of WIP:

<snip>

Thanks for the continued improvements.  So I understand:

  1. Ddoes AmpYear assign default High, Med and Low priorities unless overridden by the user?  That's what I infer from the 3rd and 4th lines above.
  2. Does the EC represent those modules selected by Calc, by ESP, or both?

Just some additional suggestions:

  1. Could you consider putting an EC Total at the top or bottom of the EC column that sums the modules' EC enabled by the Calc and/or ESP buttons?
  2. Really minor: Any chance of removing the the prefix "Module" from the items in the list of modules?  Kinda redundant in the Modules column.
Link to comment
Share on other sites

2 hours ago, Brigadier said:

Thanks for the continued improvements.  So I understand:

  1. Ddoes AmpYear assign default High, Med and Low priorities unless overridden by the user?  That's what I infer from the 3rd and 4th lines above.
  2. Does the EC represent those modules selected by Calc, by ESP, or both?

Just some additional suggestions:

  1. Could you consider putting an EC Total at the top or bottom of the EC column that sums the modules' EC enabled by the Calc and/or ESP buttons?
  2. Really minor: Any chance of removing the the prefix "Module" from the items in the list of modules?  Kinda redundant in the Modules column.

@Brigadier

Q1. Yes.
Q2. Calc. - ESP is an additional function that will shutdown and restart the modules based on Total Mains Power percentage (defaults, but user can change).

Suggestion 1 -Done. Don't forget the main AmpYear window shows the ACTUAL power production and consumption based on what modules you have selected to be included.
Suggestion 2 - Done.

A settings screenpic might help to explain:

Spoiler

itgJVdd.png

ESP High, Medium, Low Thresholds are the percentage of Main Power at which ESP will shutdown or restart any parts/modules based on their priority setting.
Each Module (only shows those supported) can included/excluded from ESP processing by setting the first radio button for each item.
The High, Medium, Low button sets the default priority value for that module for any vessels that have them.
So in this example when Main Power Hits 20% the Turn Booster, Climate Control, etc (all the priority 3 partmodules) will be deactivated.
When Main Power hits 10% the priority 2 partmodules will be deactivated.
When Main Power hits 5% the priority 1 partmodules will be deactivated.

Reverse applies when power returns... so when power goes back up to 5% the priority 1 partmodules will be reactivated.
and so on...
And yes.. I will change the input boxes to be actual percentages (this is still raw development going on here :sticktongue:)

Suggestion 1 & 2 implemented:
 

Spoiler

Q9g99f2.png

I need to fix the alignment of the last row... :confused:
The total in the Parts List is the total of the shown parts, regardless of whether their first button is set to on or off.
The Power Drain and Power Prod in the main AmpYear window shows the total, respecting the first button setting.

 

Edited by JPLRepo
Link to comment
Share on other sites

Update on the next version progress... A few set-backs. I had to re-think and re-write most of how I persist data between vessels and across scenes in order to keep all the AmpYear (and new ESP) settings from one vessel to another and between the editor and flight. Mainly because in the editor a vessel does not actually exist until it is rolled out and there is no easy way to keep the references between a ship file in the editor and a vessel in flight. I also need to cater for saved craft files to save the AmpYear settings into the craft files so it won't forget what ESP settings you set for each saved vessel in the editor and when launched. 
Still have a few bugs to iron out, including a completely broken transition to Flight mode, but slow progress is being made. Unfortunately I won't have much time this week (real life and real job), but hopefully will have some time to finish it off over the Easter break this coming weekend. Stay Tuned!

Link to comment
Share on other sites

16 hours ago, Brigadier said:

Thanks for the perseverance.  RL comes first and AmpYear will only get better with the work you're putting into it.

That's true (RL and wife and kids always come first). Still I managed to fix my broken transition to flight mode and now Ampyear ESP and other vessel data persists right through from craft file, to editor, to flight to save file. I also got some functional icons etc going (enough for now given 1.1 will mean a GUI re-write anyway). All that's left now is iron out the actual ESP processing bugs. Hope to get something out for the long weekend (for those that have Easter).

Edited by JPLRepo
Link to comment
Share on other sites

  • 2 weeks later...

I've been comparing this to Fusebox, which is the old champ; looking for a more advanced electrical sim.
You seem to be going in the right way :)

Small bug: ampyear does not account for other planet systems - time is calculated in standard-scale kerbin days (throws 4x day estimates in 24h mods like 64k). a hard-coded constant maybe?

Feature/bug: the metering/calculation does not change when the source is shut off (via resource panel), but neither does it in fusebox. It's a definition thing, but you can switch on SAS/RCS via ampyear - they light up on the navball - which is not possible in a powered down module by regular R+T keys. So I lean on the bug side

Also note that ampyear doesn't let fusebox know it's drawing power (manager's 0.017).  It adds up in resource panels, so I guess it's not detectable by fusebox for some reason. that might be a fusebox thing but, just saying...

 

Meanwhile I'll prepare some feature request  (like inverters, load, cool/heat, buses, breakers)

Edited by rgr
Link to comment
Share on other sites

I also tried adding ReservePower to Procedural Tanks in RO (... when less parts is more)

This MM patch seems to work (for the specified 'servicemodule' type)

Quote

 

@TANK_DEFINITION[ServiceModule]:FOR[RealismOverhaul]
{

    TANK
    {
        name = ReservePower
        mass = 0.00289 // same as EC
        utilization = 1000
        fillable = True
        amount = 0.0
        maxAmount = 0.0
        note = (pressurized)
    }
}

 

 

Edited by rgr
Link to comment
Share on other sites

On 4/4/2016 at 4:25 AM, rgr said:

I've been comparing this to Fusebox, which is the old champ; looking for a more advanced electrical sim.
You seem to be going in the right way :)

Small bug: ampyear does not account for other planet systems - time is calculated in standard-scale kerbin days (throws 4x day estimates in 24h mods like 64k). a hard-coded constant maybe?

Feature/bug: the metering/calculation does not change when the source is shut off (via resource panel), but neither does it in fusebox. It's a definition thing, but you can switch on SAS/RCS via ampyear - they light up on the navball - which is not possible in a powered down module by regular R+T keys. So I lean on the bug side

Also note that ampyear doesn't let fusebox know it's drawing power (manager's 0.017).  It adds up in resource panels, so I guess it's not detectable by fusebox for some reason. that might be a fusebox thing but, just saying...

 

Meanwhile I'll prepare some feature request  (like inverters, load, cool/heat, buses, breakers)

This mod is actually older than Fusebox... by about 4-5 months (but no one is complaining). I revived it in Jan 2015. But it was originally started by SodiumEyes in May 2013. Fusebox original post is from Sept 2013.
Thanks. I've added a github issue for the time calculations.
And checking for things being shut off (github issue). - But I am not sure what you mean about the SAS/RCS so perhaps you can add further explanation in the github item please.
Fusebox won't know about Ampyear because it's not able to. No plan to include that.
Add all feature requests and bugs to github thanks.

Now for a further update on the feature changes I was working on a week ago, namely Emergency Shutdown Procedures.
The pre-release of 1.1 has kind of put AmpYear a bit on the back-burner as I get my head around 1.1 and been working on some other mods. But I hope to get back to finishing it and getting AmpYear into pre-release as soon as I can.
 

Link to comment
Share on other sites

2 minutes ago, Table said:

just a suggestion, but I would like the textures on the ion rcs to be improved

 

but still, great work on this mod!

Yeah they do... Raise it on Github and I'll get to it, but probably after the 1.1 dust settles and I get AmpYear working in 1.1 first.

Link to comment
Share on other sites

Just now, JPLRepo said:

Yeah they do... Raise it on Github and I'll get to it, but probably after the 1.1 dust settles and I get AmpYear working in 1.1 first.

ah no worries, just keep doing your thing.

 

Link to comment
Share on other sites

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...