1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

[SDK MOD] Great Person Thresholds Per City

Discussion in 'Civ4 - Mod Components' started by Shaded, Apr 22, 2006.

  1. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    Great Person Points Threshold Per City Mod v1.0
    By: Shaded (Serkan Koc)
    Contact: s_koc@hotmail.com

    Patch Compatibility: v1.61
    MP Compatibility: Not Tested

    DESCRIPTION
    =-=-=-=-=-=-=


    This mod changes the great person point generation. In the original CIV IV, there is a single Great Person Points threshold per player. When this threshold is reached by any city, a great person borns and threshold is increased (doubled). This mod changes this behaviour so that each city has its own threshold. Birth of a great person in a city does not effect the thresholds of other cities. This way specialization of cities are much more meaningful and you can easily make one of your cities a Great Artist generating city, and one another a Great Prophet generating city without one of them overrunning the other. This mod eliminates the strategical need of putting all your wonders to a single city.

    (See the example below for more information.)

    INSTALLATION
    =-=-=-=-=-=-=

    Just copy the Assets/CvGameCoreDLL.dll to your custom assets folder.
    Please be aware that your previous sdk mods will be overridden.
    To be able to use multiple sdk mods, you will have to wait someone to put those mods together in a mod pack.

    SOURCE
    =-=-=-=-=-=-=

    Changed source codes (from the 1.61 SDK baseline) are also included in this package for the convenience of mod pack producers.

    LICENSE
    =-=-=-=-=-=-=

    Please feel free to use this mod in your mods/mod packs as long as you mention the name of this mod and my name (as its written on the top of this readme) in your docs and credit screens.

    EXAMPLE
    =-=-=-=-=-=-=


    City 1 generates 10 Great Artist Points per turn.
    City 2 generates 3 Great Engineer Points per turn.

    Original CIV behaviour:

    Initial GP threshold is 100.
    -------------------------------------------------
    at turn 10: A Great Artist borns in City 1.
    Threshold increases to 200
    City 2 generated only 30 GP points.
    -------------------------------------------------
    at turn 30: A Great Artist borns in City 1.
    Threshold increases to 400
    City 2 generated only 90 GP points.
    -------------------------------------------------
    at turn 70: A Great Artist borns in City 1.
    Threshold increases to 800
    City 2 generated only 210 GP points.
    -------------------------------------------------
    at turn 999999: City 2 never gets a great engineer and the player suicides seeing his investment of great wonder didnt pay off :mad:


    Modded CIV behaviour:

    Initial GP threshold is 100.
    -------------------------------------------------
    at turn 10: A Great Artist borns in City 1.
    Threshold for City1 increases to 200
    City 2 generated only 30 GP points.
    Threshold for City2 remains at 100
    -------------------------------------------------
    at turn 30: A Great Artist borns in City 1.
    Threshold for City1 increases to 400
    City 2 generated only 60 GP points.
    Threshold for City2 remains at 100
    -------------------------------------------------
    at turn 34: :goodjob: A Great Engineer borns in City 2. :goodjob:
    Threshold for City2 increases to 200
    Threshold for City1 remains at 400
    -------------------------------------------------
    at turn 999999: Player smiles with enjoyment...


    DISCLAIMER
    =-=-=-=-=-=-=

    This product is provided "as is", "free of charge" and "without guarantees". Usage of this mod should be considered completely "use at your own risk" type.I can not be held responsible for damages to your software or hardware and any loss of information.

    DOWNLOAD LINK
    =-=-=-=-=-=-=

    http://www.civfanatics.net/uploads11/GPThresholdPerCityMod.zip
     
  2. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    reserved for future posts...
     
  3. Olleus

    Olleus Warlord

    Joined:
    Oct 30, 2005
    Messages:
    6,134
    Location:
    England
    hmm.
    Specialists are probably overpowered now. I recomend that you massively tone down representation and caste system. Also, doesn't this kill the need for a GP farm?

    On another note, where did you find the great people code? I would like to do a similar mod where their is one GP counter for the entire civ, instead of per city.
     
  4. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    Powering down the specialists are easy by just dropping down the gp generation rate by xml files. That way we can still have city specialization and fairly balanced specialists. I will try to do add this to next version of this mod if people agree with that too.

    And for GP farm, yes you are right! it kills it and that was my intention. A single city of GP was killing the whole concept of GP by forcing us to one "right" way.

    The great people code is scattered around CvCity and CvPlayer classes. Download the mod,it contains the changed source code.
     
  5. Tycoon101

    Tycoon101 Loves being STRONG

    Joined:
    Jan 22, 2005
    Messages:
    4,454
    Location:
    Fiftychat
    Thank you!
    I've had that exact same problem with great people, so now it's much better. I'll try it out and post my findings:goodjob:
     
  6. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    This definatly is an improvment over the default game, but what I think the best solution would have been to pool all the GPP from across the Empire so every city would contribute and nothing would ever be wasted. The GP would spawn in a city randomly but it would be weighted towards which city is producing the most points of that type so your wonder bearing cities will get them most of the time and far off little colonies almost never spawn them.
     
  7. Houman

    Houman TR Team Leader

    Joined:
    Jan 24, 2002
    Messages:
    1,083

    This would be actually the best solution and nothing is wasted. It is more realistic too, since it is an empire that becomes cultural and not only a single city.
     
  8. RogerBacon

    RogerBacon Chieftain

    Joined:
    Nov 16, 2003
    Messages:
    649
    Nice mod but I noticed something wrong with your premise. You say that in the original civ the GP counter doubles everytime a GP is born. It doesn't double. It increases by the amount of GP points that your most productive GP producing city produces, rounded up to the nearest 100. For example: you have 3 cities making 112, 45, and 2 GP points per turn. After a GP is born the threshold increases by 200 (112 rounded up to the nearest 100).

    Roger Bacon
     
  9. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    I thought about pooling all the GPP from across the Empire too, however this solution seems like killing the city specialization. If i pool all GPP than you may very well randomly distrubite wonders and specalists all over the empire and get the same effects. There should be some incentive to specialize cities.
     
  10. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    Yes you are right. I noticed it after releasing the mod too, but since it does not matter for the sake of this mod i didnt correct it yet. I will correct the readme in the next version. Thank you for your feedback.
     
  11. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    I have an idea, to keep specialization alive and well wonders could give a % bonus to GPP creation much like the Parthanon but focused on only a particular type of GPP. So for example StoneHenge would give +50% Great Profit points rather then generate a measly 2. You would still need to alocate Priests and specialize the city for that purpose in order to get the benifits.
     
  12. Olleus

    Olleus Warlord

    Joined:
    Oct 30, 2005
    Messages:
    6,134
    Location:
    England
    Well no actualy. Remember 'Natioanal Epic'? It only doubles the GPP for one particular city, so you can still have a GPF. The difference is that it won't be quite as powerfull as before, it will be a bit like science and oxford university.
     
  13. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    Well who wants the GPF? I am trying to kill it :)
    The problem of anti-specialization of GPP pool is not the ability of having GPF. Problem is we cant differentiate different types of GP.

    To me city specialization should be like: (not a GPF, or randomly placed specialists/wonders all over the empire)

    1 city as Engineering Base : High production, produces Great Engineers
    1 city as Commercial Base : High commerce, produces Great Mercants
    1 city as Scientific Base : High science output, produces Great Scientists
    1 city as Religous Base : Triple holy city, produces Great Prophets
    etc..

    When we pool the GPP's, there will be no reason to specialize the cities like this. You may get the same effects by putting all of them to one city or distrubiting them all over your empire.
     
  14. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    :goodjob: Great Idea! :goodjob:
    This way we may still have GP pooling and city specialization. However the bonuses of wonders of the same type should be cumulative rather then additive so that people would want to put all same type projects and specialists to one city to get the cumulative bonus.

    I should mediate on this idea...We are getting to somewhere at last...:crazyeye:
     
  15. Impaler[WrG]

    Impaler[WrG] Civ4:Col UI programmer

    Joined:
    Dec 5, 2005
    Messages:
    1,750
    Location:
    Vallejo, California
    In addition some of the buildings could provide some productivity bonuses to specialists of a particular type, say for example Factory gives all Enginers +1 Hammer. Wonders might also have such bonuses for local or global specialists, the GPP bonus should be local only. Currently buildings are very limited in what kind of bonuses they can give to specialists and I belive their restricted to global bonuses only. Changing this would require some SDK work along with new Building Schemas.

    I think this would help make late game specialists more usefull as I often have realy productive terrain by that point and I dont find the measly 3 GPP and 3 hammers to be worth much when it takes 1200 to get my next GP and I have mines producing 5 hammers sitting idle.

    This could be a very nice improvment, I would like to help work on it.
     
  16. clinton

    clinton Chieftain

    Joined:
    Apr 24, 2004
    Messages:
    131
    This mod discourages city specialisation. Its better for all your cities to just have one specialist to ensure the greatest number of great people for the least great people points. Specialising a city under the mod just makes the great people come slower.
     
  17. RogerBacon

    RogerBacon Chieftain

    Joined:
    Nov 16, 2003
    Messages:
    649
    Could you post comments around where you made changes in the files? I only saw comments on one of the files.

    Roger Bacon
     
  18. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    Sounds good. Let me make a roadmap and we may work together. Also help from other guys are welcome too!

    Another idea in my mind is to relating the GP types directly to city base values like production/science/culture etc.
    The city producing the much hammers may have the highest probability to get the Great Engineer instead of some artifical GP point system. So if you used a city as a production base for years then a Great Engineer will born there. More realistic isnt it? What do you think about this idea?
     
  19. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    Yes you are right. You can exploit the mod easily. By the way this was just a concept trial mod to find the right way for GP's. I would greatly appreciate if you can contribute to the new version by providing your solutions too. Thank you for your feedback.
     
  20. Shaded

    Shaded Chieftain

    Joined:
    Apr 22, 2006
    Messages:
    48
    Sure!
    First of all, here is the fish :
    I moved
    changeGreatPeopleThresholdModifier
    incrementGreatPeopleCreated
    methods and their related attributes from CvPlayer to CvCity

    I copied and adapted the greatPeopleThreshold method in CvPlayer to CvCity
    I kept and rewrote the greatPeopleThreshold method in CvPlayer because it was DllExported and removing it could cause crashes on the other dlls.

    I changed createGreatPeople method in CvCity to reflect above changes

    Then i made the necessary changes to the callers of the moved methods by clearing the compile errors.

    Secondly, how to fish :)
    Download the winmerge from winmerge.sourceforge.net. You can compare the files and see the changes by this tool.

    I will be more then happy if you can contribute to this mod too. Software is a team work and we can produce a better product (Great Wonder :)) if we work together.
     

Share This Page