Ludeon Forums

Ludeon Forums

  • August 18, 2019, 01:16:27 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: [A16] Link's Mods - Solar Weather, Expert Quality  (Read 11288 times)

Kyna Tiona

  • Colonist
  • ***
  • Posts: 119
  • Holy crackers!
    • View Profile
[A16] Link's Mods - Solar Weather, Expert Quality
« on: January 11, 2017, 03:50:24 AM »

Downloads


Downloads:
Solar Weather   2017-1-11c      GDrive         Rebalances solar panels around adverse weather, adding some realism.
Expert Quality   2017-1-14b      GDrive         Makes crafted items' quality more consistent.

How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.








Solar Weather

Description:
Rebalances solar panels to work more like wind turbines. They have a higher maximum output (3000W over the old 1700W), but their output fluctuates based on adverse weather conditions in addition to light levels. You may find solar panels to be a far more effective energy source than wind turbines in an area with amenable weather and cool temperatures, rather than their previous state of simply not being competitive.

As an added feature, they now display how much of their output is being stifled by roofs or weather.



Balance:
Solar panels' outputs relative to vanilla are much higher output on clear days, around the same in rain and light snow, much less in fog and rainy thunderstorms, and none at all in hard snow. Heat will also lower output, and latitude is as bad for solar as ever, so the driest biomes will require their own cautious decisions.

You should see a much higher total power output, but it will fluctuate more and have more frequent outages, requiring more careful energy management overall. Feedback would be greatly appreciated.

Compatibility:
This modifies solar panels' and eclipses' defs as well as replacing solar panel's thing class, making it incompatible with basically anything that alters solar panels or eclipses.

Credits
I would've just floundered around for a bit before giving up on modding RimWorld if Grim hadn't gotten me started. Thanks, Grim!






Expert Quality

Description:
You may have seen your Godlike tailer put out a shoddy tuque or your Incompetent artist make an excellent sculpture and found this odd. From a storytelling standpoint, it's easy to explain as the former having a bad day and the latter showing signs of potential greatness, which is an enjoyable narrative.

...The first few times. However, if you looked at the numbers, you'd find that the chance of making a shoddy item don't drop below 1% until Strong Master. A "Skilled Professional" makes a poor item every fifth attempt. This is because vanilla RimWorld uses a simple normal distribution model, where any result is possible (if not always likely) at any skill level.

This can be considered true to life, but that may or may not make it enjoyable. For me, the consistency with which "planet-class masters" and "legendary" crafters make middling or low-quality goods makes me doubt the validity of those titles while wondering what the point of having skilled crafters is.

This took me out of the experience, so I replaced the previous model with a more tabletop-esque model. The specific formulas (as well as precise numbers) are included in the download, but the gist is that you should see more consistent results from your crafters, for good and for ill.

Balance:
Previously, it was difficult to have a functional import/export economy, as too many of your manufactured goods would come out being worth less than the raw materials. This is no longer the case, making it potentially quite profitable to buy raw materials from traders, turn it in to a quality item, and then sell it back.

As vanilla was not really designed for this dynamic, this may or may not break the economic system. It also radically increases the value of skilled crafters, so you may find that vanilla learning speed feels faster than it should. Feedback would be greatly appreciated.

Compatibility:
This does nothing but detour a single function that does nothing but return a random quality level relative to the crafter's level. This should be 100% compatible with everything except another mod to do the same thing.

Requires the ever-amazing HugsLib.

[attachment deleted by admin due to age]
« Last Edit: January 14, 2017, 05:54:04 AM by Caraise Link »
Logged

Senio

  • Drifter
  • **
  • Posts: 64
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #1 on: January 11, 2017, 08:24:12 AM »

Thanks.
Logged

deathstar

  • Colonist
  • ***
  • Posts: 106
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #2 on: January 11, 2017, 08:29:10 AM »

Very cool changes, should be part of vanilla really! Do you think it's possible for desert-biomes to give a boost to solar energy generated during sunny weather?
Logged

Senio

  • Drifter
  • **
  • Posts: 64
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #3 on: January 11, 2017, 09:42:47 AM »


