MSMD: How to Create a Mod (video demo)

I'm not sure what text I'm missing. I made a separate "/Buildings" directory in my xml files to put the new building details. I'll admit, I'm not completely sure what I'm doing - I figured I'd be taking the next step by replicating texts from the original game directory. Must be doing something wrong.

And thanks for the welcome! I've been a long time lurker, and love this site!
 
So you say you have text for your own civ but not the others? When you were entering this text into the file, did you save it separately in its own folder? i.e. did you create a new pedia entries file and put it in the custom assets?
I think that would bypass the original file, so you won't see any of the in-game leaders' entries...
Not sure if or why the buildingsinfo would affect it, so I assume you may have done something similar to what I've described...

I had a go a while back at creating some leaders - from smash bros and mario :P good fun.
It's a bit trial and error if you're new to it, but when it works it usually makes perfect sense why :)
As I'm sure you're doing, don't replace the originals!
 
UPDATE: I should've done more tampering and testing with stuff before I asked. I feel guilty now:( The issue was in the new ArtDefines_Building xml... somehow I slipped up and only put the info for MY new building in there instead of adding the original text to it as well. duh. I think I may have been using information from a Modular civ...
So Civilopedia has been fixed.
Now I just have to figure out how my buildingclass is wrong (startup error).
 
I guess I should be asking what files I'd need in my building directory.
first error was

Tag: BUILDING_TOLTEC_TEMPLE in Info class was incorrect. Current XML file is xml\Civilizations/CIV4CivilizationInfos.xml

to me this means there's typo somewhere.... but I could've sworn I've gone through them a thousand times.
However I tried moving the buildingclassinfos file into this folder, and the error has since changed to

Failed Loading XML file xml\Buildings/CIV4BuildingInfos.xml

I've attached the BuildingInfos, CivilizationsInfos, and custom text files.
The civilization are the Toltecs (near the bottom of the CivInfos file) and the building is the Toltec Temple (near the top of the building file)
 

Attachments

Uh, hard nut. Took some time until i saw it.
Why did you change this:
PHP:
<Civ4BuildingInfos xmlns="x-schema:Great Temple_CIV4BuildingsSchema.xml">

?
You only have to change it for modular files (and then you have to copy the mentioned schema into the folder), and your buildings file isn't modular.
The game is searching for Great Temple_CIV4BuildingsSchema.xml, can't find it, and therefore can't load the XML, that's the reason.
 
Uh, hard nut. Took some time until i saw it.
Why did you change this:
PHP:
<Civ4BuildingInfos xmlns="x-schema:Great Temple_CIV4BuildingsSchema.xml">

?
You only have to change it for modular files (and then you have to copy the mentioned schema into the folder), and your buildings file isn't modular.
The game is searching for Great Temple_CIV4BuildingsSchema.xml, can't find it, and therefore can't load the XML, that's the reason.

Agh, you're my hero!
I must have followed an example of a modular file or something and accidentally copied it, because I have no memory of ever doing that. Fixed up a couple other typos, and the whole thing is ready to roll!
Thank you so much, I knew i could count on you guys!
 
The new civ I made didn't work properly. It appears on the right-hand list of Civilizations in the pedia, but the entry is blank. The button (and I can only assume the flag) showed up for the American Empire, instead.

Code:
			<Type>CIVILIZATION_NEW_CALIFORNIA_REPUBLIC</Type>
			<Description>TXT_KEY_CIV_NEW_CALIFORNIA_REPUBLIC_DESC</Description>
			<ShortDescription>TXT_KEY_CIV_NEW_CALIFORNIA_REPUBLIC_SHORT_DESC</ShortDescription>
			<Adjective>TXT_KEY_CIV_NEW_CALIFORNIA_REPUBLIC_ADJECTIVE</Adjective>
			<Civilopedia>TXT_KEY_CIV_NEW_CALIFORNIA_REPUBLIC_PEDIA</Civilopedia>
			<DefaultPlayerColor>PLAYERCOLOR_BLUE</DefaultPlayerColor>
			<ArtDefineTag>ART_DEF_CIVILIZATION_NEW_CALIFORNIA_REPUBLIC</ArtDefineTag>
			<ArtStyleType>ARTSTYLE_EUROPEAN</ArtStyleType>
			<UnitArtStyleType>UNIT_ARTSTYLE_EUROPEAN</UnitArtStyleType>

Did I do something wrong? I did all the various text strings for it too. Attached is what I've done so far.
 

Attachments

Take a sharp look at your files ;).

In CivilizationsInfos:
PHP:
ART_DEF_CIVILIZATION_NEW_CALIFORNIA_REPUBLIC

