|
You last visited: Today at 11:21
Advertisement
FLYFF V21 how awake works?
Discussion on FLYFF V21 how awake works? within the Flyff Private Server forum part of the Flyff category.
01/19/2025, 13:13
|
#1
|
elite*gold: 0
Join Date: Feb 2018
Posts: 15
Received Thanks: 2
|
FLYFF V21 how awake works?
Hey,
I dont get it how this code works.
AddDstParameter( "DST_STR" )
--{
SetAdjValueProb( -28, 100000 , 150000 , 50000 )
SetAdjValueProb( -25, 3038270 , 4557405 , 1519135 )
SetAdjValueProb( -22, 9524381 , 14286571 , 4762190 )
SetAdjValueProb( -19, 20572000 , 30857999 , 10285999 )
SetAdjValueProb( -16, 37701630 , 56552444 , 18850814 )
SetAdjValueProb( -13, 63346074 , 95019110 , 31673036 )
SetAdjValueProb( -10, 101762741 , 152644110 , 50881369 )
SetAdjValueProb( -7, 161466445 , 242199666 , 80733221 )
SetAdjValueProb( -4, 263744223 , 395616333 , 131872110 )
SetAdjValueProb( -1, 499999999 , 749999997 , 249999998 )
SetAdjValueProb( 1, 736255775 , 868127889 , 604383664 )
SetAdjValueProb( 4, 838533553 , 919266778 , 757800331 )
SetAdjValueProb( 7, 898237257 , 949118630 , 847355887 )
SetAdjValueProb( 10, 936653924 , 968326963 , 904980887 )
SetAdjValueProb( 13, 962298368 , 981149185 , 943447553 )
SetAdjValueProb( 16, 979427998 , 989714000 , 969141998 )
SetAdjValueProb( 19, 990475617 , 995237809 , 985713426 )
SetAdjValueProb( 22, 996961728 , 998480864 , 995442592 )
SetAdjValueProb( 25, 999900000 , 999950000 , 999850000 )
SetAdjValueProb( 28, 1000000000 , 1000000000 , 1000000000 )
--}
i want to change it to
SetAdjValueProb( 1, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 4, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 7, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 10, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 13, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 16, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 19, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 22, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 25, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 28, 100000000 , 100000000 , 100000000 )
My aim is:
- only positives awakes
-all awakes should get the same chance.
But after changing the code, I only get +1 awakes.
|
|
|
01/19/2025, 17:59
|
#2
|
elite*gold: 0
Join Date: May 2020
Posts: 24
Received Thanks: 18
|
Quote:
Originally Posted by jarovart
Hey,
I dont get it how this code works.
Code:
SetAdjValueProb( 1, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 4, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 7, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 10, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 13, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 16, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 19, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 22, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 25, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 28, 100000000 , 100000000 , 100000000 )
But after changing the code, I only get +1 awakes.
|
Code:
const DWORD dwRandomProb = ::xRandom( MAX_RANDOMOPTION_PROB );
short shPrevAdjValue = 0;
for( ADJProbVec::const_iterator pos = vecAdjProb.begin(); pos != vecAdjProb.end(); ++pos )
{
if( dwRandomProb < pos->dwProb )
{
shAdjValue = bDecreaseAdjValue == true ? shPrevAdjValue : pos->shAdjValue;
}
if( shAdjValue != 0 )
{
break;
}
shPrevAdjValue = pos->shAdjValue;
}
Code:
const DWORD MAX_RANDOMOPTION_PROB = 1000000000;
Maybe don't make the chances the same as MAX_RANDOMOPTION_PROB, and you'll pass the first iteration of the loop.
|
|
|
01/20/2025, 10:21
|
#3
|
elite*gold: 117
Join Date: Jan 2008
Posts: 790
Received Thanks: 992
|
Quote:
Originally Posted by jarovart
Hey,
I dont get it how this code works.
AddDstParameter( "DST_STR" )
--{
SetAdjValueProb( -28, 100000 , 150000 , 50000 )
SetAdjValueProb( -25, 3038270 , 4557405 , 1519135 )
SetAdjValueProb( -22, 9524381 , 14286571 , 4762190 )
SetAdjValueProb( -19, 20572000 , 30857999 , 10285999 )
SetAdjValueProb( -16, 37701630 , 56552444 , 18850814 )
SetAdjValueProb( -13, 63346074 , 95019110 , 31673036 )
SetAdjValueProb( -10, 101762741 , 152644110 , 50881369 )
SetAdjValueProb( -7, 161466445 , 242199666 , 80733221 )
SetAdjValueProb( -4, 263744223 , 395616333 , 131872110 )
SetAdjValueProb( -1, 499999999 , 749999997 , 249999998 )
SetAdjValueProb( 1, 736255775 , 868127889 , 604383664 )
SetAdjValueProb( 4, 838533553 , 919266778 , 757800331 )
SetAdjValueProb( 7, 898237257 , 949118630 , 847355887 )
SetAdjValueProb( 10, 936653924 , 968326963 , 904980887 )
SetAdjValueProb( 13, 962298368 , 981149185 , 943447553 )
SetAdjValueProb( 16, 979427998 , 989714000 , 969141998 )
SetAdjValueProb( 19, 990475617 , 995237809 , 985713426 )
SetAdjValueProb( 22, 996961728 , 998480864 , 995442592 )
SetAdjValueProb( 25, 999900000 , 999950000 , 999850000 )
SetAdjValueProb( 28, 1000000000 , 1000000000 , 1000000000 )
--}
i want to change it to
SetAdjValueProb( 1, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 4, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 7, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 10, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 13, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 16, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 19, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 22, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 25, 100000000 , 100000000 , 100000000 )
SetAdjValueProb( 28, 100000000 , 100000000 , 100000000 )
My aim is:
- only positives awakes
-all awakes should get the same chance.
But after changing the code, I only get +1 awakes.
|
the last 3 params in
SetAdjValueProb( 28, 1000000000 , 1000000000 , 1000000000 )
should vary. Look at the examples beforehand, just offset them a little, in EQUAL distances, and you reach an EQUAL chance for each row to appear.
It appears that the actual 'chance' is the difference between each steps.
You only get the +1 awake as all have the effective same numbers, so the code will simply output the first you have listed, if you put the +28 STR on top of your listing it would be always +28, but as said, make equal steps for an equal chance.
Disclaimer: I have never worked with this code ever before, this is from pure visual code understanding and i might be wrong, but im confident im not.
Example:
SetAdjValueProb( 22, 80000000 , 83330000 , 86660000 )
SetAdjValueProb( 25, 90000000 , 93330000 , 96660000 )
SetAdjValueProb( 28, 100000000 , 103330000 , 106660000 )
|
|
|
All times are GMT +1. The time now is 11:23.
|
|