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

Vocum Sineratio: The Whip

Discussion in 'Civ4 Strategy Articles' started by VoiceOfUnreason, Nov 21, 2006.

  1. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    Bother - that code is such a pain to work through.

    Not that it helps, I'm pretty confident that your example demonstrates that there are two separate bugs. Were there only one bug, I think you would get the same number of hammers when whipping 2 population.

    But the description as I wrote it is wrong in any case, so thanks for the correction.
     
  2. malekithe

    malekithe King

    Joined:
    Feb 5, 2006
    Messages:
    755
    Agreed. I worked through it back in the summer and it took me at least three passes to get everything right. I'm also quite confident there is only the single bug (well, not accounting for a rounding bug that also creeps in on rare occasions).

    Here is the difference between whipping an axeman and an archer on turn 0:

    Axeman:
    35 hammers remaining / 20 hammers per pop = 2 pop sacrificed
    35 hammers left in project -> 60 hammers contributed from whipping.

    Archer:
    25 hammers remaining / 20 hammers per pop = 2 pop sacrificed
    25 hammer left in project -> 30 hammers contributed from whipping

    So, if you had a theoetical project that cost you 55 hammers on the first turn the outcomes would look like this:
    55 / 20 = 3 pop sacrificed
    55 hammers left -> 60 hammers contributed

    That last time it actually worked out exactly as it was supposed to, but those times are fairly rare.

    If you haven't seen it before, you can take a look at my whipping spreadsheet that can be used to calculate returns from whipping projects at various hammer levels. http://forums.civfanatics.com/attachment.php?attachmentid=137640&d=1157570705
     
  3. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    On further thought, I think you may be right. Based on staring at the ceiling and thinking about it....

    A) The population required to rush the build is being calculated correctly, including production bonuses, the first turn penalty and so forth.

    B) The amount of population rushed has no impact on the yield of the whip at all. The yield is always just "number of hammers you need" rounded up to "base hammers per pop".


    Side note: I didn't find the spreadsheet terribly useful - too many rows that I don't care about, and I'm unclear on why I should care about "efficiency". Also, you should delete the blank worksheets ;)
     
  4. pixiejmcc

    pixiejmcc Prince

    Joined:
    Feb 6, 2006
    Messages:
    418
    Location:
    Ingleton, North Yorkshire
    Yeah the manual and/or civilopedia is erroneous in this regard. :mad:
     
  5. malekithe

    malekithe King

    Joined:
    Feb 5, 2006
    Messages:
    755
    The point behind efficiency was simply: "How is the bug affecting my whipping at this point". It's designed for abusing the bug as much as possible. If I was ever planning on playing 1.61 again, I would clean it up. As it was, it worked very well for me (the real target audience :) ) at the time.
     
  6. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    When I get a chance to look into the details of this (or if some ambitious soul beats me to it), I'll fold it into the article.
     
  7. cabert

    cabert Big mouth

    Joined:
    Dec 14, 2005
    Messages:
    7,710
    Gender:
    Male
    Location:
    France
    a few facts to see why the whipped worker is cheaper than the fed worker :
    - expansive trait gives +50% hammers for workers
    - food is not hammers, so no +50% for building workers with food
    - when whipping, you get the +50% benefit
    - it already was better to whip 3rd and 4th pop than to give away 60 breads for a worker, since you can regrow them for less food.

    conclusion, don't build workers via food. Whip for them.
    The only exception is the first one, if you don't have seafood.
     
  8. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    Added CR5 - notes on traits.
     
  9. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    Also going through to clean up some of the formatting.
     
  10. Tzu Iop

    Tzu Iop Chieftain

    Joined:
    Jul 25, 2006
    Messages:
    30
    Location:
    Germany
    I think you can exploit Hereditary Rule much more. Since you are allowed to build Warriors in a city which has no connection to Iron or Copper, you can get two Warriors out of one Pop. One Warrior stays in the city and the other one is free to use, so you can upgrade him in a city with metalls connected or use him to surpress the unhappy faces in other cities. This works up until Gunpowder, when muskets obsolete the warroirs.
     
  11. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    Did some research on production overflow, and updated the article to reflect this. I've also an idea for some improved formatting that I'll be adding shortly.

    Open Question: In Warlords, the production that you can't carry over gets converted to gold. Can this be incorporated as a strategic element to fund your civilization - especially in the pre-currency era when you cannot build gold directly. Discuss.
     
  12. cabert

    cabert Big mouth

    Joined:
    Dec 14, 2005
    Messages:
    7,710
    Gender:
    Male
    Location:
    France
    really?
    Good to know if it works before currency!
    I'll be fogbusting with whipped warriors a lot now :D
     
  13. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    Worldbuilder says yes it does work. This agrees with what I saw reviewing the code.
     
  14. Jet

    Jet No, no, please. Please.

    Joined:
    Mar 16, 2006
    Messages:
    2,364
    That sounds good for after a big early expansion where you can't do anything but run scientists and build units. And work cottages and other commerce tiles, of course.

    Doesn't sound very satisfying, but I guess I'm not above doing it if I had to. :mischief:

    The TAM mod, which has particularly high maintenance costs, added a pre-Currency action called "Caravans" which builds just a small amount of research, culture, and wealth. Of course since it's a vanilla mod, the small amount often gets rounded down to zero :p.
     
  15. oyzar

    oyzar Have quit civ/forums

    Joined:
    Oct 7, 2006
    Messages:
    6,923
    Location:
    Norway
    i thoguht granaries were suposed to be whipped so they finished at half pop of the pop you end up with(whip from 4 pop you want to have 12-whatever food you produce that turn) for example. Say you are working all flood plain titles and start size 4 with 0 food you get 6 whip -> 10 when finish granary which is clearly better than whipping and getting 4 -> 8 not to mention that you might lose comerce too(say if all those titles were flood plain titles). comparing whipping after 3 turns 6 -> 12 -> 16(so missing 4 food in granary when you grow) compared to 6-> 10 -> 14(missing 0 food int he granary when you grow) of course it also takes one more turn to grow if you whip after 1 turn instead of after 2 turns 6->10->14->18->22->26(2 overflow so 14 food carry over), compared to 6->12->16->20->24(-4 food in granary so 8 food carry over) -> 13 . So here we see that whipping after 1 turn on size 4(assuming all 3 food sources, think flood plains), gives 1 more food than whipping after 2 turns in total. If all these titles were flood plains it might be better to wait an additional turn since you get to work 3 extra turns of cottages(say 9 commerce+ growth) at the cost of 1 food. This post is probably a bit too jumbled to be here but at least i cleared up some of my own questions about this in my current game which was when to whip when working floodplains cottages and the answer there is probably after 2 turns while if you are working just 3 food titles it is way better to wait just 1 turn(better to get 2 food less(+1 for one turn longer at lower level) than missing 4 turns in the granary.

    I hope this also cleared up something for someone when to whip granary. For more specific questions i think you should see the inner working of granary thread. That really thought me allot.
     
  16. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    Well, I can't say that it cleared anything up, but you did encourage me to work through an example, and when I was done I decided I wanted to flesh out that section a little bit further.

    But that's as deep as I intend to go there - the bibliography exists for a reason.
     
  17. Stargate

    Stargate Space Time Keeper

    Joined:
    Feb 17, 2005
    Messages:
    103
    Location:
    Multiverse
    Remember each unit need upkeep cost and further more the whip city need to have food tiles to grow back which leave commerce tiles aside are heavy impact on economy. Except you need the units for war and take enemy city gold :)
     
  18. Martinus

    Martinus Emperor

    Joined:
    Aug 19, 2001
    Messages:
    1,845
    Gender:
    Male
    Location:
    Warsaw, Poland
    Thank you for the guide - it is extremely useful. :)

    I have one technical question about queues and using hammer overflow to finish several projects/buildings over in a short sequence - after playing with the building queues, it seems to me it is not possible to have multiple units of the same type on the same queue arranged in such a way as to have at least 1 hammer invested into each of them - is this correct? I.e. it means that if I want to whip several units and not lose any hammers due to the no-hammer-invested penalty, each must be of a different type - otherwise, if I say wanted to whip 2 Axemen, the game will simply always put the Axeman with hammers in it at the top of the queue, no matter if I try to add the second Axeman at the top or at the bottom of the queue.

    To give you an example of what I mean.

    If I put an Axeman in a building queue, wait a turn for hammers to invest, then switch to a Catapult, wait another turn and then whip 2 pop, Catapult will finish on the next turn and the Axeman on the turn after that or a bit later depending on the number of the hammers initially invested.

    Now, if I had the same Axeman and wanted to put another Axeman in the city queue, I couldn't make the city invest hammers into the new Axeman - it would still continue building the first one, right?
     
  19. VoiceOfUnreason

    VoiceOfUnreason Deity

    Joined:
    Dec 5, 2005
    Messages:
    3,663
    That's right. It has to do with the way the game is actually keeping track of hammers under the covers. The two axemen are actually sharing a single bucket of hammers, which you see as all of the hammers being applied to the first one. Nothing to be done about it.
     
  20. Martinus

    Martinus Emperor

    Joined:
    Aug 19, 2001
    Messages:
    1,845
    Gender:
    Male
    Location:
    Warsaw, Poland
    Thanks.

    I think the way it is now, the engine should be changed to simply remove the "no hammer invested" penalty - while this rule seems sensible in principle, as this thread demonstrates you can easily get around it, and the exceptions where you cannot do that appear arbitrary in the end.
     

Share This Page