Decide and apply the unit of BuildingType.build_time #88
Labels
No labels
assets
bug
duplicate
enhancement
help wanted
invalid
question
testing
ui
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
liamjd/UntitledColonyBuilder#88
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
BuildingType.build_timeis an int with no unit, and the authored values (ore_mine10,warehouse5,sensor_tower3) predate #65's clock. Under any tick reading, 10 is one second.Two things need deciding together, because #70 (ConstructionTask) and #75 (pawn work loop) will bake whichever answer they find into the task they create.
The unit is labour, not elapsed time
#66 already settled this without naming it:
Task.work(ctx: Dictionary, ticks: int)decrementswork_remaining: float, so work is denominated in pawn-ticks — one pawn working one tick. Elapsed days are then an output of how many pawns are assigned, not an input.So "a Mine takes 10 in-game days" is ambiguous and needs pinning:
Recommend the first. Labour is the honest unit for a Settlers-style game, and it turns "how fast do I want this" into a staffing decision rather than a constant. It is a 3x difference in pacing, so it is a decision rather than a detail.
Author in days, store in ticks
Raw work-ticks in the
.tres(build_time = 12000) are unpleasant to author and impossible to eyeball across twenty facilities when balancing.Prefer
build_days: floatonBuildingType, converted once at task creation viaGameClock.TICKS_PER_DAY. Authoring stays human, the simulation stays integer.AC:
BuildingTypecarries build effort in a named, documented unit; the docstring says whether it is pawn-ticks or elapsedore_mine.tres,warehouse.tresandsensor_tower.tresrestated in that unit, preserving their existing 10 / 5 / 3 relative ratios unless balance says otherwisebuilding_type_card.gd:27prints a unit rather than a bare number ("Build time: 10 days", not "Build time: 10")work_remainingon the task it producesDepends on #87 for
TICKS_PER_DAY. Blocks nothing outright, but #70 should not land before it or the conversion gets written twice.#87 has now fixed the calendar constants, so the two loose ends here can be tied off.
TICKS_PER_DAYmoved offGameClocktoGameCalendar(common/game_calendar.gd), so the conversion described above readsGameCalendar.TICKS_PER_DAY.GameClockstays a pure tick source and never learns the calendar exists.The unit recommendation here is right, and days is the correct magnitude. Worth stating why, since "hours" looks tempting until you remember the unit is labour: 10 pawn-hours would be 500 work-ticks, which at a crew of three is 17 real seconds to build a mine. Pawn-days it is.
What the 10-day orbit does to the authored values
A day is 1,200 ticks, a month (one orbit) is 10 days, a 60-day contract is 72,000 ticks = 2 hours at 1x.
Those read plausibly, which is the argument for keeping the existing 10 / 5 / 3 ratios rather than rebalancing blind.
A labour budget for the whole contract
The ratios also survive the sanity check the other way round. At ~10 pawns over 60 days the run contains roughly 600 pawn-days of labour in total. A colony of 15-25 buildings at 3-10 pawn-days each spends 100-200 of that on construction - call it a quarter of the run's labour, leaving the rest for hauling, processing and threat response. That feels like the right split for a Settlers-style game where haulage is the real cost.
If a later playtest says construction dominates, this table is the thing to move, and moving it does not touch the calendar.
One caveat on the unit
A pawn-day is nominal, not effective. A pawn assigned to a build spends part of its time walking to the site and hauling materials, so a 10 pawn-day mine with three pawns will take meaningfully longer than 3.3 days once #73 (HaulTask) and #75 (work loop) are real. Not a reason to change the unit -
work_remainingshould mean work actually performed - but it means the elapsed-time column above is a floor, and balance numbers taken before those two issues land will read optimistic.Values in the
.tresfiles are placeholders and free to restate; confirmed in conversation.