1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Random Events list

Discussion in 'Civ4 Strategy Articles' started by ori, Aug 7, 2007.

  1. Icemanvlad

    Icemanvlad Chieftain

    Joined:
    Nov 2, 2009
    Messages:
    1
    Hello there. I've been playing civ for a bit of time and ever since i got beyond the sword i loved it even more :D. I love the random events and what i want to know is how can i increase the frequency or unlock all of them as i have read some and there were many i did not see andi thought i saw them all since i saw some of them 10-20 times now. Can anyone help? thanx :D
     
  2. Antilogic

    Antilogic --

    Joined:
    Sep 2, 2006
    Messages:
    15,602
    The vital files you want to look at are the GlobalDefines XML and the EventTriggerInfos XML.

    In GlobalDefines, you need to find some variable that says EVENT_PROBABILITY_ROLL_SIDES, and it is by default at 100. If you decrease this number, more random events will occur in your game. However, this doesn't affect which events occur--to figure that out, you need to look in each trigger info (one per event). There are two values you should look at: iPercentGamesActive and iWeight.

    iPercentGamesActive will tell you how many games on average where this event will be active (as in, it can happen). At the beginning of a new game, each event gets an up or down vote based on this percentage. If this number is low, then it simply won't appear in most games, whereas 100 will ensure this event will always have the chance of happening in the game.

    When the game decides that a random event occurs, it figures out the probability of each event occuring by looking at the iWeight values. It basically checks to see if the event can happen in the game (already decided above), and then checks to see if that event meets the triggering conditions (all the other stuff in the trigger info). If the event is in the game and it meets the triggering conditions, it goes into the pot of stuff that could happen this turn.

    After it looks at each event, it picks a random number and decides which event occurs based on that number. Events with high weights are more likely to be picked, so an event with a weight of 200 has twice the chance of being selected as an event with a weight of 100, so long as both events are active in the game and all triggering conditions have been met.
     
  3. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    @ ori

    Do you know if this quest:
    Code:
    Quest12:
    	Elite Swords
    	Prereq: IRON_WORKING AND State Religion
    	Obsolete: MACHINERY or FEUDALISM or MUSIC or PHILOSOPHY or CIVIL_SERVICE or THEOLOGY
    	Active/Weight: 25/200
    		Aim:
    		Build default number of players for this world size +1 Swordsmen (8 for standard)
    		Result:
    1.All Swordsman units gain the City Raider 1 promotion
    2.All Melee units gain the Drill 1 promotion
    
    had the prereqs and the rewards changed? See here
     
  4. ori

    ori Repair Guy Super Moderator

    Joined:
    Dec 17, 2005
    Messages:
    16,561
    Location:
    Baden-Württemberg, Germany
    from a quick glance at the current (BtS 3.19) files I don't think it requires any state religion (not sure if that was ever the case - if I find time I'll correct that).
    the required and obsolete techs are the same.
    the first option is available without hereditary rule and is the same and the second option requires HR and is the same.
     
  5. r_rolo1

    r_rolo1 King of myself

    Joined:
    May 19, 2006
    Messages:
    13,818
    Location:
    Lisbon, Portugal
    Thanks ;)
     
  6. ScavengerType

    ScavengerType Warlord

    Joined:
    Sep 7, 2009
    Messages:
    156
    Location:
    North North America
    I just thought I would add a thanks for this. It has been instrumental in my events editing(mostly rewording many old events) so as to prevent me from having to read the XML in order to understand crudely what every events does. I am sure I am not the only one who has benefited.

    Many of the events editing guides tell you how the XML and even the python works, but none other list the events as they are. Saved a lot of time for me, it's a must for any events editor.
     
  7. VladTepes

    VladTepes Clown Prince of Wallachia

    Joined:
    Jan 6, 2003
    Messages:
    452
    I'm sorry if this has already been mentioned, but the "Classic Literature" quest spoiler seems to have a mistake. It expires with the Renaissance era, so logically it wouldn't give an Ancient era tech as a bonus, right?
     
  8. ori

    ori Repair Guy Super Moderator

    Joined:
    Dec 17, 2005
    Messages:
    16,561
    Location:
    Baden-Württemberg, Germany
    this code

    seems to require any tech you can choose to be an ancient era tech :)
     
  9. morchuflex

    morchuflex Emperor

    Joined:
    Feb 19, 2004
    Messages:
    1,389
    Location:
    Paris
    This sucks, since you generally have all of them by the time you complete the quest.
    As it stands, this quest is only worth it if you have the Great Library.
     
  10. casey1966

    casey1966 Warlord

    Joined:
    Feb 5, 2005
    Messages:
    152
    I was wandering what calculates the # of units needed to be built or cities required? For example build 7 Colosseum's in your various cities. I'd like to lower the requirements on events,thanks.
     
  11. ori

    ori Repair Guy Super Moderator

    Joined:
    Dec 17, 2005
    Messages:
    16,561
    Location:
    Baden-Württemberg, Germany
    you need to change the respective values in the python file covering events - I forget the exact name of it, but its the only events file in the entry points subfolder IIRC.
     
  12. Alexej

    Alexej Prince

    Joined:
    May 16, 2008
    Messages:
    437
    Those military events which upgrade your existing and future troops and are triggered by technologies like Mining, Bronze Working... do you need to be first who research tech? cause in most recent games i had two of events in single (out of 8 or so) game where I rushed military technologies.
     
  13. Antilogic

    Antilogic --

    Joined:
    Sep 2, 2006
    Messages:
    15,602
    No, you just have to have that technology for the game to be eligible for that event. Researching the tech first gives you an advantage because if that event fires and nobody else has that tech, you are the only person who can receive the event. If two civilizations meet the prerequisite techs, etc. then it's a coin flip who gets it when the event fires.
     
  14. BuDDaH

    BuDDaH Chieftain

    Joined:
    Aug 23, 2004
    Messages:
    48
    Location:
    Moscow, Russia
    I hope somebody knows.

    Some things are still unclear to me in the mechanics of random events.

    So when a new game is generated it is decieded based on the "active" value whether a certain event will be included in this game. It's clear

    There is a chance of 1%/2%/4%/4%/6%/8%/10% per turn for any event to occur (era specific Ancient/Classical/Medieval/Renaissance/Industrial/Modern/Future).
    Does an event occur for a certain player? If so, it' clear how the chance for a specific era determined. It's also clear what active events are chosen to be pooled for a wehight defined dice roll. Obviously these are events for which this certain player has all the prereqs in hands.

    However there's another opinion
    The event occurs unbound to any player and then the random number generator decides which of the qualifing players gets the event. Then how the era and the chance for an event to occur defined? And how is it decided which of the acitve events meet the requirements to be pooled in the lottery cylinder? Obviously the set of qualifying events will be specific for every player.

    Another thing that I'm curious about is how the chances are calculated when a player has several qualifying objects.

    For example you have 10 forests in the fat cross. Do their weights add for a forest fire?

    Spoiler :
    Event1
    Forest Fire
    Prereq: Forest in city fat cross
    Obsolete: None
    Active/Weight: 70/100
    Result:
    1.you pay 10 gold
    2.you pay 4 gold and loose 1 forest
    3.you pay nothing, loose one forest and gain 1 angry face (lasts as long as whip anger)


    Or you have 3 city ruins under control

    Spoiler :
    Event2
    City Ruins
    Prereq: City Ruins in your control
    Obsolete: RADIO or REFRIGERATION or PLASTICS or SATELLITES or ADVANCED_FLIGHT or ECOLOGY
    Active/Weight: 90/1000
    Result:
    1.you get 15% of remaining tech cost for a tech
    2.you get 15% of remaining tech cost for a tech AND pay gold (5% of tech cost) for a chance for 3
    3.you get +15% of remaining tech cost for a tech


    Or 3 cities with a forge

    Spoiler :
    Event10:
    Careless Apprentice
    Prereq: City with Forge
    Obsolete: RADIO or REFRIGERATION or PLASTICS or SATELLITES or ADVANCED_FLIGHT or ECOLOGY
    Active/Weight: 75/200
    Result:
    1.you pay 50 gold
    2.you pay 10 gold and loose the forge
    3.you loose the forge AND gain one angry face (like whipped)

    Will this event be added to the lottery box three times or just once

    I'm interested because of an idea of busting negative events by adding multiple positive events to the weight lottery. Namely these two events requiring building walls.

    Spoiler :
    Event105
    Security Tax
    Prereq: METAL_CASTING or IRON_WORKING or MONARCHY or ALPHABET or MATHEMATICS or CODE_OF_LAWS or AESTHETICS or THEOLOGY AND city with walls
    Obsolete: NATIONALISM or PRINTING_PRESS or EDUCATION or GUNPOWDER or ASTRONOMY
    Active/Weight: 70/500
    Result:
    1.you gain 20 to 80 gold

    Miracle
    Prereq: City with walls AND state religion
    Obsolete: None
    Active/Weight: 90/200
    Result:
    1.+1 commerce for city's walls
    2.you pay 30 gold AND spread your state religion to 2 own cities


    They both have weights above average and if multiplied by the number of cities in walls can make other events including negative ones less probable.

    For example you are a protective civ whith stone. org religion and forges. Building walls in every of 10 cities will add 7000 of wheigt assuming the both events are active and their weights are multiplied by the number of qualifying cities (buildings).
     
  15. kaspergm

    kaspergm Deity

    Joined:
    Aug 19, 2012
    Messages:
    5,007
    Wow, so many events! :eek: Thanx for posting these here, many of them I remember, some of them I think I never saw.

    Oops, didn't actually intend to post in this thread, but was directed from another thread. If a mod sees this, they can delete it if they deem the thread should be put back to rest.
     
  16. TheSunIsDark

    TheSunIsDark Settled Great Scientist

    Joined:
    Jan 2, 2014
    Messages:
    479
    Location:
    The great Mayan city of Teotihuacan
    The Impeachment event has an unnecessary prerequisite (having a capital). That only has an effect if Require Complete Kills is set and they have units but not cities, in which case they can only capture cities or explore.
     
  17. TheSunIsDark

    TheSunIsDark Settled Great Scientist

    Joined:
    Jan 2, 2014
    Messages:
    479
    Location:
    The great Mayan city of Teotihuacan
    What does Holy Ritual do if you have less than 20 gold?
     
  18. whitelaughter

    whitelaughter Warlord

    Joined:
    Oct 21, 2008
    Messages:
    269
    Location:
    Canberra, Australia
    A couple of questions - can the same event happen multiple times over a game? If so, to the same player, or only to different players?

    If a scout unit is in a caravel, on an ocean square with Oil, will the Man called Jeb event trigger ?

    Thanks.
     
  19. ori

    ori Repair Guy Super Moderator

    Joined:
    Dec 17, 2005
    Messages:
    16,561
    Location:
    Baden-Württemberg, Germany
    For the first question: it depends - there is a flag which allows it to only be triggered once ever per game. in which case it cannot be triggered again by any player - most quests are set up like this - also it is possible to trigger an event that is barred from ever happening again and then later erase the memory of it having been triggered - the dustbowl event is working like this - you can only trigger the first dustbowl event once but when the event chain ends it erases the memory of the first one being triggered so that it can occur again.

    For the second: I am not perfectly sure how units in cargo are dealt with but I don't really remember anything that would prevent Jed from finding oil under water.
     
  20. whitelaughter

    whitelaughter Warlord

    Joined:
    Oct 21, 2008
    Messages:
    269
    Location:
    Canberra, Australia
    cool, thanks Ori.
     

Share This Page