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

Mountain crossing

Discussion in 'Civ5 - Creation & Customization' started by Thalassicus, Feb 23, 2013.

  1. Thalassicus

    Thalassicus Bytes and Nibblers

    Joined:
    Nov 9, 2005
    Messages:
    11,057
    Location:
    Texas
    What variable controls the damage received from ending a turn on a mountain?
     
  2. whoward69

    whoward69 DLL Minion

    Joined:
    May 30, 2011
    Messages:
    8,367
    Location:
    Near Portsmouth, UK
    Hard coded in CvUnit.cpp

    Code:
    // slewis - helicopters take attrition when ending their turn over mountains.
    if (getDomainType() == DOMAIN_LAND && pPlot->isMountain() && !canMoveAllTerrain()) {
      strAppendText =  GetLocalizedText("TXT_KEY_MISC_YOU_UNIT_WAS_DAMAGED_ATTRITION");
      changeDamage([B][COLOR="Red"]50[/COLOR][/B], NO_PLAYER, 0.0, &strAppendText);
    }
    
     
  3. PawelS

    PawelS Ancient Druid

    Joined:
    Dec 11, 2003
    Messages:
    2,803
    Location:
    Poland
    It seems to be hardcoded in the DLL (CvUnit.cpp):

    Code:
    	// slewis - helicopters take attrition when ending their turn over mountains.
    	if(getDomainType() == DOMAIN_LAND && pPlot->isMountain() && !canMoveAllTerrain())
    	{
    		strAppendText =  GetLocalizedText("TXT_KEY_MISC_YOU_UNIT_WAS_DAMAGED_ATTRITION");
    		changeDamage(50, NO_PLAYER, 0.0, &strAppendText);
    	}
    
    Edit: Ninja'd :)
     
  4. EndoConvert

    EndoConvert Warlord

    Joined:
    Dec 17, 2010
    Messages:
    297
    Forgive my ignorance, but where are you guys getting these C++ source files? Has the entire source code of Civ5 been publicly released?
     
  5. Drawmeus

    Drawmeus Emperor

    Joined:
    Jul 25, 2007
    Messages:
    1,213
    EndoConvert: It was released in October or November IIRC. You can find a thread about getting set up with it here: http://forums.civfanatics.com/showthread.php?t=479374

    p.s. why would they hardcode that? That's like bush league stuff, it doesn't even make sense as a time saver, because reading it from a global define takes what, 15 minutes including testing?
     
  6. EndoConvert

    EndoConvert Warlord

    Joined:
    Dec 17, 2010
    Messages:
    297
    So we can actually compile the entirety of Civ5, including the whole graphics engine?

    Or is the code only for a few selected DLLs?
     
  7. PawelS

    PawelS Ancient Druid

    Joined:
    Dec 11, 2003
    Messages:
    2,803
    Location:
    Poland
    It's one DLL, and it doesn't contain the graphics engine, only things directly related to the gameplay.
     

Share This Page