Changing things in CORE (not mod)

Started by confusedwings, August 31, 2015, 07:01:08 AM

Previous topic - Next topic

confusedwings

hi all,

I would love to know what and where i would have to change a core file to get a higher output from the solar generator.

I love the game but i keep running in some problems.
1. My colony is more like a warehouse because it's loaded with items, stuff and/or food.
2. I make my base inside a mountain. Outside it's a mess... full of solar generators, wind turbines etc
so much it's almost impossible to protect anything.

sollution:
- download a mod to store more things (and get a *** load of stuff extra).
- Change the game (core)

i did the last.
- Download Notepad++ (https://notepad-plus-plus.org/download/v6.8.2.html)
- Searched for 'stacklimit' in core.
- look at every result and changed what i wanted to be changed.

but for the solar generation i don't know how or what to look for.
could anybody help me?


Shinzy

from memory
(I can't check the files from where I am right now!)

in Core/Defs/ThingDefs/Buildings_Power.xml <- open this with your notepad!
find the Solar generator's thingdef
study the strings of text under that
and you'll find something power related (they're all quite logical, you should be able to find it without too much effort)
I'd be more specific if I could, sorry! ;D
Someone else can fill in the details I'm sure

confusedwings

thx for the respond.
i found this:

  <ThingDef ParentName="BuildingBase">
    <defName>SolarGenerator</defName>
    <label>solar generator</label>
    <thingClass>Building_PowerPlantSolar</thingClass>
    <graphicData>
      <texPath>Things/Building/Power/SolarCollector</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(4,4)</drawSize>
    </graphicData>
    <altitudeLayer>Waist</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>70</pathCost>
    <fillPercent>0.5</fillPercent>
    <castEdgeShadows>true</castEdgeShadows>
    <statBases>
      <MaxHitPoints>300</MaxHitPoints>
      <WorkToMake>2500</WorkToMake>
      <Flammability>1.0</Flammability>
    </statBases>
    <tickerType>Normal</tickerType>
    <description>Produces electricity from sunlight. Does not work in the dark.</description>
    <size>(4,4)</size>
    <building>
      <ignoreNeedsPower>true</ignoreNeedsPower>
    </building>
    <costList>
      <Steel>100</Steel>
    </costList>
    <comps>
      <li>
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>-1</basePowerConsumption>
        <transmitsPower>true</transmitsPower>
        <powerToggleable>false</powerToggleable>
      </li>
    </comps>
    <terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
    <designationCategory>Power</designationCategory>
    <staticSunShadowHeight>0.20</staticSunShadowHeight>
    <designationHotkey>L</designationHotkey>
    <constructEffect>ConstructMetal</constructEffect>
  </ThingDef>

So i guess i should change the 'staticSunShadowHeight'...?
I would think if i increase the '0.20' for example to '0.40' that would double the output of the panel ingame?

I wanna make sure it's correct befor i do this... Thx for the help so far... much better then the ppl just reading and leaving this. THX FOR REAL

Shinzy

#3
It is actually the Power consumption!
it seems to be have changed since the alphas I last fiddled with them
(You can't seem to change the power generation rate of solar panels through the xml files anymore, if you've ever could) Think it's something to do with how the daylight stuff works I don't know

But! you can still change the other two power generation things
if you wish you could boost the Geothermal power
(if you scroll down some more you'll see it. The -3600 power consumption)
at negative numbers it generates power instead of consume it ;D

        <basePowerConsumption>-3600</basePowerConsumption>

Just boost that up to what you'd think would suit you better
Or you can change the Windmill's power "consumption" (it has it's own xml file beneath the building_power)
These should still make visible change in the game

But but do report back if it does nothing I can alert some bigger brains to have a look
incase nobody else stumbles in this thread ;D

1000101

#4
I think the bigger problem is your play strategy but hopefully this will help:

Sun shadows have nothing to do with anything except the shadow a building has from the...sun.

The Solar Generator is hard-coded to produce a maximum of 1700 watts in full-daylight conditions.

The Wind Turbine is xml definable and the "basePowerConsumption" is set to -2000 (2000 watts produced), which is 2/3 it's maximum output (wind turbines can been seen in game to produce up to 3000 watts in high winds).

Simply put, if "basePowerConsumption" is positive, the building will use power, if it's negative, it will produce power.  You can make any building a power user or generator by having the CompPowerTrader component ("comp") and setting the basePowerConsumption appropriately.

As to item creep, that is a problem of the genre.  There are several mods dealing with both of these issues (power and item creep) and can help you in your management of.

I personally use:
A2B - Conveyor belts to move items around
RT Storage - Quantum stockpiles, warehouses and relays to multi-stack items
RTGs and ASRGs - Small nuclear power plants
Mechanical Defense 2 (MD2) - Industry (to make steam geysers for geothermal plants) and Power (for a "cheap" power generator)

Other mods I know of:
Mechanical Defence 2 - Deep Storage Unit (I prefer RT Storage)
Miscellaneous (w/ MAI+Robots) - Nano Storage
Clutter - Plasma Generator, also has some storage buildings which are one-stack per cell but pretty to look at as storage goes
Tools for Haul (A11) - Backpacks and carts so your pawns can haul more at once

The above is not exhaustive and there are certainly more mods than that.

And don't forget to build trade beacons and a comms console to sell off your excess stocks.  If traders aren't coming around enough for you, look into the "good" incidents (defs) and change the chance of traders to something more fitting to your needs (lower is more often).
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By