We should use 100x values for resources

Open
#20,339 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp
Domain
game-dev

Research direction

Start by tracing how YAML resource values become cash values and how those values are displayed to players, using the repairable construction yard example from the issue and related context in #20109. Identify every affected conversion path and determine how tests can verify that internal values use 100x precision while displayed amounts remain unchanged.

Written by the indexing model from the issue text.

Description

Bug Refactor

In #20109 I made repairable building use 100x values as due to the small numbers we are losing quite a lot of information. For instance for repairing construction yard from 0 health should cost 400$ credits but we only use up 214$

We could in every place where we translate yaml to cash multiply by 100 and where we display it to the player divide 100. That way we won't inflate yaml values and everything should still function correctly

Dominant language
C#
Stars
17.4k
Forks
3k
Avg merge
1d 12h
Merged PRs (30d)
14

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenRA/OpenRA

All issues in OpenRA/OpenRA

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.