Scriptable simulation