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

C2C: Promotions

Discussion in 'Civ4 - Caveman 2 Cosmos' started by ls612, Apr 3, 2012.

  1. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,409
    Outcome types already have a text label each (e.g. in the case of Subdue Animal it is TXT_KEY_OUTCOME_SUBDUE) which you can get from the outcome info class (it is inherited from the info base class).

    The information which promotions add an extra chance to an outcome type is currently only in the outcome info class. If you want to know for a promotion, if it adds an extra chance to any outcome type, you have to loop through all outcome infos and check.
    What I mean with mirroring is adding a vector of OutcomeType to the promotion info and then after all XML is read loop once through all outcome infos, read the list of extra chance promotions in each and enter the outcome type into the new vector for those promotions. Now it is cheaper to query if a specific promotion increases the chance for any outcomes by checking that new vector in the promotion info.

    There are also some other information types that could use that kind of cheaper reverse lookup (at the cost of some memory).

    I agree, an AI weight should probably be added to the outcome info specifically for this extra chance evaluations for promotions (there is already code to evaluate specific outcome lists for outcome missions).
     
  2. Koshling

    Koshling Vorlon

    Joined:
    Apr 11, 2011
    Messages:
    9,254
    in general my advise would be not to bother with these (they amount to one off calculated caches) unless profiling indicates that were spending any significant amount of time in the otherwise-necessary looping. We know memory is precious, and all the reverse lookups take up more. Equally (providing the routines include the profile macro at the start, which they should if we are at all suspicious about their overall cost) we can tell with a high degree of confidence if they are actually having a significant performance impact. Hence the appropriate course of action is(usually) to err on the side of simplicity and/or economy of memory usage, profile periodically, and move to more complex or more memory intensive algorithms as necessary based on the outcome of the profiling.
     
  3. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    26,727
    Gender:
    Male
    Location:
    Las Vegas
    Then it shouldn't be too much to add a Promotion Text, a Unit Text, and a Unit Help text much the same way. I would think that TXT_KEY_OUTCOME_ wouldn't contain the correct wording for display in the help popups so we'd need the others to flesh it out properly.

    I see. Interesting to see Koshling's answer to that as well. I'm going to PROMISE I would not personally attempt such a maneuver without being guided by the hand on such a thing ;). (Even though it actually did make some sense to me in a theoretical fashion.)

    Note that although I suggest it, Outcome Missions are your affair and there's a lot there in the way its setup fundamentally that I don't really understand yet so I'm not touching anything about it myself... for now at least. I'm still a bit curious to understand some things about it actually but I'll ask when I'm ready to learn.
     
  4. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    26,727
    Gender:
    Male
    Location:
    Las Vegas
    Under THAT reasoning, I would be happy to see it set as a Melee unit then.


    Sorry for the double post but it WAS for a differing topic ;)
     
  5. Nimek

    Nimek Emperor

    Joined:
    Jul 7, 2010
    Messages:
    1,179
    Gender:
    Male
    +1 for Clockwork Golem as a melee unit

    If we will had a lot of other clockpunk units than you will can conider adding another unit category.
     
  6. Hydromancerx

    Hydromancerx C2C Modder

    Joined:
    Feb 27, 2008
    Messages:
    16,281
    Location:
    California, USA
    Also if one had a religion that gave promotions wouldn't you think that they just might creature the Golem to reflect the religion? Such as a Holy Golem with religious symbols or decorations on it. My vote is to make it a Melee unit again.
     
  7. MoogleEmpMog

    MoogleEmpMog Chieftain

    Joined:
    Nov 9, 2008
    Messages:
    94
    Considering that the term 'golem' comes from specifically Jewish mysticism and folklore, I should say so! ^_~

    Admittedly, this wouldn't apply if it was renamed automaton, as has been suggested in this thread. However, there's still no reason that a war automaton couldn't be anointed, festooned with prayer scrolls or otherwise blessed if that's the sort of society that built it.

    If there are balance issues with it, better to weaken it specifically than to weaken it by means of a unittype that might later be strengthened independently of the unit.
     
  8. AIAndy

    AIAndy Deity

    Joined:
    Jun 8, 2011
    Messages:
    3,409
    I would go the easy way and use the existing names of the outcome types and generate text like this:
    +35% chance of Subdue Animal

    I don't think a help text on the unit itself would help much. If you want to know your subdue chances, select the unit and then mouse over the target animal and you will see the specific chance for each outcome of the kill for the selected unit.
     
  9. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,069
    Location:
    America
    Done now on the SVN.
     
  10. Actuarian

    Actuarian Warlord

    Joined:
    Sep 15, 2010
    Messages:
    136
    My hunter just got attacked by a tiger that had the eligible for promotion glow (I won without taking any damage) - not sure what is up with that. (v25)
     
  11. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,391
    Gender:
    Male
    Location:
    Canberra, Australia
    I too have noticed that some wild animals and sea critters are getting the promotion glow. There should b promotions there for them to get, so why aren't they?
     
  12. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,069
    Location:
    America
    Will they glow if they have enough XP for a promotion, even if they have no promotions to get?
     
  13. Dancing Hoskuld

    Dancing Hoskuld Deity

    Joined:
    Jul 5, 2004
    Messages:
    23,391
    Gender:
    Male
    Location:
    Canberra, Australia
    To glow a unit needs both the XP and an available promotion. You can see that from healers who often have enough points for a promotion but have none available so don't glow as soon as a promotion that they can use becomes available they start to glow.
     
  14. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,523
    Gender:
    Male
    Location:
    MN
    Do you think i have enough "Promotions" for my Assassin :p:thumbsup: (Ah i just gained one more)
     
  15. Thunderbrd

    Thunderbrd C2C War Dog

    Joined:
    Jan 2, 2010
    Messages:
    26,727
    Gender:
    Male
    Location:
    Las Vegas
    Nice! All too soon you won't have quite that much of a spread showing but that's going to be impressive either way. What level is he at?
     
  16. LumenAngel

    LumenAngel King

    Joined:
    Apr 15, 2012
    Messages:
    668
    Location:
    Center of the World (France)
    Why anti-crime promotion are so hard to get now? :(
    having the III is nearly impossible : these units cant attack and are not often the best defense, so they never XP...
    We cant attach a noble to them to give them more XP...
     
  17. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,069
    Location:
    America
    You can either 1) put them in border cities that get attacked a lot to give them more XP or 2) build them in cities with lots of military buildings that give free XP.
     
  18. strategyonly

    strategyonly C2C Supreme Commander

    Joined:
    Mar 13, 2006
    Messages:
    20,523
    Gender:
    Male
    Location:
    MN
    Example pls:confused:
     
  19. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,069
    Location:
    America
    No, I'm just giving the ways for the unit to earn XP for more crime-fighting promotions.
     
  20. BlueGenie

    BlueGenie Emperor

    Joined:
    Apr 23, 2009
    Messages:
    1,563
    You can also have another unit on the same plot as a TW and attach a Noble/Warlord to that unit which will give half of the granted XP to the TW.

    Cheers
     

Share This Page