Jesus_666 wrote:Interesting. How are you going to ensure that the results are random yet fixed? The most obvious way is to use the post ID/number/time as a seed but what do you show when the user previews the post? There's no problem if phpBB allows you to specify different behavior for preview and final post, of course.
(Being a geek is awesome. All knowledge is fun, whether it's NATO shorthand codes, medieval sociology or implementation details of phpBB hacks.)
Well, since you asked...
I'm planning on short-circuiting the preprocessor so that it fetches the specified roll's results and replaces the tag with the final data as the post body is being inserted into the database. That way, the outcome isn't decided until the user actually submits their post; preventing someone from 'rerolling' by repeatedly previewing their post until they get the outcome they like. I may also use their current session ID as a sanity check to also deter this behavior.