[1.0] Centralized Climate Control (v1.5.0 - 21st October '18)

Started by coldtoad, July 11, 2017, 06:50:20 AM

Previous topic - Next topic

frenchiveruti

Hey ColdToad, will you consider updating the mod download links? It keeps linking to the old version with the wall destroying bug.
thanks-

coldtoad

Quote from: Nightinggale on November 27, 2017, 08:52:19 PM
Quote from: coldtoad on October 20, 2017, 12:15:30 AMLet's see what we can do. I was thinking of duplicating the code base and implement the above features. If you would be willing to contribute with some of the code, I would be happy to work together!
Just for the record I haven't forgotten this statement and I still would like to work on such game mechanics at some point. However as it turned out, it seemed that first BoneMod and then patching became topics to take my modding time. I still have a point on the todo list where I plan to get back to this mod.

In the next update, more vents will be added. But I need to scale them appropriately. Currently, I think the Vents are a little OP. To scale them, I need to adjust the weights as well as the formula for temperature change.

Here are the following Vents:

1) Wall Vent - Regular Current Vents
Exhaust Ouput: 100
Cost: 70 Steel

2) Small Wall Vent - Smaller Wall Vent
Exhaust Ouput: 50
Cost: 35 Steel

3) Surround Vent - Surround Exhaust; Full Size Vent
Exhaust Ouput: 300
Cost: 210 Steel

4) Wide Surround Vent - Surround Exhaust; 2x1 Size Vent
Exhaust Ouput: 600
Cost: 420 Steel

Current Temperature Change Formula:

// Flow Efficiency is capped at 1.0f.
magnitudeChange = temperatureDifference (between outside and room but capped at 10.0 degrees)
efficiencyImpact = FlowEfficiency * FlowEfficiency;
smoothMagnitude =  magnitudeChange * 0.25f * (ExhaustOutput / 100.0f);

// Rimworld's Heater / Cooler code
// I feel this needs a change as it makes no sense to me.
energyLimit = smoothMagnitude * efficiencyImpact * 4.16666651f * 12f * signChanger;
tempChange = GenTemperature.ControlTemperatureTempChange(intVec, Map, energyLimit, outsideTemp);

Would greatly appreciate if anyone could pitch in and explain what's happening in the Heater/Cooler formula.

The update is on Github, you'll need to download the ZIP of the master branch in order to test it. To edit the formula, one needs to build the DLL which is a pain for a tester.

coldtoad

Quote from: frenchiveruti on December 06, 2017, 04:25:49 PM
Hey ColdToad, will you consider updating the mod download links? It keeps linking to the old version with the wall destroying bug.
thanks-

Sorry forgot to reply, if you are referring to the Google Drive link, it was fixed around that time. I hope you were able to get the new zips.

sidfu

hmm the <defName>AirVent</defName> like vent not showing in my game. everything else shows

Farry

please help, im scared to start a new game (debug log shows first lines in yellow):

Def-linked translation error: Found no Verse.ThingDef named AirVent_Blueprint to match AirVent_Blueprint.label
Verse.Log:Warning(String)
Verse.DefInjectionPackage:InjectIntoDefs()
Verse.LoadedLanguage:InjectIntoData_Patch1(Object)
Verse.PlayDataLoader:<DoPlayLoad>m__1()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()

Def-linked translation error: Found no Verse.ThingDef named AirVent_Frame to match AirVent_Frame.label
Verse.Log:Warning(String)
Verse.DefInjectionPackage:InjectIntoDefs()
Verse.LoadedLanguage:InjectIntoData_Patch1(Object)
Verse.PlayDataLoader:<DoPlayLoad>m__1()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()

Def-linked translation error: Found no Verse.ThingDef named AirVent_Frame to match AirVent_Frame.description
Verse.Log:Warning(String)
Verse.DefInjectionPackage:InjectIntoDefs()
Verse.LoadedLanguage:InjectIntoData_Patch1(Object)
Verse.PlayDataLoader:<DoPlayLoad>m__1()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()

Harry_Dicks

Quote from: Farry on January 02, 2018, 08:05:18 AM
please help, im scared to start a new game (debug log shows first lines in yellow):

Def-linked translation error: Found no Verse.ThingDef named AirVent_Blueprint to match AirVent_Blueprint.label
Verse.Log:Warning(String)
Verse.DefInjectionPackage:InjectIntoDefs()
Verse.LoadedLanguage:InjectIntoData_Patch1(Object)
Verse.PlayDataLoader:<DoPlayLoad>m__1()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()

Def-linked translation error: Found no Verse.ThingDef named AirVent_Frame to match AirVent_Frame.label
Verse.Log:Warning(String)
Verse.DefInjectionPackage:InjectIntoDefs()
Verse.LoadedLanguage:InjectIntoData_Patch1(Object)
Verse.PlayDataLoader:<DoPlayLoad>m__1()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()

Def-linked translation error: Found no Verse.ThingDef named AirVent_Frame to match AirVent_Frame.description
Verse.Log:Warning(String)
Verse.DefInjectionPackage:InjectIntoDefs()
Verse.LoadedLanguage:InjectIntoData_Patch1(Object)
Verse.PlayDataLoader:<DoPlayLoad>m__1()
Verse.LongEventHandler:ExecuteToExecuteWhenFinished()
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent()
Verse.LongEventHandler:LongEventsUpdate(Boolean&)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update()


I've had those same 3 yellow lines for a few weeks now, and they haven't given me any issue. I even had 2 separate climate systems that worked perfect in my mountain base. 70F for normal temp for pawns, 0F for my freezers.

