边缘世界 RimWorld

边缘世界 RimWorld

评价数不足
Custom Climate Cycle (Continued)
   
奖励
收藏
已收藏
取消收藏
Mod, 1.3, 1.4, 1.5, 1.6
文件大小
发表于
更新日期
49.302 KB
2024 年 5 月 10 日 下午 6:38
11 月 20 日 下午 6:54
4 项改动说明 ( 查看 )

订阅以下载
Custom Climate Cycle (Continued)

在 Zaljerem 的 1 个合集中
Zal's Continued Mods
571 件物品
描述
Original mod by dninemfive
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1684902496
MIT License
Even so, if the original author requests it, I will remove this update.

--

Original mod notes (1.2):

Adds a new climate cycle setting allowing customization of every aspect, from period to temperature offsets, plus the ability to set up a runaway scenario. Access it through the new "Custom Climate Cycle" scenario part.


Variables

Formula:

(Mathf.Sin((GenDate.YearsPassedFloat + (float)ticksOffset / (float)GenDate.TicksPerYear) / PeriodYears * tau) * tempOffsetFactor) + tempOffsetOffset + (xCoeff * GenDate.YearsPassedFloat)

- Period offset: how many years into the cycle the game will be when it starts. Default 0, and can be randomized.
- Period: how many years the cycle takes to go through. Default 4.
- Temperature offset factor: The magnitude of the sine wave. If the temperature offset is 0, this is the maximum variation from normal temperatures. Default 20.
- Temperature offset: Lets you modify the default yearly temperature. Negative values make the whole cycle colder, positive ones make it warmer. Default 0.
- X-coefficient: a modifier which lets you set runaway warming or cooling. Negative values make temperature trend colder over time, positive ones make it trend hotter. Default 0.

Custom climate calculator/visualizer:
https://www.desmos.com/calculator/sj9ycjx97n


Notes

- You need to use the new "Custom climate cycle" scenario part; simply adding a custom climate cycle as a standard game condition will work, but it'll be the same as a normal climate cycle.
- You should be able to layer multiple Custom Climate Cycles to get non-sine behavior if you want to go through the effort, and by zeroing out the temperature offset factor, temperature offset, and x-coefficient you can do things like balance the game's overall temperature (making a warmer or cooler planet) or simply make temperature increase/decrease over time without a cycle.
- No mod compatibility issues are expected; this doesn't modify any base game code.


Thanks to 22点下 for the Chinese (Simplified and Traditional) translations.
19 条留言
Zaljerem  [作者] 11 月 20 日 下午 6:55 
Looks like you're right on in your analysis, I just tested it and it seems to be applying. Thanks! I've pushed an update.
Matathias 11 月 20 日 下午 6:40 
I've noticed issues with this mod not properly applying temperature changes, as well. I took the liberty of looking through the code, and after some messing around, I believe I've figured out the problem: the TemperatureOffset function is never actually being called.

This appears to be because the climate cycle gameCondition is added to the World's gameConditionManager, rather than the map's. If I alter the code so that the ScenPart overrides GenerateIntoMap instead of PostWorldGenerate, and I register the condition in the map instead of the World, then the temperature changes are correctly applied. The condition will even automatically be applied to new maps (according to my brief testing, at least).

I didn't start looking at Rimworld's code until after 1.6 dropped, so I don't know why things seem to work differently from how they did in 1.5. But I guess they changed something about how gameConditions are handled with Odyssey.
smrow 8 月 5 日 下午 7:35 
Thank you! No rush. I noticed there's two different climate cycle conditions I can apply in devmode - I can't tell a difference between them, it seems like both affect the temps by some identical default amount. I don't have much experience past basic XML editing but maybe that's something to investigate. Thanks again for looking into it.
Zaljerem  [作者] 8 月 4 日 下午 5:18 
It's not just you, I am also seeing similar issues, and I'm not sure what's going on. I'll try to work back on it soon.
smrow 8 月 4 日 下午 5:15 
Hey, I love this mod! I'm struggling to get this working for 1.6 though. It's not throwing any errors and I both reinstalled and tried disabling everything back to straight vanilla. It lets me put in values and the 'climate cycle' condition is applied, but it doesn't seem like it actually alters any temperatures. Not sure if it's just me.
Yrol Akiyama 7 月 30 日 下午 12:57 
Ah. okay. :o)
DuckGoosebear PrairieDogLover 7 月 28 日 下午 5:55 
@Yrol Akiyama the DLC don't work with old versions, because the new versions are made with updates and features that support the DLC which older versions didn't have. It's especially true with Anomaly and Odyssey AFAIK. So it will surely break without those updates and potentially not even boot.
Yrol Akiyama 7 月 12 日 上午 5:40 
°grins° Zaljerem, bad idea... NOW they all EXPECT such fast updates ;o)

Slightly more serious Sidenote: if the devs roll back the update due to an issue, so must you...
Zaljerem  [作者] 7 月 11 日 下午 7:13 
Updated to 1.6.
wizardofmagicmemes 7 月 11 日 下午 3:43 
Will this be updated to 1.6?