Skip to content

About RESPONSE probabilities

chimericchimeric Member Posts: 1,163
Say, guys. How are these checked, exactly - if there are several in a row? For example

RESPONSE #70
Yada yada
RESPONSE #30
Blah blah

Does the computer first roll a percentile for 70, then for 30? If so, then won't there be cases, and often enough, when it misses both values and neither happens? I've also read that the probabilities don't have to add up to 100. And, I suppose, you could put several RESPONSEs there, not just two. Yes?

How is this different from RandomNum(), if at all, and how do I make sure that I get either the one response or the other, at those probabilities? RandomNum() falls through for some applications... It's all these revised Charm spells of mine, you see. I want to reflect the caster's Charisma in them so that there is a chance the charmed creature won't go hostile at the end of the duration, but first I need to set up a framework of chances that work properly.

Not related to this - creatures. I looked at CRE files, walked up and down on them, as the book says, but I don't see where I can change a creature's visual range. Can I?

Comments

  • IsayaIsaya Member, Translator (NDA) Posts: 752
    You'll find information on RESPONSE and RandomNum() and their respective pros anc cons in this guide, topic 3).
    This was written for BG II. I don't know if the non uniform random generation in RESPONSE is fixed or not in the EE.
  • chimericchimeric Member Posts: 1,163
    I know that one, and I don't understand it. He says "multiple responses" - and then gives an example of just two. And what does it mean, "they matter relative to each other"? If #100 and #100 is 50/50, or just about, then what is 70/30? What is 30/70?
  • ArdanisArdanis Member Posts: 1,736
    IF
      True()
    THEN
      RESPONSE #120
        DisplayStringHead(Player1,~This occurs 120/(120+30+60) = 4/7 of times.~)
      RESPONSE #30
        DisplayStringHead(Player1,~This occurs 30/(120+30+60) = 1/7 of times.~)
      RESPONSE #60
        DisplayStringHead(Player1,~This occurs 60/(120+30+60) = 2/7 of times.~)
    END
  • chimericchimeric Member Posts: 1,163
    So the frequency of a probability equals its share of the total. Okay. Thanks.
Sign In or Register to comment.