Jump to content

Trying to add the solar panel light exposure sensor to a command pod


Recommended Posts

I've bolded the part in one of the stock solar panels' .cfg that looks like it may pertain to the part's ability to gauge its light exposure level. Can I just add these to a command pod's .cfg and be able get its sun exposure? Or is that function hidden somewhere inside the module itself?

Quote

PART
{
    name = solarPanels3
    module = Part
    author = NovaSilisko
    mesh = model.mu
    rescaleFactor = 1
    node_attach = 0.0, 0.0, 0.0, 1.0, 0.0, 0.0
    TechRequired = advElectrics
    entryCost = 3800
    cost = 380
    category = Electrical
    subcategory = 0
    title = #autoLOC_500376 //#autoLOC_500376 = OX-4W 3x2 Photovoltaic Panels
    manufacturer = #autoLOC_501633 //#autoLOC_501633 = Probodobodyne Inc
    description = #autoLOC_500377 //#autoLOC_500377 = The OX-4 is similar in design to the SP series solar panels, but without the heavy casing. WARNING: Not retractable once deployed!
    attachRules = 0,1,0,0,1
    mass = 0.0175
    dragModelType = default
    maximum_drag = 0.2
    minimum_drag = 0.2
    angularDrag = 1
    crashTolerance = 8
    maxTemp = 1200 // = 3200
    bulkheadProfiles = srf
    thermalMassModifier = 2.0
    emissiveConstant = 0.95
    heatConductivity = 0.04 // 1/3 the default
    tags = #autoLOC_500378 //#autoLOC_500378 = array charge deploy e/c elect energ extend generat (light photo power solar sun track unfold volt watt
    
    MODULE
    {
        name = ModuleDeployableSolarPanel
        resourceName = ElectricCharge
        chargeRate = 1.64
        retractable = false
        animationName = altsolarpanelbase
        secondaryTransformName = panel1
        extendActionName = #autoLOC_6001805 //#autoLOC_6001805 = Extend <<1>>
        retractActionName = #autoLOC_6001806 //#autoLOC_6001806 = Retract <<1>>
        extendpanelsActionName = #autoLOC_6001807 //#autoLOC_6001807 = Toggle <<1>>
    }
}
 

Edited by blorgon
Link to comment
Share on other sites

If I understand what you are trying , no. You cant just add that module to a command pod and expect it to work. The command pod would need an animation and a integrated solar panel and its still a little more involved than that. Near Future Solar has a curved solar panel module that you could add to the pod and get it to work without any animation. I think you just need to know the name of the mesh in Unity that you want to act as the solar panel.

Link to comment
Share on other sites

6 minutes ago, harrisjosh2711 said:

If I understand what you are trying , no. You cant just add that module to a command pod and expect it to work. The command pod would need an animation and a integrated solar panel and its still a little more involved than that. Near Future Solar has a curved solar panel module that you could add to the pod and get it to work without any animation. I think you just need to know the name of the mesh in Unity that you want to act as the solar panel.

I did try using the module from the stock fixed solar panel that doesn't extend, retract, or track, and even though the module showed up in the context menu, it wasn't registering any sun exposure.

Link to comment
Share on other sites

The command pod will need to have some sort of animation to work with moduleDeployableSolarPanel. I'm assuming the game thinks you haven't deployed your panel so it doesn't produce electrical charge. If you look at all the stock solar panel modules they all have an animationName. You command pod needs to have an animation and that animation needs to be linked in the cfg. I presently have a trunk covered in solar panels that will not work with the stock module because I have yet to create a deploy animation. Presently I'm using this module and it will work for you if you don't have an animation. But you also need the .dll from near future solar. Is this your command pod you created or a stock one? If its stock your going to need to find out the name of the mesh/transform you want to actually act as the solar panel in unity(PanelTransformName). With either module you will need to know these things. 

MODULE
 {
  name = ModuleCurvedSolarPanel
  
  PanelTransformName = suncatcher
  TotalEnergyRate = 32
  ResourceName = ElectricCharge
  
  //animationName = ExtendPanels
  powerCurve
  {
   key = 206000000000 0 0 0
   key = 13599840256 1 0 0
   key = 68773560320 0.5 0 0
   key = 0 10 0 0
  }
 }

Link to comment
Share on other sites

3 hours ago, harrisjosh2711 said:

The command pod will need to have some sort of animation to work with moduleDeployableSolarPanel. I'm assuming the game thinks you haven't deployed your panel so it doesn't produce electrical charge. If you look at all the stock solar panel modules they all have an animationName. You command pod needs to have an animation and that animation needs to be linked in the cfg. I presently have a trunk covered in solar panels that will not work with the stock module because I have yet to create a deploy animation. Presently I'm using this module and it will work for you if you don't have an animation. But you also need the .dll from near future solar. Is this your command pod you created or a stock one? If its stock your going to need to find out the name of the mesh/transform you want to actually act as the solar panel in unity(PanelTransformName). With either module you will need to know these things. 

MODULE
 {
  name = ModuleCurvedSolarPanel
  
  PanelTransformName = suncatcher
  TotalEnergyRate = 32
  ResourceName = ElectricCharge
  
  //animationName = ExtendPanels
  powerCurve
  {
   key = 206000000000 0 0 0
   key = 13599840256 1 0 0
   key = 68773560320 0.5 0 0
   key = 0 10 0 0
  }
 }

 

4 hours ago, blorgon said:

I did try using the module from the stock fixed solar panel that doesn't extend, retract, or track, and even though the module showed up in the context menu, it wasn't registering any sun exposure.

