R(bxxx byyy) or (xxx | yyy)?
OK, the topic description here isn't really totally accurate, but I was worried about hitting a character cut-off
Also, before I go into this, I know there will be questions about how one mission can have 8-11 objectives and even if it does, how one could make it so that it would be progressively harder to accomplish each. Just trust me on this one.
Aaaanyhow, I'm going to try to do this without giving too much away again, since I'm dealing with the tail end of the second installment of Anathema, in which everything changes. There are some missions in which the better the player does (i.e. completing 8 particular missions instead of just 2), the odds of preventing something from happening go up. The question really is two-fold. Firstly, is it even possible to have some sort of "sliding scale" in this sense instead of an either/or deal? Secondly, if it is, can it be accomplished in the following way:
There are two things in the nova scripting that allow for something random to happen in terms of mission bits. The first is the r(xxx yyy) command, and the second is the | "or" operator. The bible isn't clear on this, and it would be enormously time-consuming to test this, so I wanted to know if anybody knew if these commands can be used to this particular end.
Say that the player manages to accomplish only 1 out of 8 (there's actually 11, but let's just make it objectives in this mission. We'll call these objectives "Buying Lottery Tickets." Also, let's say that every complete objective has a 20% of creating the desired effect. Let's call it winning 1B credits. I know that this isn't a perfect analogy, because one can win more than once in this example while the desired effect is static, but just ignore that pesky detail for now. :rolleyes:
So, if the player buys 1 ticket, the chance of winning 1B credits is only 20%, and if the player manages to buy all 8 tickets, the chance of winning is ~83.3 from the equation (1 - (.8^8))x100. Obviously, there is a sliding scale that creates better odds the more tickets are bought.
Now, let's try to put this into Nova scripting. 20% turns into the fraction 1/5, so each ticket represents a 1 in 5 chance of winning. Therefore, it may be possible to represent this using bit xxx as "losing" and bit yyy as "winning" and running the following Random Ž script every time a "ticket" is "bought": r(bxxx bxxx bxxx bxxx byyy). Or, we could use the "or" operator by running the script: b(xxx | xxx | xxx | xxx | yyy). This would effectively simulate the odds increasing for every "ticket" "bought" without taking up one additional crön or mďsn for every possible combination of "tickets" "bought" (since every "ticket" in this case is independent and acquired in a different way). Because that's a ton of resources.
While these both work in theory, I'm really not sure if the Nova scripter can handle more than 1 random, nor if it will properly deal with having the same expression repeated in an "or" operator. Does anybody know if either of these will work out?
(edit) Oh, and if this is just a pipe dream and I'm totally insane, feel free to let me know that too. I certainly won't disagree.
This post has been edited by Archon : 01 September 2007 - 07:52 PM