Hi Rafal!  (Welcome back!  :->)
There is a proposal along these lines, which you can see here:
https://github.com/MesserLab/SLiM/issues/387
Until that issue is fixed, what you want to do is somewhat difficult.  
As you mention, you could have a mutationEffect() callback for all of 
the *other* types, making them all neutral.  You could use the `active` 
property of SLiMEidosBlock to deactivate those callbacks all the time 
except when you want to do this custom fitness calculation; then 
activate the callbacks, recalculate the fitness values with 
recalculateFitness(), get those recalculated values with 
cachedFitness(), and then deactivate all the callbacks again.  (Note 
that SLiM automatically activates all script blocks at the start of each
 tick, so you'd need to have a first() event to deactivate them at the 
start of each tick right after SLiM activates them for you.)  You'd also
 need to make sure that SLiM actually uses its own fitness values, not 
your special ones; you might need to call recalculateFitness() again to 
make that happen, since otherwise the fitness caches would have your 
special values in them, depending on the tick cycle stage when you did 
all this.  I think that would probably work, but obviously it's a pain, 
and would also be somewhat inefficient and bug-prone – which is why that
 issue is there in GitHub, of course.  :->  It would be helpful if 
you would comment on that issue, indicating whether or not the new 
method as proposed would be useful to you, and what other features you'd
 like to see added to it.  Or, if I've misunderstood what you need 
entirely, please do post again.  Thanks!
Cheers,
-B.
Benjamin C. Haller
Messer Lab
Cornell University
Rafal Gutaker wrote on 9/18/25 10:56 AM: