Skip to content

Workshop service/repair completion time displays hours above 24:00 (e.g. 47:35) when service duration exceeds 24 hours #161

@Rough-Draft

Description

@Rough-Draft

Summary

When using the mechanic/dealership workshop to service a vehicle, the time preview/estimate for completion sometimes displays times such as "tomorrow at 47:35" (or similarly formatted times well above 24:00). This occurs when the calculated service time exceeds 24 hours, typically when a vehicle is significantly overdue for service and the overdue penalty makes the total service duration very long. As a disclaimer, I used Claude AI to assist me in diagnosing this issue, I have nearly no experience with fs25 modding and the Root Cause section was suggested by the ai without me verifying it. I play fs25 with a 5 day month on timescale of x30 or x60 and due to the way the mod currently calculates service time, getting large amount of overdue hours is far easier.

Reproduction Steps

  • Let a vehicle go well past the service interval (e.g., 150+/40 hours overdue)
  • Take the vehicle to the mechanic workshop and click to service it
  • The dialog will report something like "your tractor will be ready tomorrow at 47:35" instead of a correctly wrapped time

Expected Behavior

  • Service completion times should never display more than 23:59 in the "hour:minute" field.
  • If service requires more than 24 hours, the display should properly wrap to the next day(s) or use a clarified format (e.g., "ready in X days at HH:MM").

Actual Behavior

  • The time estimation shows values over 24 hours (e.g., 47:35), which is incorrect for a 24-hour clock display.
  • This stems from the service duration calculation with high "overdue" penalties not being properly wrapped in the CalculateFinishTime function (see VehicleBreakdowns.lua lines 924-950).

Technical Details

  • Service interval: 40 hours (default)
  • Vehicle tested: At 150+ hours overdue
  • Workshop: Default mechanic/dealership
  • Mode: Single player
  • Service type: Periodic service

Root Cause

The CalculateFinishTime function receives AddHour and AddMinute values but doesn't properly validate or wrap times that exceed 24 hours before displaying them.

Suggested Fix

Add validation to ensure the displayed time never exceeds 23:59, wrapping to the next day as needed.

Feature Request

  • A setting for changing the penalty amounts for overdue service (though this might be unnecessary if the mod changed its behavior on timescale)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions