Jump to content

[1.12.x] Deployable Batteries


linuxgurugamer

Recommended Posts

5 hours ago, hraban said:

@linuxgurugamer,

the battery models are available here: CSA Cooperations

I leave the integration into your mod to you ;)

 

I've adjusted the costs to be inline with the regular batteries, other than that, looks real nice

 

On 11/7/2019 at 8:39 AM, flart said:

A patch for using restock assets, no new color

  Reveal hidden contents


@PART[DB_battery_B100]:NEEDS[DeployableBatteries&ReStock]
{
	-MODEL{}
	MODEL
	{
		model = ReStock/Assets/Electrical/restock-battery-radial-small-1
		position = 0.0, 0.0, 0.0
		scale = 1,1,1
		rotation = 90, 0, 0
	}
}


@PART[DB_battery_B200]:NEEDS[DeployableBatteries&ReStock]
{
	-MODEL{}
	MODEL
	{
		model = ReStock/Assets/Electrical/restock-battery-radial-small-1
		position = 0.0, 0.0, 0.0
		scale = 1.26, 1.26, 1.26
		rotation = 90, 0, 0
	}
}


@PART[DB_battery_B400]:NEEDS[DeployableBatteries&ReStock]
{
	-MODEL{}
	MODEL
	{
		model = ReStock/Assets/Electrical/restock-battery-radial-med-1
		position = 0.0, 0.0, 0.0
		scale = 1,1,1
		rotation = 90, 0, 0
	}
}

 

 

-------------------------


The station, the weather analyzer, two solar panels, battery-400 

https://www.dropbox.com/s/jklrlll8hxcuhxb/20191107-154223.743.mp4?dl=0

  •  0:00 - enabling/disabling stock solar and analyzer instantly changes "Total power needed" and "total power available" on the station, but battery doesn't count there,
                expected "total power available" += battery's max power unit flow
  • 0:13 - 2 solar disabled, battery enabled - quick EC flow,  and battery still doesn't count on the station
                expected much slower EC consumption
  • 0:19 - changing max power unit flow - no changing in the speed of battery discharge, and still doesn't count on the station
                expected change in the speed of discharge, and total power available changes with the changing of max power unit flow
  • 0:40 - speed of recharge ignores warp
  • 0:50 - it's night, the battery is still recharged, and responds to solar enabling/disabling as on the daytime

https://www.dropbox.com/s/c9p5scmzk3xbih6/2019-11-07-KSP.log?dl=0

I'm looking at this.  What struck me was that the battery said "Power Unit Hours:  0.00", which would explain most of the rest.

Also, I really need to know who put out the battery, it does make a difference

Link to comment
Share on other sites

New release, 0.1.0.6 for KSP 1.7.3, 0.2.0.6 for KSP 1.8.x

  • Fixed calculation & display of Power-Unit-Hours
  • Changed display of PowerUnitsProduced to reduce confusion
  • Added code to deal with TimeWarping
  • Fixed batteries recharging at night from solar panels
  • Coded around a stock bug: https://bugs.kerbalspaceprogram.com/issues/24349
    • The ActualPowerUnitsProduced by a solar panel doesn't update if any timewarp is active
  • Added Base PowerUnitHours to PAW
  • Changed PowerUnitHours to Actual PowerUnitHours in PAW
  • Added data to info section about different levels of PUH
  • Added new parts from  @hraban

First off, a big shout out of thanks to @hraban for the three new batteries.  They are a very nice addition.

Second, it turned out that I ran into a stock bug which affected my testing.  You can read about it in the link above, but to summarize,  if any level of timewarp is active, and the sun rises or sets, the ActualPowerUnitsProduced on the Solar Collector doesn't change until the timewarp is set back to 1.

What this means is that when you put down an instrument package and you then timewarp, the package could concievable work through the night with magic power, or, if you started your timewarp at night, you could lose scicne during the day until you stop timewarping.

I've fixed the bug inside this mod, but it only works if you have a battery as part of the package

Link to comment
Share on other sites

hraban,  it's awesome parts

 

