Colonialist Legacies' Canadian Dominion for VP

So I don't know what kind of spooky mods you guys might have poopin' up the works, but the 4UC stuff is showing up just fine for me:
Spoiler :
upload_2018-12-2_21-2-53.png

As for the problem with the human player getting Canada's free tiles, even if they aren't playing Canada, it's pretty bizarre.

Can I get a second pair of eyeballs on this code? This looks pretty airtight to me, but it's still not working as intended. I loaded up a game as a different civ, then ran autoplay and gave Canada an internal trade route, and the first civ I loaded up as got all the free tiles.
Code:
function YorkFactoryExpress(iPlayer, iUnit, iX, iY)
    local pPlayer = Players[iPlayer]
    if pPlayer:GetCivilizationType() ~= iCanada then return end

    local pUnit = pPlayer:GetUnitByID(iUnit)
    if (pUnit == nil or pUnit:IsDelayedDeath()) then return end

    if pUnit:GetUnitType() == GameInfoTypes.UNIT_CARAVAN then
        local iRouteIndex = pUnit:GetTradeRouteIndex()
        if iRouteIndex == -1 then return end
              
        if (Game.GetTradeRoute(iRouteIndex).ToCivilizationType == iCanada) then

        local pPlot = pUnit:GetPlot()
            if pPlot:GetOwner() == -1 then
                local eYesWeCanada = Players[pUnit:GetOwner()]
                pPlot:SetOwner(eYesWeCanada, eYesWeCanada:GetCapitalCity():GetID(), 1, 1)
            end
        end
    end
end
That seems foolproof to me, I made a separate PlayerID check to make sure the owner of the Caravan is the one who gets the tiles, and it STILL gives the free tiles to whichever civ the human player is loaded as. I'm stumped.
 
So I don't know what kind of spooky mods you guys might have poopin' up the works, but the 4UC stuff is showing up just fine for me:

You misunderstood. In this screen I also see it fine, but try starting or loading a game with the version in the opening post. The two icons for HR/EF will be missing from the loading screen which is usually narrated for vanilla civs, which is the place where it says all about how Lester was the most bloodthirsty of all the Canadians and how he "literally saved the world". Civilopedia won't have the EF and neither will the right tech.

It might be even weirder and it could be a bug that doesn't appear on starting, but after loading a game with EF destroying itself. This bug appears in the gameplay. Strangely, Hockey is appearing to be all fine, but EF isn't. There's only Riflemen for Canada.

As to mods, I use current hotfixed version of VP, 4UC and promo icons. Nothing else.
 
I just played a test game and was able to build Expeditionary Force normally... I also built a hockey Rink (unlocked at Radio).

I wasn't able to replicate your bug, but this border problem persists, no matter what I try.
I also found out that the :c5influence:Influence on completion of the hockey rink doesn't actually work. I tested this with the CERN wonder as well, which is supposed to give +100:c5influence:, and it doesn't work there either. I posted a bug on the CBP Github.
 
Okay, now I only see 2 uniques (Courier + Hudson) even when checking the civs out, the other two don't appear even when starting the game. I might've been mistaken and Expeditionary/Hockey never appeared as icons, that is possible. Since some other guy seemingly had the same problem, maybe there's something wrong with the uploaded version? Can you reupload? I think half of the problem might lay in the fact the downloadable zip with the mod contains not the mod folder, but the insides of a folder I can't truly know the name of. I made my own folder because there is no other solution, named it (1) Canada and put the inside files there, but it might be case sensitive or require certain words/right combination, or something. I think a reupload of a zip containing the right folder (not purely the things it contains) would help.

Also to your playerid thing, I don't know coding but this is suspicious
local pPlayer = Players[iPlayer]
Does local mean played by the player? What does pPlayer and iPlayer mean? If one indicates being played by human, that might be it. I'm just shooting blindly trying to help, though.
 
