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. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    tried this too, same problem - I tried it w/out any mods...
    (other mods work fine)
     
  2. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
    Last edited: Nov 2, 2018
  3. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
  4. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    I get the error when I set up the game to start and then it does not even load in... I don't even get to first turn...

    EDIT: so the game does not go to first turn but instead I get the error message popping up with the 10digit number and that is it - I can click button to go to the mods menu or back to main menu.

    EDIT2: more precisely: I set up the game to start, then "Loading...", then for a short moment "Start game" and then the ERROR STARTING GAME message in the middle of the screen...
     
    Last edited: Nov 2, 2018
  5. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
  6. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    Can it be that I don't have all DLCs - and perhaps your mod wants them...?

    I am no modder, but for instance, I read here an example:
    "The Foreign Key it can't find is the DLC civs. Creator should have used WHERE EXISTS tags like they did for modded civs. I'll let them know of the issue and hope they can patch it quick."

    here is the log:

    [3577146.625] [Localization]: StartupErrorMessages.xml
    [3577146.625] [Localization]: Input XML does not contain database entry tags. GameData, GameInfo or Database
    [3577150.373] [Localization]: Validating Foreign Key Constraints...
    [3577150.375] [Localization]: Passed Validation.
    [3577150.395] [Configuration]: Validating Foreign Key Constraints...
    [3577150.395] [Configuration]: Passed Validation.
    [3577158.272] [FullTextSearch]: Initializing FullTextSearch
    [3577159.041] [Gameplay]: Validating Foreign Key Constraints...
    [3577159.061] [Gameplay]: Passed Validation.
    [3577161.203] [Configuration]: Validating Foreign Key Constraints...
    [3577161.203] [Configuration]: Passed Validation.
    [3577162.286] [FullTextSearch]: FTS - Creating Context
    [3577245.788] [FullTextSearch]: FTS - Creating Context
    [3577252.719] [Configuration]: Validating Foreign Key Constraints...
    [3577252.719] [Configuration]: Passed Validation.
    [3577258.805] [Configuration]: Validating Foreign Key Constraints...
    [3577258.806] [Configuration]: Passed Validation.
    [3577271.912] [Gameplay] ERROR: FOREIGN KEY constraint failed
    [3577271.912] [Gameplay] ERROR: FOREIGN KEY constraint failed
    [3577271.912] [Gameplay]: Validating Foreign Key Constraints...
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_TLACHTLI" does not exist in Buildings
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_PRASAT" does not exist in Buildings
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_BASILIKOI_PAIDES" does not exist in Buildings
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_SUKIENNICE" does not exist in Buildings
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_HUEY_TEOCALLI" does not exist in Buildings
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_ANGKOR_WAT" does not exist in Buildings
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_APADANA" does not exist in Buildings
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_HALICARNASSUS_MAUSOLEUM" does not exist in Buildings
    [3577271.917] [Gameplay] ERROR: Invalid Reference on BuildingModifiers.BuildingType - "BUILDING_JEBEL_BARKAL" does not exist in Buildings
    [3577271.944] [Gameplay]: Failed Validation.
    [3577274.816] [Configuration]: Validating Foreign Key Constraints...
    [3577274.816] [Configuration]: Passed Validation.
    [3577275.429] [FullTextSearch]: FTS - Creating Context
    [3577295.435] [FullTextSearch]: FullTextSearch - Shutting down
     
    Last edited: Nov 2, 2018
  7. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    I got it! :)

    Deleted all buildings I don't have DLC of in the LoyaltyMod.sql file... and NOW it works all fine! :)
    Time to play...
     
    Gueux likes this.
  8. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
    ok good, I didn't knew it would cause problem, I may erase it from the mod so
     
  9. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
    Gueux updated Loyalty++ with a new update entry:

    Colonial and better separatist riot

    Read the rest of this update entry...
     
  10. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    A question: are loyalty policies values adjusted for this mod? like +20 instead of +2 in case of Limitanei, etc...
     
  11. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
    Yes everything should be scaled x10, if you find something that is not tell me, I ll try to fix this
     
  12. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    OK, another thing: where do you set the separatist riot 30 tile distance?
    I would like to set it for less as I play on small map...

    or: can you scale it to map size?
    so 30 would be for standard, and less for smaller, more for biggger...
     
  13. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
    Go in LoyaltyMod.lua file at line 2228, change the "30" in whatever you like, I ll look for a map scale
     
    V. Soma likes this.
  14. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
    ok I made it :
    Code:
    local MinimumDistanceToColony = Map.GetPlotCount() / 230 > 10 and Map.GetPlotCount() / 230 or 10
    if DistancewithCapital >= MinimumDistanceToColony then  
    number of plots / 230

    MAPSIZE_HUGE = 31
    MAPSIZE_LARGE = 26
    MAPSIZE_STANDARD = 20
    MAPSIZE_SMALL = 15
    MAPSIZE_TINY = 10
    MAPSIZE_DUEL = 10
     
  15. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    Man, that's great, that you made it scaled, but... I think it shouldn't go that big a distance...

    Think of it: bigger map means more civs, so the size for one civ doesn't really go up...

    A "10" distance for normal civ means that it can have 2 cities on a "line" from the capital.
    That means, if we think in circle, that in an ideal case the civ can have even about a total of 20 (!) cities in 2 rings around the capital.
    OK, normally it will be less possible, but still, at least 10-15 cities, I would guess...
    So that is with "10", and allowing 2 rings of cities around the capital.

    I believe this could be for standard map and smaller, and maybe a 3rd ring for bigger maps,
    so my idea would be: 10, 10, 10, 15, 15, 15 for the map sizes... maybe 20 for huge...

    What do you think?

    EDIT:
    And what about continents?
    Perhaps there should be a hard minimum distance (say 10), but if city is on another continent, and above 10 in distance, then it should be too far, no matter what map size...
     
  16. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    Also, do we get some warning message about revolts, riots, separatism?
    Like, when I settle or capture a city that is "too far", it would be nice to get notification...
     
    Gueux likes this.
  17. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
    maybe number of plots / 350

    MAPSIZE_HUGE = 20
    MAPSIZE_LARGE = 17
    MAPSIZE_STANDARD = 13
    MAPSIZE_SMALL = 10
    MAPSIZE_TINY = 10
    MAPSIZE_DUEL = 10

    I can do the notif if you want
     
    V. Soma likes this.
  18. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    Notif would be great :)

    This scaling will be OK, I would say...

    Now I play with the 10 distance and it gives me thinking a lot about placing cities - I like this...
    (my capital is in a corner end of a long shaped continent, this is kind of the worst scenario.
    I can make 8 cities whitin "disatnce"...)
     
  19. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,801
    Gender:
    Male
    Location:
    Hungary
    Err, sorry, how about making it plots/470 (and round it)?
    So: 10, 10, 10, 10, 12, 15 (no more than 3 rings)
     
  20. Gueux

    Gueux Chieftain

    Joined:
    Mar 30, 2018
    Messages:
    154
    Gender:
    Male
    Location:
    France
    copy paste this at line 272 in LoyaltyMod.lua file, it's the notif, it has no icon for now, I don't know what icon to put (replace "MinimumDistanceToColony" by whatever you want):
    Code:
                local pPlayerCapital               = Players[owner]:GetCities():GetCapitalCity();
                if pPlayerCapital == nil and GameConfiguration.GetValue("CapitalCity"..owner) then
                    pPlayerCapital = GetCity(GameConfiguration.GetValue("CapitalCity"..owner));
                end
                local DistancewithCapital       = 0;
                if pPlayerCapital ~= nil then
                    DistancewithCapital         = Map.GetPlotDistance(cityX, cityY, pPlayerCapital:GetX(), pPlayerCapital:GetY());
                end
                if DistancewithCapital and DistancewithCapital >= MinimumDistanceToColony and owner == Game:GetLocalPlayer() and ReadyForPhase then
                    local CityName = Locale.Lookup(CityManager.GetCity(owner, cityID):GetName()) and Locale.Lookup(CityManager.GetCity(owner, cityID):GetName()) or "This city";
                    SetDefaultNotificationTable(notifid, Currentturn(), Game:GetLocalPlayer());
                    local NewColonialCity = {};
                    for k,func in pairs (DefaultNotification) do
                        NewColonialCity[k] = func;
                    end
                    NewColonialCity.GetTypeName         = function() return "NOTIFICATION_CUSTOM_New_Colonial_City"; end
                    NewColonialCity.GetIconName         = function() return "ICON_NOTIFICATION_GENERIC"; end
                    NewColonialCity.GetMessage          = function() return "ATTENTION"; end
                    NewColonialCity.GetSummary          = function() return CityName.." is too far from capital, this city could take independance in the futur"; end
                    NewColonialCity.IsTargetValid       = function() return true; end
                    NewColonialCity.GetTarget           = function() return owner, cityID, PlayerComponentTypes.CITY; end
                    LuaEvents.CustomNotification_OnDefaultAddNotification(NewColonialCity)
                end
     

Share This Page