Xref: utzoo rec.games.frp:1800 comp.sources.wanted:2786 Path: utzoo!mnetor!uunet!husc6!rutgers!paul.rutgers.edu!gabai From: gabai@steppenwolf.rutgers.edu (Gabai) Newsgroups: rec.games.frp,comp.sources.wanted Subject: Re: programs for frp Message-ID: <2694@steppenwolf.rutgers.edu> Date: 17 Dec 87 02:00:11 GMT References: <2305@k.cc.purdue.edu> <9867@ut-sally.UUCP> <7236@sunybcs.UUCP> <3061@briar.Philips.Com> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 39 If anyone is interested, one time I wrote up a simple little 10-line program: its purpose: instead of time-driven random encounter rolls it made event-driven random encounter rolls ex) 1/6 chance of encounter, every 4 hours for 15 days !! that's ninety die rolls! (egads) thus I applied some formula (if you are interested, there's more: Amount_of_time_until_next_encounter := std_time_check * ln(1 - rnd(0..1))/ln(1 - std_prob_check) so what, I lied about the program being 10 lines(it was on a pgm. calc.) ex) t = (1/6 day) * ln (1-.12345678)/ln(1-1/6) ~ 50 minutes t = (1/6 day) * ln (1-.99)/ln(1-1/6) ~ 1 day (or larger) just make sure: - you have appropriate real number capabities, - rnd(0..1) returns a random real number, with uniform distribution, in the range [0..1), cannot equal 1.000000... (should be obvious: ln(1-1)=undefined) this makes it easier, with a time program running in background: party: "we post guards at night, during a long journey" computer: encounter at 3:45 during 3rd watch" (much hacking/slashing or sneaking/hiding/BSing later) computer: , 3 days later, at sunrise, just before the mountain pass. etc. -- Yours etc., Steven D. Gabai gabai@nadc.arpa gabai@paul.rutgers.edu