Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temperature phases (HOT/COLD/FROZEN) tweaks & fixes [SPLIT] #25166

Merged
merged 6 commits into from Aug 27, 2018
Merged

Temperature phases (HOT/COLD/FROZEN) tweaks & fixes [SPLIT] #25166

merged 6 commits into from Aug 27, 2018

Conversation

nexusmrsep
Copy link
Contributor

@nexusmrsep nexusmrsep commented Aug 27, 2018

SUMMARY: Bugfixes "Fixes and tweaks of values used by freezing mechanic."

Split from #24971

Resolves #24914
Partially resolves #25020 by activating freezer. Freezer behavior however is not fixed in this PR. EDIT: found a way to tweak freezer to freeze at expected ratios.

Rationale:

After feedback from field testing and initial tweaks the conclusion was that transition between FROZEN(deeply )<--> FROZEN <--> COLD <--> normal <-- HOT stages is too fast, and needs fine-tuning.

This PR introduces:

Tweaks the way how transition speed is calculated, so cooling/freezing & thawing/warming will be more realistic now.

There are 3 main adjustable variables in food temperature mechanics:

1. Max freezing/cooling time at lowest ratio: now set at 60 minutes

2. Max (capped) temperature ratio influence (how much faster can it go max) for ex. x2 = 30 min., x4 = 15 min, x5 = 10 min, now set at x4 = 15 min

3. Number of degrees per 1 ratio unit (how big difference converts to 1 unit of ratio) for ex. can be set 1:1 so 1 degree = 1 ratio unit, 5:1 means for 5 degree diff = 1 ratio unit (10 = 2 etc.) - now set to 10F per 1 ratio unit (~5.5C per ratio unit)

Difference is calculated between measured temperature and freezing point (32F, 0C) for freezing, and cooling point (37F, ~2.7C) for cooling. HOT food is unaffected so in normal (not cold, not freezing) temperatures it will return to 'normal' after 60 min, and if it was defrozen via a HOTPLATE action it will cool down after 30 minutes (unless affected by cold temperatures that is - in both cases).

Example:

EDIT: after some extra changes numbers blow were edited to represent current state of this PR
It works like that:

  • Ambient temperature for a chunk of meat is -10C.
  • Temperature differences to thresholds are: to freezing 0C = 10 degrees, and to cooling 5C = 12.7 degrees,
  • these are converted to ratio units and at 5C : 1 ratio they will be: for cooling down = 2 = 60min/2 = COOL phase will take 30 minutes and then it will change to FREEZE, and after it hits FREEZE ratio is 2 = 60min/2 = 30 min from FREEZE to (max) FREEZE (deep freeze)
  • this also means that newly created meat at -10C will take 20 minutes to freeze beyond edibility (20 min being COLD )
  • reheated (defrosted) meat is HOT but in -10C rate of cooling is 2 so it eats up HOT for 30m/2 = 15 min, then its COLD for 20 min so, 15+20+= 35 minutes of edibility.

EDIT numbers have changed because @cainiaowu convinced me in comments to get rid of that extra time in which food stays edible despite being frozen to avoid player confusion about why some frozen food is edible and some not. Also the differential for each ratio step was changed to 10F (~5.5C) per step

You can run down this numbers yourself to see how will it affect outcome in different conditions.

@nexusmrsep nexusmrsep changed the title Temp fix post split Temperature phases (HOT/COLD/FROZEN) tweaks & fixes [SPLIT} Aug 27, 2018
@nexusmrsep nexusmrsep changed the title Temperature phases (HOT/COLD/FROZEN) tweaks & fixes [SPLIT} Temperature phases (HOT/COLD/FROZEN) tweaks & fixes [SPLIT] Aug 27, 2018
@nexusmrsep nexusmrsep added Game: Balance Balancing of (existing) in-game features. (P2 - High) High priority (for ex. important bugfixes) <Bugfix> This is a fix for a bug (or closes open issue) labels Aug 27, 2018
@AMurkin
Copy link
Contributor

AMurkin commented Aug 27, 2018

Make temp_difference_ratio a free function?
I've seen it in another PR.

@ZhilkinSerg ZhilkinSerg self-assigned this Aug 27, 2018
@nexusmrsep
Copy link
Contributor Author

@AMurkin here you go, its free.

@ZhilkinSerg ZhilkinSerg merged commit 6a7b45e into CleverRaven:master Aug 27, 2018
@ZhilkinSerg ZhilkinSerg removed their assignment Aug 27, 2018
@nexusmrsep nexusmrsep deleted the temp-fix-post-split branch August 27, 2018 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Game: Balance Balancing of (existing) in-game features. (P2 - High) High priority (for ex. important bugfixes)
Projects
None yet
3 participants