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

District_CitizenGreatPersonPoints bug?

Discussion in 'Mod Creation Help' started by redon, Jul 21, 2017.

  1. redon

    redon Chieftain

    Joined:
    Jul 21, 2017
    Messages:
    1
    Gender:
    Male
    Hello, noob modder here. I'm trying to make some balance modifications to my game, one of which is that great person points (GPP) should come from specialists rather than districts and buildings themselves.

    Removing GPP from districts/buildings was easy enough. To add GPP yields for specialists, I found that there is a table called District_CitizenGreatPersonPoints in Districts.xml, which seems to be empty/unused in the vanilla game. Using the following SQL query, I was able to add specialist GPP yields to the campus district:

    Code:
    INSERT INTO District_CitizenGreatPersonPoints (DistrictType, GreatPersonClassType, PointsPerTurn) VALUES ('DISTRICT_CAMPUS', 'GREAT_PERSON_CLASS_SCIENTIST', 1);
    This seems to work, or rather it almost does. Working the tiles does indeed yield GPP, but for some reason the yields are always twice what they should be. If PointsPerTurn is set to 1, then each specialist yields 2 GPP, so working the district with two citizens yields 4 GPP instead of 2. As a test, I tried setting PointsPerTurn to 3, after which each specialist provided 6 GPP. If PointsPerTurn is set to a value below 1 instead, then the specialists yield no GPP at all.

    It seems to me that at some point the game rounds the value of PointsPerTurn down to the nearest integer and then doubles it. I'm wondering why this would happen? FWIW, I've also added the change to the civilopedia using the code for district GPP, and there the yields are displayed correctly. Has anyone else run into this problem before? I couldn't find anything online. Is this a most likely a bug, or is there something else influencing the yields that I'm missing?
     
    Last edited: Jul 21, 2017
  2. luei333

    luei333 Warlord

    Joined:
    May 25, 2014
    Messages:
    185
    It's very often the case that stuff that seems implemented in the base code, but unused by any part of the game, doesn't work as it should, if at all. It's very possible this was a thing that was developed in the game at some point, then later they changed the design and just never removed or updated the table. I'm kind of surprised it works in the first place. Hopefully that provides some solace, but I'm afraid I can't really help. Maybe just balance your designs around +2/4/6 GPP, that may be the only way to use the table for now.
     
  3. Atlas627

    Atlas627 Deity

    Joined:
    Aug 25, 2011
    Messages:
    2,789
    I have been toying with this as well. My theory is that the current implementation provides +1 GPP *per yield* the specialist provides. I think Harbor specialists produce 3 yields? I haven't gotten a chance to test my theory, but I'll post here when I confirm or debunk it.
     
  4. Atlas627

    Atlas627 Deity

    Joined:
    Aug 25, 2011
    Messages:
    2,789
    Ok, it is actually always +2 GPP, even though the Harbor produces 3 yields per citizen. I'll just balance around it, but its weird for sure!
     
  5. TC_

    TC_ Chieftain

    Joined:
    Jul 8, 2017
    Messages:
    77
    Gender:
    Male
    Post removed for incorrect info
     
    Last edited: Aug 10, 2017
  6. Atlas627

    Atlas627 Deity

    Joined:
    Aug 25, 2011
    Messages:
    2,789
    My buildings all give +1, as they say on them. Sure you're not seeing a +2 that is actually from the District + the Building and attributing it all to the building?
     
  7. TC_

    TC_ Chieftain

    Joined:
    Jul 8, 2017
    Messages:
    77
    Gender:
    Male
    You're right Atlas, I'm not sure why I was seeing it that way. Post edited above.
     

Share This Page