You mean like it is currently implemented, specifying the dependent probabities right (because there is no "Chance").Geoff the Medio wrote: ↑Wed Jul 14, 2021 3:39 pmThere is already a chance condition, so you could probably already construct something like with If-Else and Chance.
Dependend picks have different probabilities p(A, 1/3), p(B, 1/3), p(C, 1/3), but if a is picked p(B|A, 1/2), p(C|A, 1/2).
But it is a bit hard to read the specified chances are 1/3, 1/2, 1/2 are meant in the end to result in 1/3 1/3 1/3 probabilites.
My idea would be a (more complex) multiple weighted random sampling without replacement. So you want to pick N different objects and state the probabilities for each of the objects so p(A), p(B), p(C) or in order to circumvent leaving a gap because of user mistakes and how floats work not stating p(C).
If I read you you mean it would be good to be able to skip a choice conditionially. It seems you suggest using (valueref) amounts instead of probabilites, which seems fine to me. It seems you have your own suggestion/use cases in your head - why dont you write it down?
Not successive checks.
The values are probabilities, the specified probabilities plus the unstated "default"/leftover probability should sum 1. Probably you would rather specify (50%, default) instead of (50%, 50%, default). It certainly would have utility to specify amounts instead of probabilities, which would need to be completely specified (so no default in that case). That version would also be fine to me.
edit:Geoff the Medio wrote: ↑Wed Jul 14, 2021 3:39 pm Also, for that specific example, you could probably just have a single effect for most of it, but with OneOf("SP_BANFORO", "SP_KILANDOW", "SP_MISIORLA") for the inner ValueRef that specifies what species to apply, as long as the effectsgroup just needs to pick what species to apply at a single location.
No, without remembering the result/specifying the seed (so you get the same "random" result) it is not possible to do the right thing. Functions/Named effects could also work. Metaprogramming with python would also be an option (which would create the if-else structure in FOCS). Currently you need the species name in multiple places.
So taking in geoffs suggestions with more features
Code: Select all
effects = PickEffects picks = 1 from = [ WeightedEffects weight = [[ONE_IF_SPECIES_EXISTS_ELSE_ZERO("SP_BANFORO")]] effects = [ ... ] // revive Banforo WeightedEffects weight = [[ONE_IF_SPECIES_EXISTS_ELSE_ZERO("SP_KILANDOW")]] effects = [ ... ] // revive Kilandow WeightedEffects weight = [[ONE_IF_SPECIES_EXISTS_ELSE_ZERO("SP_MISIORLA")]] effects = [ ... ] // revive Misiorla ] instead = [ ...] // already got all those species - give something else