Tech Tree API
Validator
Paste a definition and see what Tech Tree would say about it - before you build, install and load a save to find out.
Paste the object initializer - the lines from Id = ... to the last
field. The surrounding tree.Register(new UpgradeDefinition { ... }) can
be there or not. Equivalent JSON works too. Nothing leaves your browser.
ForPlugin. Checked against the 18-character limit.
Result
Cost table
What it checks
| Area | Checks |
|---|---|
| Id | Present, 3-64 characters, prefix.name, lower case only, no double dot, not a reserved prefix, not one of the ten built-in ids. |
| Name | DisplayName or NameKey present; warns when only the key is set. |
| Effect | DescribeLevel present. |
| Levels | 1 to 20; warns above 8 because the column gets hard to read. |
| Cost | A positive BaseCost or a CostForLevel; flags a multiplier below 1 or above 3. |
| Sell-back | SellBackRate inside 0..1, and flags a rate high enough to turn the upgrade into a piggy bank. |
| Icon | Built-in name exists; reminds you of the white-with-alpha rule for a PNG. |
| Gate | IsUnlocked without a LockedReason. |
| Fields | Anything that is not a field of UpgradeDefinition - usually a typo. |
| Sub-tab | Length against the 18-character cut, when you fill it in. |
It knows the reserved prefixes and Tech Tree's own ten ids. It has no idea which ids other mods in the community have already taken - there is no registry to ask. A unique-looking prefix based on your plugin guid is still your best protection against a collision.
It also cannot tell whether
DescribeLevel matches what your effect actually does. That one is on
you.
The cost table is the point
Beyond validation, this is a balancing tool. The table shows what each level costs, what the
whole line costs, and what the player gets back when they sell - at 60% by default, or at your
own SellBackRate if you set one. A badly chosen curve is where an
upgrade stops feeling worth it. Compare against the built-ins:
| Built-in | Levels | Base | Multiplier | Full line |
|---|---|---|---|---|
| Fast Feet | 5 | 800 | 1.8 | 17 896 |
| Faster Till | 5 | 1 200 | 1.8 | 26 843 |
| Faster Shoppers | 4 | 1 500 | 1.8 | 17 808 |
| More Customers | 5 | 2 000 | 1.8 | 44 739 |
Land in that range and your upgrade sits naturally next to the rest of the tree. Come in far cheaper and it is the obvious first buy for everyone; far more expensive and nobody finds out what it does.