I’m trying to make a challenge-centric tree, but no matter what code I try, trying to make the canComplete anything other than straight return player.points.gte() makes my game go to the “serious error loading” screen, even if it ends with return player.points.gte().
Did you use a New function to change the goal
canComplete: function() {
let goal = new Decimal(10)
goal = goal.pow(challengeCompletions(this.layer, this.id).add(1))
return player.points.gte(goal)
I’m not sure what you mean by that, but this is the code I was using
You need a New function to change it
How do I do that? I’m not that familiar with Javascript beyond its uses in TMT so I’m not familiar with a lot of stuff.
Try the TMT Documentary
Do you mean the TMT documentation? If so, then I have, and it’s silent on this. This is all it has to say about completion requirements in the new system:
A function that returns true if you meet the win condition for the challenge. Returning a number will allow bulk completing the challenge.
Make the fixed goal be replaced
I feel like I don’t understand JS at all, and am also beginning to despise challenges as a mechanic, because I didn’t understand that and my best interpretation just made a killscreen happen
Code I used:
canComplete: function() {
if (challengeCompletions('p', 12).gte(2)) return player.points.gte(10000)
if (challengeCompletions('p', 12).gte(1)) return player.points.gte(1000)
if (!hasChallenge('p', 12)) return player.points.gte(100)
},
What…