Synthesis-Collective / SynthEBD

Port of zEBD to Mutagen
31 stars 7 forks source link

(not an issue) question about probability weighting #28

Closed HitBug83 closed 2 years ago

HitBug83 commented 2 years ago

Hello, I have a question about distribution probability weighting setting.

Let's say I have two config files, one containing 3 options for Vampire diffuse head and the other just one. I want my Vampires able to get all four options.

I wonder how the final probabilities will be calculated. I can think about three different outcomes :

(all distribution probability weighting set to 1)

Outcome 1

Config 1 ..........Head Diffuse ....................Vampire Young ..............................Option 1 = 0.25% ..............................Option 2 = 0.25% ....................Vampire Old ..............................Option 1 = 0.25% Config 2 ..........Head Diffuse ....................Vampire ..............................Option 1 = 0.25%

Outcome 2

Config 1 ..........Head Diffuse ....................Vampire Young ..............................Option 1 = 0.16% ..............................Option 2 = 0.16% ....................Vampire Old ..............................Option 1 = 0.16% Config 2 ..........Head Diffuse ....................Vampire ..............................Option 1 = 0.50%

Outcome 3

Config 1 ..........Head Diffuse ....................Vampire Young ..............................Option 1 = 0.125% ..............................Option 2 = 0.125% ....................Vampire Old ..............................Option 1 = 0.25% Config 2 ..........Head Diffuse ....................Vampire ..............................Option 1 = 0.50%

Piranha91 commented 2 years ago

It actually depends on external factors. The probability weighting basically says "If I'm grabbing lottery tickets from a bag, how many will this subgroup purchase"? So it depends on what the other choices are. Let's say all the subgroups are set to 1. If there are no restrictions on any of the config files, each should have a 25% chance of being drawn. But if Config 2 has a config-wide distribution rule that "Allowed Attributes: NPC = Nazeem", and your vampire isn't Nazeem, it'll be thrown out and there would only be the 3 contestants from Config 1, each of which with a 33% chance. If one of those contestants had a different restriction that disqualified it for the given NPC, then there would only be two contestants with 50% chance each. If one of those had a probability weighting of 2, then it would have a 66% chance to the other's 33%. And so on.

HitBug83 commented 2 years ago

OK, great.

I was worried that the relative probability weighting of all the parents subgroups (even those empty of textures) would have been proceeded, which would have greatly disfavor the subgroups burried deep into the tree and those with a lot of "brothers" (like in outcome 3).

Piranha91 commented 2 years ago

Nope, but they're factored in. For example if Config 1 Vampire Young had a weighting of 3, its child subgroups would multiply that into their own weightings.

HitBug83 commented 2 years ago

So, another question, what happens if I set a higher probability weighting in the "Vampire Young" subgroup in the example above ? As it doesn't hold any asset by itself, but only other subgroups, its probability weighting won't be taken into consideration ?

Edit : OK you just responded while I was typing, thank you !