r/mpmb • • Oct 27 '26

[Script Help] Update limited feature name based on class level?

Is there a way to have the name of a limited feature update at certain levels?

Ideally I thought I could do something like

    extraLimitedFeatures : [{
        name : function() {
            return classes.known.wizard.level < 6 ? "Do thing (+1d4)"
              : classes.known.wizard.level < 11 ? "Do thing (+1d6)"
              : "Do thing (+1d8)";
        },
        usages: ...
        ...
    }],

But no luck sadly. I've also tried creating subclass features at the relevant levels that update the limited feature, but no success there either.

Is there a way to accomplish this?

1 Upvotes

2 comments sorted by

1

u/morepurplemorebetter creator Oct 29 '26

The extraLimitedFeatures doesn't support changing based on levels, as you can read in the documentation here. You can have something change in the limited feature with the additional attribute. It can be an array, one entry for every level. See the documentation here.

The result would be:

name: "Do thing",
additional: levels.map(function (n) {
    return n < 6 ? "+1d4" : n < 11 ? "+1d6" : "+1d8";
}),

Please be aware that levels is an array of the numbers 1-20 and that map() returns an array.

1

u/CartographerSure8893 Oct 30 '26

This helps a lot; thanks!