Rebalances solar panels to work more like wind turbines. They have a higher maximum output (3000W over the old 1700W), but their output fluctuates based on adverse weather conditions in addition to light levels. You may find solar panels to be a far more effective energy source than wind turbines in an area with amenable weather and cool temperatures, rather than their previous state of simply not being competitive.

As an added feature, they now display how much of their output is being stifled by roofs or weather.

Hi,Caraise Link
how can modify 3000w max? i think 3000w too much
Logged

Canute

  • Transcendent
  • *****
  • Posts: 7519
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #4 on: January 11, 2017, 10:28:16 AM »

I didn't try them yet, but
- does the panels can get dusty or snowed too ?
If not maybe ask the author from Mars, the panells of his mod will get dusty during a sandstorm.
Logged

vlad_1492

  • Muffalo
  • *
  • Posts: 14
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #5 on: January 11, 2017, 10:47:00 AM »

Thanks for this, I like the added realism.

I wonder if latitude could be factored in, as the further from the equator you go the more atmosphere the light gets filtered through, reducing available energy. 

Dust and snow would be awesome!
Logged

XeoNovaDan

  • Super Tester
  • Planetologist
  • ***
  • Posts: 1566
  • Yee-Haw!
    • View Profile
Re: [A16] Solar Weather
« Reply #6 on: January 11, 2017, 11:01:09 AM »

how can modify 3000w max? i think 3000w too much

My knowledge in C# is non-existent; I only know a limited amount of Python, Lua (from when I vainly tried to take up Scripting on ROBLOX donkey's years ago), and XML, but I think I can provide an answer to this.

You'll want to go to Source/ExampleMod/ExampleMod/CompPowerPlantSolarWeather.cs, and change the following:

Code: [Select]
private static readonly float MaxDayPower = 1f; on line 15

