Is there any function that generates a random number, ideally uniform between 0 and 1 (or 1 and 100)?
EDIT: would the Dice() function fulfil that purpose? Is then Dice(100) a 100-sided die, i.e., random integer number between 1 and 100?
Random Number Function?
Moderator: Pocus
-
- General - Elite King Tiger
- Posts: 4362
- Joined: Mon Jun 03, 2019 4:17 pm
- Location: Stockholm, SWEDEN
Random Number Function?
kronenblatt's campaign and tournament thread hub:
https://www.slitherine.com/forum/viewtopic.php?t=108643
https://www.slitherine.com/forum/viewtopic.php?t=108643
-
- Site Admin
- Posts: 9707
- Joined: Wed Mar 23, 2005 10:35 pm
Re: Random Number Function?
Rand should do the trick. You can see a list of all commands in Documents/My Games/FieldOfGloryEmpires/AUTODOCS/Battlescript.txt
Cheers
Pip
Cheers
Pip
follow me on Twitter here
-
- General - Elite King Tiger
- Posts: 4362
- Joined: Mon Jun 03, 2019 4:17 pm
- Location: Stockholm, SWEDEN
Re: Random Number Function?
Thanks Pip: appreciated! You wouldn't happen to know the answer to my question in a separate thread too; on creating and calling upon a new function?pipfromslitherine wrote: ↑Tue Jul 21, 2020 3:56 pm Rand should do the trick. You can see a list of all commands in Documents/My Games/FieldOfGloryEmpires/AUTODOCS/Battlescript.txt
Cheers
Pip
kronenblatt's campaign and tournament thread hub:
https://www.slitherine.com/forum/viewtopic.php?t=108643
https://www.slitherine.com/forum/viewtopic.php?t=108643
Re: Random Number Function?
I use Dice for everything I think.
AGEOD Team - Makers of Kingdoms, Empires, ACW2, WON, EAW, PON, AJE, RUS, ROP, WIA.
-
- General - Elite King Tiger
- Posts: 4362
- Joined: Mon Jun 03, 2019 4:17 pm
- Location: Stockholm, SWEDEN
Re: Random Number Function?
Thanks Pocus! And is then Dice(100) a 100-sided die, i.e., random integer number from uniform distribution between 1 and 100?
kronenblatt's campaign and tournament thread hub:
https://www.slitherine.com/forum/viewtopic.php?t=108643
https://www.slitherine.com/forum/viewtopic.php?t=108643
Re: Random Number Function?
yes
AGEOD Team - Makers of Kingdoms, Empires, ACW2, WON, EAW, PON, AJE, RUS, ROP, WIA.