No you don't need a anitmation but you do need to set a raycaster I thought but looking at the cfg it's  suncatcher transformer where your solarpanel is on the part like a thrustransformer on a engine

Edited by Mecripp
Link to comment
Share on other sites

@Mecripp I know Module curved panel doesn't need an animation. But what do you put in the animationName = X from the stock module if you don't have an animation? Can you just delete that line or does it act as something else? I'm currently using the module curvedPanel because I cant get my solar trunk to work with the stock module because that animationName= in the stock module. And my trunk does not have an animation.

Edited by harrisjosh2711
Link to comment
Share on other sites

24 minutes ago, harrisjosh2711 said:

@Mecripp I know Module curved panel doesn't need an animation. But what do you put in the animationName = X from the stock module if you don't have an animation? Can you just delete that line or does it act as something else? I'm currently using the module curvedPanel because I cant get my solar trunk to work with the stock module because that animationName= in the stock module. And my trunk does not have an animation.

Now if the panel rapes around a tank or trunk then you need a plugin pretty sure and most use Near Futures plugin and if you look at the stock panel 

	MODULE
	{
		name = ModuleDeployableSolarPanel
		isTracking = false
		secondaryTransformName = suncatcher
		pivotName = suncatcher
		isBreakable = false
		resourceName = ElectricCharge
		chargeRate = 0.35
		extendActionName = #autoLOC_6001805 //#autoLOC_6001805 = Extend <<1>>
		retractActionName = #autoLOC_6001806 //#autoLOC_6001806 = Retract <<1>>
		extendpanelsActionName = #autoLOC_6001807 //#autoLOC_6001807 = Toggle <<1>>
	}
	MODULE
	{
		name = ModuleDeployableSolarPanel
		resourceName = ElectricCharge
		chargeRate = 1.64
		retractable = false
		animationName = altsolarpanelbase
		secondaryTransformName = panel1
		extendActionName = #autoLOC_6001805 //#autoLOC_6001805 = Extend <<1>>
		retractActionName = #autoLOC_6001806 //#autoLOC_6001806 = Retract <<1>>
		extendpanelsActionName = #autoLOC_6001807 //#autoLOC_6001807 = Toggle <<1>>
	}

you can is the first one doesn't have anitmation but it does have pivotname which is just the suncatcher transformer and there a couple more things has you can see

Link to comment
Share on other sites

16 hours ago, Mecripp said:

Now if the panel rapes around a tank or trunk then you need a plugin pretty sure and most use Near Futures plugin and if you look at the stock panel 


	MODULE
	{
		name = ModuleDeployableSolarPanel
		isTracking = false
		secondaryTransformName = suncatcher
		pivotName = suncatcher
		isBreakable = false
		resourceName = ElectricCharge
		chargeRate = 0.35
		extendActionName = #autoLOC_6001805 //#autoLOC_6001805 = Extend <<1>>
		retractActionName = #autoLOC_6001806 //#autoLOC_6001806 = Retract <<1>>
		extendpanelsActionName = #autoLOC_6001807 //#autoLOC_6001807 = Toggle <<1>>
	}

	MODULE
	{
		name = ModuleDeployableSolarPanel
		resourceName = ElectricCharge
		chargeRate = 1.64
		retractable = false
		animationName = altsolarpanelbase
		secondaryTransformName = panel1
		extendActionName = #autoLOC_6001805 //#autoLOC_6001805 = Extend <<1>>
		retractActionName = #autoLOC_6001806 //#autoLOC_6001806 = Retract <<1>>
		extendpanelsActionName = #autoLOC_6001807 //#autoLOC_6001807 = Toggle <<1>>
	}

you can is the first one doesn't have anitmation but it does have pivotname which is just the suncatcher transformer and there a couple more things has you can see

So wait, you need pivotName or secondaryTransformName? Or both? And suncatcher is the value it needs?

Because this is what I put into the command pod's .cfg and it didn't work (also the extend and toggle context menu buttons didn't appear):

MODULE
	{
		name = ModuleDeployableSolarPanel
		isTracking = false
		secondaryTransformName = suncatcher
		pivotName = suncatcher
		isBreakable = false
		resourceName = ElectricCharge
		chargeRate = 0
		extendActionName = #autoLOC_6001805 //#autoLOC_6001805 = Extend <<1>>
		retractActionName = #autoLOC_6001806 //#autoLOC_6001806 = Retract <<1>>
		extendpanelsActionName = #autoLOC_6001807 //#autoLOC_6001807 = Toggle <<1>>
	}

 

Edited by blorgon
Link to comment
Share on other sites

25 minutes ago, blorgon said:

So wait, you need pivotName or secondaryTransformName? Or both? And suncatcher is the value it needs?

Because this is what I put into the command pod's .cfg and it didn't work (also the extend and toggle context menu buttons didn't appear):


MODULE
	{
		name = ModuleDeployableSolarPanel
		isTracking = false
		secondaryTransformName = suncatcher
		pivotName = suncatcher
		isBreakable = false
		resourceName = ElectricCharge
		chargeRate = 0
		extendActionName = #autoLOC_6001805 //#autoLOC_6001805 = Extend <<1>>
		retractActionName = #autoLOC_6001806 //#autoLOC_6001806 = Retract <<1>>
		extendpanelsActionName = #autoLOC_6001807 //#autoLOC_6001807 = Toggle <<1>>
	}

 

You will need unity you might try just using blender and the plugin to import mu and export them but you will need to add a suncatcher transformer to the model where you are putting the solar panel you can't do it just by editing the cfg

Link to comment
Share on other sites

  • 2 weeks 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...