Ludeon Forums

Ludeon Forums

  • September 24, 2020, 01:29:05 AM
  • Welcome, Guest
Please login or register.

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

Author Topic: [A17] Water Power  (Read 25497 times)

Swenzi

  • Muffalo
  • *
  • Posts: 11
  • Refugee
    • View Profile
[A17] Water Power
« on: June 16, 2017, 12:54:49 PM »

Adds new power generation buildings that use hydropower.
Download Available At: https://github.com/yliankuo/WaterPower
Steam Link: http://steamcommunity.com/sharedfiles/filedetails/?id=934418281

Additions:

Underwater Power Cable:
Designed to built underwater, as such is unbuildable on land. Cost: 2 Steel.

Water Turbine:
Designed to generate power from river tiles. Increased power output during
rain/thunderstorms. Can only be built in deep moving water tiles.
Cost: 150 Steel, 2 Components

Tidal Plant:
Designed to generate from the ocean. Power output can be boosted by up to 300%
from the use of Tidal Turbines (10 max). Can only be built in shallow ocean
water tiles. Requires Tidal Power research. Cost: 750 Steel, 50 Plasteel, 30 Components

Tidal Turbine:
Boosts the power output of the tidal plant by 20%, boost can be stacked up to
10 times. Can only be built in ocean tiles. Requires Tidal Power research.
Cost: 100 Steel, 7 Plasteel, 4 Components

Lighthouse:
Misc. building that produces light in a large area, only built on ocean tiles.
Cost: 200 Steel, 10 Components

Power Output:

Water Turbine Base Output: 1250 Watts to 2500 Watts
Rain Effect:
Up to 500 Watts of increased power output increase during thunderstorms/rain.

Tidal Plant Base Output: 4000 Watts (up to 12000 Watts, vial Tidal Turbines)
Rain Effect:
Up to 500-1500 Watts of increased power output increase during thunderstorms/rain.

v1.1.0
-Rebalanced/Reworked Water Turbine image/requirements/cost/output
-Added Tidal Plant and Tidal Turbines
-Added Lighthouse
v1.0.2
-Underwater Power Cables no longer block path
v1.0.1
-Balancing issues, modified power output from different water tiles.
-Added Electricity research requirement.
v1.0.0
-Initial Release



Compatability:
Compatible with Basic Bridges by Rainbeau, Bridgello by Shinzy, and Vegetable Garden by Dismarzero. However error messages occur in dev log due xpathing conflicts that DO NOT effect gameplay. If you wish to remove those error messages, check out the compatibility patch available at the SubMod below:
https://github.com/yliankuo/WaterPower--Basic-Bridges-Compatible-

Please report other compatibility issues.


Suggestions:
Suggestions on balancing/additional features for the mod would be appreciated.


Credits:
-Swenzi: Coding Mechanics
-Zairya: Textures
-Skratchey: Sounds
-DrizzlyBear: Bug Testing

[attachment deleted by admin due to age]
« Last Edit: June 16, 2017, 12:59:40 PM by Swenzi »
Logged

Swenzi

  • Muffalo
  • *
  • Posts: 11
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #1 on: June 16, 2017, 12:55:16 PM »

Reserved.
Logged

Swenzi

  • Muffalo
  • *
  • Posts: 11
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #2 on: June 16, 2017, 12:55:29 PM »

Reserved.
Logged

SpaceDorf

  • Transcendent
  • *****
  • Posts: 4083
  • Secretly Captain Obvious
    • View Profile
Re: [A17] Water Power
« Reply #3 on: June 16, 2017, 04:37:59 PM »

First :)
Right from the wishlist.
Thank you swenzi, Subscribed.
Logged
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Swenzi

  • Muffalo
  • *
  • Posts: 11
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #4 on: June 16, 2017, 04:59:52 PM »

First :)
Right from the wishlist.
Thank you swenzi, Subscribed.

Cool. If you wanna elaborate on that wishlist, it might give me some mod ideas.
Logged

AngleWyrm

  • Planetologist
  • ****
  • Posts: 1154
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #5 on: June 16, 2017, 09:54:05 PM »

This post explains how to make an xpath statement that isn't going to generate duplicate field errors. Quick recap:

<Operation Class="PatchOperationSequence">
  <success>Always</success>
  <operations>
    <li Class="PatchOperationTest">
      <xpath>*/ThingDef[defName = "ChosenThingy"]/elementThatIWannaAdd</xpath>
      <success>Invert</success>
    </li>
    <li Class="PatchOperationAdd">
      <xpath>*/ThingDef[defName = "ChosenThingy"]</xpath>
      <value>
        <elementThatIWannaAdd> someValue </elementThatIWannaAdd>
      </value>
    </li>
  </operations>
</Operation>
« Last Edit: June 16, 2017, 10:10:00 PM by AngleWyrm »
Logged
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Swenzi

  • Muffalo
  • *
  • Posts: 11
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #6 on: June 16, 2017, 11:23:39 PM »

This post explains how to make an xpath statement that isn't going to generate duplicate field errors. Quick recap:

<Operation Class="PatchOperationSequence">
  <success>Always</success>
  <operations>
    <li Class="PatchOperationTest">
      <xpath>*/ThingDef[defName = "ChosenThingy"]/elementThatIWannaAdd</xpath>
      <success>Invert</success>
    </li>
    <li Class="PatchOperationAdd">
      <xpath>*/ThingDef[defName = "ChosenThingy"]</xpath>
      <value>
        <elementThatIWannaAdd> someValue </elementThatIWannaAdd>
      </value>
    </li>
  </operations>
</Operation>


So if i use this to test than I won't need the submod?
Logged

PixelBitZombie

  • Drifter
  • **
  • Posts: 98
  • 5th of Hearts
    • View Profile
    • PixelBitZombie's Twitch
