fireChance has a random component
If you want the check to only be run once, put the result of it in memory in CommodityRequestCalc, and then only call that once, and not as a condition, but rather in the body of another rule before this stuff fires.
Ok I think I gotcha, so just like the cost of the aid request, the calc script would put a boolean into memory that would be set as true if fireChance is over 100 and false otherwise. Then the calc script could be run, say at the initial dialogue (in the scripts column, not the conditions) that would set the variable (and give you the description flavor), then the condition in the following line of rules simply check for the memory variable.
That sum up what you mean?
edit:
Also, why does the random number added to fireChance make the rule sometimes not return anything? I would have thought simply having two paths based on one variable where an end equals a true return and the other end equals a false return would be enough. (This is more for my own curiosity and for me to better understand the engine/java)
Nvm I get it now! Just clicked!
In case people are following this, so its running the script each rule entry, (duh, cant believe I didn't see that flaw).
So actually, though it would appear that the script would return "one" true or false, its actually running the calc script each time a new rule is checked, so it can, sometimes, return the script as false in the rule that checks for true, but still have the condition that checks for false ALSO return a true, by pure chance, when the script is run AGAIN, causing that rule to fail too, so rules can't find a match. Thats why it only "fails" to return a true or false rarely, because multiple chance calculations have to align... haha
Putting the script in a precursor rule makes it only run once, therefore, the true or false return stays "constant" across all the followup rule checks in rules.csv
(This is looking very cool, btw!)
Wow thanks that's high praise coming from you!
Have more in the development list that I'm excited about too! How big can rules be, btw? The commodity request rules configurations has.. about 100 entries so far, or with dialogue options around 300 different potential outputs and 100 condition configurations. It doesn't seem to slow anything down that I can tell, but I'm curious as to its limitations.
I'm thinking once I start scripting in story stuff, that will begin to get a lot higher. School is starting next week though so time is going to get more limited.
I also want to say I love how rules.csv works! I was intimidated at first, but it really makes things a lot easier once you get it down!