Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: Kirid on March 11, 2014, 09:29:52 AM

Title: [A13] Modular Solar Panels (1.11)
Post by: Kirid on March 11, 2014, 09:29:52 AM
(http://i1301.photobucket.com/albums/ag117/Kirid420/Screenshots/SolarModded.png) (http://s1301.photobucket.com/user/Kirid420/media/Screenshots/SolarModded.png.html)
This adds single solar panels that are placed similar to walls.
Charge, health, and metal cost are close if not equal to the same fraction of a regular solar (1/16).
Colonists can walk on them and build floors underneath.

How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.
Notes:
Thanks to Abrexus for a new texture and code help.
I give my permission to include this in any modpacks. Contact me if you plan to use or alter the code or art. Please give me credit in either case.
Changelog:
Released
1.1: Cleaned redundant code
     Panels no longer connect to walls
     Floors can be placed underneath                         
1.2: Updated for Alpha 3
1.3: Dll added - Now change charge depending on light level.
1.4: Updated for Alpha 5
1.5: Updated for Alpha 6
1.6: Updated for Alpha 7
     New texture and charge bar
1.7: Updated for Alpha 8
1.7.1: Changed fillpercent from 1 to 0.025
     Added mod menu picture
     Now requires research
1.8: Updated for Alpha 9
1.9: Updated for Alpha 10
     Changed texture
     Added slight pathing cost
1.9NoBars: Removed charge bar (Optional)
1.10: Updated to Alpha 11
     No change for Alpha 12
1.11: Updated to Alpha 13
1.11.1: Readded Building_Base
     Removed component breakdown



[attachment deleted by admin - too old]
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Agthor on March 11, 2014, 09:35:12 AM
Very nice, going to give this a try.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kilroy232 on March 11, 2014, 01:29:11 PM
Cool concept, and I really like that you put a good amount of thought into the distribution of resources needed and power output. having said that is it possible to make it so that they do not produce power during the night?
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Vas on March 11, 2014, 05:39:53 PM
I like the concept, I haven't tested yet but I do know of one issue this might present, which is having a hard time repairing small solar panels in the center of a group.  EG if you build a 4x4 grid, the 2x2 in the middle, can't be repaired anymore.  You can't reach them.

Also that issue of producing power during the night that someone else just mentioned, though I believe that would be an easy fix, I think.  Not sure.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Darker on March 11, 2014, 05:50:20 PM
Why don't you use solar panel class to enforce solar panel behavior? Like this:


   <thingClass>Building_PowerPlantSolar</thingClass>



Edit: actually, that would cause nasty things to render on the screen. Nevemind.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 11, 2014, 06:17:38 PM
He could write his own C# mod for this...

Code (C#) Select

using System;
using System.Reflection;
using UnityEngine;

public static class Reflect<T> { // basic reflection helper
const BindingFlags staticField =
BindingFlags.Public |
BindingFlags.NonPublic |
BindingFlags.Static |
BindingFlags.GetField |
BindingFlags.GetProperty;
public static TResult GetStatic<TResult>(string name) {
return (TResult)typeof(T).InvokeMember(name, staticField, null, null, null);
}
}


public class Building_PowerPlantSimpleSolar : Building_PowerPlant {
    readonly float FullSunPower = Reflect<Building_PowerPlantSolar>.GetStatic<float>("FullSunPower");
    readonly float NightPower = Reflect<Building_PowerPlantSolar>.GetStatic<float>("NightPower");
   
    public override void Tick() {
        base.Tick();

        powerComp.powerOutput =
Find.RoofGrid.Roofed(Position)
? NightPower
: Mathf.Lerp(NightPower, FullSunPower, SkyManager.curSkyGlowPercent);
    }
}


Then it'd be...

<thingClass>Building_PowerPlantSimpleSolar</thingClass>
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Darker on March 11, 2014, 06:20:44 PM
Wow, you're good with C#.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 11, 2014, 08:25:36 PM
Quote from: Vas on March 11, 2014, 05:39:53 PM
I like the concept, I haven't tested yet but I do know of one issue this might present, which is having a hard time repairing small solar panels in the center of a group.  EG if you build a 4x4 grid, the 2x2 in the middle, can't be repaired anymore.  You can't reach them.

I had this problem while I was testing them, they are currently set to standable, so no problem.

As for making them work at night As said,<thingClass>Building_PowerPlantSolar</thingClass> makes nasty power bars to appear, and I would fix it if it wasn't a class file.

Quote from: JackQW on March 11, 2014, 06:17:38 PM
He could write his own C# mod for this...

Then it'd be...

<thingClass>Building_PowerPlantSimpleSolar</thingClass>

Have you tested that and does it work?

On the other hand, I'd like to fix it connecting to walls, I thought maybe changing the Altas art for the wall to something more like a sandbagwall might fix it?
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 11, 2014, 08:29:03 PM
Nah I didn't want to go through all the project setup stuff to make a seperate one, I was investigating with other bits of craziness...


It might work though. Do you know how to create your own project, and throw that in? I'd be happy to help. :)

If you really want me to, I can make the project and add it to your mod, then send it to you... but then you'd have nothing much to do on your own. :P
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 11, 2014, 08:38:13 PM
Heh, I dont know how to write or inject a file like that. I might work on somethng else and let this mod rest until alpha 3, not much more I can do to it without alot of effort.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 11, 2014, 09:03:58 PM
Code (build.cmd) Select

set _64=
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set _64=64
set tools=%WinDir%\Microsoft.NET\Framework%_64%\v2.0.50727\
for /f "usebackq delims=." %%n in (`dir /a /b "..\..\..\*.exe"`) do set refs=..\..\..\%%~n_Data\Managed
%tools%csc.exe /nologo /noconfig /target:library /out:..\Assemblies\Mod.dll Mod.cs /nostdlib /lib:%refs% /r:"mscorlib.dll" /r:"System.dll" /r:"System.Core.dll" /r:"System.Security.dll" /r:"System.Configuration.dll" /r:"System.Xml.dll" /r:"System.Xml.Linq.dll" /r:"UnityEngine.dll" /r:"UnityScript.Lang.dll" /r:"Mono.Posix.dll" /r:"Mono.Security.dll" /r:"Boo.Lang.dll" /r:"Assembly-UnityScript-firstpass.dll" /r:"Assembly-CSharp-firstpass.dll" /r:"Assembly-CSharp.dll"

Code (Mod.cs) Select

using System;
using System.Reflection;
using UnityEngine;

public static class Reflect<T> { // basic reflection helper
const BindingFlags staticField =
BindingFlags.Public |
BindingFlags.NonPublic |
BindingFlags.Static |
BindingFlags.GetField |
BindingFlags.GetProperty;
public static TResult GetStatic<TResult>(string name) {
return (TResult)typeof(T).InvokeMember(name, staticField, null, null, null);
}
}


public class Building_PowerPlantSimpleSolar : Building_PowerPlant {
    readonly float FullSunPower = Reflect<Building_PowerPlantSolar>.GetStatic<float>("FullSunPower");
    readonly float NightPower = Reflect<Building_PowerPlantSolar>.GetStatic<float>("NightPower");
   
    public override void Tick() {
        base.Tick();

        powerComp.powerOutput =
Find.RoofGrid.Roofed(Position)
? NightPower
: Mathf.Lerp(NightPower, FullSunPower, SkyManager.curSkyGlowPercent);
    }
}


Attached above as a zip file.

Extract to <RimWorldGameDir>\Mods\ModSolar\Source (create the Source folder).
Create a folder <RimWorldGameDir>\Mods\ModSolar\Assemblies


This is a single-file style somewhat auto-config mod for you...
You still have to change the Xml, and you can play with the C# Mod.cs file...

[attachment deleted by admin: too old]
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 11, 2014, 10:13:59 PM
If I define <thingClass>Building_PowerPlantSimpleSolar</thingClass> I get an error.
<thingClass>Building_PowerPlant</thingClass> seems to work without error.
But they still have <eType>Wall</eType>, which is BuildingComplex on a regular solar.

In short.. they still dont react to day/night.

with a regular panel
<compClass>CompPowerTrader</compClass>
<basePowerConsumption>-1</basePowerConsumption>
and mine need
<basePowerConsumption>-106</basePowerConsumption>
in order to match the power created, which leaves me to believe that the charge of the regular solar is from the class file, which I dont know how to find.
Mod solars are modeled like geyser generators, a set constant output. Its may be too wonkey of a building to easily edit.
Its still defined as a wall for the most part, except that it creates power, and we're trying to make it function like a regular solar. Its a bit of a mashup building

also Mods\ModSolar\Assemblies stays empty?

Thank you JackQW! You can help me as long as you are willing and able, this is a pretty awesome learning experience for me.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 11, 2014, 10:16:59 PM
You have to run build.cmd
It'll run the .NET v2 (v3.5) framework compiler on Mod.cs, referencing the managed (Mono) libraries in the game directory, and build Mod.dll in the Assemblies folder.

If you run it by double clicking, it'll all happen very fast... add "pause" on a new line to the end to make it stay open.
If it still closes too fast, you have to open a command prompt, and enter "cd /d C:\PathToModFolderHere\", then "build", and paste the output in a reply.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 11, 2014, 10:20:20 PM
Okay, I had already done that
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 11, 2014, 10:20:39 PM
^ Edited post, sorry.

You should see output like this;

X:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\RimWorld376WinDev\Mods\ModSolars\Source>set
_64=
X:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\RimWorld376WinDev\Mods\ModSolars\Source>if
"AMD64" == "AMD64" set _64=64
X:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\RimWorld376WinDev\Mods\ModSolars\Source>set
tools=C:\Windows\Microsoft.NET\Framework64\v2.0.50727\
X:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\RimWorld376WinDev\Mods\ModSolars\Source>for
/F "usebackq delims=." %n in (`dir /a /b "..\..\..\*.exe"`) do set refs=..\..\.
.\%~n_Data\Managed
X:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\RimWorld376WinDev\Mods\ModSolars\Source>set
refs=..\..\..\RimWorld376WinDev_Data\Managed
X:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\RimWorld376WinDev\Mods\ModSolars\Source>C:\
Windows\Microsoft.NET\Framework64\v2.0.50727\csc.exe /nologo /noconfig /target:l
ibrary /out:..\Assemblies\Mod.dll Mod.cs /nostdlib /lib:..\..\..\RimWorld376WinD
ev_Data\Managed /r:"mscorlib.dll" /r:"System.dll" /r:"System.Core.dll" /r:"Syste
m.Security.dll" /r:"System.Configuration.dll" /r:"System.Xml.dll" /r:"System.Xml
.Linq.dll" /r:"UnityEngine.dll" /r:"UnityScript.Lang.dll" /r:"Mono.Posix.dll" /r
:"Mono.Security.dll" /r:"Boo.Lang.dll" /r:"Assembly-UnityScript-firstpass.dll" /
r:"Assembly-CSharp-firstpass.dll" /r:"Assembly-CSharp.dll"
X:\XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\RimWorld376WinDev\Mods\ModSolars\Source>pau
se
Press any key to continue . . .
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 11, 2014, 10:50:12 PM
Yeah I get that screen, I added the pause. I dont understand what that does though, thats just to get it to recognize Mod.CS right?
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 11, 2014, 10:54:11 PM
Pause should cause the command prompt to stay open. I updated the previous post again with instructions.
I think I posted that update while you were posting again...

Copy and paste or screenshot the output of that console in the forum, so I can see what the ending is.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 11, 2014, 11:00:20 PM
C:\Users\Kirid\Desktop\modding\rimworldmodding\RimworldTest\RimWorld363Win\Mods\
AModSolars\Source>set _64=

C:\Users\Kirid\Desktop\modding\rimworldmodding\RimworldTest\RimWorld363Win\Mods\
AModSolars\Source>if "x86" == "AMD64" set _64=64

C:\Users\Kirid\Desktop\modding\rimworldmodding\RimworldTest\RimWorld363Win\Mods\
AModSolars\Source>set tools=C:\Windows\Microsoft.NET\Framework\v2.0.50727\

C:\Users\Kirid\Desktop\modding\rimworldmodding\RimworldTest\RimWorld363Win\Mods\
AModSolars\Source>for /F "usebackq delims=." %n in (`dir /a /b "..\..\..\*.exe"`
) do set refs=..\..\..\%~n_Data\Managed

C:\Users\Kirid\Desktop\modding\rimworldmodding\RimworldTest\RimWorld363Win\Mods\
AModSolars\Source>set refs=..\..\..\RimWorld363Win_Data\Managed

C:\Users\Kirid\Desktop\modding\rimworldmodding\RimworldTest\RimWorld363Win\Mods\
AModSolars\Source>C:\Windows\Microsoft.NET\Framework\v2.0.50727\csc.exe /nologo
/noconfig /target:library /out:..\Assemblies\Mod.dll Mod.cs /nostdlib /lib:..\..
\..\RimWorld363Win_Data\Managed /r:"mscorlib.dll" /r:"System.dll" /r:"System.Cor
e.dll" /r:"System.Security.dll" /r:"System.Configuration.dll" /r:"System.Xml.dll
" /r:"System.Xml.Linq.dll" /r:"UnityEngine.dll" /r:"UnityScript.Lang.dll" /r:"Mo
no.Posix.dll" /r:"Mono.Security.dll" /r:"Boo.Lang.dll" /r:"Assembly-UnityScript-
firstpass.dll" /r:"Assembly-CSharp-firstpass.dll" /r:"Assembly-CSharp.dll"

C:\Users\Kirid\Desktop\modding\rimworldmodding\RimworldTest\RimWorld363Win\Mods\
AModSolars\Source>pause
Press any key to continue . . .
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 12, 2014, 09:27:54 AM
Ok, good.

It should have placed C:\Users\Kirid\Desktop\modding\rimworldmodding\RimworldTest\
RimWorld363Win\Mods\AModSolars\Assemblies\Mod.dll ...

Now the Xml change followed by activating the mod should be all you need to do.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 12, 2014, 12:39:51 PM
It's not working. I should be changing the ThingClass of the panels to  Building_PowerPlantSimpleSolar  correct?
I get errors, I dont think its finding that ThingClass. If i switch it back to BuildingComplex it still works, or is there something else I need to change the defintion of
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 12, 2014, 10:54:00 PM
Can you upload your mod w/ the DLL in it? I'll try to help debug it.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 13, 2014, 12:19:25 AM
Ah screw it, I went ahead and fixed it up.
A few Xml changes, added some logging statements for good measure...

Each one gives 0 to 170w of power. It's easy to add a custom field to that building class to have it parse minimum and maximum power outputs, I'll demonstrate that later I think...

You can mash the .cs files into 1 .cs file called 'Mod.cs', then get rid of ModSolar.dll in Assemblies and use that build.cmd file on it, if you plan on rolling your own that way...
In a day or two though, I might release a project I'm working on that enables building mods like this w/o much effort.

You might can handle it from here. :)

[attachment deleted by admin: too old]
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 13, 2014, 01:24:38 AM
Could not find a type named Building_PowerPlantSimpleSolar
Config error in ModSolar: ModSolar has components but it's not a ThingWithComponents
Same error as before. took that rar and put it into a fresh rimworld folder
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 13, 2014, 08:37:59 AM
Shame... I'll try to get it to work in Alpha 2, but that works in Alpha 3...
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: Kirid on March 13, 2014, 08:40:25 AM
Just makes me more anxious for Alpha3, though I really hope I won't have to write codes liek that at all, I like my XML defs.
Title: Re: [MOD] (Alpha 2) Modular Solar Panels
Post by: JackQW on March 15, 2014, 11:31:17 PM
Just FYI, you'll be able to do this without having to compile a dll in Alpha 3, you'll be able to do everything with Xml files, including the C# code, with the tiniest bit of help from an extension mod I'm making... I used your case specifically for testing. :)
Title: Re: [MOD] (Alpha 3) Modular Solar Panels
Post by: Kirid on April 14, 2014, 08:14:37 PM
Updated for Alpha 3, no yellow errors.
Still not able to create a new building type, so they function exactly as before.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels
Post by: Vas on April 17, 2014, 08:12:03 AM
I can't use these solar panels.  They charge at night, which isn't right so they are illogical.  Breaks the game.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels
Post by: Kirid on April 17, 2014, 08:18:52 PM
Yeah that's the known issue. Eventually when I can change it, I will. They charge at a much slower, 28 of these=1 regular panel, so the charge ends up being similar. I wouldn't support a whole base with them though. I only use them to power things far from my main grid, like a small room.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels
Post by: Vas on April 18, 2014, 04:09:06 PM
It'd be really nice if you could change the type of roof above your building.  You could get power from your roof tops! :P  But that'd require a second level of area to be viewable and stuff.  Was just a thought is all.

I'd use this only if the solar panels could work during day time only.  I don't even use solar panels anymore, I just use them for a small but, till I can get my coal burners and nuclear reactors up.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels
Post by: Kirid on April 28, 2014, 12:45:11 PM
Updated! Now change charge depending on light level!

Give it a try Vas!
Thanks to JackQW for his dll example, and pawnstorm for teaching me what I needed to write it up myself.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels
Post by: Vas on April 28, 2014, 07:22:28 PM
Yay, it now depends on light.  :P  it still produces 4 less power than normal solar panels but eh, that's fine.  :P  Now if only you could make it a roof instead of floor like tile.  :P
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Kirid on April 28, 2014, 07:55:16 PM
Yeah the panels would have to produce 106.25 each to be equal with solar panels, which would make some really odd numbers at points, So you give up 4 power for convenience of tinyness.
No idea how to make a new roof, but I'm looking into it.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Vas on April 28, 2014, 09:02:33 PM
Quote from: Kirid on April 28, 2014, 07:55:16 PM
Yeah the panels would have to produce 106.25 each to be equal with solar panels, which would make some really odd numbers at points, So you give up 4 power for convenience of tinyness.
No idea how to make a new roof, but I'm looking into it.
I believe the game would require multiple build levels to be able to build a roof.  I doubt it'll be possible.  Roof panels would be good though because they would be out of your way and such.  They should not however forward power down, only by touching a power forwarding wall can  they supply power to the stuff below them.  In case you figure out a way to do it.I really think the game could be much nicer if they'd allow 3 levels to build with, so you could build roofs on top level, everything on middle, and only certain objects like underground pipes or wires on bottom level.  Colonists wouldn't be able to leave middle level ever.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Kirid on April 28, 2014, 09:45:20 PM
Quote from: Vas on April 28, 2014, 09:02:33 PM
I believe the game would require multiple build levels to be able to build a roof.  I doubt it'll be possible.  Roof panels would be good though because they would be out of your way and such.  They should not however forward power down, only by touching a power forwarding wall can  they supply power to the stuff below them.  In case you figure out a way to do it.I really think the game could be much nicer if they'd allow 3 levels to build with, so you could build roofs on top level, everything on middle, and only certain objects like underground pipes or wires on bottom level.  Colonists wouldn't be able to leave middle level ever.
It would probably fix all the issues with roofed and non-roofed areas. That whole system is super screwy.
And you could build different roof types besides factory standard corrugated steel coated in invisi-spray.
Plenty of games have a level dedicated just to utilites.
If we're talking hypothetical extra z-levels; I would definitely want just one more level for building.
A second floor is very common in buildings, especially western towns (https://www.google.com/search?q=western+town&rlz=1C1PRFC_enUS513US513&es_sm=93&source=lnms&tbm=isch&sa=X&ei=yf9eU9HeHIrH8AG4y4B4&ved=0CAYQ_AUoAQ&biw=1474&bih=824#q=western+town&tbm=isch&imgdii), almost all those buildings are 2 stories high.
The old west just so happens to be a core theme of rimworld.  :'( But Tynan already said never on z-levels right?
I think once you start with z levels it becomes, well why not 3, why not 10, why not 60, why not infinite.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Vas on April 29, 2014, 12:12:37 AM
Quote from: Kirid on April 28, 2014, 09:45:20 PM
It would probably fix all the issues with roofed and non-roofed areas. That whole system is super screwy.
And you could build different roof types besides factory standard corrugated steel coated in invisi-spray.
Plenty of games have a level dedicated just to utilites.
If we're talking hypothetical extra z-levels; I would definitely want just one more level for building.
A second floor is very common in buildings, especially western towns, almost all those buildings are 2 stories high.
The old west just so happens to be a core theme of rimworld.  :'( But Tynan already said never on z-levels right?
I think once you start with z levels it becomes, well why not 3, why not 10, why not 60, why not infinite.

Well, I'm only asking for 3 levels, under, main, roof.  At very absolute most, 4 levels for double layered buildings, but that isn't necessary at all.  What is necessary is the ability to build different roofing.  So at super very ultra LEAST, 2 levels, one for main, one for roof.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: jamieg on April 29, 2014, 04:23:29 PM
so they are working like real solar panels now?
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Kirid on April 29, 2014, 05:42:45 PM
Quote from: jamieg on April 29, 2014, 04:23:29 PM
so they are working like real solar panels now?
Yeah. Night off, full sun=full charge, and varies between.

Just notes:
.003% less power produced for easier math.
The power bar that shows the charge is removed (you can see it go up and down on the regular solars), that was actually the problem in the first place. I could make them act like normal solars but each panel had that huge charge bar. Does anyone want a little charge bar for each panel? I'm pretty sure that's possible.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Austupaio on April 29, 2014, 05:46:52 PM
Personally, I'd like the bar, yeah.

Secondary, but I'd also prefer they were much less efficienct than the true solar panel building. You can place them anywhere, they're cheap, they're walk-able and raiders don't target them, plus for all that you lose a neglible amount of power. Doesn't feel super balanced to me.

Neat mod though, I do like having these when a full 4X4 building just isn't possible.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: jamieg on April 29, 2014, 06:05:07 PM
awesome, im gunna play it a few day with the mod pack, if it works fine is it still cool to add it with next update?
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Kirid on April 29, 2014, 06:14:49 PM
Quote from: Austupaio on April 29, 2014, 05:46:52 PM
Personally, I'd like the bar, yeah.
Secondary, but I'd also prefer they were much less efficienct than the true solar panel building. You can place them anywhere, they're cheap, they're walk-able and raiders don't target them, plus for all that you lose a neglible amount of power. Doesn't feel super balanced to me.
Neat mod though, I do like having these when a full 4X4 building just isn't possible.
Thanks for the feedback!
Now I have them working I can do improvements. New texture, power bar.
Now sure where to make the targetable.
They have low heath, and get destroyed sometimes, from fire often or if placed near targeted objects. Though I increased the health from 30 to 50 with this last update.
16 of them takes up the same space and metal cost(80) as a big solar. Not so OP, they end up costing you more if even 1 gets destroyed.
I'm almost thinking of making them charge more, but be that much weaker (and cost more).

Quote from: jamieg on April 29, 2014, 06:05:07 PM
awesome, im gunna play it a few day with the mod pack, if it works fine is it still cool to add it with next update?

Yeah that's cool ;D I'm pretty sure it's bugless and compatible with everything. Going to run a test game here in a bit.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: knoedel90 on June 30, 2014, 05:31:25 AM
we Need an upadate to Alpha 4.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Kirid on June 30, 2014, 11:35:33 PM
Quote from: knoedel90 on June 30, 2014, 05:31:25 AM
we Need an upadate to Alpha 4.
They have been broken since Alpha 4, they dont charge.
I'm trying to solve it, but it looks like Alpha 5 might get released before I do.
Didn't know anyone liked the mod much so I swept it under the rug
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Cala13er on July 02, 2014, 07:19:07 AM
Quote from: Kirid on June 30, 2014, 11:35:33 PM
Quote from: knoedel90 on June 30, 2014, 05:31:25 AM
we Need an upadate to Alpha 4.
They have been broken since Alpha 4, they dont charge.
I'm trying to solve it, but it looks like Alpha 5 might get released before I do.
Didn't know anyone liked the mod much so I swept it under the rug

I updated them to Alpha 4 myself and they work perfectly fine? Yeah I changed a few bits here and there but works like it should. I'll send you the code.
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: StorymasterQ on July 02, 2014, 08:54:44 PM
Quote from: Cala13er on July 02, 2014, 07:19:07 AM
Quote from: Kirid on June 30, 2014, 11:35:33 PM
Quote from: knoedel90 on June 30, 2014, 05:31:25 AM
we Need an upadate to Alpha 4.
They have been broken since Alpha 4, they dont charge.
I'm trying to solve it, but it looks like Alpha 5 might get released before I do.
Didn't know anyone liked the mod much so I swept it under the rug

I updated them to Alpha 4 myself and they work perfectly fine? Yeah I changed a few bits here and there but works like it should. I'll send you the code.

Woo, send me some of that code, too. Perhaps just upload it here? Also, will it work with A5?
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Cala13er on July 03, 2014, 01:55:47 AM
Modular Solar Panels 1.3

Updated for Alpha 4

Alpha 5 version is ready, will update it when Alpha 5 releases, unless Kirid would prefer I not and he releases his own version. These updates are only up for as long as Kirid hasn't updated it hiself :).

Also, feel free to use my updated version as the actual version, then you can say this is Alpha 4 mod.

[attachment deleted by admin: too old]
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Kirid on July 03, 2014, 10:19:19 AM
Quote from: Cala13er on July 03, 2014, 01:55:47 AM
Modular Solar Panels 1.3

Updated for Alpha 4

Alpha 5 version is ready, will update it when Alpha 5 releases, unless Kirid would prefer I not and he releases his own version. These updates are only up for as long as Kirid hasn't updated it hiself :).
I dont mind. I had some somewhat serious  surgery lately, So updating hasn't been a priority. And Im out of town for this next week. I might take control later but I appreciate you updating it for me :)
Title: Re: [MOD] (Alpha 3) Modular Solar Panels 1.3
Post by: Cala13er on July 03, 2014, 01:55:02 PM
Quote from: Kirid on July 03, 2014, 10:19:19 AM
Quote from: Cala13er on July 03, 2014, 01:55:47 AM
Modular Solar Panels 1.3

Updated for Alpha 4

Alpha 5 version is ready, will update it when Alpha 5 releases, unless Kirid would prefer I not and he releases his own version. These updates are only up for as long as Kirid hasn't updated it hiself :).
I dont mind. I had some somewhat serious  surgery lately, So updating hasn't been a priority. And Im out of town for this next week. I might take control later but I appreciate you updating it for me :)

No problem, I've had surgery before, got my appendix removed, my appendix was so bad that if I left it a few more days to get it checked out it would of burst, and that would of left to death. I know how the aftermath is, painful!
Title: Re: [MOD] (Alpha 6) Modular Solar Panels 1.5
Post by: Kirid on August 13, 2014, 03:44:15 PM
Updated for Alpha 6. Code changed a bit, but otherwise working the same.
I had a chunk of my skull cut out 2 days ago, but its not stopping me updating this time ;D ..Alpha 6!
Title: Re: [MOD] (Alpha 6) Modular Solar Panels 1.5
Post by: Somz on August 14, 2014, 07:02:52 AM
The texture seems a bit...strange, and I have the feeling I've seen something like this before in our world... Hmm.
But anyway, THIS IS SO AWESOME!  ;D
Title: Re: [MOD] (Alpha 6) Modular Solar Panels 1.5
Post by: Kirid on October 03, 2014, 05:29:17 PM
Updated for Alpha 7! Updated to use textures and code introduced in Abrexus's Superior Crafting (http://ludeon.com/forums/index.php?topic=5413.0)!
I like this new texture, several complaints about the old one. Yet I don't like the way it reacts to zooming in the game. This has always been an issue when modding, textures too complex glitch.
Would appreciate feedback concerning the new texture and charge bar.
Title: Re: [MOD] (Alpha 7) Modular Solar Panels 1.6
Post by: conrad812 on October 03, 2014, 05:38:36 PM
awesome, I've been waiting for this to come out.
Title: Re: [MOD] (Alpha 7) Modular Solar Panels 1.6
Post by: daft73 on October 03, 2014, 05:38:42 PM
Ah Kirid..the update is appreciated!  ;)
Title: Re: [MOD] (Alpha 7) Modular Solar Panels 1.6
Post by: Kirid on October 11, 2014, 06:42:42 PM
Just reuploaded, if anyone was getting corrupt file
Title: Re: [MOD] (Alpha 8) Modular Solar Panels 1.7
Post by: Kirid on December 10, 2014, 08:52:24 PM
Updated for alpha 8! Enjoy :)
Title: Re: [MOD] (Alpha 8) Modular Solar Panels 1.7
Post by: Scaremeister on December 13, 2014, 09:05:15 AM
Forum attachment seems borked, could you add a link to an external source?
Title: Re: [MOD] (Alpha 8) Modular Solar Panels 1.7
Post by: Kirid on December 14, 2014, 02:43:55 AM
Sorry for any inconvenience, It's working now.
This and all my other mods are reuploaded.
Title: Re: [MOD] (Alpha 8) Modular Solar Panels 1.7
Post by: coyoteseattle on December 30, 2014, 05:10:05 AM
So I noticed something a little weird with this; I had my entry way covered in modular solar panels to power my turrets, but the turrets couldn't actually shoot anything, because the solar panels were blocking their line of sight.  It looks like that was just because fillPercent was set to 1 in the thingDef. I set it to .025, and now I can actually shoot past them, with a small chance of accidentally hitting each panel I'm shooting over.  Attached is a copy with that modification, for your convenience if you want to use it.

