• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Random Seed during Cinematics in Reforged

Status
Not open for further replies.
Level 8
Joined
Mar 10, 2009
Messages
213
I used those
Code:
call SetRandomSeed(bj_cineModeSavedSeed)
and
Code:
set bj_cineModeSavedSeed = GetRandomInt(0, 1000000)
to get random seed during cinematics.

Now they don't seem to work any more =( Does anyone have a viable replacement option?

Note: I disabled fixed values in WorldEdit, so that's not the issue.

[Update]: Ok, I found a solution. So, before Reforged you could easily use GUI cinematic on/off and simply adjust random with the scripts listed above. Now don't use the GUI command at all. Use custom cinematic commands instead if you require to change something within the cinematic on/off code. For example:
Code:
call ShowInterface(true, 0)
or
Code:
call ShowInterface(false, 0)
(0 can be replace by variable of your choice). And so on for all other cinematic-influenced elements (game speed, dusk/dawn etc.)
Those who need decent custom function could thank Dr Super Good and PurgeandFire for this thread.


[Update 2]: FFS... It seems that the above mentioned option provides another fixed seed (different from GUI cinematic on/off fixed seed, but still fixed).

[Update 3]: It seems cinematic mode has nothing to do with it all. The game just refuses to have random seed, even if the cinematic is off.

Even in-game random numbers tested via chat command follow fixed seed.

So, the WorldEdit "Preferences" option enable/disable use of random seed does nothing, and the game just runs on fixed seed. How sweet...
 
Last edited:
Level 8
Joined
Mar 10, 2009
Messages
213
Ive run into this problem as well. The games chooses the same fixed seed every game.

I am okay with fixed randomness based on one seed, but that one seed needs to be different on a game by game basis. Here is a cool post from 2012 that i am going to try to get map randomness back:

[Snippet] Random Seed
Thank you for the snippet info. The point was: why break something that worked just fine. And I've mentioned before, blizz don't address the related bug report. I hope it will get fixed eventually.
 
Level 8
Joined
Mar 10, 2009
Messages
213
F'in unbelievable: after almost a month maps still use FIXED default random seed for random numbers. It's so disgusting.
I need your advice. I'm using so many instances of random number generation, that manual insertion of
UpdateSeed call each time I need it would be VERY time consuming.

Would it be a better idea to call UpdateSeed every 0.03 sec? I know it looks ugly and goes against optimization, but I've tried it, and so far, it does help. One line(!) fixes the whole game for me, but takes its toll in a form of memory, lol.

Another approach would be calling UpdateSeed only ONCE at start, thus producing new fixed random seed. But I'm not feeling comfortable knowing that each instance of random is predetermined till the rest of the game.
 
Last edited:
Level 10
Joined
Dec 11, 2009
Messages
234
I have an idea for a temporary workaround.
When map loads, stop everything and ask the player to move the mouse for a while. Then use mouse coordinates to generate Random Seed (but make sure the mouse was moved at some minimal distance at least). Then proceed with starting the gameplay and everything.
That way the Seed is pretty much guaranteed to be different every time, as it's highly unlikely to be exactly the same mouse position.
And you won't need to update the seed after that anymore.

If it's a multiplayer map, that's a bit worse, but you could ask, for example, only the host to do it, and then sync the coordinates for other players, I guess.
 
Level 8
Joined
Mar 10, 2009
Messages
213
I have an idea for a temporary workaround.
+ rep bro <3
That's a sound idea. I'll try it as well. For now, calling the UpdateSeed from the library link above is pretty easy to use as a lazy workaround. As I mentioned above, I call it every 0.03 sec, since in my project I rely heavily on random numbers for the custom combat procedures.
 
Last edited:
Status
Not open for further replies.
Top