No point in uploading a new version until I get the problem with the UA resolved. I will also be buffing the culture from colonial capitalism and the influence from the hockey rink (10 :c5influence: increased to 20)

So you want me to put a zip folder inside a zip folder? Just don’t use the Extract Here command and unzip normally
 
No point in uploading a new version until I get the problem with the UA resolved. I will also be buffing the culture from colonial capitalism and the influence from the hockey rink (10 :c5influence: increased to 20)

So you want me to put a zip folder inside a zip folder? Just don’t use the Extract Here command and unzip normally

AHH, the other unpack option lets it be unpacked, choose location and it makes the folder itself. I meant putting a regular folder inside zip, but didn't know it can make itself. Thanks, it all works now. Apparently having the wrong folder name made the mod go crazy.
 
All the 4UC stuff is in its own folder, so if you unpacked the zip folder and it split off all over your directory you might not have been able to find the Canada 4UC in your directory and put it back in.

btw, the pPlayer stuff is the problem, and yet it's not. That doesn't necessarily mean Human player, but the problem we have is that the tiles are being claimed by the wrong player.

Maybe I can get @adan_eslavo or @Infixo to take a look at this lua problem?
Code:
function YorkFactoryExpress(iPlayer, iUnit, iX, iY)
   local pPlayer = Players[iPlayer]
    if pPlayer:GetCivilizationType() ~= iCanada then return end

    local pUnit = pPlayer:GetUnitByID(iUnit)
    if (pUnit == nil or pUnit:IsDelayedDeath()) then return end

    if pUnit:GetUnitType() == GameInfoTypes.UNIT_CARAVAN then
        local iRouteIndex = pUnit:GetTradeRouteIndex()
        if iRouteIndex == -1 then return end
         
        if (Game.GetTradeRoute(iRouteIndex).ToCivilizationType == iCanada) then

        local pPlot = pUnit:GetPlot()
            if pPlot:GetOwner() == -1 then
                local eYesWeCanada = Players[pUnit:GetOwner()]
                pPlot:SetOwner(eYesWeCanada, eYesWeCanada:GetCapitalCity():GetID(), 1, 1)
            end
        end
    end
end
To recap, the code is supposed to give the player (Canada) ownership of unowned tiles that its internal land TRs pass over. The problem is that no matter what civ the human player is playing, Canada or not, the code gives the Human player the free tiles. So if the AI is playing Canada, their Trade Routes claim free tiles for the human player.

First, I'm going to try @Infixo's iPlayer/pPlayer recommendation. If that doesn't work I'll try @Gedemon's fix that he posted here... This community sure is helpful.

EDIT: update - @Infixo's change to playerID worked. Thanks Mr. Infixo!
 
