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.

The second argument of ForPlugin. Checked against the 18-character limit.

Result

Cost table


What it checks

AreaChecks
IdPresent, 3-64 characters, prefix.name, lower case only, no double dot, not a reserved prefix, not one of the ten built-in ids.
NameDisplayName or NameKey present; warns when only the key is set.
EffectDescribeLevel present.
Levels1 to 20; warns above 8 because the column gets hard to read.
CostA positive BaseCost or a CostForLevel; flags a multiplier below 1 or above 3.
Sell-backSellBackRate inside 0..1, and flags a rate high enough to turn the upgrade into a piggy bank.
IconBuilt-in name exists; reminds you of the white-with-alpha rule for a PNG.
GateIsUnlocked without a LockedReason.
FieldsAnything that is not a field of UpgradeDefinition - usually a typo.
Sub-tabLength against the 18-character cut, when you fill it in.
What it cannot check

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-inLevelsBaseMultiplierFull line
Fast Feet58001.817 896
Faster Till51 2001.826 843
Faster Shoppers41 5001.817 808
More Customers52 0001.844 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.