[attachment deleted due to age]
Title: Re: [MOD] (Alpha 8) Modular Solar Panels 1.7
Post by: Kirid on January 02, 2015, 08:43:32 PM
Quote from: coyoteseattle on December 30, 2014, 05:10:05 AM
So I noticed something a little weird with this; I had my entry way covered in modular solar panels to power my turrets, but the turrets couldn't actually shoot anything, because the solar panels were blocking their line of sight.  It looks like that was just because fillPercent was set to 1 in the thingDef. I set it to .025, and now I can actually shoot past them, with a small chance of accidentally hitting each panel I'm shooting over.  Attached is a copy with that modification, for your convenience if you want to use it.
Heh, my bad. Never been sure what fill percent affects. Updated the mod with that, thanks! Also added a research requirement.
Title: Re: [MOD] (Alpha 8) Modular Solar Panels 1.7
Post by: Loki88 on January 11, 2015, 09:15:08 AM
I like the little charge bar on these but is there a way to simplify it to something like an icon or indicator that warns you if they're out of the sun? Other than aesthetics I can't see the reason for the bar since the game doesn't factor in clouds or partial shade yet does it? I'm asking because with around 1000 or more of these panels my computer starts to have serious brain farts with the charge bar animation going up and down.

I guess it would be like a low performance computer version? I'm not trying to knock the mod I really love it, it's just my computer = crap   :'(

