Random Number Function?

Moderator: Pocus

Post Reply
kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 986
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Random Number Function?

Post by kronenblatt » Tue Jul 21, 2020 8:54 am

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?
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

pipfromslitherine
Site Admin
Site Admin
Posts: 9283
Joined: Wed Mar 23, 2005 10:35 pm

Re: Random Number Function?

Post by pipfromslitherine » 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
follow me on Twitter here

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 986
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Random Number Function?

Post by kronenblatt » Tue Jul 21, 2020 4:45 pm

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
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?
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

Pocus
Ageod
Ageod
Posts: 2680
Joined: Tue Oct 02, 2012 3:05 pm

Re: Random Number Function?

Post by Pocus » Thu Jul 23, 2020 1:39 pm

I use Dice for everything I think.
AGEOD Team - Makers of Empires, ACW2, WON, EAW, PON, AJE, RUS, ROP, WIA.

kronenblatt
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 986
Joined: Mon Jun 03, 2019 4:17 pm
Location: Stockholm, SWEDEN

Re: Random Number Function?

Post by kronenblatt » Sat Jul 25, 2020 6:44 am

Pocus wrote:
Thu Jul 23, 2020 1:39 pm
I use Dice for everything I think.
Thanks Pocus! And is then Dice(100) a 100-sided die, i.e., random integer number from uniform distribution between 1 and 100?
Arranging the The Year of Many Emperors (TYME), Dividing the Spoils (DiSp), and The West is No More (TWiNM) tournaments for Field of Glory II!

Pocus
Ageod
Ageod
Posts: 2680
Joined: Tue Oct 02, 2012 3:05 pm

Re: Random Number Function?

Post by Pocus » Mon Jul 27, 2020 3:09 pm

yes
AGEOD Team - Makers of Empires, ACW2, WON, EAW, PON, AJE, RUS, ROP, WIA.

Post Reply

Return to “MOD”