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

XML Load Order

Discussion in 'Civ4 - Modding Tutorials & Reference' started by Gerikes, Jul 18, 2006.

  1. Gerikes

    Gerikes User of Run-on Sentences.

    Joined:
    Jul 26, 2005
    Messages:
    1,753
    Location:
    Massachusetts
    This is for people trying to use the SDK to add XML entries for their mod that require other XML files to be loaded first.

    For example, say you want to make it so terrain types can give bonuses to a city's ability to produce a certain type of specialist, and you wanted to make it able for users to change this value in XML. If you try making an entry in the Civ4Terrain.xml file that talks about Specialists and has an array in it's Civ4TerrainInfo class that is initialized to a length equal to the number of specialists, you'd get an error because the Specialists file hasn't been loaded yet (and thus GC.getNumSpecialistInfos() would return zero). What might be easier is adding to the Specialist info XML file a tag that gives bonuses for the different terrains, since when the Specialist info XML file is loaded you know that the TerrainInfos file has already been loaded as well.

    Also, you can see which XML files are loaded when you first start Civ4 versus those that are loaded when you start or load a game.

    Hopefully this is helpful for some people (it's probably tough to read, so you might want to use your "Search" function in your browser)

    #####################################################

    # During Civ4 Game Load (first part of "Loading" screen before reaching main menu)
    GameInfo/CIV4PlayerOptionInfos.xml
    GameInfo/CIV4GraphicOptionInfos.xml

    # During Civ4 Game Load (When "Loading" screen says "Init XML" before reaching Main Menu):
    GlobalDefines.xml
    GlobalDefinesAlt.xml
    Text/Civ4GameTextInfos.xml
    Text/Civ4GameText_civilopedia_concepts.xml
    Text/Civ4GameText_help.xml
    Text/Civ4DiplomacyText.xml
    Text/Civ4GameText_Civilopedia_buildingsprojects.xml
    Text/Civ4gametext_civilopedia_units.xml
    Text/Civ4gametext_civilopedia_bonuses.xml
    Text/Civ4gametextinfos_cities.xml
    Text/Civ4gametextinfos_objects.xml
    Text/Civ4gametext_strategy.xml
    Text/Civ4gametext_civilopedia_techs.xml
    Text/Civ4gametext_misc1.xml
    Text/Civ4gametextinfos_greatpeople.xml
    Text/Civ4gametext_civilopedia_CivicsReligion.xml
    Text/Civ4gametext_new.xml
    Text/Civ4gametext_civilopedia_civleaders.xml
    GlobalTypes.xml
    Art/Civ4ArtDefines_Interface.xml
    Art/Civ4ArtDefines_Movie.xml
    Art/Civ4ArtDefines_Misc.xml
    Art/Civ4ArtDefines_Unit.xml
    Art/Civ4ArtDefines_Building.xml
    Art/Civ4ArtDefines_Civilization.xml
    Art/Civ4ArtDefines_Leaderhead.xml
    Art/Civ4ArtDefines_Bonus.xml
    Art/Civ4ArtDefines_Improvement.xml
    Art/Civ4ArtDefines_Terrain.xml
    Art/Civ4ArtDefines_Feature.xml
    BasicInfos/Civ4BasicInfos.xml
    GameInfo/CIV4GameSpeedInfo.xml
    GameInfo/CIV4TurnTimerInfo.xml
    GameInfo/Civ4WorldInfo.xml
    GameInfo/Civ4ClimateInfo.xml
    GameInfo/Civ4SeaLevelInfo.xml
    Interface/Civ4AdvisorInfos.xml
    Terrain/Civ4TerrainInfos.xml
    GameInfo/Civ4EraInfos.xml
    Units/Civ4UnitClassInfos.xml
    GameInfo/Civ4SpecialistInfos.xml
    Technologies/Civ4TechInfos.xml
    Terrain/Civ4FeatureInfos.xml
    Units/Civ4PromotionInfos.xml
    Civilizations/Civ4TraitInfos.xml
    GameInfo/Civ4GoodyInfo.xml
    GameInfo/Civ4HandicapInfo.xml
    GameInfo/Civ4CursorInfo.xml
    GameInfo/Civ4CivicOptionInfos.xml
    GameInfo/Civ4UpkeepInfo.xml
    GameInfo/Civ4HurryInfo.xml
    Buildings/Civ4SpecialBuildingInfos.xml
    GameInfo/Civ4ReligionInfo.xml
    GameInfo/Civ4CultureLevelInfo.xml
    Terrain/Civ4BonusClassInfos.xml
    GameInfo/Civ4VictoryInfo.xml
    Terrain/Civ4BonusInfos.xml
    Buildings/Civ4BuildingClassInfos.xml
    Buildings/Civ4BuildingInfos.xml
    Units/Civ4SpecialUnitInfos.xml
    GameInfo/Civ4ProjectInfo.xml
    Misc/Civ4RouteInfos.xml
    Terrain/Civ4ImprovementInfos.xml
    GameInfo/Civ4CivicInfos.xml
    Civilizations/Civ4LeaderheadInfos.xml
    Interface/Civ4ColorVals.xml
    Interface/Civ4PlayerColorInfos.xml
    Misc/Civ4EffectInfos.xml
    Units/Civ4AnimationInfos.xml
    Units/Civ4BuildInfos.xml
    Units/Civ4UnitInfos.xml
    Civilizations/Civ4CivilizationInfos.xml
    Terrain/Civ4yieldInfos.xml
    GameInfo/Civ4CommerceInfo.xml
    GameInfo/Civ4Hints.xml
    GameInfo/Civ4GameOptionInfos.xml
    GameInfo/Civ4MPOptionInfos.xml
    GameInfo/Civ4ForceControlInfos.xml
    Interface/Civ4SlideShowInfos.xml
    Interface/Civ4WorldPickerInfos.xml

    # Loaded after starting a new game or loading a saved game. This only happens once. Exiting to the main menu then loading a game doesn't reload the files, you still must exit Civ4 and reload.

    Terrain/Civ4TerrainSettings.xml
    Art/Civ4RouteModelInfos.xml
    Misc/Civ4RiverInfos.xml
    Art/Civ4RiverModelInfos.xml
    Misc/Civ4WaterPlaneInfos.xml
    GameInfo/Civ4ProcessInfo.xml
    GameInfo/Civ4EmphasizeInfo.xml
    Units/Civ4MissionInfos.xml
    Units/Civ4ControlInfos.xml
    Units/Civ4CommandInfos.xml
    Units/Civ4AutomateInfos.xml
    GameInfo/Civ4VoteInfo.xml
    Interface/Civ4CameraInfos.xml
    Interface/Civ4InterfaceModeInfos.xml
    Units/Civ4FormationInfos.xml
    Misc/Civ4AttachableInfos.xml
    GameInfo/Civ4DiplomacyInfos.xml
    Misc/Civ4QuestInfos.xml
    Misc/Civ4TutorialInfos.xml
     
  2. zulu9812

    zulu9812 The Newbie Nightmare

    Joined:
    Jan 29, 2002
    Messages:
    6,389
    Location:
    Athens of the North

Share This Page