More Civilisations

How can you add CIV IV Trait compatibility to one of the MC civs that don't already have it? I tried to copy the method used in the Kilwa/Nubia support files (since they are compatible) and just fill it in with the bits of Gaul code, but that doesn't seem to do anything.

Would I have to rearrange the Gaul files to be in the same layout as the Kilwa/Nubia files? The Kilwa/Nubia files are in an "XML" folder and sorted into their own separate sub-folders (Buildings, Civilizations, Leaders, etc) but the Gaul files are all just put together in one "Core" folder.

I'm not very good with code or programming so trying to figure this out is pretty much just me taking shots in the dark. D:
 
How can you add CIV IV Trait compatibility to one of the MC civs that don't already have it? I tried to copy the method used in the Kilwa/Nubia support files (since they are compatible) and just fill it in with the bits of Gaul code, but that doesn't seem to do anything.

Would I have to rearrange the Gaul files to be in the same layout as the Kilwa/Nubia files? The Kilwa/Nubia files are in an "XML" folder and sorted into their own separate sub-folders (Buildings, Civilizations, Leaders, etc) but the Gaul files are all just put together in one "Core" folder.

I'm not very good with code or programming so trying to figure this out is pretty much just me taking shots in the dark. D:

Don't move files, whatever you do.

Just copy the code from the other mod, and if it doesn't work, use logging to work out the problem.
 
I did it! : D Thanks for the help. <3

ztKRPop.jpg
 
It's actually my icon for the Bundesrat from Events and Decisions, the mod in question just fitted it with US flags. :p

But judging from that Byzantium UA, I suspect the UB is from the CBP :P
 
Okay, we're approaching the final stages of Greece, I'm working on mod support now. At the moment, all of the civs just use Greece's standard political stuff and base Hellenic colonies for CiD, but if anyone had time to make them more unique and fitting (colony names etc) that'd be awesome. Also if anyone wanted to try and sort out splash screens for a Hellenic CulDiv group / Mediterranean if current splashes fit Hellenic better
 
How does Gandhi interact with CID? I noticed that his UA text used the CID UA, but will he also still have the Lua/changes from the India Split too? If so, you should probably make a reference to CID and update the Usersetting to disable his CID UA, in order to avoid inconsistencies.
 
The effects of both changes will stack.
EDIT: Well, no, JFD, they won't. Actually, JFD, the CID UA is technically new, whereas the MC UA is technically attached to the vanilla. So, you see, JFD, this means Ghandhi gets only the CID UA when CID is active. Understand, JFD?
EDIT: Look, JFD, that's just plain misleading. You were right the first time. Because MC - like most modders - hardcodes the Lua to check for the civilization and not the trait, the effect of both UAs will be active. One benefit to my switching to checking Trait over Civ as of late. Good work, JFD.
 
Is there a method for getting the leader's UA? Never come across that one before.

Thinking about it, I could use trait detection for Cyrus' SQL, and maybe reduce the number of AND statements he uses...
 
Using the CP, it's player:HasTrait(traitID).

Otherwise, it's a loopdeloop. I have a quick utilty function for this, which you may use:

Code:
function IsCPDLL()
	for _, mod in pairs(Modding.GetActivatedMods()) do
		if mod.ID == "d1b6328c-ff44-4b0d-aad7-c657f83610cd" then
			return true
		end
	end
	return false
end
local isCPDLL = IsCPDLL()

-- HasTrait
function HasTrait(player, traitID)
	if isCPDLL then 
		return player:HasTrait(traitID)
	else
		local leaderType = GameInfo.Leaders[player:GetLeaderType()].Type
		local traitType  = GameInfo.Traits[traitID].Type
		for row in GameInfo.Leader_Traits("LeaderType = '" .. leaderType .. "' AND TraitType = '" .. traitType .. "'") do
			return true
		end
	end
	return false
end

Invoke like so:
Code:
if HasTrait(player, GameInfoTypes["TRAIT_JFD_BURGUNDY"]) then
 
Nice - you should probably post that somewhere where it will get noticed, since it could help a lot of vanilla-editing mods.
 
The effects of both changes will stack.
EDIT: Well, no, JFD, they won't. Actually, JFD, the CID UA is technically new, whereas the MC UA is technically attached to the vanilla. So, you see, JFD, this means Ghandhi gets only the CID UA when CID is active. Understand, JFD?
EDIT: Look, JFD, that's just plain misleading. You were right the first time. Because MC - like most modders - hardcodes the Lua to check for the civilization and not the trait, the effect of both UAs will be active. One benefit to my switching to checking Trait over Civ as of late. Good work, JFD.

So.............if the CBP is active, which trait is in play? Is it just the CBP one or are they all in play?
 
That was about CID, but...

When CBP is active, the MC India AND the CBP India's effects will be active, unless the CBP loads AFTER MC India, in which case all effects are active except the Unhappiness from Population effect. I'm not sure whether MC has a reference to the CBP, so I don't know if the load order is guaranteed (to the best of the game's ability).

When CID is active, CBP's India will not take effect, with or without MC India.

So, CID + MC India + CBP India, only CID + MC India effects would be active.
MC India + CBP India, both effects active.
CID + MC India, both effects active.
CBP + CID, only CID effects active.

At least, that's in conventional theory.

*article 12 of the UDHR is right to privacy and article 17 of the ICCPR is the same right*
 
But what does ICESCR have to say on the matter?
 
Back
Top Bottom