Genghis.Khan
Person
CvAchievementUnlocker.cpp in CvGameCoreDLL_Expansion.dll
Line 95
I have no Experience in C++ or any other Programming Language other than Lua, XML, SQL or Visual Basic. Anyway, I assume, also based on the context, and the displayed conditions in Lines 67-93, this line is the one who executes the Action and Unlocks the Achievement.
Considering all the stated above, would the General Code to Unlock an Achievement be the following code:
If this Code Actually Works I Have the Following Questions:
Would I need a new .cpp file or I could just add lines in this file or any Random One?
Where can I see the Achievement IDs listed. Is there any reference or file that has the List?
Sorry for bothering
Line 95
Code:
[COLOR="SeaGreen"]//Yep[/COLOR]
gDLL->UnlockAchievement(ACHIEVEMENT_SPECIAL_CONQUEST_WORLD)
I have no Experience in C++ or any other Programming Language other than Lua, XML, SQL or Visual Basic. Anyway, I assume, also based on the context, and the displayed conditions in Lines 67-93, this line is the one who executes the Action and Unlocks the Achievement.
Spoiler :
Code:
void CvAchievementUnlocker::AlexanderConquest(PlayerTypes ePlayer)
{
//Test For Alexander Conquest
CvGame& kGame = GC.getGame();
if (ePlayer == kGame.getActivePlayer())
{
CvString szLeaderName = (CvString)GET_PLAYER(ePlayer).getLeaderTypeKey();
if(szLeaderName == "LEADER_ALEXANDER")
{
if(kGame.getGameTurnYear() <= 350)
{
for(int iPlayerLoop = 0; iPlayerLoop < MAX_PLAYERS; iPlayerLoop++)
{
CvPlayer* pPlayer = &GET_PLAYER((PlayerTypes) iPlayerLoop);
//All known players must be dead and killed by us
if(GET_TEAM(pPlayer->getTeam()).isHasMet(GET_PLAYER(kGame.getActivePlayer()).getTeam()))
{
if(!pPlayer->isBarbarian() && !pPlayer->isMinorCiv())
{
if(pPlayer->isAlive() && pPlayer->GetID() != GET_PLAYER(kGame.getActivePlayer()).GetID())
{
return; // Nope.
}
}
}
}
Code:
[COLOR="SeaGreen"]//Unlock Achievement Template[/COLOR]
gDLL->UnlockAchievement(ACHIEVEMENT_ID)
If this Code Actually Works I Have the Following Questions:
Would I need a new .cpp file or I could just add lines in this file or any Random One?
Where can I see the Achievement IDs listed. Is there any reference or file that has the List?
Sorry for bothering
