Results 1 to 14 of 14

Thread: "RandomPercent" parameter

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    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

  2. #2
    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.

  3. #3

    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

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

    Default Re: "RandomPercent" parameter

    thanks aradan :) so RandomPercent < 99 would mean 99 times out of 100, the condition returns "true"?

    can you do...

    Code:
    and RandomPercent < 99
    and RandomPercent > 50
    ?

    or (assuming the system would even accept that) is that just a redundant way to do

    Code:
    and RandomPercent > 51
    ?

    but what about traits/ancillaries? first there is a RandomPercent, and then the usual "Chance" #

    does that mean that first it rolls dice for RandomPercent to see if it even will or will not execute yet another dice roll with the "Chance" parameter? which makes me wonder... why bother with two dice rolls?
    Last edited by tai4ji2x; 06-16-2007 at 13:54.

  5. #5

    Default Re: "RandomPercent" parameter

    Basically it will be true 98 times out of 100, since 99 isn't less than 99... In order to have a 99% chance you must have
    and RandomPercent <= 99
    Assuming that in the case you used two RandomPercent checks the game only trows the dice once, I don't think your logic is correct. Because if the RandomPercent is 51, this
    and RandomPercent < 99
    and RandomPercent > 50
    will be satisfied, while this
    and RandomPercent > 51
    will not. Or if the value is 100, then the double one won't be satisfied and the single one will.

    And there is always the chance that if you put two RandomPercent lines, the game actually throws the dice two times, in which case the final probability of your thing happening is prob1 * prob2= final_prob, which will always be less than the min{prob1, prob2} (assuming that we can't have 100% probability.

    Generally, I can see no reason to put two RandomPercent lines, even if the game accepts them. It seems redudant and rather complicated.

    The usage of both 'chance' and 'RandomPercent' is probably possible in order to allow for probabilities with up to two decimals to be used, as the engine calculates probabilities only with integers... I guess it's a valuable tool for traiters to be able to have probs like 43.76%...

    Perhaps one of the highly experienced EB traitors would be of more avail here.
    Last edited by Aradan; 06-16-2007 at 17:03.

    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

  6. #6
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: "RandomPercent" parameter

    I believe the term is traiters ;)

    monitor_event ForumTurnStart FactionType palantir
    ...
    and I_PostNumber > 1
    and I_PostNumber < 2
    and RandomPercent < 100
    and LocalForumBrowser noobie
    and ProblemNameExists Installation Error

    console_command create_angryPost Palantir ReadTheInstructionsProperlyFor_victory
    ...
    end_monitor
    Last edited by Dol Guldur; 06-16-2007 at 14:56.
    "One of the most sophisticated Total War mods ever developed..."

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

    Default Re: "RandomPercent" parameter

    Quote Originally Posted by Dol Guldur
    I believe the term is traiters ;)
    hyuk hyuk hyuk

    seriously though... anyone here know what the purpose is when it comes to trait/ancillaries?

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