Unhardcoded and self-documented more resource/smudge parameters

Tried to fix #6270, but failed as all offsets are ignored. Hopefully the cleanup commit is still useful.