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

Rule with Faith

Rule with Faith

  1. Odinius Arcainius

    Odinius Arcainius Chieftain

    Joined:
    Sep 23, 2018
    Messages:
    8
    Gender:
    Male
    I see your point and even seem to have found the file and section where the correct methods are listed:
    \...Civiliztion VI\DLC\Expansion1\UI\Additions\EraProgress.lua
    Code:
    function GetData()
        m_EraData.PlayerID = Game.GetLocalPlayer();
        m_EraData.CurrentEraName = currentEraDef.Name;
        m_EraData.CurrentEraScore = pGameEras:GetPlayerCurrentScore(m_EraData.PlayerID);
    
    Function where the score is refreshed at the start of the new era:
    Code:
        Controls.EraScoreValue:SetText(m_EraData.CurrentEraScore);
    
    Implementation:
    Code:
        Game.GetEras():GetPlayerCurrentScore(playerID)
    
    Attempting to reference these on the player panel failed so far which means I may be at the limits of what I am able to do without more indepth understanding of the tuner, yet it seems like I'm inadvertently making a mole hill out of what is likely a very simple solution.
     
    Last edited: Mar 1, 2019
  2. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,046
    All you need is
    Code:
    Game.GetEras():GetPlayerCurrentScore(playerID)
    
    or well for Tuner
    Code:
    Game.GetEras():GetPlayerCurrentScore(g_SelectedPlayer)
    
    or w/e. If you get nil value errors when attempting to index the functions then that would just imply that Tuner is limited to the Gameplay methods which can't be the case because the City panel can give Population info which I'm sure is limited to UI only. If it doesn't work though I guess you'll either have to scour Tuner panel examples to see if there's some way to associate a panel with both contexts or just sit back and enjoy the multithreaded processing that no-one is ever going to use because no-one's ever going to run a BR in this game.
     
    Odinius Arcainius likes this.
  3. Odinius Arcainius

    Odinius Arcainius Chieftain

    Joined:
    Sep 23, 2018
    Messages:
    8
    Gender:
    Male
    Forgive my ignorance of the basics here but the way the tuner populates its string controlls is using return functions like such:

    Game Score
    Code:
    function()
                    if Players == nil or g_TunerSelectedPlayer == nil or Players[g_TunerSelectedPlayer] == nil then return -1; end
                    return Players[g_TunerSelectedPlayer]:GetScore();
    end
    
    screenshot

    The Gold Balance string control is more complex (and so the era score might also need to be since they both call multiple getFunctions it seems: screenshot

    I still have been unable to use these examples to work with erascores. When I use:
    Code:
    return Players[g_TunerSelectedPlayer]:GetEras():GetPlayerCurrentScore();
    
    get this error:
    Runtime Error: [string "return function()..."]3:funtion expected instead of nilstack

    Interestingly tho, if I use only GetEras() like this:
    Code:
    return Players[g_TunerSelectedPlayer]:GetEras();
    
    I get this output with no error:
    Table: 00000001C8B406E0

    Im assuming erascores are in that table somewhere and the problem is in the syntax to retrieve the score itself. Again thanks for you replies and patience. At this point is has become somewhat of an obsession I suppose.

    EDIT: Should also mention there are builtin controls to modify erascore on this panel which is why it seems interesting they don't show the actual scores.

    Button +1 Era Score:
    Code:
    if (Game.ChangePlayerEraScore ~= nil) then
        Game.ChangePlayerEraScore(g_TunerSelectedPlayer, 1);
    end
    
     
    Last edited: Mar 5, 2019
  4. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,046
    Game.GetEras() ~= Players[g_TunerSelectedPlayer]:GetEras()

    They're two different sets of child methods. GetPlayerCurrentScore is a child method of the object GetEras which is a child of the global table Game. It isn't a child method of the object GetEras which is a child of the object Player. Since your example shows Game being valid in Tuner it should be as simple as
    Code:
    return Game.GetEras():GetPlayerCurrentScore(g_TunerSelectedPlayer)
    
    Functions and Methods are arranged in trees. To access the method (branch) GetGoldBalance of the object (trunk) Player you have to first go through the method (branch) GetTreasury; if the global table (trunk) Game happened to have a method (branch) GetTreasury this would have different methods (branches) defined within it to Player's GetTreasury.
     
    Odinius Arcainius likes this.
  5. Odinius Arcainius

    Odinius Arcainius Chieftain

    Joined:
    Sep 23, 2018
    Messages:
    8
    Gender:
    Male
    Using:
    Code:
    function()
                    if Players == nil or g_TunerSelectedPlayer == nil or Players[g_TunerSelectedPlayer] == nil then return -1; end
                    return Game.GetEras():GetPlayerCurrentScore(g_TunerSelectedPlayer);
    end
    
    returned same runtime error: [string "return function()..."]3:funtion expected instead of nilstack

    Edit: removing the if statement and using just the code you suggested returned the same error.
     
  6. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,046
    Well then my best guess is that the Tuner panel can only operate methods in the Gameplay context and so doesn't have access to the presumably UI-only GetPlayerCurrentScore. You can break the statement down further if you like to get a more precise report from the Lua error but I think that'll be what it'll tell you.
     
    Odinius Arcainius likes this.
  7. Deutsch

    Deutsch Chieftain

    Joined:
    Apr 19, 2017
    Messages:
    50
    Any updates on a GS patch? EDIT: SDK was updated today so I hope this awesome mod will be updated soon.
     
    Last edited: Apr 10, 2019
  8. Grathocke

    Grathocke Marquis

    Joined:
    Dec 19, 2009
    Messages:
    243
    Gender:
    Male
    Location:
    New Orleans, Louisiana, USA
    I, too, am waiting somewhat less than patiently :mischief: for the update. Even with all the mods that I use, it's rather mundane to play without Rule with Faith.
     
    cypherix93 and Deutsch like this.
  9. cypherix93

    cypherix93 Chieftain

    Joined:
    Nov 26, 2016
    Messages:
    5
    Gender:
    Male
    Basically the same reason. I've looked for other mods that add new governments, but there simply aren't any. Will wait for this to get updated before I start a serious game.
     
    Deutsch likes this.
  10. zon

    zon Chieftain

    Joined:
    Feb 6, 2010
    Messages:
    56
    Deutsch likes this.
  11. Deutsch

    Deutsch Chieftain

    Joined:
    Apr 19, 2017
    Messages:
    50
    Agreed. It will be worth the wait no doubt.
     
  12. Sumerian Bara Husband

    Sumerian Bara Husband Chieftain

    Joined:
    Jun 11, 2018
    Messages:
    15
    I'm especially excited to see how medieval governments change, since Imperial Monarchy is I think kind of worse than Merchant Republic now! Since Moksha's got an ability that is parallel to Reyna's district purchasing, I'd be interested to see if Imperial Monarchy gets changed to parallel Merch Repub.
     
  13. Civilowealth

    Civilowealth Chieftain

    Joined:
    Apr 5, 2019
    Messages:
    10
    It seems JFD has left Civ VI modding. I feel we should all have the expectation that this mod won't be updated, that way if JFD does ever decide to dabble with Civ VI again it will be a pleasent surprise.

    It is a shame, very talented person.
     
  14. Grathocke

    Grathocke Marquis

    Joined:
    Dec 19, 2009
    Messages:
    243
    Gender:
    Male
    Location:
    New Orleans, Louisiana, USA
    Where does your info come from? He stated before that he was waiting for the new modding tools, so it's my hope and expectation that an update is still coming.
     
  15. Civilowealth

    Civilowealth Chieftain

    Joined:
    Apr 5, 2019
    Messages:
    10
    I believe I saw it on his Discord a few days ago, lack of time overall to mod plus a loss of interest in Civilization VI, pretty much told people asking what his plans are to just assume he's stopped modding for Civilization VI. There's nothing saying something couldn't spark his interest again, but not to hold your breathe either.
     
  16. Chrisy15

    Chrisy15 Flower, Beautiful

    Joined:
    Jul 9, 2015
    Messages:
    2,046
    Jifford does what he wants to do. Idk who you are to know what he does and doesn't want to work on.
     
  17. Aussie_Lurker

    Aussie_Lurker Warlord

    Joined:
    Jul 21, 2003
    Messages:
    7,656
    Location:
    Adelaide, South Australia
    JFD made it abundantly clear that there would be no further updates until Firaxis releases the SDK for the game.
     
  18. Civilowealth

    Civilowealth Chieftain

    Joined:
    Apr 5, 2019
    Messages:
    10
    I really am sorry if I caused some offence? I just thought all of the people waiting might have wanted to know what the current state was when it came to Rule with Faith and Civilization VI. I only summerised what I saw him state, I'm sorry if I've done that badly.
     
  19. Grathocke

    Grathocke Marquis

    Joined:
    Dec 19, 2009
    Messages:
    243
    Gender:
    Male
    Location:
    New Orleans, Louisiana, USA
    Thanks for that update. Sad news as this mod had great features. In the meantime I use Quo's Spheres of Interest.
     
  20. zon

    zon Chieftain

    Joined:
    Feb 6, 2010
    Messages:
    56

Share This Page