nattywwc

Quote from: sidfu on December 22, 2017, 12:13:07 AM
hmm the <defName>AirVent</defName> like vent not showing in my game. everything else shows

I had that problem too, can confirm that it's present in the steam workshop and Google drive versions (1.4.0).

What's happened is that the designationCategory isn't set for the air vent. Copy the line <designationCategory>CentralClimateControl</designationCategory> into "AirVent" somewhere and you should be fine.
For those who don't know where to go, this is found at "(mod root folder)\Defs\ThingDefs_Buildings\Buildings_Temperature.xml". The air vent is down the bottom of the file.

Working code for the air vent is as follows if you want to just copy/paste.

  <ThingDef ParentName="CentralizedClimateControlBuilding">
    <defName>AirVent</defName>
    <label>airVent</label>
    <thingClass>CentralizedClimateControl.Building_AirVent</thingClass>
    <graphicData>
      <texPath>Things/Building/AirVent</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <damageData>
        <cornerTL>Damage/Corner</cornerTL>
        <cornerTR>Damage/Corner</cornerTR>
        <cornerBL>Damage/Corner</cornerBL>
        <cornerBR>Damage/Corner</cornerBR>
      </damageData>
    </graphicData>
    <altitudeLayer>Building</altitudeLayer>
    <passability>Impassable</passability>
    <blockWind>true</blockWind>
    <fillPercent>1</fillPercent>
    <coversFloor>true</coversFloor>
    <blockLight>true</blockLight>
    <canOverlapZones>false</canOverlapZones>
    <castEdgeShadows>true</castEdgeShadows>
    <staticSunShadowHeight>1.0</staticSunShadowHeight>
    <statBases>
      <WorkToBuild>1600</WorkToBuild>
      <MaxHitPoints>100</MaxHitPoints>
      <Flammability>1.0</Flammability>
    </statBases>
    <tickerType>Rare</tickerType>
    <description>An Air Vent.</description>
    <costList>
      <Steel>50</Steel>
    </costList>
    <terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
    <drawPlaceWorkersWhileSelected>true</drawPlaceWorkersWhileSelected>
    <building>
      <canPlaceOverWall>true</canPlaceOverWall>
    </building>
    <comps>
      <li Class="CentralizedClimateControl.CompProperties_AirFlow">
        <compClass>CentralizedClimateControl.CompAirFlowConsumer</compClass>
        <flowType>Any</flowType>
        <baseAirExhaust>100</baseAirExhaust>
      </li>
      <li Class="CompProperties_Flickable">
        <commandTexture>UI/Commands/Vent</commandTexture>
        <commandLabelKey>CommandDesignateOpenCloseVentLabel</commandLabelKey>
        <commandDescKey>CommandDesignateOpenCloseVentDesc</commandDescKey>
      </li>
    </comps>
<designationCategory>CentralClimateControl</designationCategory>
    <holdsRoof>true</holdsRoof>
    <researchPrerequisites>
      <li>AirConditioning</li>
      <li>BasicClimateControl</li>
    </researchPrerequisites>
    <placeWorkers>
      <li>CentralizedClimateControl.PlaceWorker_AirVent</li>
    </placeWorkers>
  </ThingDef>

coldtoad

It's because it was removed in the previous updates. Because we have these new Surround Vents now. I temporarily removed them from the menus so that It doesn't affect people already using it. These new powerful vents are coming in a few days (scheduled for 9th Jan).


Edit: My english.

Harry_Dicks

Quote from: coldtoad on January 04, 2018, 09:00:50 PM
It's because it was removed in the previous updates. Because we have these new Surround Vents now. I temporarily removed them from the menus so that It doesn't affect people already using it. These new powerful vents coming in a few days (scheduled for 9th Jan).


Edit: My english.

Nice!

KocLobster

Quote from: coldtoad on January 04, 2018, 09:00:50 PM
It's because it was removed in the previous updates. Because we have these new Surround Vents now. I temporarily removed them from the menus so that It doesn't affect people already using it. These new powerful vents are coming in a few days (scheduled for 9th Jan).

Edit: My english.
I was wondering why I was only able to create wall mounted vents. I guess those will just have to do for now. So you're pushing an update on the 9th that will include the new surround vents?

coldtoad


Mst


Canute

coldtoad,
i think the Air climate control need a pipe selector too like the vents have.
I got an working cooling system with blue pipes.
But then i build red pipes for another system, since i try to build the pipes allways inside walls blue and red overlap ofcouse.
But the Control unit for the blue network started to use the red pipe and ofcouse the cooling didn't worked anymore.

The intakes don't realy need it, but basicly it can't hurt to give them a selector too. In case you bundle pipes.

Harry_Dicks

Quote from: Canute on January 17, 2018, 03:01:38 AM
coldtoad,
i think the Air climate control need a pipe selector too like the vents have.
I got an working cooling system with blue pipes.
But then i build red pipes for another system, since i try to build the pipes allways inside walls blue and red overlap ofcouse.
But the Control unit for the blue network started to use the red pipe and ofcouse the cooling didn't worked anymore.

The intakes don't realy need it, but basicly it can't hurt to give them a selector too. In case you bundle pipes.

I suppose you really do need selectors on everything, when they can all connect to multiple networks. Makes a lot of sense to me.

Canute

Another thing i notice.
Set the target temp. to -10C but the room just went to -5C.
But when i set the target temp. to -15C the room goes down to -10C.

And the room temp. is pretty constant, so it can't be the on/off hysteries.