Results 1 to 14 of 14

Thread: "RandomPercent" parameter

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member tai4ji2x's Avatar
    Join Date
    Apr 2001
    Location
    MA
    Posts
    291

    Default "RandomPercent" parameter

    just a quick question, could someone explain how exactly the "RandomPercent" parameter works?

  2. #2

    Default Re: "RandomPercent" parameter

    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

  3. #3
    EB Traitor Member BozosLiveHere's Avatar
    Join Date
    Jan 2006
    Location
    Uqbar, Tlön
    Posts
    3,662

    Default Re: "RandomPercent" parameter

    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.

  4. #4

    Default Re: "RandomPercent" parameter

    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

  5. #5
    Member Member tai4ji2x's Avatar
    Join Date
    Apr 2001
    Location
    MA
    Posts
    291

    Default Re: "RandomPercent" parameter

    ok, i think i understand, but let me just check to be sure.

    if a trait or ancillary trigger says:
    Code:
    ...
    Condition ...
        and RandomPercent <= 5
    ...
    Affects GoodCommander  1  Chance 10
    what exactly happens?

    (... denotes clipped text)

    similarly, if triggering an event in a script, such as this one in EB:
    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
    what does the RandomPercent do here?

    thanks in advance
    Last edited by tai4ji2x; 06-16-2007 at 03:28.

  6. #6

    Default Re: "RandomPercent" parameter

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO