passiveGeneration() not working correctly

As far as I am aware, it only seems to change the visual saying “you are gaining x prestige points per second”, but the automate() function also seems to have broken for me so idk if passiveGeneration() normally generates prestige points

passiveGeneration() as the name implies passively generates layer currency per second if you set up it correctly

This function actually generates the currency every second if you use this preformatted text that is below.

passiveGeneration() { return (hasUpgrade("<your layer id>", <upgrade id>)?1:0) },

The "return (hasUpgrade(“your layer id”, upgrade id)?1:0)| includes that it will generate 100% of the Prestige Points every second when buying an upgrade in a layer, otherwise it will not passively generate any prestige point every second.

In fact, I’ll recommend you study how TMT works and examine the functions.

My usage of passiveGeneration doesn’t seem to be flawed at all, but it still doesn’t act as expected.

    passiveGeneration() {
        let passive = new Decimal(0)
        if(hasChallenge('SR', 11)) passive = passive.add(0.2)
        return passive
    },

I can tell that my code is working since the prestige points per second display is showing 20% of prestige points on gain (Rebirth Points in picture)
image
But the amount of actual points isn’t increasing for some reason (do I have to implement the points increasing elsewhere?)

Looking at your code, I can actually test this in my tester tree to see if this examination works.

image
I tried this and it seems to generate 20% of the prestige points per second.
Probably the automate() function probably interferes the passive generation or there might be something wrong with the passive generation.

I did some testing with an earlier version of the game I’m using and it seems to work on the older version, but simply refuses to actually generate prestige points automatically in the current version.

Basically the issue is because of one of the differences between the current version of my game I’m making and the older version.

Since the older version also had automate(), the only differences that I can see that would impact this seems to be the addition of doReset() to the layer and turning requires into a function.
image
(idk why }, isn’t green)

edit: I did a test and it isn’t because of either doReset() or requires so I have no idea why its happening
edit 2: I also noticed that automate() and update() no longer work (I’m pretty sure something is breaking layer functions that run every tick)

As I looked into your post, I can see why it refuses to generate prestige points per second in the current version.

You can just look into the “game.js” file and find something like this:

function generatePoints(layer, diff) {
	addPoints(layer, tmp[layer].resetGain.times(diff))
}

If you find something changed, then you can show me the changed version, if you found that is not changed or its not found, I’ll try to find more ways to resolve the passiveGeneration() problem.

I haven’t made any changes to game.js, so the issue wouldn’t be from there
Here is the function anyways

function generatePoints(layer, diff) {
	addPoints(layer, tmp[layer].resetGain.times(diff))
}

The only files I have changed from the base Modding Tree are:
layers.js
mod.js
tree.js
NumberFormatting.js
themes.js

Edit: I figured out that the problem lies in a specific layers row element (unrelated row and layer)
Edit 2: I fixed the problem by removing the other layers row element and using layerProxy to put the layer in another layer.
Edit 3: I think the problem was caused by an incorrect layer, but since the layer was on the “side” row, it didn’t disappear, so I never realised that the layer was broken. The broken layer did also break the tree, but I attempted to fix that by manually setting the tree.