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

Soldiers rating in demographics

Discussion in 'Civ5 - Strategy & Tips' started by Nefliqus, Oct 7, 2011.

  1. Nefliqus

    Nefliqus Chieftain

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland
    Nice work vexing :)

    I'm sure that:
    n number is not connected with combat power but only with:
    -unit base power
    -unit promotions
    -civilization gold amount
    -unit HP

    and formula for n number is sth like that:
    =(( unitbasepower+x)^y) / z
    with gold const =0 and only for units without promotions like warrior, sword and long
    so we have
    unit/power/n level
    warrior/6/17
    sword/11/44
    long/16/75
    so
    17=((6+x)^y)/z
    44=((11+x)^y)/z
    75=((16+x)^y)/z

    :) and who will find x,y,z? i think that you can assume that y = 2 or 3 or 4

    NOVAL invert mirror map script
     
  2. vexing

    vexing knows

    Joined:
    Dec 24, 2010
    Messages:
    2,668
    it is base power only, regular promotions actually have no effect but level and base promotions do. that is if you give a unit free promotions using firetuner, its power doesn't change, but if you give it experience and grant it promotions that way, then the N increases.

    the base N for melee units i already gave... (1.15*base combat strength)^1.5

    based on your chart, one level seems to grant an additional 25% floored. i don't know the effect of gold, but i'd expect it's not a per unit thing and just is applied after everything else
     
  3. Nefliqus

    Nefliqus Chieftain

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland
    exactly

    You can add new panel to firetuner from this post
    http://www.flickr.com/photos/whoward69/5775260621/sizes/l/in/photostream/
    http://forums.2kgames.com/showthread.php?108142-MOD-Live-Tuner-Panels
    it is very useful for testing

    there are 3 variable regarding units positive modifiers:
    unit experience
    unit level
    unit promotions

    all can be modified separately
    pNewUnit:SetExperience(iExperience) -> experience
    pUnit:SetLevel(iLevel) -> level

    unit:SetHasPromotion(4, true); -->drill I
    unit:SetHasPromotion(1, true); -->shock I
    unit:SetHasPromotion(30, true); -->march
    unit:SetHasPromotion(31, true); -->bliz
    unit:SetHasPromotion(78, true); --> +1 move

    if you get promotion from experience you automatically change unit level

    so

    if we want to be accurate we should modified our list to:
    -unit base power
    -current unit level (from experience)
    -starting unit promotions (e.g warrior and jaguar both have 6 base power but different n number. I think that it is because additional promotion that jaguar has at start)
    -civilization gold amount
    -unit HP

    Maybe there is 4th variable that describe units but I dont know it.

    unfortunately it is per unit based and every n-level has different gold steps

    e.g if you have 10 gold:
    warrior score will not change because first gold step for 17 level (first warrior level) is 35 gold
    but sward score will by 1 levels up because sword (level 44) has 0, 6 ,21 gold steps

    see attached file for more data

    NOVAL invert mirror map script
     

    Attached Files:

  4. vexing

    vexing knows

    Joined:
    Dec 24, 2010
    Messages:
    2,668
    only innate promotions and level gained promotions have an impact.
    you can run a command like for x=1,100,1 do unit:SetHasPromotion(x, true) end; and the unit's N value does not change. however if you modify the unitFreePromotions table and give a warrior siege 1 or such, its power does increase.

    nope. it appears to be floor(n*(1+gold^.5/100))
    for a warrior at 35 gold this gives 17 * (1+35^.5/100) = 18.00573, while 34 gold gives 17.99, hence the first step point for a warrior is 35 gold

    thanks for the data, made figuring that part out easy.
     
  5. Nefliqus

    Nefliqus Chieftain

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland
    :) I love you :)
    How you did it?

    Initiate promotion is not a problem because it is constant so it is very easy to check initiate n for all units.

    Your gold formula it is what I needed, thank you.

    are you sure that this formula for meele unit is ok? e.g.
    scout base strength = 4
    (1.15*4)^1.5 = 9,86
    it should be 9 - OK

    warrior base strength = 6
    (1.15*6)^1.5 = 18,12
    it should be 17
    - Err

    sword base strength = 11
    (1.15*11)^1.5 =44,99
    it should be 44 - ok

    longsword base strength = 16
    (1.15*16)^1.5 =78,92
    it should be 78 - ok

    it works with:
    floor((1.15*strength)^1.5 -0,25)


    NOVAL invert mirror map script
     
  6. vexing

    vexing knows

    Joined:
    Dec 24, 2010
    Messages:
    2,668
    the formula is not exact, but it's a pretty close approximation. i'd guess there is more flooring that occurs somewhere that is the cause of the slightly off errors; i haven't been able to find the exact formula, though i'm not looking too hard.

    the strength : n values that need to fit are
    1 1
    10 38
    20 109
    25 153
    40 310
    50 434
    80 880
    100 1231
    200 3481
    201 3507
     
  7. Nefliqus

    Nefliqus Chieftain

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland
    I think that we dont need this strength formula.
    What I want to do is a list of initial n and 1 level n for all units.

    What a pity that lua command GetMilitaryMight() uses turn-1 data. I dont know how to refresh it or how to end turn by lua command. :(

    NOVAL invert mirror map script
     
  8. Nefliqus

    Nefliqus Chieftain

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland
    Initial MilitaryMight level for all units
    gold =0, level = 0


    american_b17 401
    american_minuteman 78
    anti_aircraft_gun 432
    anti_tank_gun 277
    arabian_camelarcher 69
    archer 16
    artillery 164
    artist 0
    atomic_bomb 4000
    aztec_jaguar 21
    babylonian_bowman 24
    barbarian_archer 19
    barbarian_spearman 27
    barbarian_swordsman 44
    barbarian_warrior 17
    battleship 115
    bomber 357
    cannon 120
    caravel 13
    carrier 199
    catapult 39
    cavalry 173
    chariot_archer 24
    chinese_chukonu 39
    crossbowman 61
    danish_berserker 88
    danish_ski_infantry 217
    destroyer 103
    egyptian_warchariot 25
    engineer 0
    english_longbowman 61
    english_shipoftheline 48
    fighter 322
    french_foreignlegion 265
    french_musketeer 109
    frigate 40
    galley 2
    german_landsknecht 47
    german_panzer 794
    great_general 0
    greek_companioncavalry 66
    greek_hoplite 41
    guided_missile 232
    helicopter_gunship 755
    horseman 46
    incan_slinger 16
    indian_warelephant 27
    infantry 265
    ironclad 50
    iroquoian_mohawkwarrior 54
    japanese_samurai 78
    japanese_zero 342
    jet_fighter 581
    knight 105
    korean_hwacha 104
    korean_turtle_ship 27
    lancer 156
    longswordsman 78
    mech_robot 2554
    mechanized_infantry 490
    merchant 0
    missile_cruiser 95
    mobile_sam 743
    modern_armor 1158
    mongolian_keshik 66
    mongolian_khan 0
    musketman 78
    nuclear_missile 4000
    nuclear_submarine 454
    ottoman_janissary 87
    ottoman_sipahi 166
    paratrooper 387
    persian_immortal 33
    pikeman 47
    polynesian_maori_warrior 17
    rifleman 153
    rocket_artillery 392
    roman_ballista 55
    roman_legion 56
    russian_cossack 173
    scientist 0
    scout 9
    settler 0
    siamese_warelephant 141
    songhai_muslimcavalry 105
    spanish_conquistador 105
    spanish_tercio 116
    spearman 27
    ss_booster 0
    ss_cockpit 0
    ss_engine 0
    ss_stasis_chamber 0
    stealth_bomber 706
    submarine 306
    swordsman 44
    tank 572
    trebuchet 67
    trireme 4
    warrior 17
    workboat 0
    worker 0

    NOVAL invert mirror map script
     
  9. Nefliqus

    Nefliqus Chieftain

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland
    unfortunately level modifier is not a simple 25%

    unit / level 0 / level 1 / level 2
    MODERN_ARMOR 1158 1425 1610

    MONGOLIAN_KESHIK
    66 81 91


    HELICOPTER_GUNSHIP
    755 929 1049

    MECH_ROBOT
    2554 3144 3551


    level mod = first score * current level^0,3


    NOVAL invert mirror map script
     
  10. vexing

    vexing knows

    Joined:
    Dec 24, 2010
    Messages:
    2,668
    interesting that nukes and abombs have the same ranking.
    looks like abombs are the best deterrent available.
     
  11. Nefliqus

    Nefliqus Chieftain

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland

    Attached Files:

  12. avl8

    avl8 Chieftain

    Joined:
    Oct 4, 2010
    Messages:
    356
    Woot, sounds like another number crunching thread for me :)

    Does that formula actually mean

    "If you want to maximize your military rating in demographics, get a tech lead and spawn high tech units?"
     
  13. Nefliqus

    Nefliqus Chieftain

    Joined:
    Sep 16, 2010
    Messages:
    400
    Location:
    Poland
  14. vexing

    vexing knows

    Joined:
    Dec 24, 2010
    Messages:
    2,668
    here are units ordered by might / hammer cost - presumably the most effective things to build for the sole purpose of deterrent

    atomic_bomb 6.666666667
    mech_robot 6.009411765
    nuclear_missile 4
    modern_armor 2.724705882
    german_panzer 2.117333333
    helicopter_gunship 1.776470588
    mobile_sam 1.748235294
    stealth_bomber 1.661176471
    guided_missile 1.546666667
    tank 1.525333333
    jet_fighter 1.367058824
    mechanized_infantry 1.306666667
    siamese_warelephant 1.175
    anti_aircraft_gun 1.152
    american_b17 1.069333333
    nuclear_submarine 1.068235294
    german_landsknecht 1.044444444
    paratrooper 1.032
    anti_tank_gun 1.025925926
    bomber 0.952
    rocket_artillery 0.922352941
    japanese_zero 0.912
    ottoman_sipahi 0.897297297
    greek_companioncavalry 0.88
    knight 0.875
    songhai_muslimcavalry 0.875
    fighter 0.858666667
    barbarian_warrior 0.85
    lancer 0.843243243
    french_foreignlegion 0.828125
    infantry 0.828125
    submarine 0.816
    cavalry 0.768888889
    russian_cossack 0.768888889
    roman_legion 0.746666667
    roman_ballista 0.733333333
    greek_hoplite 0.732142857
    french_musketeer 0.726666667
    iroquoian_mohawkwarrior 0.72
    rifleman 0.68
    japanese_samurai 0.65
    longswordsman 0.65
    cannon 0.648648649
    horseman 0.613333333
    persian_immortal 0.589285714
    barbarian_swordsman 0.586666667
    swordsman 0.586666667
    ottoman_janissary 0.58
    arabian_camelarcher 0.575
    trebuchet 0.558333333
    mongolian_keshik 0.55
    carrier 0.530666667
    aztec_jaguar 0.525
    pikeman 0.522222222
    american_minuteman 0.52
    musketman 0.52
    catapult 0.52
    artillery 0.5125
    crossbowman 0.508333333
    english_longbowman 0.508333333
    barbarian_spearman 0.482142857
    spearman 0.482142857
    barbarian_archer 0.475
    egyptian_warchariot 0.446428571
    chariot_archer 0.428571429
    warrior 0.425
    archer 0.4
    indian_warelephant 0.385714286
    scout 0.36
    chinese_chukonu 0.325
    battleship 0.306666667
    english_shipoftheline 0.282352941
    destroyer 0.274666667
    missile_cruiser 0.223529412
    frigate 0.216216216
    ironclad 0.185185185
    caravel 0.108333333
    trireme 0.071428571



    and mostly similar, might/gold cost (standard speed)

    atomic_bomb 2.580645161
    mech_robot 2.146218487
    nuclear_missile 1.762114537
    modern_armor 0.973109244
    german_panzer 0.728440367
    helicopter_gunship 0.634453782
    mobile_sam 0.624369748
    stealth_bomber 0.593277311
    tank 0.524770642
    jet_fighter 0.488235294
    mechanized_infantry 0.449541284
    guided_missile 0.42962963
    anti_aircraft_gun 0.396330275
    nuclear_submarine 0.381512605
    american_b17 0.367889908
    paratrooper 0.355045872
    rocket_artillery 0.329411765
    bomber 0.327522936
    anti_tank_gun 0.325882353
    japanese_zero 0.313761468
    siamese_warelephant 0.306521739
    fighter 0.295412844
    submarine 0.280733945
    french_foreignlegion 0.276041667
    infantry 0.276041667
    ottoman_sipahi 0.259375
    lancer 0.24375
    cavalry 0.233783784
    russian_cossack 0.233783784
    knight 0.22826087
    songhai_muslimcavalry 0.22826087
    german_landsknecht 0.213636364
    rifleman 0.206756757
    french_musketeer 0.201851852
    cannon 0.1875
    carrier 0.182568807
    artillery 0.170833333
    japanese_samurai 0.169565217
    longswordsman 0.169565217
    greek_companioncavalry 0.169230769
    ottoman_janissary 0.161111111
    greek_hoplite 0.157692308
    arabian_camelarcher 0.15
    trebuchet 0.145652174
    american_minuteman 0.144444444
    musketman 0.144444444
    roman_legion 0.143589744
    mongolian_keshik 0.143478261
    barbarian_warrior 0.141666667
    roman_ballista 0.141025641
    iroquoian_mohawkwarrior 0.138461538
    barbarian_swordsman 0.1375
    crossbowman 0.132608696
    english_longbowman 0.132608696
    pikeman 0.127027027
    persian_immortal 0.126923077
    horseman 0.117948718
    swordsman 0.112820513
    battleship 0.105504587
    aztec_jaguar 0.105
    barbarian_spearman 0.103846154
    spearman 0.103846154
    catapult 0.1
    egyptian_warchariot 0.096153846
    barbarian_archer 0.095
    destroyer 0.094495413
    chariot_archer 0.092307692
    indian_warelephant 0.087096774
    warrior 0.085
    chinese_chukonu 0.084782609
    archer 0.08
    missile_cruiser 0.079831933
    english_shipoftheline 0.066666667
    scout 0.064285714
    ironclad 0.058823529
    frigate 0.051948052
    caravel 0.021666667
    trireme 0.015384615


    to summarize, for posturing ships are weak and mounted are strong, and abombs blow away the competition
     
  15. Aaginor

    Aaginor Chieftain

    Joined:
    Jun 7, 2009
    Messages:
    20
    Hi guys,

    the numbers of the base military might seem to have changed with G+K. (i.e. Warrior now 27 instead of 17) Any idea, how to find out the new values? Is there already a list of the new numbers somewhere?
     
  16. mintcandy

    mintcandy Chieftain

    Joined:
    Apr 10, 2012
    Messages:
    609
    I've got a simpler question than a reverse engineering of the formula for Soldier count in the Demographics menu.

    My question is: when are the Demographic values updated? At the beginning of my turn? At the end of my turn (aka when I've clicked on Next turn)? At some other time?

    I'm pretty certain that those values aren't always in sync with the present game state...
     
  17. Halcyan2

    Halcyan2 Chieftain

    Joined:
    May 12, 2012
    Messages:
    1,380
    I find it interesting that promotions and gold factor into the military score.

    In contrast, population and technology do *not* factor in (whereas they did in Civ IV).
     
  18. vexing

    vexing knows

    Joined:
    Dec 24, 2010
    Messages:
    2,668
    it's still the same formulas, the values changed because combat strength changed. unfortunately we never figured out a full formula, but you can approximate by (1.15*base combat strength)^1.5

    if you want to find out the values, i think nefliqus just used firetuner to pop the units and the GetMilitaryMight command listed in his post above.

    they're definitely not in sync mid turn, but i suspect they update between each players turn.
     
  19. Aaginor

    Aaginor Chieftain

    Joined:
    Jun 7, 2009
    Messages:
    20
    Ah, thanks a lot for the info, vexing! As I didn't played vanilla Civ5, I didn't realize, that the combat values changed. I think the approximation will already help a lot!

    @mintcandy: It is definitely somewhere before your turn starts, at least before the production has been calculated. I.e. when you produce your first scout you can see, that the soldier-value doesn't change, it changes in the next round. Also, when you stumble upon a ruin with weapons, the value doesn't change immediately.
    But if your opponents build units, you see it in the turn following theirs.
    I have not proven that guess yet, but from what I see in my small tests, it works like this.
     
  20. soprof

    soprof Chieftain

    Joined:
    Feb 20, 2013
    Messages:
    101
    Location:
    Sydney, Australia
    This is still best info on the topic.

    Anyone has the list of units for BNW?
     

Share This Page