Re: [A17] Water Power
« Reply #7 on: June 17, 2017, 12:56:34 AM »

Is anyone able to use the water turbine in deep water? I got the materials but it's not working. The light house works and looks great, I haven't got to the research yet so maybe this is why. But thought I'd give you a heads up!

Edit: Deep Moving Water, odd I figured the ocean would be considered this. Doesn't matter, this mod still kicks ass, water power is great when starting out like wind.
« Last Edit: June 17, 2017, 02:21:20 AM by PixelBitZombie »
Logged
"When logic and proportion have fallen sloppy dead
And the White Knight is talking backwards
And the Red Queen's off with her head"

AngleWyrm

  • Planetologist
  • ****
  • Posts: 1154
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #8 on: June 17, 2017, 01:09:25 AM »

So if i use this to test than I won't need the submod?
I've used this test to do the same thing: Add a sub-element if it doesn't exist.

The error messages are saying that two separate attempts (by two different mods) were made to add a specific element, and so it failed the second time because that element already exists.

This test checks to see if the element already exists (maybe because some other mod created it), and if it doesn't then there's a spot in there to add the element. And if it does already exist, then the check quietly bails out of it's sequence without spilling big red oops onto the user's screen.
« Last Edit: June 17, 2017, 01:21:07 AM by AngleWyrm »
Logged
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Antaios

  • Drifter
  • **
  • Posts: 79
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #9 on: June 17, 2017, 05:30:32 AM »

So if i use this to test than I won't need the submod?
I've used this test to do the same thing: Add a sub-element if it doesn't exist.

The error messages are saying that two separate attempts (by two different mods) were made to add a specific element, and so it failed the second time because that element already exists.

This test checks to see if the element already exists (maybe because some other mod created it), and if it doesn't then there's a spot in there to add the element. And if it does already exist, then the check quietly bails out of it's sequence without spilling big red oops onto the user's screen.

Do take note that PatchSequenceTest operates per file, not global and not per def.

So if for example you're editing ThingDefs and looking to add RandomProperty1 if it doesn't exist in any of them, you need to be sure that no single file contains both ThingDefs which are missing RandomProperty1 and ThingDefs which include RandomProperty1 already.

It's why when I did that, I use a placeholder tag and some gymnastics with '../' in xpath, rather than PatchOperationTest.
« Last Edit: June 17, 2017, 05:34:19 AM by Antaios »
Logged

AngleWyrm

  • Planetologist
  • ****
  • Posts: 1154
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #10 on: June 17, 2017, 08:03:37 PM »

Do take note that PatchSequenceTest operates per file, not global and not per def.
There should be no connection between xpath data searches and the underlying physical storage of that data.

The assertion that there is implies a defect in the implementation of the PatchSequenceTest function. Can you construct a test case that fails if the test draws values from different files, but succeeds if those values are drawn from the same file?
« Last Edit: June 17, 2017, 08:05:08 PM by AngleWyrm »
Logged
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Antaios

  • Drifter
  • **
  • Posts: 79
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #11 on: June 17, 2017, 10:34:16 PM »

Do take note that PatchSequenceTest operates per file, not global and not per def.
There should be no connection between xpath data searches and the underlying physical storage of that data.

The assertion that there is implies a defect in the implementation of the PatchSequenceTest function. Can you construct a test case that fails if the test draws values from different files, but succeeds if those values are drawn from the same file?

It is evident in the code, if you take a look at ModContentPack.LoadDefs(IEnumerable<PatchOperation> patches), PatchOperation, PatchOperationSequence and PatchOperationTest.
But a simple test is to take tuning fork, and in the core defs of Rimworld, add a blank abstract in Core\Defs\ThingDefs_Items.xml which has an ingestible/chairSearchRadius. You'll notice the patch no longer works on core meals.

Sorry Swenzi, since this is only half relevant to your mod :/.
I copied the discussion the mod help forum, AngelWyrm.
« Last Edit: June 17, 2017, 11:15:32 PM by Antaios »
Logged

MadsMartinMadsen

  • Muffalo
  • *
  • Posts: 13
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #12 on: June 20, 2017, 05:21:21 AM »

Looks very interesting, I have to try it out.
Honestly the first thought I had when I saw there was rivers in A17 was "I wonder how long till watermills or water power"  ;D
Logged

asquirrel

  • Colonist
  • ***
  • Posts: 489
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #13 on: June 25, 2017, 11:32:06 AM »

The water generator is listed and I can drag the blueprint but there is no body of water I can place it in.  I've tried all colors of water (light and dark blue) but the blueprint stays red.  Is there a technology I have to research before I can place it?  Thanks!

Edit: 
I have the base water power mod installed and then the patch for basic bridges installed below that.  It looks like this in my mods list:

WaterPower
WaterPower [Basic Bridges Compatible]
« Last Edit: June 25, 2017, 11:38:27 AM by asquirrel »
Logged

jts1702

  • Drifter
  • **
  • Posts: 20
  • Refugee
    • View Profile
Re: [A17] Water Power
« Reply #14 on: June 25, 2017, 12:17:41 PM »

The water generator is listed and I can drag the blueprint but there is no body of water I can place it in.  I've tried all colors of water (light and dark blue) but the blueprint stays red.  Is there a technology I have to research before I can place it?  Thanks!

Edit: 
I have the base water power mod installed and then the patch for basic bridges installed below that.  It looks like this in my mods list:

WaterPower
WaterPower [Basic Bridges Compatible]

Nothing. You are not putting in MOVING water (which are what river tiles are - they are not typical water tiles). Ponds and swamps do not generate water, and seawater is another beast altogether (which is what the tidal power station is for).
Logged
Pages: [1] 2