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

Loyalty++ 5.3.3

adds several changes to loyalty:

  1. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    172
    Gender:
    Male
    Location:
    France
    thanks, I set the loyalty to 5000 to decrease chance of revolt and give more time before revolt, so yes less max loyalty = more revolts. I think I already fixed freeze on AI turn may be not in the last version, I will upload next version when I have fixed the memory problem or just download last version I sent on this thread, it should be stable
     
    glider1 likes this.
  2. cuso210

    cuso210 Chieftain

    Joined:
    Apr 6, 2012
    Messages:
    55
    Oh, ok, I'll install it. I've just noticed another thing, I don't seem to have the notifications from the mod appear in my game. I usse Concise UI and it's addon to colorize notifications, do you think that may conflict with the mod?
     
  3. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    172
    Gender:
    Male
    Location:
    France
    Does it works if you deactivate consise UI? ( start a game a try reaching pop 2 it should notify you)
     
  4. cuso210

    cuso210 Chieftain

    Joined:
    Apr 6, 2012
    Messages:
    55
    Yes, it does. It was specifically the Notifications add on. I disabled only that and the notifications appeared.
    So just now half of my empire rebeled because y prolonged a war for a thousand years, it was great. I had a great time balancing my army between conquest and pacifying my empire.
    I have one more question: the rebels don't need to take the city for the siege to win, right? they just need to be alive till the time runs out. Am I understanding it correctly?
     
    glider1 likes this.
  5. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    172
    Gender:
    Male
    Location:
    France
    Yes, if the time runs out the siege win, I could try to make the barbarians attack the city but it wouldn't skip their turn so they could attack twice
     
  6. glider1

    glider1 Chieftain

    Joined:
    May 29, 2006
    Messages:
    2,779
    Location:
    Where animals hop not run
    Probably best not to do that because of the AI. Currently the AI doesn't do anything about sieges other than react to it at a city and encampment level automatically or with whatever defenses happen to be around. Adding even more pain would hurt the AI too much.
     
  7. glider1

    glider1 Chieftain

    Joined:
    May 29, 2006
    Messages:
    2,779
    Location:
    Where animals hop not run
    Gueux do you think that this SQL statement works for all loyalty type modifiers including Englands extra loyalty pressure from great works?
    Spoiler :

    Code:
    UPDATE ModifierArguments
    SET Value = Value*10
    WHERE name = 'Amount' and ModifierId IN (
        SELECT ModifierId
        FROM Modifiers
        WHERE ModifierType IN (
            SELECT ModifierType
            FROM DynamicModifiers
            WHERE EffectType = "EFFECT_ADJUST_CITY_IDENTITY_PER_TURN" or EffectType = "EFFECT_ADJUST_CITY_IDENTITY_PRESSURE"
            )
        );


    If not, which line in the SQL handles that?

    Thanks in advance
     
  8. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    172
    Gender:
    Male
    Location:
    France
    These lines should multiply by 10 every loyalty modifier, I can't verify every modifier but it should works for every modifier
     
    glider1 likes this.
  9. Bonci

    Bonci Chieftain

    Joined:
    Oct 22, 2005
    Messages:
    738
    Location:
    Tridentum - Italia
    Reporting back with my test with the last version I found on here!
    I changed my LoyalityMod.sql as glider1 suggested.
    I played about 200 turns on a standard map on normal speed and I didn't see any free cities or succesful revolts, there is definitely something wrong with the numbers.
    I saw a revolt but it was easily dispatched by the AI in a city without walls.

    Here are some screenshots:


    That's the AI city that I saw revolt one time. I kept a close look on it and it didn't revolt again.


    After 50 turns the AI still has the city and the loyality is still 1000, even tough it should be going down.


    Here look at the minimap. You can see Jabalpur is half a continent away from India and beyond me and Scotland. It never ever had a loyality problem.
    You can also see a scottish city under me (hungary) and that too is perfectly fine.

    Hope this helps :)
     
    Gueux likes this.
  10. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    172
    Gender:
    Male
    Location:
    France
    Hi thanks for reporting your game,

    the city can't revolt for 30 turn after a revolt so it's normal if the loyalty doesn't change during this time

    I may balance everything in the next update, should I add more separatism and/or colonial riot?
     
  11. glider1

    glider1 Chieftain

    Joined:
    May 29, 2006
    Messages:
    2,779
    Location:
    Where animals hop not run
    Bonci did you change all these lines for loyalty = 1000 (standard size game)
    update GlobalParameters set Value = "1000" where Name="LOYALTY_START";
    update GlobalParameters set Value = "1000" where Name="LOYALTY_MAXIMUM";

    then change
    update GlobalParameters set Value = "200" where Name="LOYALTY_AFTER_TRANSFERRED_BY_COMBAT";
    update GlobalParameters set Value = "300" where Name="LOYALTY_AFTER_TRANSFERRED_BY_COMBAT_ORIGINAL_OWNER";
    update GlobalParameters set Value = "200" where Name="LOYALTY_AFTER_TRANSFERRED_BY_COMBAT_OWNER_BEFORE_OCCUPATION";
    update GlobalParameters set Value = "300" where Name="LOYALTY_AFTER_TRANSFERRED_BY_CULTURAL_IDENTITY";

    also:
    UPDATE LoyaltyLevels SET LoyaltyMax = '250', LoyaltyMin = '0' WHERE LoyaltyLevelType = 'LOYALTY_LEVEL_0';
    UPDATE LoyaltyLevels SET LoyaltyMax = '500', LoyaltyMin = '251' WHERE LoyaltyLevelType = 'LOYALTY_LEVEL_1';
    UPDATE LoyaltyLevels SET LoyaltyMax = '750', LoyaltyMin = '501' WHERE LoyaltyLevelType = 'LOYALTY_LEVEL_2';
    UPDATE LoyaltyLevels SET LoyaltyMax = '1000', LoyaltyMin = '751' WHERE LoyaltyLevelType = 'LOYALTY_LEVEL_3';

    and also:
    update GlobalParameters set Value = "300" where Name="LOYALTY_AFTER_TRANSFERRED_BY_LIBERATION"; -- default 10
    update GlobalParameters set Value = "-150" where Name="ESPIONAGE_FOMENT_UNREST_BASE_LOYALTY_CHANGE"; -- default 15
    update GlobalParameters set Value = "-50" where Name="ESPIONAGE_FOMENT_UNREST_LEVEL_LOYALTY_CHANGE"; -- default 5

    Real pain I know. Mod is looking good though and does add interest even though some AI's struggle with it (others don't).
     
  12. glider1

    glider1 Chieftain

    Joined:
    May 29, 2006
    Messages:
    2,779
    Location:
    Where animals hop not run
    Thanks Gueux not sure about riot frequency. Maybe lua is the place to adjust the variable for map size?
     
  13. cuso210

    cuso210 Chieftain

    Joined:
    Apr 6, 2012
    Messages:
    55
    On my part, I'm playing a game with "historic speed" (marathon-like research times with standard production) and on that length the effects are noticiable. I've also played on a huge map, so there's more space for cities and early development. So at least for longer games, 5000 is ok (i'm seeing revolts in clasical age!)
     
  14. Bonci

    Bonci Chieftain

    Joined:
    Oct 22, 2005
    Messages:
    738
    Location:
    Tridentum - Italia
    Yes exactly those values.

    Maybe 30 turns is too much? At least I think loyality should change even in the "grace period" between revolts. If not, you'll have 30 turns+whatever number of turns it takes to get from max to 0 before another revolt. Also loyality shouldn't be reset to the max (not sure if it does right now, but it seems so).
    Or if revolts are kept "rare" maybe they should be far more strong?


    On a side note: do you guys know if there are any mods that allow you to have more players on the map? Playing on standard I would like to have more than 14 players so that I can remove more at the start and have more revolts :p
     
  15. cuso210

    cuso210 Chieftain

    Joined:
    Apr 6, 2012
    Messages:
    55
    I think Yet Not Another Map Pack lets you have up to 60 civs in a game, but I don't know if it's only for big maps or for standard as well.
     
  16. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    172
    Gender:
    Male
    Location:
    France
    I think i fixed the memory problem + added a mapsize multiplier for chance of revolt :
    MAPSIZE_DUEL : 6.28
    MAPSIZE_TINY : 5.84
    MAPSIZE_SMALL : 5.532
    MAPSIZE_STANDARD : 5.15
    MAPSIZE_LARGE : 4.75
    MAPSIZE_HUGE : 4.33

    calcul is (20 000 - mapPlotCount) /3000

    it's always less than reducing the loyalty to 1000 so may be add more

    I could change the "grace period" time but revolt siege will have less time to win cause if siege duration is longer than the "grace period" the siege automatically lose and the loyalty do not need to be 0 for revolt, I could make stronger revolt but the AI already barely handle it
     

    Attached Files:

    Last edited: May 29, 2019
    glider1 likes this.
  17. glider1

    glider1 Chieftain

    Joined:
    May 29, 2006
    Messages:
    2,779
    Location:
    Where animals hop not run
    I did one autoplay standard settings on the latest test build. The memory problem is still the same. Memory creeps up to 15GB private memory which causes crash turn 469. Reload a saved game seems to wipe garbage memory (which is ok because almost nobody plays in one session all 500 turns).

    Log of 469 turns autoplay standard continents:
    LoyaltyMod: Turn :194 LOC_CITY_NAME_ULM riot siege lost
    LoyaltyMod: Turn :226 LOC_CITY_NAME_AUGSBURG riot siege lost
    LoyaltyMod: Turn :234 LOC_CITY_NAME_NOBAMBA riot siege lost
    LoyaltyMod: Turn :263 LOC_CITY_NAME_RAVENNA riot siege lost
    LoyaltyMod: Turn :310 LOC_CITY_NAME_ANTIUM riot siege lost
    LoyaltyMod: Turn :319 LOC_CITY_NAME_RAVENNA riot siege won
    LoyaltyMod: Turn :323 LOC_CITY_NAME_AUGSBURG riot siege won
    LoyaltyMod: Turn :326 free city change owner at34.37
    LoyaltyMod: Turn :326 free city change owner at21.6
    LoyaltyMod: Turn :329 LOC_CITY_NAME_RAVENNA riot siege lost
    LoyaltyMod: Turn :337 LOC_CITY_NAME_ANTIUM riot siege lost
    LoyaltyMod: Turn :338 LOC_CITY_NAME_AUGSBURG riot siege won
    LoyaltyMod: Turn :347 LOC_CITY_NAME_NAPATA riot siege lost
    LoyaltyMod: Turn :348 LOC_CITY_NAME_MUNSTER riot siege lost
    LoyaltyMod: Turn :348 LOC_CITY_NAME_NOBAMBA riot siege lost
    LoyaltyMod: Turn :349 LOC_CITY_NAME_BULAWAYO riot siege lost
    LoyaltyMod: Turn :352 LOC_CITY_NAME_KWAHLOMENDLINI riot siege lost
    LoyaltyMod: Turn :354 LOC_CITY_NAME_ULM riot siege lost
    LoyaltyMod: Turn :355 LOC_CITY_NAME_BRUNDISIUM riot siege lost
    LoyaltyMod: Turn :361 LOC_CITY_NAME_REGENSBURG riot siege lost
    LoyaltyMod: Turn :362 LOC_CITY_NAME_KUMASI riot siege lost
    LoyaltyMod: Turn :363 LOC_CITY_NAME_QASR_IBRIM riot siege lost
    LoyaltyMod: Turn :363 LOC_CITY_NAME_NURI riot siege lost
    LoyaltyMod: Turn :376 LOC_CITY_NAME_MAINZ riot siege lost
    LoyaltyMod: Turn :379 LOC_CITY_NAME_MUNSTER riot siege lost
    LoyaltyMod: Turn :388 LOC_CITY_NAME_ULM riot siege lost
    LoyaltyMod: Turn :396 LOC_CITY_NAME_KWAHLOMENDLINI riot siege lost
    LoyaltyMod: Turn :398 LOC_CITY_NAME_NOBAMBA riot siege lost
    LoyaltyMod: Turn :404 LOC_CITY_NAME_REGENSBURG riot siege lost
    LoyaltyMod: Turn :428 LOC_CITY_NAME_MUNSTER riot siege lost
    LoyaltyMod: Turn :430 LOC_CITY_NAME_HAMBURG riot siege lost
    LoyaltyMod: Turn :433 LOC_CITY_NAME_REGENSBURG riot siege lost
    LoyaltyMod: Turn :462 LOC_CITY_NAME_MUNSTER riot siege lost
    LoyaltyMod: Turn :466 LOC_CITY_NAME_HAMBURG riot siege lost
    LoyaltyMod: Turn :467 LOC_CITY_NAME_REGENSBURG riot siege lost

    There were no other types of revolts logged so I think it needs adjusting.

    Errors:
    LoyaltyMod: Turn :326 free city change owner at34.37
    LoyaltyMod: Turn :326 free city change owner at21.6
    Runtime Error: C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Loyalty++Test\UI\CityBanners\LoyaltyMod.lua:2685: attempt to index a nil value
    stack traceback:
    C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Loyalty++Test\UI\CityBanners\LoyaltyMod.lua:2685: in function 'SetCityMigration'
    C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Loyalty++Test\UI\CityBanners\LoyaltyMod.lua:3011: in function 'SetMigrationPerTurn'

    LoyaltyMod: LOC_CITY_NAME_ISIPHEZI Loyalty per turn198pCityCulturalIdentity:GetLoyaltyPerTurn()141
    Runtime Error: C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Loyalty++Test\UI\CityBanners\LoyaltyMod.lua:2995: operator / is not supported for number / nil
    stack traceback:
    C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Loyalty++Test\UI\CityBanners\LoyaltyMod.lua:2995: in function 'SetMigrationPerTurn'
    Lua callstack:
    LoyaltyMod: Phase has Begun
     
    Gueux likes this.
  18. glider1

    glider1 Chieftain

    Joined:
    May 29, 2006
    Messages:
    2,779
    Location:
    Where animals hop not run
    Another autoplay run on standard map. Memory problem is sometimes back to 60GB private memory so there are still issues. Just reload to keep playing though.

    New error non-fatal:
    LoyaltyMod: LOC_CITY_NAME_HAMBURG Loyalty per turn160.40625pCityCulturalIdentity:GetLoyaltyPerTurn()165.40625
    Runtime Error: C:\Steam\steamapps\common\Sid Meier's Civilization VI\DLC\Expansion2\UI\Replacements\CitySupport.lua:496: attempt to index a nil value
    stack traceback:
    C:\Steam\steamapps\common\Sid Meier's Civilization VI\DLC\Expansion2\UI\Replacements\CitySupport.lua:496: in function 'GetCityData'
    C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Loyalty++Test\UI\CityBanners\LoyaltyMod.lua:2890: in function 'SetMigrationPerTurn'
    Lua callstack:
    LoyaltyMod: Phase has Begun

    autoplay log up to turn 416 where game runs out of memory:
    LoyaltyMod: Turn :137 LOC_CITY_NAME_TYRE riot siege lost
    LoyaltyMod: Turn :140 LOC_CITY_NAME_KTY riot siege lost
    LoyaltyMod: Turn :155 LOC_CITY_NAME_MBWILA riot siege won
    LoyaltyMod: Turn :155 free city change owner at22.38
    LoyaltyMod: Turn :159 LOC_CITY_NAME_MBWILA riot siege lost
    LoyaltyMod: Turn :160 LOC_CITY_NAME_MUSCAT riot siege lost
    LoyaltyMod: Turn :167 LOC_CITY_NAME_JIAODONG riot siege lost
    LoyaltyMod: Turn :169 LOC_CITY_NAME_CHENGDU riot siege lost
    LoyaltyMod: Turn :190 LOC_CITY_NAME_KTY riot siege lost
    LoyaltyMod: Turn :246 LOC_CITY_NAME_TRIER riot siege won
    LoyaltyMod: Turn :248 free city change owner at67.11
    LoyaltyMod: Turn :307 LOC_CITY_NAME_SIVAS riot siege lost
    LoyaltyMod: Turn :326 LOC_CITY_NAME_MAINZ riot siege won
    LoyaltyMod: Turn :333 free city change owner at64.12
    LoyaltyMod: Turn :335 LOC_CITY_NAME_AMASYA riot siege lost
    LoyaltyMod: Turn :337 LOC_CITY_NAME_HALEP riot siege lost
    LoyaltyMod: Turn :339 LOC_CITY_NAME_SIVAS riot siege lost
    LoyaltyMod: Turn :339 LOC_CITY_NAME_URFA riot siege lost
    LoyaltyMod: Turn :340 LOC_CITY_NAME_DIYARBEKIR riot siege lost
    LoyaltyMod: Turn :340 LOC_CITY_NAME_ERZURUM riot siege lost
    LoyaltyMod: Turn :340 LOC_CITY_NAME_ISKENDERUN riot siege lost
    LoyaltyMod: Turn :342 LOC_CITY_NAME_MAINZ riot siege lost
    LoyaltyMod: Turn :342 LOC_CITY_NAME_AMASYA riot siege lost
    LoyaltyMod: Turn :374 LOC_CITY_NAME_SIVAS riot siege lost
    LoyaltyMod: Turn :377 LOC_CITY_NAME_MUSCAT riot siege lost
    LoyaltyMod: Turn :380 LOC_CITY_NAME_AMASYA riot siege lost
    LoyaltyMod: Turn :400 LOC_CITY_NAME_HAMBURG riot siege won
    LoyaltyMod: Turn :403 LOC_CITY_NAME_MAGDEBURG riot siege won
    LoyaltyMod: Turn :411 LOC_CITY_NAME_FRANKFURT riot siege won
    LoyaltyMod: Turn :412 LOC_CITY_NAME_BREMEN riot siege won
    LoyaltyMod: Turn :413 LOC_CITY_NAME_BERLIN riot siege won
    LoyaltyMod: Turn :414 LOC_CITY_NAME_AACHEN riot siege won

    For some reason this line is never hit any more:
    print("Turn "..Game.GetCurrentGameTurn()..": "..cityKey.." "..CityName.." started a"..TypeOfRevoltName.." revolt")
     
    Last edited: May 30, 2019
    Gueux likes this.
  19. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    172
    Gender:
    Male
    Location:
    France
    Thanks for reporting,

    I have fixed errors (I think)
    mapsize multiplier is 1.5 higher new cacul is (20 000 - mapPlotCount) /2000,
    fixed Phoenician loyalty by removing their ability "Mediterranean Colonies"
    tried to fix memory problem
     

    Attached Files:

    glider1 likes this.
  20. glider1

    glider1 Chieftain

    Joined:
    May 29, 2006
    Messages:
    2,779
    Location:
    Where animals hop not run
    Did a run on latest build Gueux:
    memory after 430 turns:
    upload_2019-5-31_16-4-13.png

    Revolts:
    LoyaltyMod: Turn :179 LOC_CITY_NAME_MIAM riot siege lost
    LoyaltyMod: Turn :371 LOC_CITY_NAME_GOIANIA riot siege won
    LoyaltyMod: Turn :375 LOC_CITY_NAME_VITORIA riot siege lost
    LoyaltyMod: Turn :384 LOC_CITY_NAME_NATAL riot siege won
    LoyaltyMod: Turn :385 LOC_CITY_NAME_PARNAIBA riot siege won
    LoyaltyMod: Turn :387 free city change owner at13.11
    LoyaltyMod: Turn :388 LOC_CITY_NAME_MANAUS riot siege won
    LoyaltyMod: Turn :388 LOC_CITY_NAME_SAO_LUIS riot siege won
    LoyaltyMod: Turn :388 free city change owner at9.23
    LoyaltyMod: Turn :389 LOC_CITY_NAME_SAO_PAULO riot siege won
    LoyaltyMod: Turn :390 LOC_CITY_NAME_CURITIBA riot siege won
    LoyaltyMod: Turn :390 free city change owner at8.16
    LoyaltyMod: Turn :390 free city change owner at13.15
    LoyaltyMod: Turn :391 LOC_CITY_NAME_SALVADOR riot siege won
    LoyaltyMod: Turn :391 LOC_CITY_NAME_CAMPINAS riot siege won
    LoyaltyMod: Turn :391 LOC_CITY_NAME_FLORIANOPOLIS riot siege won
    LoyaltyMod: Turn :393 free city change owner at11.27
    LoyaltyMod: Turn :395 LOC_CITY_NAME_GUARULHOS riot siege won
    LoyaltyMod: Turn :396 free city change owner at12.19
    LoyaltyMod: Turn :397 LOC_CITY_NAME_FORTALEZA riot siege won
    LoyaltyMod: Turn :398 LOC_CITY_NAME_RIO_DE_JANEIRO riot siege won
    LoyaltyMod: Turn :399 LOC_CITY_NAME_PARNAIBA riot siege won
    LoyaltyMod: Turn :402 LOC_CITY_NAME_CURITIBA riot siege won
    LoyaltyMod: Turn :403 LOC_CITY_NAME_SAO_PAULO riot siege won
    LoyaltyMod: Turn :405 LOC_CITY_NAME_RECIFE riot siege won
    LoyaltyMod: Turn :406 LOC_CITY_NAME_BRASILIA riot siege won
    LoyaltyMod: Turn :406 LOC_CITY_NAME_PORTO_ALEGRE riot siege won
    LoyaltyMod: Turn :406 free city change owner at4.23
    LoyaltyMod: Turn :407 free city change owner at7.20
    LoyaltyMod: Turn :409 LOC_CITY_NAME_FLORIANOPOLIS riot siege won
    LoyaltyMod: Turn :412 LOC_CITY_NAME_CAMPINAS riot siege won
    LoyaltyMod: Turn :413 LOC_CITY_NAME_MUSAWWARAT_ES_SUFRA riot siege lost
    LoyaltyMod: Turn :416 LOC_CITY_NAME_RECIFE riot siege lost
    LoyaltyMod: Turn :423 LOC_CITY_NAME_SEDEINGA riot siege lost
    LoyaltyMod: Turn :427 LOC_CITY_NAME_BELEM riot siege won
    LoyaltyMod: Turn :427 free city change owner at3.19
    LoyaltyMod: Turn :429 LOC_CITY_NAME_MANAUS riot siege won

    One error:
    LoyaltyMod: Turn :407 free city change owner at7.20
    Runtime Error: C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Loyalty++Test\UI\CityBanners\LoyaltyMod.lua:2988: attempt to index a nil value
    stack traceback:
    C:\Users\Harry\Documents\My Games\Sid Meier's Civilization VI\Mods\Loyalty++Test\UI\CityBanners\LoyaltyMod.lua:2988: in function 'SetMigrationPerTurn'
    Lua callstack:
    LoyaltyMod: 4 table: 00000001A655CE80

    Still not executing this line:
    print("Turn "..Game.GetCurrentGameTurn()..": "..cityKey.." "..CityName.." started a"..TypeOfRevoltName.." revolt")
     
    Gueux likes this.

Share This Page