Probably no, but who nows… Any way this sounds like terrible solution.
As I understand you need generate radome number on client and on server side, and you want them to be the same.
So when client is connected to the server, generate on server side 1000 random numbers, and send them to client. In this way when client and server have to use same random numbers they just pop it from the stack instead generating.
Hope it helps. If not, please describe why do you need it for.
Ingame there is an inventory with items where I want to display the stats on the website.
The items have static stats and dynamic stat. For the example let’s only look at a single stat: damage.
Let’s say a weapon has 100 damage (static stats) and can have anywhere from +10 to +50 damage boost (dynamic stats).
The static stats never change and are hardcoded. The dynamic stats are determined by a limit range, and a seed.
So a basic weapon (100 damage) has a certain seed: 1234.
The first roll on the random.range with that seed will determine if there are dynamic stats (e.g. float > 0.75 will roll true)
The second roll on the random.range with that seed will determine what the bonus is of the first dynamic stat (anything between +10 and +50 damage).
Then if there are more dynamic stats, the system will keep on rolling with that seed until all dynamic stats are handled.
So an item is stored by the type (weapon/armor/etc), the base form of that weapon (reference Id to a hardcoded item) and a seed that describes if a weapon has dynamic stats, and what value they are.
I want to display weapons that users found on the website along with the stats they have, however the only data I have online is the type of item, the base form of that item/referenceId and the seed it has.
It sounds like you don’t need Random function, You need function with going to generate value based on
So you simply have to write your function with going to process this values, and use it in client and on server side. And you will be always 100% shure with value’s and what dependencies has your own function.
I’ve found a solution that works in c# and php and will return the same number sequence for a given seed. If anyone needs this, please pm me, I can send you the code then.