You can add an integer input to your node setup, and add a driver to it in the modifier stack: fmod(hash(name), 10e7)
.
Then the geo setup:
Then you can duplicate your cube:
❌ The biggest problem with this solution is that it requires enabling Script Auto-execution, which introduces security risks and makes it harder to share work with others. See my answer to another question, where I elaborate.
According to bpy_driver.c in Blender source, there's really no way to convert a string into a somewhat unique number. If not for a 256 character limit of driver expressions, you could use a script like that:
from bpy import context as C
import string
chars = string.ascii_letters + string.digits
significant_characters = 20
base = len(chars)
expr = ""
for i in range(significant_characters):
for j, c in enumerate(chars):
if i or j:
expr += "+"
expr += f"{base**i+j}*(n[{i}]=='{c}')"
C.active_object.animation_data.drivers[0].driver.expression = expr
✅ But to lighten things up, there are some important advantages of this approach: the rotation is decoupled from position. And object can move without rotating if you want it to. An object following another object won't mimic the rotation of the one in front from a moment ago.