just a quick question, could someone explain how exactly the "RandomPercent" parameter works?
just a quick question, could someone explain how exactly the "RandomPercent" parameter works?
I believe: the game uses a random-function to generate a number. Then it compares the number with the one you've given for the RandomPercent. If your number is equal or greater than the generated one, you get the effect you want.
Norman Invasion - The fate of England lies in your hands...
Viking Invasion II - Unite Britain in the best TW campaign ever!
Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland
Actually, you provide the logic token yourself. That way, RandomPercent > 99 will return True with a 1% chance, same as RandomPercent < 2 or RandomPercent <= 1.
Yes, I thought that goes without saying, my bad. Thx Bozos! :)
Last edited by Aradan; 12-28-2007 at 14:44.
Norman Invasion - The fate of England lies in your hands...
Viking Invasion II - Unite Britain in the best TW campaign ever!
Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland
ok, i think i understand, but let me just check to be sure.
if a trait or ancillary trigger says:
what exactly happens?Code:... Condition ... and RandomPercent <= 5 ... Affects GoodCommander 1 Chance 10
(... denotes clipped text)
similarly, if triggering an event in a script, such as this one in EB:
what does the RandomPercent do here?Code:monitor_event FactionTurnStart FactionType scythia ... and I_TurnNumber > 35 and I_TurnNumber < 210 and RandomPercent < 5 and I_LocalFaction scythia console_command create_building Sulek hinterland_victory ... end_monitor
thanks in advance![]()
Last edited by tai4ji2x; 06-16-2007 at 03:28.
If the random number generated by the game is less than 5 (and all other conditions are met), you get the victory-building in Sulek.
Norman Invasion - The fate of England lies in your hands...
Viking Invasion II - Unite Britain in the best TW campaign ever!
Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland
Bookmarks