• 🏆 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 Stuck in Reforged

Status
Not open for further replies.
Level 4
Joined
Nov 20, 2006
Messages
71
"Use fixed random seed" no longer has any effect on my map. I have seen a number of people complain about the same thing starting from the Reforged beta but I can't tell if there is any fix. Most of the complaints aren't recent.

Is there a fix? Is there a workaround?
 
Level 14
Joined
Feb 7, 2020
Messages
387
Should be able to mimic the code with math.randomseed( generatedIntHere ). I know it doesn't work with a fixed integer but it might work with the timer method.

edit: I tried it myself, something seems to be hardcoded to overwrite the seed that I can't figure out. When you first disable "fixed random seed" it actually does work. But it doesn't continue working if the map is loaded up or if you toggle it off and on again. Another Deforged bug.
 
Last edited:
Level 14
Joined
Feb 7, 2020
Messages
387
Hm. I think I discovered the source of the fixed random seed bug (or Deforged feature) in Lua maps. Maybe it was already known by someone, but it's new to me. Still verifying if this is a real discovery.

The seed gets reset to fixed after every test map run (I think the fixed seed code runs on client closure). If you open up preferences, toggle it on and off, then click Okay and run test map, the seed is properly unfixed and pseudo random again [edit] as long as the randomseed is fixed to a timer.

Essentially, it has to be "re-toggled" every run of test map.

edit: as a side note, I do this in conjunction with a new math.randomseed()

edit 2: take with grain of salt, testing some things to verify

edit 3: was false hope on the initial randomseed, think I got a false positive originally

I currently use math.randomseed( GetTimeOfDay()*10000000*bj_PI ) (arbitrary numbers) which acts pseudo-randomly as long as player agency is required (e.g. a chat command). Anything started from map init that uses time is stuck to the fixed seed output (which makes sense as a fixed seed setting). Grrrr!
 
Last edited:
Status
Not open for further replies.
Top