on the 0.2.0.6:

  • Engineer Lvl0 PUH coeff is 1.0, could it be larger than Pilot's and Scientist's?
  • Max PU Flow sometimes disappears (SCA-240's bar is disappeared on my eyes) 
  • Batteries "PU Produced" isn't right. Are they suppose to be dynamic? (0 on the screenshot)
  • if Max PU Flow is set to 0, it is still consumed
  • if EC on a battery goes to 0, maybe do not count it in the Total Power Available?
  • Should charging battery be working if the controller is disabled?
  • looks like battery charging ignores Max PU flow (small battery is charged 1 PUH by 2 PU produced solar in 0.5 hour)
Spoiler

NYYohmT.jpg

 

cQUSPxJ.jpg

https://www.dropbox.com/s/vbubu5dy500esky/2019-11-09-KSP.log

 

Edited by flart
Link to comment
Share on other sites

Hello @linuxgurugamer,


there are any dependencies or necessary sub-mods for the mod?

With KSP 1.8.1, the batteries in the VAB cannot be dragged directly into the inventory slot of the context menu.
If the battery is pulled over the inventory-suitable object it is optically added to the inventory and can now be removed in the VAB and placed on a slot in the context menu again.
However, the batteries disappear from the inventory module as soon as the created and filled object is placed on the launchpad!

Did I forget something?

Link to comment
Share on other sites

2 hours ago, hraban said:

Hello @linuxgurugamer,


there are any dependencies or necessary sub-mods for the mod?

With KSP 1.8.1, the batteries in the VAB cannot be dragged directly into the inventory slot of the context menu.
If the battery is pulled over the inventory-suitable object it is optically added to the inventory and can now be removed in the VAB and placed on a slot in the context menu again.
However, the batteries disappear from the inventory module as soon as the created and filled object is placed on the launchpad!

Did I forget something?

As listed in the OP:

Dependency

Link to comment
Share on other sites

  • 3 weeks later...
10 hours ago, linuxgurugamer said:

This is an important update, especially for KSP 1.8.x

Thanks @linuxgurugamer I have 181 also and look forward to trying it soon.

Yanno, after watching your twitch again over the weekend, I have to give you a major thumbs up.:rep:

With all the mods you are making and redoing from others that you took on, you went out of your way to help a beginner on line, in real time, to help that person out with a basic re-entry problem. Not just a quick reply, but built a ship like theirs and did a step by step example to help them. Wow, well done!

Link to comment
Share on other sites

18 minutes ago, Saturn5tony said:

Thanks @linuxgurugamer I have 181 also and look forward to trying it soon.

Yanno, after watching your twitch again over the weekend, I have to give you a major thumbs up.:rep:

With all the mods you are making and redoing from others that you took on, you went out of your way to help a beginner on line, in real time, to help that person out with a basic re-entry problem. Not just a quick reply, but built a ship like theirs and did a step by step example to help them. Wow, well done!

Having good people in chat also helped, in that they/you were able to answer questions which I either glossed over or just forgot about (like the acronyms)

Link to comment
Share on other sites

  • 1 year later...

I'm on 1.11.2 and I checked an experiment cluster on the Mun at night and it is still powered. So this mod is no longer needed? It seems silly to have solar panels functioning at night - I wish they just made this mod stock. But I could say that about many mods. 

Link to comment
Share on other sites

Are the B-400 batteries supposed to recharge?  I have some deployed with plenty of deployable solar (3x the required need of the equipment) but the batteries don't charge even in full sun.  Known issue?  Is there something I can do about it?

More info: batteries deployed by level 2 engineer, science deployed by level 2 scientist.  Batteries worked fine until drained, but won't charge.  Getting science when the sun shines but with 3x solar capacity I'd expect the batteries to charge.

Edited by darthgently
more info
Link to comment
Share on other sites

13 hours ago, Krazy1 said:

I'm on 1.11.2 and I checked an experiment cluster on the Mun at night and it is still powered. So this mod is no longer needed? It seems silly to have solar panels functioning at night - I wish they just made this mod stock. But I could say that about many mods. 

Is this for real?  I wondered why the science rate seemed like mine were running 24x7 with batteries that won't charge.  And I hauled all those extra panels there to charge the batteries as well as power the science.  Bother.  I guess we can just figure the deployable panels have built in batteries or something.   On 1.11.2 here also, btw.  So maybe it is just that

Edited by darthgently
Link to comment
Share on other sites

  • 3 months later...
47 minutes ago, Dominiquini said:

This items don't take any volume of the inventory!

Maybe add 'ModuleCargoPart' on this items.

 

Thanks.

Use KSP_PartVolume.

Cargo is fairly new, this mod was created to fill a gap, which I believe Squad  now does have deployable batteries, so there really isn't any real reason to use this anymore.

Link to comment
Share on other sites

3 hours ago, linuxgurugamer said:

Use KSP_PartVolume.

Cargo is fairly new, this mod was created to fill a gap, which I believe Squad  now does have deployable batteries, so there really isn't any real reason to use this anymore.

I'm using it! But when I tested, the batteries don't discount to the volume capacity of the kerbal. I don't see if their have a ModuleCargoPart on the info window. Then I edited this parts, adding "packedVolume = ### " inside each "ModuleDeployableBattery", and almost worked. The value I defined was been using in the cargo inventory, but the info windows tell the wrong value defined by KSP_PartVolume. Then I added "ModuleCargoPart" manually o each part!

The only stock alternative to batteries is the RTG! Is this what you mean?

Thanks.

Link to comment
Share on other sites

8 hours ago, Dominiquini said:

I'm using it! But when I tested, the batteries don't discount to the volume capacity of the kerbal. I don't see if their have a ModuleCargoPart on the info window. Then I edited this parts, adding "packedVolume = ### " inside each "ModuleDeployableBattery", and almost worked. The value I defined was been using in the cargo inventory, but the info windows tell the wrong value defined by KSP_PartVolume. Then I added "ModuleCargoPart" manually o each part!

The only stock alternative to batteries is the RTG! Is this what you mean?

Thanks.

yes, the parts don't have the ModuleCargoPart.  When you used KSP_PartVolume, did you restart the game after the first time ?  Because it doesn't work well until you do

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

yes, the parts don't have the ModuleCargoPart.  When you used KSP_PartVolume, did you restart the game after the first time ?  Because it doesn't work well until you do

I know! I was using this two mods a while ago! So I don't think that was the problem...
I'm not sure, but I got the impression that KSP_PartVolume only added the 'CargoPart' module after I added 'packedVolume = #' to the 'ModuleDeployableBattery' module!
Anyway, KSP_PartVolume set a much larger volume than I would like, although the items occupied the value I set above!
Fix this by manually setting 'ModuleCargoPart'.

But since this is not a mod you want to keep, I think you can ignore this bug.
If you like, I can try to test it to see if there is any bug in KSP_PartVolume...

Thanks.

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

I've created a small patch to add packedVolume for the AKKU batteries so they play more nicely with stock inventory system. As far as I can tell the batteries still work in 1.12 and from my limited testing of 'stick it in an inventory box, does the available volume decrease?' the patch seems to be working as intended too.

Spoiler

@PART[CSA_BG_AKKU_4]

{

    @MODULE[ModuleDeployableBattery]

    {

        packedVolume = 20

    }

}

 

@PART[CSA_BG_AKKU_6]

{

    @MODULE[ModuleDeployableBattery]

    {

        packedVolume = 30

    }

}

 

@PART[CSA_BG_AKKU_8]

{

    @MODULE[ModuleDeployableBattery]

    {

        packedVolume = 40

    }

}

 

Link to comment
Share on other sites

Your patch is wrong.  You are adding the packedVolume to the ModuleDeployableBattery, it needs to be in a ModuleCargoPart

If you have KSP_PartVolume installed, then that's what's actually doing the job for you

 

17 hours ago, jimmymcgoochie said:

I've created a small patch to add packedVolume for the AKKU batteries so they play more nicely with stock inventory system. As far as I can tell the batteries still work in 1.12 and from my limited testing of 'stick it in an inventory box, does the available volume decrease?' the patch seems to be working as intended too.

  Hide contents

@PART[CSA_BG_AKKU_4]

{

    @MODULE[ModuleDeployableBattery]

    {

        packedVolume = 20

    }

}

 

@PART[CSA_BG_AKKU_6]

{

    @MODULE[ModuleDeployableBattery]

    {

        packedVolume = 30

    }

}

 

@PART[CSA_BG_AKKU_8]

{

    @MODULE[ModuleDeployableBattery]

    {

        packedVolume = 40

    }

}

 

 

Link to comment
Share on other sites

5 hours ago, linuxgurugamer said:

Your patch is wrong.  You are adding the packedVolume to the ModuleDeployableBattery, it needs to be in a ModuleCargoPart

If you have KSP_PartVolume installed, then that's what's actually doing the job for you

 

 

I copied what was in the BG deployable solar panel config, where the packedVolume is inside ModuleGroundSciencePart- the other deployable parts also put packedVolume inside their respective ModuleGroundXxx modules- and I’m not using KSP_PartVolume.

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