Last edited:
Update going live:
  • Colonial capitalism increased back to 2:c5gold:2:c5culture: every turn
  • Unique ability works even if the AI is playing Canada
  • General impression I get is the 4UC components are too weak:
    • Increased Expeditionary Force's unique promotion to +35% on attack and vs fortified (up from 25% each)
    • Changed name of unique promotion to "Byng's Boys" (Stormtrooper was too German)
    • Removed Gold maintenance from Hockey Rink (actually a nerf/bug fix. Prevents Hockey Rink from being sold and re-built for instant boosts)
    • increased :c5influence: on construction to 20 (up from 10. 10 made 0 impact, it decayed faster than you could get a second Rink up.)
    • Increased :c5culture:/:c5gold: per citizen to 1:c5gold::c5culture::1:c5citizen: (up from 1:c5culture:/:c5gold::2:c5citizen:. Sweden's Skola is comparatively stronger, earlier, cheaper, and with :c5science:, a better yield than :c5gold:)
 
So far I feel like 2C per citadel/fort garrison is definitely not OP. I am currently equal with Denmark and Egypt in Culture, with Songhai being 1 policy ahead, and it's mid renaissance for all. I lead in Science as they all went wide and took Artistry excluding the only sane person, mr Harald who also took Fealty. Artistry does make sense for Egypt too though.

Is Hockey Rink meant not to have a Faith cost? I picked Faith of the Masses thinking it'd help me out later (and Defender of the Faith/Crusader Spirit were taken), but neither civilopedia nor tech tree show that it can be faithbought even though it did get the expected +2 Culture. Stadiums should be buyable with Faith, and so should an unique one. Perhaps also with a discount because the production cost is discounted to begin with.
 
Totally forgot about Faith of the Masses. I didn't think to integrate Hockey Rink with that. However, I think it's already good to go.

UnlockedByBelief is tied to the buildingClass, and since Hockey Rinks are BuildingClass=Stadium already, They should already have faith purchase and the +2 culture unlocked already without me doing anything.

EDIT: The hockey Rink does not have a Faith cost. That's the problem right there. I'll set it to 500 (100 cheaper than the base stadium) and release an update.
 
Last edited:
Hello, it's just a thought but would it be possible for the new city-states like St. John to have unique traits of their own in regards to Unique City States? This question could also apply to the other custom civs.
 
4UC for Canada stopped working, at least for me. I installed both the newest hotfix for this (hockey rink) and VP, and HR/EF no longer show up even after unpacking it correctly. I tried loading Canada first and then UC, and also the other way around with 4UC first, Canada later, but it does nothing. I even turned off VP promo icons mod but it also had no effect.
 
Hello, it's just a thought but would it be possible for the new city-states like St. John to have unique traits of their own in regards to Unique City States? This question could also apply to the other custom civs.
The switches to St. John's and Honiara are only name switches. I don't have any plans to make UCS compatibility. If someone else does then more power to them.

Part of that is that I would rather focus on completing more civs than making conditional changes to integrated mods that already work just fine. The other issue is that there is a delicate balance between all these different bonuses, and me adding balance changes to Enginseer's work would only serve to complicate what he and jarcast are trying to add.
4UC for Canada stopped working, at least for me. I installed both the newest hotfix for this (hockey rink) and VP, and HR/EF no longer show up even after unpacking it correctly. I tried loading Canada first and then UC, and also the other way around with 4UC first, Canada later, but it does nothing. I even turned off VP promo icons mod but it also had no effect.
This problem seems to be persistent with your downloads, but I am having no such trouble with my games. You need to set 4UC as a dependency; the UCs will not load up otherwise.

The other thing you could do is go into 4UCHockeyCEF.sql and replace this:
Code:
INSERT INTO Civilization_UnitClassOverrides
        (CivilizationType, UnitClassType, UnitType)
SELECT    'CIVILIZATION_COLONIALCANADA', 'UNITCLASS_GREAT_WAR_INFANTRY', 'UNIT_JFD_GE_EXPEDITIONARY'
WHERE EXISTS (SELECT * FROM Buildings WHERE Type = 'BUILDING_GERMANY_TEUTONIC_ORDER');

INSERT INTO Civilization_BuildingClassOverrides
        (CivilizationType, BuildingClassType, BuildingType)
SELECT    'CIVILIZATION_COLONIALCANADA', 'BUILDINGCLASS_STADIUM', 'BUILDING_CANADA_HOCKEY'
WHERE EXISTS (SELECT * FROM Buildings WHERE Type = 'BUILDING_GERMANY_TEUTONIC_ORDER');
with this
Code:
INSERT INTO Civilization_UnitClassOverrides
        (CivilizationType, UnitClassType, UnitType)
VALUES    ('CIVILIZATION_COLONIALCANADA', 'UNITCLASS_GREAT_WAR_INFANTRY', 'UNIT_JFD_GE_EXPEDITIONARY');

INSERT INTO Civilization_BuildingClassOverrides
        (CivilizationType, BuildingClassType, BuildingType)
VALUES    ('CIVILIZATION_COLONIALCANADA', 'BUILDINGCLASS_STADIUM', 'BUILDING_CANADA_HOCKEY');
 
Last edited:
The switches to St. John's and Honiara are only name switches. I don't have any plans to make UCS compatibility. If someone else does then more power to them.

Part of that is that I would rather focus on completing more civs than making conditional changes to integrated mods that already work just fine. The other issue is that there is a delicate balance between all these different bonuses, and me adding balance changes to Enginseer's work would only serve to complicate what he and jarcast are trying to add.

This problem seems to be persistent with your downloads, but I am having no such trouble with my games. You need to set 4UC as a dependency; the UCs will not load up otherwise.

The other thing you could do is go into 4UCHockeyCEF.sql and replace this:
Code:
INSERT INTO Civilization_UnitClassOverrides
        (CivilizationType, UnitClassType, UnitType)
SELECT    'CIVILIZATION_COLONIALCANADA', 'UNITCLASS_GREAT_WAR_INFANTRY', 'UNIT_JFD_GE_EXPEDITIONARY'
WHERE EXISTS (SELECT * FROM Buildings WHERE Type = 'BUILDING_GERMANY_TEUTONIC_ORDER');

INSERT INTO Civilization_BuildingClassOverrides
        (CivilizationType, BuildingClassType, BuildingType)
SELECT    'CIVILIZATION_COLONIALCANADA', 'BUILDINGCLASS_STADIUM', 'BUILDING_CANADA_HOCKEY'
WHERE EXISTS (SELECT * FROM Buildings WHERE Type = 'BUILDING_GERMANY_TEUTONIC_ORDER');
with this
Code:
INSERT INTO Civilization_UnitClassOverrides
        (CivilizationType, UnitClassType, UnitType)
VALUES    ('CIVILIZATION_COLONIALCANADA', 'UNITCLASS_GREAT_WAR_INFANTRY', 'UNIT_JFD_GE_EXPEDITIONARY');

INSERT INTO Civilization_BuildingClassOverrides
        (CivilizationType, BuildingClassType, BuildingType)
VALUES    ('CIVILIZATION_COLONIALCANADA', 'BUILDINGCLASS_STADIUM', 'BUILDING_CANADA_HOCKEY');

Thanks, that helped. I think the problem is Canada is loaded first, and because of that it cannot find a Teutonic Order because that is created afterwards, but this solves it.
 
Thanks, that helped. I think the problem is Canada is loaded first, and because of that it cannot find a Teutonic Order because that is created afterwards, but this solves it.
If it is loading first then it is because you monkeyed around with the modinfo file. :p
 
If it is loading first then it is because you monkeyed around with the modinfo file. :p

Nope I did not, the only files I mess with are coredefines and communityoptions in (2) cbp. It might just be the Civ 5 mod launcher inexplicably being weird.
 
TPangolin deserves the credit for civ5 Canada, not me.

Ugh... I’m not happy with what they came up with or civ 6 Canada. It’s not the worst thing, and it’s coherent for gameplay, but it’s chock full of memes rather than history. Oh well.
 
Ugh... I’m not happy with what they came up with or civ 6 Canada. It’s not the worst thing, and it’s coherent for gameplay, but it’s chock full of memes rather than history. Oh well.
You mean the devs gave a half assed effort? No way, I'm shocked...

In all honesty, I have no intention on playing civ 6 anytime soon. From what I've read it is still a mess. It's funny because I saw a very thorough comment asking why they didn't take a different approach with Canada, and the person went on to describe what they had in mind. It was very similar to what you've done here with Pearson. Without having played it, I think I can still confidently say that Civ V + VP and your Canada mod bring much more to the table.The work TPangolin, yourself, and others have put in definitely shows.

P.S. The new Macedonia/Greek split and Tlingit civs look sweet. I'm looking forward to trying them out
 
Do you plan to pack your civs into one big mod? Mod list expands very quickly... And it is easier to do one bigger download instead of downloading each civ separately. You could do some checks inside to enable/disable certain civs. I would suggest same for @hokath and @HungryForFood.
 
Top Bottom