In ArtDefines_Civilizations:
PHP:
AART_DEF_CIVILIZATION_NEW_CALIFORNIA_REPUBLIC


Funny that it loads, normally such bugs directly crash the game.
 
Thanks much! Not only did I make that mistake, I accidentally switched the America and NCR CivArtInfos as well. Woops :mischief:
 
I follow these steps without beyond the sword and open it up, my new leader: Lord Vetinari, is not there, I may have got the sizes wrong but I don't think I did.
 
Here is the code (this is just the leader that I want to get right beforer continuing)
Code:
<Type>LEADER_LORD_VETINARI</Type>
      <Description>Lord Havelock Vetinari</Description>
      <Civilopedia>TXT_KEY_LEADER_CATHERINE_PEDIA</Civilopedia>
      <ArtDefineTag>ART_DEF_LEADER_LORD_VETINARI</ArtDefineTag>
      <iWonderConstructRand>30</iWonderConstructRand>
      <iBaseAttitude>1</iBaseAttitude>
      <iBasePeaceWeight>2</iBasePeaceWeight>
      <iPeaceWeightRand>3</iPeaceWeightRand>
      <iWarmongerRespect>2</iWarmongerRespect>
      <iRefuseToTalkWarThreshold>10</iRefuseToTalkWarThreshold>
      <iNoTechTradeThreshold>10</iNoTechTradeThreshold>
      <iTechTradeKnownPercent>20</iTechTradeKnownPercent>
      <iMaxGoldTradePercent>5</iMaxGoldTradePercent>
      <iMaxGoldPerTurnTradePercent>10</iMaxGoldPerTurnTradePercent>
      <iMaxWarRand>100</iMaxWarRand>
      <iMaxWarNearbyPowerRatio>90</iMaxWarNearbyPowerRatio>
      <iMaxWarDistantPowerRatio>40</iMaxWarDistantPowerRatio>
      <iMaxWarMinAdjacentLandPercent>1</iMaxWarMinAdjacentLandPercent>
      <iLimitedWarRand>80</iLimitedWarRand>
      <iLimitedWarPowerRatio>100</iLimitedWarPowerRatio>
      <iDogpileWarRand>25</iDogpileWarRand>
      <iMakePeaceRand>10</iMakePeaceRand>
      <iDeclareWarTradeRand>40</iDeclareWarTradeRand>
      <iDemandRebukedSneakProb>80</iDemandRebukedSneakProb>
      <iDemandRebukedWarProb>0</iDemandRebukedWarProb>
      <iRazeCityProb>0</iRazeCityProb>
      <iBuildUnitProb>25</iBuildUnitProb>
      <iBaseAttackOddsChange>2</iBaseAttackOddsChange>
      <iAttackOddsChangeRand>10</iAttackOddsChangeRand>
      <iWorseRankDifferenceAttitudeChange>-2</iWorseRankDifferenceAttitudeChange>
      <iBetterRankDifferenceAttitudeChange>0</iBetterRankDifferenceAttitudeChange>
      <iCloseBordersAttitudeChange>-4</iCloseBordersAttitudeChange>
      <iLostWarAttitudeChange>-1</iLostWarAttitudeChange>
      <iAtWarAttitudeDivisor>-5</iAtWarAttitudeDivisor>
      <iAtWarAttitudeChangeLimit>5</iAtWarAttitudeChangeLimit>
      <iAtPeaceAttitudeDivisor>60</iAtPeaceAttitudeDivisor>
      <iAtPeaceAttitudeChangeLimit>1</iAtPeaceAttitudeChangeLimit>
      <iSameReligionAttitudeChange>1</iSameReligionAttitudeChange>
      <iSameReligionAttitudeDivisor>10</iSameReligionAttitudeDivisor>
      <iSameReligionAttitudeChangeLimit>5</iSameReligionAttitudeChangeLimit>
      <iDifferentReligionAttitudeChange>-2</iDifferentReligionAttitudeChange>
      <iDifferentReligionAttitudeDivisor>-5</iDifferentReligionAttitudeDivisor>
      <iDifferentReligionAttitudeChangeLimit>-1</iDifferentReligionAttitudeChangeLimit>
      <iBonusTradeAttitudeDivisor>50</iBonusTradeAttitudeDivisor>
      <iBonusTradeAttitudeChangeLimit>2</iBonusTradeAttitudeChangeLimit>
      <iOpenBordersAttitudeDivisor>25</iOpenBordersAttitudeDivisor>
      <iOpenBordersAttitudeChangeLimit>2</iOpenBordersAttitudeChangeLimit>
      <iDefensivePactAttitudeDivisor>12</iDefensivePactAttitudeDivisor>
      <iDefensivePactAttitudeChangeLimit>2</iDefensivePactAttitudeChangeLimit>
      <iShareWarAttitudeChange>1</iShareWarAttitudeChange>
      <iShareWarAttitudeDivisor>8</iShareWarAttitudeDivisor>
      <iShareWarAttitudeChangeLimit>3</iShareWarAttitudeChangeLimit>
      <iFavoriteCivicAttitudeChange>1</iFavoriteCivicAttitudeChange>
      <iFavoriteCivicAttitudeDivisor>10</iFavoriteCivicAttitudeDivisor>
      <iFavoriteCivicAttitudeChangeLimit>3</iFavoriteCivicAttitudeChangeLimit>
      <DemandTributeAttitudeThreshold>ATTITUDE_CAUTIOUS</DemandTributeAttitudeThreshold>
      <NoGiveHelpAttitudeThreshold>ATTITUDE_CAUTIOUS</NoGiveHelpAttitudeThreshold>
      <TechRefuseAttitudeThreshold>NONE</TechRefuseAttitudeThreshold>
      <StrategicBonusRefuseAttitudeThreshold>ATTITUDE_CAUTIOUS</StrategicBonusRefuseAttitudeThreshold>
      <HappinessBonusRefuseAttitudeThreshold>ATTITUDE_CAUTIOUS</HappinessBonusRefuseAttitudeThreshold>
      <HealthBonusRefuseAttitudeThreshold>ATTITUDE_ANNOYED</HealthBonusRefuseAttitudeThreshold>
      <MapRefuseAttitudeThreshold>ATTITUDE_PLEASED</MapRefuseAttitudeThreshold>
      <DeclareWarRefuseAttitudeThreshold>ATTITUDE_ANNOYED</DeclareWarRefuseAttitudeThreshold>
      <DeclareWarThemRefuseAttitudeThreshold>ATTITUDE_FRIENDLY</DeclareWarThemRefuseAttitudeThreshold>
      <StopTradingRefuseAttitudeThreshold>ATTITUDE_ANNOYED</StopTradingRefuseAttitudeThreshold>
      <StopTradingThemRefuseAttitudeThreshold>ATTITUDE_ANNOYED</StopTradingThemRefuseAttitudeThreshold>
      <AdoptCivicRefuseAttitudeThreshold>ATTITUDE_CAUTIOUS</AdoptCivicRefuseAttitudeThreshold>
      <ConvertReligionRefuseAttitudeThreshold>ATTITUDE_CAUTIOUS</ConvertReligionRefuseAttitudeThreshold>
      <OpenBordersRefuseAttitudeThreshold>ATTITUDE_ANNOYED</OpenBordersRefuseAttitudeThreshold>
      <DefensivePactRefuseAttitudeThreshold>ATTITUDE_CAUTIOUS</DefensivePactRefuseAttitudeThreshold>
      <PermanentAllianceRefuseAttitudeThreshold>ATTITUDE_PLEASED</PermanentAllianceRefuseAttitudeThreshold>
      <FavoriteCivic>CIVIC_REPRESENTATION</FavoriteCivic>
      <Traits>
        <Trait>
          <TraitType>TRAIT_INDUSTRIOUS</TraitType>
          <bTrait>1</bTrait>
        </Trait>
        <Trait>
          <TraitType>TRAIT_FINANCIAL</TraitType>
          <bTrait>1</bTrait>
        </Trait>
      </Traits>
      <Flavors>
        <Flavor>
          <FlavorType>FLAVOR_SCIENCE</FlavorType>


Just the stuff I changed and the art bit:

Code:
<Type>ART_DEF_LEADER_LORD_VETINARI</Type>
      <Button>,Art/interface/LeaderHeads/Vetinari button.dds</Button>
      <NIF>art/LeaderHeads/Vetinari.dds</NIF>
      <KFM></KFM>
      <NoShaderNIF></NoShaderNIF>
      <BackgroundKFM></BackgroundKFM>
    </LeaderheadArtInfo>
Please help, I really want to start modding as i have created a discworld map and want to start a mod:(.
 
None yet as I am following the tutorials I am planning to make him part of a new civilization I'll make called the "Ankhian empire"
 
It still doesn't work
 
It's in Firaxis games\Civilization 4\Mods\Discworld\Assets\XML
for the code and in
Firaxis games\Civilization 4\Mods\Discworld\Assets\Art\Leaderheads
for the pictures of the leader.
 
Screenshot please ;).
I trust you about what you say, but no one can trust his/her eyes about tiny things like a missing "s" or so somewhere.

Additionally, i hope the leaderHeadInfos.xml was in the Civilizations subfolderin the XML folder, right?
 
Back
Top Bottom