Edit: typos :(
Title: Re: [MOD] (Alpha 8) Modular Solar Panels 1.7
Post by: Epyk on January 11, 2015, 09:36:37 AM
Interesting mod, I like.
Title: Re: [MOD] (Alpha 10) Modular Solar Panels 1.9
Post by: Kirid on April 15, 2015, 10:28:44 PM
Updated for Alpha 10!
Mostly unnoteworthy xml/dll updating. I added a slight pathing cost. Now colonists will somewhat avoid walking over the panels (they prefer the fastest path) and walk a bit slower over the panels when they do (to avoid breaking them :p)
The texture is the biggest change. Hopefully no one gets too upset over it.
I like the texture Abrexus made, but had a couple issues with it. I didn't like the transparency much. While it's a cool feature for most objects, I don't think it worked very well in this case. The borders were too thin, and caused visual glitches when scrolling or zooming. I also didn't like the visual of them being separate little panels. Even though you can build them individually to control the size/output of your power needs, I wanted them to seem like they are built as one solid panel with a backing plate. This also makes them seem less flimsy.

For comparison:
(http://i1301.photobucket.com/albums/ag117/Kirid420/Screenshots/Shootout.png) (http://s1301.photobucket.com/user/Kirid420/media/Screenshots/Shootout.png.html) (http://i1301.photobucket.com/albums/ag117/Kirid420/Screenshots/mewsolar.png) (http://s1301.photobucket.com/user/Kirid420/media/Screenshots/mewsolar.png.html) (http://i1301.photobucket.com/albums/ag117/Kirid420/Screenshots/SolarModded.png) (http://s1301.photobucket.com/user/Kirid420/media/Screenshots/SolarModded.png.html)
    Original                                           Abrexus                                     New

Enjoy :) Please report any issues.


Quote from: Loki88 on January 11, 2015, 09:15:08 AM
I like the little charge bar on these but is there a way to simplify it to something like an icon or indicator that warns you if they're out of the sun? I guess it would be like a low performance computer version?
Sorry to reply... 3 months later.. I'll see what I can do. 95% of the charge bar code was copied directly from the vanilla solars. Creating an indicator that is basically in/out of sun might be a bit beyond my skill because I have to write it all custom. At the very least I can make a version with no bar at all.
Title: Re: [MOD] (Alpha 10) Modular Solar Panels 1.9
Post by: mathwizi2005 on April 27, 2015, 05:18:55 PM
I find them a bit OP for their size and mat cost (seriously, 1x1 and only 5 ore gives 500w?)
Title: Re: [MOD] (Alpha 10) Modular Solar Panels 1.9
Post by: Kirid on April 28, 2015, 08:05:37 AM
Quote from: mathwizi2005 on April 27, 2015, 05:18:55 PM
I find them a bit OP for their size and mat cost (seriously, 1x1 and only 5 ore gives 500w?)
They only put out 106w. They are balanced with the vanilla solars, which are 16 squares, cost 80 metal, and put out 1700w. So if you built 16 of these it would cost 80 metal and put out 1696w.
Are you sure yours are putting out 500w? They are capped at 106 within the dll code. The research cost is 500, if that's what you're thinking of?
Title: Re: [MOD] (Alpha 10) Modular Solar Panels 1.9
Post by: mathwizi2005 on April 30, 2015, 12:39:17 AM
Well this is when its running in conjunction to Superior Crafting ;)
Possible conflict there
Title: Re: [MOD] (Alpha 11) Modular Solar Panels 1.10
Post by: Kirid on June 11, 2015, 07:59:00 PM
I don't know anything about the syntax of version numbering, here 1.10, update for alpha 11.
Working as far as I can tell, please report any issues. Enjoy :)
Title: Re: [MOD] (Alpha 11) Modular Solar Panels 1.10
Post by: Tezarius on June 21, 2015, 04:17:12 PM
Hi! On the first post I can see only this message:
[attachment deleted by admin: too old]
Could you restore download link pls?
Title: Re: [A11] Modular Solar Panels (1.10)
Post by: Eisenwulf on June 22, 2015, 02:56:20 PM
Could you post a link for last A10 version please?
Title: Re: [A12] Modular Solar Panels (1.10)
Post by: Loki88 on April 14, 2016, 09:31:01 AM
Can there be an A13 update for this pretty please?
Title: Re: [A13] Modular Solar Panels (1.11)
Post by: Kirid on April 14, 2016, 10:59:34 AM
Just for Loki, Alpha 13 no bars version uploaded.
Minimal testing done, Please report any issues.
Title: Re: [A13] Modular Solar Panels (1.11)
Post by: Loki88 on April 14, 2016, 11:43:17 PM
Quote from: Kirid on April 14, 2016, 10:59:34 AM
Just for Loki, Alpha 13 no bars version uploaded.
Minimal testing done, Please report any issues.

