How many DAR folders?5 equal chance? [Y/N]n input real probability expectation for DAR folders, starting from top folder(smallest number) 40 inputted 1 probabilities 15 inputted 2 probabilities 15 inputted 3 probabilities 15 inputted 4 probabilities 15 inputted 5 probabilities Error: sum of expected probabilities cannot be bigger than 1.
if anyone is interested in trying to make this work, I think this can be done with a simple .bat file inside the DAR folder.
it's unfinished because the count needs to be converted to decimal and i'm sure i screwed up the echo by not correctly escaping the brackets and fractional slash.
for /D /R "%rootPath%" %%G in (*) do ( set "filePath=%%G\conditions.txt" echo Random(1/!count!) > "!filePath!" set /A count+=1 )
by the way... I literally "wrote" this using ChatGPT because I have no experience at all with windows scripting and haven't got a clue about the syntax.
I'm guessing someone who actually knows windows scripting can make this work without much effort.
for /D /R "%rootPath%" %%G in (*) do ( set "filePath=%%G\conditions.txt" set /A fraction=1000 * 1 / count echo Random(!fraction:~0,-1!.!fraction:~-1!) > "!filePath!" set /A count+=1 )
So if I want to use 20% random for 5 folders then I should set folder 1 - 100% folder 2 - 80% folder 3 - 60% folder 4 - 40% folder 5 - 20% Am I right? Isn't it obvious if you read DAR description carefully?
Having descending probabilities helps, but the result is not accurate. The real probabilities for equal randomness for 5 folders should be: 100 50 33.3 25 20
I have to add quite a few numbers to many folders and they are different. any ideas to streamline the work? before I had used a file duplicator that copied the same file in all the folders now that each one is different is a long work
wonder if anybody knows a tool that lets you sort out all conflicting DAR mods and "fix" them by auto changing folder structures with a given "priority", akin to LOOT or MO2 plugin/mod ordering.
No, but DAR is pretty straightforward to tweak. Change priority by changing folder numbers (higher number = higher priority) and change _conditions.txt with random() for probability. E.g. from one of the sneak idles in Underdog Animations IsSneaking() AND NOT IsInCombat() AND Random(0.2)
so.. when I calculate for 10 folders, equally...i get the following:
How many DAR folders?10 equal chance? [Y/N]y probability to put into Random(), starting from top folder(smallest number): 1.000001 0.5000002 0.3333334 0.2500001 0.2 0.1666667 0.1428572 0.125 0.1111111 0.1
I thought that the values could not be greater than 1? Am I doing it wrong? ..or should I just round that first value down to 1?
Just a rounding error due to the code calculating the bottom value first and then working its way up with each value relying on the previous one. Round it to 1.
1. 1/1 or 1 2. 1/2 or 0.5 3. 1/3 or 0.333 4 1/4 or 0.25 and so on
Put that in your Dar conditions (1,0.5,0.333 etc). Example : Folder 3000 Use 1, Folder 3001 Use 0.5 Why like that ?. because DAR use Priority function. Folder 3001 Will have More priority than 3000, Thats why if you set all conditions to be 0.25, it is not equal probability. I have tested this and also asked DAR author felisky, he confirmed that this is the correct way.
The "hazzle" (hassle) you refer to is most likely because this is an EXE file, and Windows does not like users downloading EXE's from locations outside of their short-list of trusted sites.
I, personally, found this helpful. Sure, I could've done a quick calculation in my excel file that has all the animations I'm using (because I'm awesome like that), but this does the same thing and it is helpful to many.
28 comments
equal chance? [Y/N]n
input real probability expectation for DAR folders, starting from top folder(smallest number)
40
inputted 1 probabilities
15
inputted 2 probabilities
15
inputted 3 probabilities
15
inputted 4 probabilities
15
inputted 5 probabilities
Error: sum of expected probabilities cannot be bigger than 1.
I have 10 folders. They replace the same animation. I want them to happen 20% of the time but equally distributed.
How do I calculate this? :S
it's unfinished because the count needs to be converted to decimal and i'm sure i screwed up the echo by not correctly escaping the brackets and fractional slash.
for /D /R "%rootPath%" %%G in (*) do ( set "filePath=%%G\conditions.txt"
echo Random(1/!count!) > "!filePath!"
set /A count+=1
)
by the way... I literally "wrote" this using ChatGPT because I have no experience at all with windows scripting and haven't got a clue about the syntax.
I'm guessing someone who actually knows windows scripting can make this work without much effort.
echo off
setlocal enabledelayedexpansion
set "rootPath=C:\Your\Root\Path"
set count=1
for /D /R "%rootPath%" %%G in (*) do (
set "filePath=%%G\conditions.txt"
set /A fraction=1000 * 1 / count
echo Random(!fraction:~0,-1!.!fraction:~-1!) > "!filePath!"
set /A count+=1
)
folder 1 - 100%
folder 2 - 80%
folder 3 - 60%
folder 4 - 40%
folder 5 - 20%
Am I right? Isn't it obvious if you read DAR description carefully?
100
50
33.3
25
20
1/1 - 1.0
then 1/2 - 0.5
then 1/3 - 0.33
and so on, so at folder 12 it's 1/12 - 0.083
at 40 folders you're doing 1/40 - 0.025
IsSneaking() AND
NOT IsInCombat() AND
Random(0.2)
when I calculate for 10 folders, equally...i get the following:
How many DAR folders?10
equal chance? [Y/N]y
probability to put into Random(), starting from top folder(smallest number):
1.000001
0.5000002
0.3333334
0.2500001
0.2
0.1666667
0.1428572
0.125
0.1111111
0.1
I thought that the values could not be greater than 1?
Am I doing it wrong? ..or should I just round that first value down to 1?
1. 1/1 or 1
2. 1/2 or 0.5
3. 1/3 or 0.333
4 1/4 or 0.25
and so on
Put that in your Dar conditions (1,0.5,0.333 etc).
Example : Folder 3000 Use 1, Folder 3001 Use 0.5
Why like that ?. because DAR use Priority function. Folder 3001 Will have More priority than 3000, Thats why if you set all conditions to be 0.25, it is not equal probability.
I have tested this and also asked DAR author felisky, he confirmed that this is the correct way.
I, personally, found this helpful. Sure, I could've done a quick calculation in my excel file that has all the animations I'm using (because I'm awesome like that), but this does the same thing and it is helpful to many.