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

Super Workers Mod

Discussion in 'Civ4 - Mod Components' started by stolenrays, Mar 2, 2013.

  1. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
    Super Workers Mod v1.1


    This is a small modcomp that allows wokers to gain XP after building improvements. 3 New Promotions are now available to workers. I derived the code from FFH care of Xienwolf & Co.

    Worker promotions require a new unitclass (worker). Workers gain xp whenever they build any improvement. They could also get some xp from wonders and other buildings that give xp to 'all land units'. This encourages more protecting of your workers, as you are not just giving away a worker if it is taken, but a skilled one.

    ------Gameplay-----
    -Workers gain 1 XP after successfully building an improvement
    -3 New Promotions increase Work Rate by 10% (Skilled I, II, III).
    -Workers are their own UnitCombat Class

    ------Noes for Modders----
    -Commented as Super Workers Mod
    -Added <WorkRateModify> to the CIV4PromotionInfos.xml

    -----Version History-----
    Spoiler :
    ----Version 1.1----
    -Added Concept Text

    ----Version 1.0----
    -Standalone released for BTS 3.19
    -Workers gain 1 XP after successfully building an improvement
    -3 New Promotions increase Work Rate (Skilled I, II, III)


    -----Credits-----
    -FFH modders Xienwolf & BennThereDoneThat


    DOWNLOAD
     

    Attached Files:

  2. The_J

    The_J Say No 2 Net Validations Retired Moderator Supporter

    Joined:
    Oct 22, 2008
    Messages:
    31,144
    Location:
    Germany / Netherlands
    Nice, nice :).
     
  3. TheLadiesOgre

    TheLadiesOgre Aspiring Codesmith

    Joined:
    Jan 16, 2009
    Messages:
    505
    oooooh, me likey, ty sir
     
  4. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,676
    Location:
    UK
    I was just thinking about wanting something like this the other day :D

    Now of course the question is...do I really want to try and add this :D

    And the even more important question... Can stolenrays cope with all the stupid things I will do and all my cries for help if I try to add this!
     
  5. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  6. Cruel

    Cruel King

    Joined:
    Jun 22, 2005
    Messages:
    823
    Location:
    São Paulo, Brazil
    No, no... our mod actually misses more programmers...
     
  7. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,676
    Location:
    UK
    Rays, is there a way to make this nly work with a unique unit or leader trait?

    Basically, can this be a special ability for just certain civs?

    The thought I have at the minute would be to connect the promotions to particular units with a free promo that cannot otherwise be chosen... hmm yes this could be the way...

    (mumbles incoherently to himself)
     
  8. Jennvare

    Jennvare Prince

    Joined:
    Jan 10, 2010
    Messages:
    371
    I vaguely remember the FfH mod that had this feature. One of the reasons this was put in was because all tile improvements could be made without their pre-requisite techs like Replaceable parts to build lumbermills.

    However, as with the stated example, if you tried to build lumbermills without the prereq, they would take an exorbitant number of turns to complete. You could always add multiple workers, but the promotions would also help speed up the work. When you got the pre-req, it was along the line of Lumbermills build 50% faster or some such.

    I also dont think FfH had many civics that increased worker work rates, so the promotions made sense.

    For most mods, workers are probably the most abused unit in the game when you consider your empire completely depends on them. If the very first warrior you made in the game can survive to become a mech infantry 4000 years later, why can't a worker do the same?

    Just some food for thought! Good luck to those who use this.
     
  9. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
    If you want to modify the xml you can make this promotion available to other unitclasses in promotions.xml. It does have to possibility to make the promotion only available with a trait, but I haven't done that yet. A nice idea though.
     
  10. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  11. jojoweb

    jojoweb Chimpa-Z

    Joined:
    Jun 6, 2004
    Messages:
    492
    Location:
    Lyon, France
    Good idea ;) Does the AI use it ?
     
  12. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  13. ls612

    ls612 Deity Moderator

    Joined:
    Mar 10, 2008
    Messages:
    8,069
    Location:
    America
    @Stolenrays: Would you mind if I merged your code with my worker promotions code (from C2C, but it is easily spun off) to make a more complete worker XP and leveling modcomp?
     
  14. Lib.Spi't

    Lib.Spi't Overlord of the Wasteland

    Joined:
    Feb 12, 2009
    Messages:
    3,676
    Location:
    UK
  15. stolenrays

    stolenrays Deity

    Joined:
    Aug 2, 2009
    Messages:
    2,061
  16. Inyah

    Inyah Chieftain

    Joined:
    Jan 28, 2012
    Messages:
    45
    Hi Stolenray,

    I took on your idea and develloped it a little further: http://forums.civfanatics.com/showthread.php?t=545080
    :)

    Actually getting the AI to use these promotions is quite easy: putting this in AI_promotionValue() in CVUnitAI.cpp does the trick:

    Spoiler :


    if (GC.getPromotionInfo(ePromotion).getWorkRateModify())
    {
    iValue += 20;
    }



    Original:
    also if you dont mind: i feel like adding a few promotions to this, so if you are interested in making a 1.2. version at some time? (or has someone already done that somewhere and I didnt see it?)
     

Share This Page