17.07.2016, 21:16
17.07.2016, 21:23
You can do something like this instead:
17.07.2016, 22:05
In fact I have 3 random values to get in a row (v2-v4), so I thought time based will give same values.
17.07.2016, 23:07
That's why bugyboy and I didn't suggest it.
17.07.2016, 23:27
Not sure how to use your code: I want random level 8 monster (150-158)
!!VRv1:S0 T2147483647 &2147483647 R0/v1; set random seed to current time
I am lost, don't understand the bit part
!!VRv1:S0 T2147483647 &2147483647 R0/v1; set random seed to current time
I am lost, don't understand the bit part
18.07.2016, 00:13
Both my and bugyboy's code are initialization-type. You only need to run it once, then you are free to generate whatever and however many times you need.
18.07.2016, 01:42
ah now makes sense. Thanks both.
I put it in a timer and it runs once a week, before randomizer. When you said "one time", means really one time, in PI or so?
I put it in a timer and it runs once a week, before randomizer. When you said "one time", means really one time, in PI or so?
18.07.2016, 01:51
Most likely. VR:R is essentially SoD random, I'm not sure if it's saved in the save file.
But you can execute it several times if you like, just not too often.
But you can execute it several times if you like, just not too often.
18.07.2016, 02:34
But if it is not saved then I need to recall it in GM, like UN hacks? Will be executed quite often then.
18.07.2016, 03:13
You can check easily if it's saved or not. Save the game and generate random value on load.
(18.07.2016 02:34)Valery Wrote: [ -> ]Will be executed quite often then.Do you save several times per turn and load every single of those saves?
18.07.2016, 03:31
No, as quick saves mod replace previous quick save with the new one, so I have only a maximum of two saves daily, the automatic and the manual.
18.07.2016, 03:41
Then I don't see a problem. You are calling it on load, not on save.
18.07.2016, 04:13
Right now I only put it in a weekly timer, no on GM. So far there are no problems and random values are really random, I like it.
10.04.2018, 02:16
катастрофа, сломался рандом
всегда получаю одно и тоже значение - 36
всё работало хорошо, рандом работал как надо, создавал карту, добавлял скрипты и в один день заметил что рандом выдаёт одно и тоже число, в чем может быть причина?
ради эксперимента:
- удалил с карты все скрипты, оставил только этот, один, и всё равно не работает
- создал новую карту, пустую (2 замка только синий и красный), вставил туда этот скрипт, всё нормально работает
Code:
ZVSE
!#TM20:S2/999/1/1;
!?TM20;
!!VRy1:S0;
!!VRy1:R100;
!!IF:M^%Y1^;
всё работало хорошо, рандом работал как надо, создавал карту, добавлял скрипты и в один день заметил что рандом выдаёт одно и тоже число, в чем может быть причина?
ради эксперимента:
- удалил с карты все скрипты, оставил только этот, один, и всё равно не работает
- создал новую карту, пустую (2 замка только синий и красный), вставил туда этот скрипт, всё нормально работает
10.04.2018, 13:34
Sedman7, если у тебя не куча рандом-команд за секунду выполняется, можно использовать VR:T вместо VR:R. Ну или вручную инициализировать генератор можно (доп. синтаксис VR:R).