Trying to create a step-by-step calculating system

I would first check the GAS, maybe it’ll suit you.
It’s not built exactly for such purposes, but in general counting modifiers, multipliers etc is a big part of it.