Mega Tree API

Validator

Paste a definition and see what Mega 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 megatree./mt., not one of Mega Tree's own 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, and a base high enough to be late-game money on its own.
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, and a RequiredStoreLevel that goes backwards or out of range.
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 Mega Tree's own node 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 50% by default, or at your own SellBackRate if you set one.

Megastore's economy is the ruler. The player starts with $400, and these are the numbers the game itself charges:

The game chargesLevel 1TopWhole thing
Store expansion60013 800~80 000
Licence1002 800~15 000

And these are Mega Tree's own lines, for a closer comparison:

Built-inLevelsLevel 1Full line
Walking Speed52509 550
Long Reach44007 800
Fast Cashier580027 900
Full Day Shift160 00060 000

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. The one exception is Full Day Shift, and it earns its price by changing how the entire store operates - if your node does that too, charge for it.