YES!!! Thank you!
Title: Re: [A13] Modular Solar Panels (1.11)
Post by: TheLunatic889 on April 15, 2016, 05:09:26 AM
I'm wondering wheres the update for Alpha 13 but with the bars?
Title: Re: [A13] Modular Solar Panels (1.11)
Post by: makapse on April 15, 2016, 11:47:04 PM
no component costs and breakdown?
Title: Re: [A13] Modular Solar Panels (1.11)
Post by: Kirid on April 16, 2016, 11:04:19 AM
The component cost would have to be 1 minimum. Since a regular solar panel is only 3 components, these would be extremely expensive. Vanilla solar are ~ 6.25 metal per tile, so I put the cost of these modulars to 7 metal. Unless a major rebalance of components happens, that's the best I could do.

Barred version in the works, still working on some things. No bar version is missing a few things like the breakdown.
Title: Re: [A13] Modular Solar Panels (1.11)
Post by: Kirid on April 26, 2016, 02:35:08 PM
Barred version is here finally.
Fixed some hidden xml errors due to missing Building_Base. Removed the component breakdown (It ends up being ridiculously expensive to maintain.)
Working on a more fair version. Expensive 1 component cost for each; yet produce more power. No breakdown, yet still very low health. Longer research time?
Title: Re: [A13] Modular Solar Panels (1.11)
Post by: CurrentlyFapping on May 23, 2016, 04:48:55 PM
Yo, I use to use this mod a lot back in A10+ and now with A13s components I noticed this mod became a bit OP.

While this might be a bit of a messy solution perhaps you could give us a way to break down a single component into say X number of miniature components. So each little panel is just 1 of these smaller components. I know that may not be ideal but I figured I'd share the suggestion. I'm hesitant to use the mod otherwise.

Still love the idea behind the mod, hopefully you're able to balance it out with the new components.