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

How many bulbs need for the current tech ?

Discussion in 'Civ1 - General Discussions' started by meifire, Aug 21, 2010.

  1. meifire

    meifire Chieftain

    Joined:
    Nov 13, 2004
    Messages:
    9
    Hi everyone ! long time no see .
    Maybe this is a OLD question , but how can I exactly know how many bulbs need for the current tech ?
     
  2. Whelkman

    Whelkman Phantom Taxman

    Joined:
    Mar 16, 2007
    Messages:
    524
  3. meifire

    meifire Chieftain

    Joined:
    Nov 13, 2004
    Messages:
    9
    Thanks . I have read that page before . But I am confused by this sav (civ dos 474.05 ).

    In this sav , I am plying English for OCC , prince level . I have build library , university , and all wonders that can increase tech researching . The Trade advisor said London can build 342 bulbs per turn , and I have 36 techs already , so I just need only 361 bulbs for next tech ? Yes , the Trade advisor said I will get it in 2 turns . But in fact I get it in 3 turns , at least 684 bulbs !

    Have this question be mentioned ?
     

    Attached Files:

  4. Theov

    Theov Deity

    Joined:
    Feb 11, 2008
    Messages:
    2,161
    Location:
    Taiwan
    allow me to mention that it's extremely annoying when you put a space before dots, comma's and question marks.
     
  5. Revenant

    Revenant Warlord

    Joined:
    Oct 21, 2002
    Messages:
    266
    Location:
    Ireland
    More annoying is to post and complain about someone's grammar and punctuation without even taking to time to respond to the actual question. Also there's no apostrophe in commas.






    To the OP: Is it after 1AD? The amount of bulbs needed for a tech doubles at 1 AD which would explain your tech rate.
     
  6. meifire

    meifire Chieftain

    Joined:
    Nov 13, 2004
    Messages:
    9
    Ah Yeah ! thank you all ! I get it now .

    My English is poor , I am sorry about that .
     
  7. meifire

    meifire Chieftain

    Joined:
    Nov 13, 2004
    Messages:
    9
    I was confused again .
    In this sav , the year is 640 BC , I have build Colossus/library . I calculated my bulbs in every tech carefully . Until the Republic , the difficultychart on civfanatics homepage is right . Then I change the goverment to Republic , so I can produce 42 bulbs per turn . But when I researched the 18th tech , "Banking" , it took at least 5 turn/210 bulbs . Can Revenant help me again ?
     

    Attached Files:

  8. Dack

    Dack Terra Form Moderator

    Joined:
    Nov 26, 2003
    Messages:
    532
    Location:
    civ dos 474.05
    Using your save files as a base I assigned taxes to be 100 percent. Which made the light bulb production zero. I set the light bulb counter for the Aztec to decimal 179. I played until the end of turn no change. I Incremented the counter to 180 at end of turn nothing. Incremented the counter to 181 at end of turn and I got the advancement.

    I admit this is a rather limited test but to get the advance I needed (10 X 18 = 180 plus 1) to get the advance.

    I chose Mathematics as the next advance
    190 light bulbs - no advance
    191 light bulbs - advance took place

    Astronomy
    200 light bulbs - no advance
    201 light bulbs - advance took place

    Again very limited test results, but it seems that the calculated amount plus one is needed.
     
  9. Whelkman

    Whelkman Phantom Taxman

    Joined:
    Mar 16, 2007
    Messages:
    524
    That "plus one" is constant and seems to be some sort of holdover from the bulb needed to bring up the advancement dialog for the first time.
     
  10. meifire

    meifire Chieftain

    Joined:
    Nov 13, 2004
    Messages:
    9
    Thank you Dack ! This is real good idea to test the bulbs need for a tech . Can you tell me which utility do you use to " set " the bulb counter ?
     
  11. Valen

    Valen TWAYF Builder

    Joined:
    Mar 8, 2004
    Messages:
    268
    Location:
    Left Coast
    There may be more than just the "+1bulb" going on here. The question in post 3 was how did meifire fail to make a discovery in turn 2 when he had 684 bulbs - well over the 361 (including the +1) that he needed.
    In my experience, if a city completes production of what it is building, it cannot make a discovery in the same turn no matter how many bulbs you have.
    There are a few exceptions to this rule, but I think this is what kept meifire from making that discovery.
     
  12. Dack

    Dack Terra Form Moderator

    Joined:
    Nov 26, 2003
    Messages:
    532
    Location:
    civ dos 474.05
    This shows how much time I’ve had for civilization this last month or so. I still had as a save file the test that I left off from in post 8. I have 201 light bulbs ready for the next advance. I selected Barracks as a city item to build and filled the production box.
    At the end of the next Chiauhtia built a Barracks but no tech advance. I can only surmise that the programmer exited the City update/check/status code prematurely after finding the production box full.
    As I was writing the above the thought came to mind did the light bulbs from the city get added to the light bulb counter?

    I have modified the light bulb counter to 197. Also changed the tax rate to 90 percent. The new tax rate allows Chiauhtia to produce 4 light bulbs.

    On the next End Of Turn one would expect Chiauhtia built a Barracks and the next advance. As Valen pointed out ”… if a city completes production of what it is building, it cannot make a discovery in the same turn no matter how many bulbs you have. There are a few exceptions to this rule…”
    I was curious about this phenomenon. I ran the following test.

    The attached CIVIL1 - MAP & SVE in this instance at the end of turn the Barracks will be build. The bulbs will be added. But no advance occurred.

    The attached CIVIL2 - MAP & SVE shows the same situation with the addition of another city. Note the second city does not produce any light bulbs. At the end of turn, Chiauhtia built a Barracks, and then the advance is made.

    A second time with CIVIL2 this time open up Chapultepec and change what is being built from courthouse to barracks. This time at end of turn both cities will build a barracks but there will be no tech advance.
     

    Attached Files:

  13. jpciv

    jpciv Warlord

    Joined:
    Jul 9, 2010
    Messages:
    101
    So, from a game play perspective, the end result seems to be as follows?

    "If you absolutely need the next tech advance by the end of the current turn, make sure that your last city does not produce a city improvement during that turn."

    Very interesting...
     
  14. Valen

    Valen TWAYF Builder

    Joined:
    Mar 8, 2004
    Messages:
    268
    Location:
    Left Coast
    This is still possible, but it implies pollution is handled in a separate routine. A city that completes production can still pollute a square. Pollution occurs after the discovery in a city.

    It's also interesting to note exceptions. If a city completes a transport, it can still make a discovery. Weird!
     
  15. jpciv

    jpciv Warlord

    Joined:
    Jul 9, 2010
    Messages:
    101
    Transports are unique, if I recall. Once upon a time, they caused unhappiness, just like other military units, then later they didn't. Not sure if it's relevant, tho...
     
  16. Valen

    Valen TWAYF Builder

    Joined:
    Mar 8, 2004
    Messages:
    268
    Location:
    Left Coast
    Transports are also built "silently". You will never see the message "Berlin builds Transport" during a city check. When the transport is completed, the city display doesn't come up.
    From what I have seen, it is the opening of the dity display that prevents science.
     
  17. darkpanda

    darkpanda Dark Prince

    Joined:
    Oct 28, 2007
    Messages:
    606
    I am currently looking into the following request from hannurabi:

    While reverse-engineering CIV.EXE, I stumbled upon the logic that is also presented in this chart, showing how many more bulbs (the increment)[/B]are required for the player or for the AI, depending on the difficulty level.

    1. What we know

    With difficulty valued from 0 (Chieftain) to 4 (Emperor), the increment is computed as follows:
    • for the AI: increment = 14 - difficultyLevel
    • for the Player: increment = 6 + 2*difficultyLevel

    Later in the code, we find more logic that deals with the 2x factor after 0 AD:
    Code:
    ...
    factor2x = 1;
    if( currentYear >= 0 ) factor2x = 2;
    
    if( bulbs[civID]/factor2x >= increment*techCount[civID] ) {
        // ... discover advance, reset bulbs[civID] to 0
    
    }
    
    Note that this condition could as well be written: bulbs[civID] >= factor2x*increment*techCount[civID], which effectively means that the increment is twice higher after 0 AD.

    Thus we can list expected increment values based on difficulty level and year:

    Column 1 Column 2 Column 3 Column 4 Column 5 Column 6
    Chieftain (0) Warlord (1) Prince (2) King (3) Emperor (4)
    AI increment (BC) 14 13 12 11 10
    Player increment (BC) 6 8 10 12 14
    AI increment (AD) 28 26 24 22 20
    Player increment (AD) 12 16 20 24 28


    But wait a second... between these 2 pieces of code, there is some more logic that is actually affecting the computation of bulbs!

    2. First discovery

    After initial calculation of the increment following the first formula above, and evaluating the condition, a mysterious value is added to the increment, which I have called additionalRequiredBulbs.

    This value, additionalRequiredBulbs, is re-computed every 50 turns after 0 AD, as part of the main game loop, with the following formula:
    Code:
    additionalRequiredBulbs = maxTechCounter - gameTurn/9;
    if(additionalRequiredBulbs<0) additionalRequiredBulbs=0;
    if(additionalRequiredBulbs>6) additionalRequiredBulbs=6;
    
    In the code above, maxTechCounter is the maximum number of techs discovered by any Civ so far.

    Let's recall the equivalent between turns and years:
    • Turns 0 to 250 (4000 BC to 1000 AD): 1 turn = 20 years
    • Turns 250 to 300 (1000 AD to 1500 AD): 1 turn = 10 years
    • Turns 300 to 350 (1500 AD to 1750 AD): 1 turn = 5 years
    • Turns 350 to 400 (1750 BC to 1850 AD): 1 turn = 2 years
    • Turns 400 onwards (after 1850 AD): 1 turn = 1 year

    We can ignore everything before 0 AD, which corresponds to turn 200.

    At 0 AD, it is the first time that additionalRequiredBulbs is computed. At that time, turn/9 = 200/9 = 22. That means if any Civ has discovered 23 or more techs, then the increment will be modified, and will keep its value for the next 50 years.

    If we imagine that the player knows the most, with 23 techs, the increment will increase by 1, but since we're at 0 AD (or after), it really means an additional 2 bulbs required per known techs. Since the player knows 23 techs already, that means at least 2*23 = 46 more bulbs will be necessary to discover the 24th tech !

    And if any Civ knows 28 techs, the increment will increase by 12 (2*6), leading to an incredible 336 additional bulbs required for that Civ to discover its 29th tech !

    Honestly, I never cared to hold a detail accounting on bulbs and techs when playing Civ, but these numbers look quite astonishing to me, and I wonder if anyone would care to put them to the test... I'd like to highlight I discovered this in version 474.01, and this may have been altered in subsequent versions.

    Similar logic applies every 50 years after this:
    • After 1000 AD, turn 250, the base increment will be increased if any Civ has more than 250/9 = 27 techs
    • After 1500 AD, turn 300, the base increment will be increased if any Civ has more than 300/9 = 33 techs
    • After 1750 AD, turn 350, the base increment will be increased if any Civ has more than 350/9 = 38 techs
    • After 1850 AD, turn 400, the base increment will be increased if any Civ has more than 400/9 = 44 techs

    3. Second discovery

    After adding additionalRequiredBulbs to the increment, CIV makes an extra step just for the player, that may completely override the increment:
    Code:
    if( 11 - techCount[playerCivID] > increment ) {
        increment = 11 - techCount[playerCivID];
    }
    
    This one is summed up as follows: the fewer techs the player has (below 11 techs), the more bulbs he will require for the next tech. Somehow this seeks to mitigate the conditions at game start, I suppose, but I really don't find it straightforward.

    That's it for now, I'll come with more details, if any come up.
     

Share This Page