[Outdated] Marvin's Hot and Cold Pack IV

Started by RemingtonRyder, December 12, 2014, 12:10:53 PM

Previous topic - Next topic

rsof69

Quote from: MarvinKosh on June 25, 2015, 10:27:59 AM
Yeah, tried to in A10.

You kind of need to keep the duration sensible because the temperature goes down at a rate governed by the duration. Thus, in the example above, it will go down and stay down for a looong time, but it will take years to get there.

we need alpha 11 update

RemingtonRyder

#241
Patience you must have. Testing it needs. Bugs must I find.

:)

e: So I've got Minification in testing as well now. That means I just need Space Meals, Small Sun Lamp and Modded Charge Lance to bring the modpack up to date. :D

Quote from: rsof69 on June 25, 2015, 11:15:34 AM
we need alpha 11 update

RemingtonRyder

So, very much a WIP, but here you go, v0.9.0 of Harsher Map Conditions. It'll get added to the pack when you guys are happy with the amount of harshness.

A word of forewarning though, if you trigger the heat wave, you better have lots of cooling. I thought that two coolers would be enough to keep my colonists at a safe temperature in their small bunker. NOPE.

Kaballah

Nice, thanks for the update.  Also thanks for the explanation of what goes on with Cold Snap/etc.

e: how do you load this, just make sure it's last?

RemingtonRyder

Yes, must be last, otherwise the incident files from Hot and Cold Biomes will override.

Kaballah

Tried a fairly hot desert map on extreme, was doing OK, and then in short succession:
- heat wave drives up temp to ~65C
- guy fleeing raid, I take him and figure I can probably handle it
- 12 or so stone age type raiders swarm in after the refugee, who is naked and unarmed
- fighting begins
- 2 of my 3 colonists break from the heat and other stresses
- raiders demolish everything and kidnap/kill everyone

working as intended!   ;D

Kaballah

I just had your modified version of Cold Snap occur at -55C.  NICE!
e: This took the outdoor temp down to -123C.  Holy shit and it's not even Winter yet!

Kaballah

Okay your new version of Cold Snap may be just a little bit too intense.    ;D  What formula are you using to decide how much to lower the temperature?  Last colony went from about -60C to -145C.  And that was just in October!

RemingtonRyder

It's the same sort of formula as vanilla, but with a different limit: -60C for cold snap. This is separate from normal daily and seasonal fluctuations.

I increased the factor which decides when the effect reaches peak (or trough) for each map condition. Before I did this, the effect was at maximum so quickly there was no time at all to prepare.

So, to make it less intense, there's a few options. One is to rein in the max temp offset a bit, so that temperature swings aren't so severe. Or, I could increase the factor which determines how slowly the effect kicks in and when it maxes out.

You wanted the training wheels taken off, though. ;)

Kaballah

I think it'd probably be best to just soften the max amount of temperature drop somewhat.  I don't have a big problem with the rate of drop being really sharp, I think it's fine for it to be really scary and possibly wipe out your colony.  Can you post the exact formula?

RemingtonRyder

Well, the exact formula is sort of buried, but I can explain what the code does:

public class MapCondition_ColdSnap : MapCondition
{
private int LerpTicks = 150000; //was 12000
private float MaxTempOffset = -60f; //was -20

public override float TemperatureOffset()
{
return MapConditionUtility.LerpInOutValue((float) this.TicksPassed, (float) this.ticksLeft, (float) this.LerpTicks, this.MaxTempOffset);
}
}


So basically, TicksPassed, ticksLeft, LerpTicks are used to calculate a value between 0 and 1. This is then multiplied by maxtempOffset to give the current tempOffset for this map condition.

public static float LerpInOutValue (float timePassed, float timeLeft, float lerpTime, float lerpTarget = 1)
{
float t;
if (timePassed < lerpTime) {
t = timePassed / lerpTime;
}
else {
if (timeLeft < lerpTime) {
t = timeLeft / lerpTime;
}
else {
t = 1;
}
}
return Mathf.Lerp (0, lerpTarget, t);
}


And that's how it actually figures out when to increase the value, when to keep it the same, and when to start decreasing - because as TimePassed increases, the value steadily increases from 0 to 1. As timeLeft becomes less than lerpTime, the value decreases from 1 to 0.

As you can see in the first bit of code, I've decided to increase the lerpTicks to 150000, which is five days. In the test version, it was 36000 which is a little over a day.

Kaballah

You know what, if the amount of temperature drop ends up being similar to the minimum temperature in the middle of Winter, then that's actually fine (just extremely hard).  I thought about it some more and after all I'm playing in the coldest map I've been able to roll, which has an average temperature of -95C.

RemingtonRyder

Yeah. It's an extra challenge, which is something that mods are good for. :) I can easily accommodate different versions with varying difficulty though, just by pointing to alternate map conditions in XML.


Kaballah

Yeah it looks like the deepest part of Cold Snap is about the same as deepest Winter, so that's all right.  And my poor colony just froze to death due to running out of power, which was due to running out of metal to build power infrastructure with.  Even with having the rooms insulated with 2 tiles' thickness of walls, I had to put two small heaters in each room to keep them out of the -75C range at night.  I had made it well past the sustainable farm threshold though, so that's something.

Kaballah

Okay -160 is totally survivable (though very difficult).  The only thing that bothers me a little bit is the duration of Cold Snap - 70 days is 7 months.  I suggest you shorten it to like 40 days.  Otherwise I like how this is working.