add a new dev options to set all research and production costs to 0 #202

Closed
opened 2026-09-04 19:14:48 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

Implemented in commit 571f01d on main.

The toggle
A fourth sandbox tool in the dev menu, FREE COSTS ON/OFF, beside unlimited resources. Kept as its own switch rather than folded into that one: unlimited resources tests whether a price can be PAID, and this tests what happens when there is no price at all. Like the others it is refused outside a dev game, is cleared when dev mode ends, and does not survive reset_new_game().

What it zeroes
GameState.costs_are_free() is consulted by the price accessors themselves - skill_costs, skill_research_point_cost, research_costs, research_point_cost, upgrade_cost, building_costs, product_costs - which is what every purchase, every lab queue, and every price label in the UI already reads. So skill-tree unlocks, vessel unlocks, ship-lab upgrades, research points, building placement and vessel production all read zero at once, and the menus show zero rather than showing a price that is not charged.

One site was reading a research price straight off its definition file instead of through the accessor (unlock_vessel); it would have kept charging full price alone, and now goes through research_point_cost() like everything else.

Layout
Both sandbox rows were widened to four columns with a matching pitch, so each label now sits under the button it names - the three-column layout was about 48px out.

Verification

  • test_dev_menu.gd now counts every price in the game (skills, buildings, vessel production, unlocks, upgrades) rather than sampling a few, asserts the total drops to zero with the toggle on and returns exactly when it goes off, and that a fleet with an emptied bank and hold can afford every building. Leak-into-a-normal-game check extended to the new flag.
  • Dev group: 2/2. Visual check of the four-tool menu at 720x1280.
  • Full suite: 161/161 passed.

No web deployment was performed.

Implemented in commit `571f01d` on `main`. **The toggle** A fourth sandbox tool in the dev menu, FREE COSTS ON/OFF, beside unlimited resources. Kept as its own switch rather than folded into that one: unlimited resources tests whether a price can be PAID, and this tests what happens when there is no price at all. Like the others it is refused outside a dev game, is cleared when dev mode ends, and does not survive `reset_new_game()`. **What it zeroes** `GameState.costs_are_free()` is consulted by the price accessors themselves - `skill_costs`, `skill_research_point_cost`, `research_costs`, `research_point_cost`, `upgrade_cost`, `building_costs`, `product_costs` - which is what every purchase, every lab queue, and every price label in the UI already reads. So skill-tree unlocks, vessel unlocks, ship-lab upgrades, research points, building placement and vessel production all read zero at once, and the menus show zero rather than showing a price that is not charged. One site was reading a research price straight off its definition file instead of through the accessor (`unlock_vessel`); it would have kept charging full price alone, and now goes through `research_point_cost()` like everything else. **Layout** Both sandbox rows were widened to four columns with a matching pitch, so each label now sits under the button it names - the three-column layout was about 48px out. **Verification** - `test_dev_menu.gd` now counts every price in the game (skills, buildings, vessel production, unlocks, upgrades) rather than sampling a few, asserts the total drops to zero with the toggle on and returns exactly when it goes off, and that a fleet with an emptied bank and hold can afford every building. Leak-into-a-normal-game check extended to the new flag. - Dev group: 2/2. Visual check of the four-tool menu at 720x1280. - Full suite: **161/161 passed**. No web deployment was performed.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#202
No description provided.