Can any kind soul tell me what is wrong with my modinfo file?

Earende

Chieftain
Joined
Sep 25, 2010
Messages
19
Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<Mod id="655d2764-4b36-6e63-2778-68455e4d645c" version="1">
<Properties>
<Name>The Classical Era</Name>
<Stability>Beta</Stability>
<Description>Limits era advancement to the classical age.</Description>
<Authors>Earende</Authors>
<SpecialThanks>Civilization Fanatics</SpecialThanks>
<Homepage>http://forums.civfanatics.com</Homepage>
<AffectsSavedGames>0</AffectsSavedGames>
<SupportsSinglePlayer>1</SupportsSinglePlayer>
<SupportsMultiplayer>1</SupportsMultiplayer>
<SupportsMac>1</SupportsMac>
<ReloadLandmarkSystem>0</ReloadLandmarkSystem>
<ReloadUnitSystem>0</ReloadUnitSystem>
</Properties>
<Dependencies />
<References />
<Blocks />
<Files>
<File md5="53a40bfb200d73b578daca95ccc6c7fb">CIV5Technologies.xml</File>
</Files>
<Actions>
<OnModActivated>
<UpdateDatabase>CIV5Technologies.xml</UpdateDatabase>
</OnModActivated>
</Actions>
</Mod>
It installs properly but it still doesn't work upon entering a new game. :confused: Simply editing the original file is so much easier.
 

Attachments

  • The Classical Era (v 1).civ5mod
    6.7 KB · Views: 73
Maybe, I used IE8. On this line

<File md5="53a40bfb200d73b578daca95ccc6c7fb">CIV5Technol ogies.xml</File>

On my browser I see a space between the "l" and "o" in the technologies.xml. Probably just a viewing error on my end.
 
Yeah, that space only appeared here somehow, don't know why. There's no space in the file.
 
I've opened this on firefox, opera and IE, all of them show the space in the filename, it's probably the error.


edit: op beat me, forums are slow :(
 
There might be a structural error. I don't know if the game would have a problem with your modded XML file lying in the root folder of your mod as opposed to following the conventional structure. Instead of:

Civ5Technologies.xml

The file should be referred to as:

XML/Technologies/Civ5Technologies.xml
 
You need 1 for AffectsSaveGames and 0 for SupportsMac for a starter.

Also, within the technologies XML file do you redefine the entire tech? Or are you just using update to change the values you want?
 
I tried your suggestion, didn't work though. :crazyeye: Ah, I'm being driven insane.
You need 1 for AffectsSaveGames and 0 for SupportsMac for a starter.

Also, within the technologies XML file do you redefine the entire tech? Or are you just using update to change the values you want?
Eh, redfine the entire tree? :crazyeye:
 
I tried your suggestion, didn't work though. :crazyeye: Ah, I'm being driven insane.
Eh, redfine the entire tree? :crazyeye:

So you have the entire tech tree in the file and just make changes through it?

There is a MUCH easier way my friend. ;)

Sit and let me enlighten you. :D

Code:
<GameData>
	<Technologies>
		<Update>
			<Where Type="TECH_AGRICULTURE" />
			<Set Cost="100" />
		</Update>
	</Technologies>
</GameData>

Guess what that does. ;)
 
Interesting, didn't know that. But isn't it faster (well, not that much faster) to copy the whole thing and add the new lines instead of searching for all the names and paste them one by one?
 
If you copy-paste the entire file and just make changes, you're telling the sql database to add new rows. however, TECH_AGRICULTURE already exists so it doesn't implement it.

If you UPDATE stuff you have to use update like above.

It's an SQL database, think of modding xml data like you would changing rows and fields in an SQL database.
 
I see. So it's something like this...
Spoiler :
<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSPY v2004 rel. 2 U (http://www.xmlspy.com) by Jon Shafer (Firaxis Games) -->
<GameData>
<Technologies>
<Update>
<Where Type="TECH_CIVIL_SERVICE" />
<Set Disable="true" />
</Update>
</Technologies>
</GameData>

And... :sad: still not working. Such a complicated thing.
 
Here's an extract from a mod of mine I'm working on, where Update works:

modinfo
Code:
<?xml version="1.0" encoding="utf-8"?>
<Mod id="1450dc65-5d97-43ae-b724-335a0d41bca4" version="1">
  <Properties>
    <Name>Hardwood Resource</Name>
    <Stability>Alpha</Stability>
    <Description>The hardwood resource mod adds hardwood as a strategic resource.  This resouce is required for certain units including catapult and wooden ships.</Description>
    <Authors>Dale Kent</Authors>
    <SpecialThanks>Firaxis</SpecialThanks>
    <Homepage>http://www.weplayciv.com</Homepage>
    <AffectsSavedGames>1</AffectsSavedGames>
    <MinCompatibleSaveVersion>0</MinCompatibleSaveVersion>
    <SupportsSinglePlayer>1</SupportsSinglePlayer>
    <SupportsMultiplayer>1</SupportsMultiplayer>
    <SupportsMac>0</SupportsMac>
    <ReloadLandmarkSystem>0</ReloadLandmarkSystem>
    <ReloadUnitSystem>0</ReloadUnitSystem>
  </Properties>
  <Dependencies />
  <References />
  <Blocks />
  <Files>
    <File md5="1C14FDF42A3EAD8D36721C4118F4436A">AssignStartingPlots.lua</File>
    <File md5="7E05BDBE91DA5349D94F18EA67CD800E">hardwood.xml</File>
    <File md5="3CA9B3F17F73B013439129C5B7A9A059">WoodAtlas256.dds</File>
    <File md5="E3B160928EB0993CC52C9A7864007B43">WoodAtlas32.dds</File>
    <File md5="43A8CDEA04E507C1CA72F210149A5A60">WoodAtlas45.dds</File>
    <File md5="E46C871F3ACB73B4F351C7332773060B">WoodAtlas64.dds</File>
  </Files>
  <Actions>
    <OnModActivated>
      <UpdateDatabase>hardwood.xml</UpdateDatabase>
    </OnModActivated>
  </Actions>
</Mod>

xml
Code:
	<Unit_ResourceQuantityRequirements>
		<Row>
			<UnitType>UNIT_CANNON</UnitType>
			<ResourceType>RESOURCE_WOOD</ResourceType>
		</Row>
		<Row>
			<UnitType>UNIT_CARAVEL</UnitType>
			<ResourceType>RESOURCE_WOOD</ResourceType>
		</Row>
		<Update>
			<Where UnitType="UNIT_TREBUCHET" />
			<Set ResourceType="RESOURCE_WOOD" />
		</Update>
		<Update>
			<Where UnitType="UNIT_FRIGATE" />
			<Set ResourceType="RESOURCE_WOOD" />
		</Update>
		<Update>
			<Where UnitType="UNIT_ENGLISH_SHIPOFTHELINE" />
			<Set ResourceType="RESOURCE_WOOD" />
		</Update>
	</Unit_ResourceQuantityRequirements>
 
It finally worked! There are so many <Update></Update> that I pretty much messed up all of them! :mischief:
Thank you all for helping me! I did a record-breaking of messing up codes. :D
 
Why are the first two entries <row></row> and the last three are <update></update>. Aren't they all updates. What are the differences?
 
Why are the first two entries <row></row> and the last three are <update></update>. Aren't they all updates. What are the differences?

Cannon and caravel have no resource prerequisite, so it's new.
 
Top Bottom