Change 1f to the variable of your suiting, assuming 1f is equivalent to 3000W. For example, 0.6f would be 1800W (if I'm not mistaken). I think a nice number would be 2100W or 0.7f
« Last Edit: January 11, 2017, 11:06:11 AM by XeoNovaDan »
Logged
My mods - Turret Extensions, Adjustable Predator Count, Profitable Weapons and various other goodies

Senio

  • Drifter
  • **
  • Posts: 64
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #7 on: January 11, 2017, 11:15:14 AM »

how can modify 3000w max? i think 3000w too much

My knowledge in C# is non-existent; I only know a limited amount of Python, Lua (from when I vainly tried to take up Scripting on ROBLOX donkey's years ago), and XML, but I think I can provide an answer to this.

You'll want to go to Source/ExampleMod/ExampleMod/CompPowerPlantSolarWeather.cs, and change the following:

Code: [Select]
private static readonly float MaxDayPower = 1f; on line 15

Change 1f to the variable of your suiting, assuming 1f is equivalent to 3000W. For example, 0.6f would be 1800W (if I'm not mistaken). I think a nice number would be 2100W or 0.7f

Thank you , nice number 2100w
Logged

asquirrel

  • Colonist
  • ***
  • Posts: 481
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #8 on: January 11, 2017, 11:37:04 AM »

Wow, great mod man!  I agree this is something that should be included in the vanilla version!
Logged

Senio

  • Drifter
  • **
  • Posts: 64
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #9 on: January 11, 2017, 01:00:51 PM »

Waiting wind turbines fixed  :D :D
Logged

swampslug

  • Muffalo
  • *
  • Posts: 14
  • Refugee
    • View Profile
Re: [A16] Solar Weather
« Reply #10 on: January 11, 2017, 02:27:28 PM »

how can modify 3000w max? i think 3000w too much

My knowledge in C# is non-existent; I only know a limited amount of Python, Lua (from when I vainly tried to take up Scripting on ROBLOX donkey's years ago), and XML, but I think I can provide an answer to this.

You'll want to go to Source/ExampleMod/ExampleMod/CompPowerPlantSolarWeather.cs, and change the following:

Code: [Select]
private static readonly float MaxDayPower = 1f; on line 15

Change 1f to the variable of your suiting, assuming 1f is equivalent to 3000W. For example, 0.6f would be 1800W (if I'm not mistaken). I think a nice number would be 2100W or 0.7f

Wouldn't changing line 39 of Defs\ThingDefs_Buildings\Buildings_Power.xml from
Code: [Select]
<basePowerConsumption>-3000</basePowerConsumption>
to
Code: [Select]
<basePowerConsumption>-2100</basePowerConsumption>
achieve the same effect without having to recompile the dll?
Logged

XeoNovaDan

  • Super Tester
  • Planetologist
  • ***
  • Posts: 1566
  • Yee-Haw!
    • View Profile
Re: [A16] Solar Weather
« Reply #11 on: January 11, 2017, 03:21:07 PM »

Wouldn't changing line 39 of Defs\ThingDefs_Buildings\Buildings_Power.xml from
Code: [Select]
<basePowerConsumption>-3000</basePowerConsumption>
to
Code: [Select]
<basePowerConsumption>-2100</basePowerConsumption>
achieve the same effect without having to recompile the dll?

Hmm, didn't see that :P
Logged
My mods - Turret Extensions, Adjustable Predator Count, Profitable Weapons and various other goodies

Kyna Tiona

  • Colonist
  • ***
  • Posts: 119
  • Holy crackers!
    • View Profile
Re: [A16] Solar Weather
« Reply #12 on: January 11, 2017, 06:31:24 PM »

Thanks.

You're very welcome!

Very cool changes, should be part of vanilla really! Do you think it's possible for desert-biomes to give a boost to solar energy generated during sunny weather?

I am deeply embarrassed to say that I had to look this up when making the mod. Deserts don't actually get more sunlight per se; the sun is pretty indiscriminate in that regard. They just don't have so much rain, fog, snow, etc. to stop it from reaching the surface.

My understanding is that clouds don't actually hinder solar panels as much as you'd think either, and RimWorld's weather system doesn't currently handle clouds anyway. Deserts are probably fine the way they are. Especially because cold deserts are a thing, and on super-cold planets, they stand to be as amazing as wind turbines on ice sheets.

Actually, this mod is probably broken for colonies made on ice sheets near the equator of a super-cold planet. Oops!

I didn't try them yet, but
- does the panels can get dusty or snowed too ?
If not maybe ask the author from Mars, the panells of his mod will get dusty during a sandstorm.

Solar panels are typically placed at an angle so that snow and other debris tends to rolls off. The panels themselves also tend to be as much as ~20 C warmer than their environment, so in most weather conditions snow will melt and slide off even if it's stuck firmly.

Realistically, cleaning should probably be a thing, but I felt it was a lot of work to make for a mechanic that many players would probably just find frustrating.

I wonder if latitude could be factored in, as the further from the equator you go the more atmosphere the light gets filtered through, reducing available energy. 

Vanilla totally does this, actually. I was honestly depending on it for balance, because otherwise the poles would be solar energy havens.

Hmm, didn't see that :P

Geez, guy, I went and made responsible code just for these situations, and you go and overlook it~
Logged

Qwynn

  • Drifter
  • **
  • Posts: 38
    • View Profile
Re: [A16] Solar Weather
« Reply #13 on: January 12, 2017, 12:22:14 AM »

Oh! This looks interesting to try out!

On load up though I get this warring. Should we be concerned about that?

Code: [Select]
Type CompPowerPlantSolarWeather probably needs a StaticConstructorOnStartup attribute, because it has a field PowerPlantSolarBarFilledMat of type Material. All assets must be loaded in the main thread.
Verse.Log:Warning(String)
Verse.StaticConstructorOnStartupUtility:ReportProbablyMissingAttributes()
Verse.PlayDataLoader:<DoPlayLoad>m__6F8()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update()
Verse.Root_Entry:Update()
Logged

Kyna Tiona

  • Colonist
  • ***
  • Posts: 119
  • Holy crackers!
    • View Profile
Re: [A16] Solar Weather
« Reply #14 on: January 12, 2017, 12:47:36 AM »

On load up though I get this warring. Should we be concerned about that?

Oh, I didn't realize that was throwing a warning. I guess I forgot to run it in dev mode to see the full log, lesson learned. It looks like an easy fix, so I'll look into it in a moment. I don't expect it will cause any noticeable problems in the meantime.

EDIT: Updated, this should be fixed now.
« Last Edit: January 12, 2017, 12:58:33 AM by Caraise Link »
Logged
Pages: [1] 2