[A13] Modular Solar Panels (1.11)

Started by Kirid, March 11, 2014, 09:29:52 AM

Previous topic - Next topic

Kirid

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?
You can't rollerskate in a muffalo herd

JackQW

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.

Kirid

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 . . .
You can't rollerskate in a muffalo herd

JackQW

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

Kirid

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
You can't rollerskate in a muffalo herd

JackQW

Can you upload your mod w/ the DLL in it? I'll try to help debug it.

JackQW

#21
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]

Kirid

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
You can't rollerskate in a muffalo herd

JackQW

Shame... I'll try to get it to work in Alpha 2, but that works in Alpha 3...

Kirid

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.
You can't rollerskate in a muffalo herd

JackQW

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

Kirid

Updated for Alpha 3, no yellow errors.
Still not able to create a new building type, so they function exactly as before.
You can't rollerskate in a muffalo herd

Vas

I can't use these solar panels.  They charge at night, which isn't right so they are illogical.  Breaks the game.
Click to see my steam. I'm a lazy modder who takes long breaks and everyone seems to hate.

Kirid

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.
You can't rollerskate in a muffalo herd

Vas

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.
Click to see my steam. I'm a lazy modder who takes long breaks and everyone seems to hate.