[TUTORIAL] Modular XML Modding With C2C

On my desktop i have a folder called Municip Comp Project. It consists of 5 untouched xml documents and an art folder with a dds button in it. If I understand correctly you want me to move everything in my project folder over to a new folder called Steampunk in the Alt Timelines folder. Taking the MegaFauna folder for example would it be better to, after making a Steampunk folder, create a folder in that for the building I am creating?

You will want to have a "Steampunk" folder with you current steampunk era project in it. When testing that is the location you will want to put it in to test it out. Inside your Steampunk folder you will want o have the following files ...

- Steampunk_CIV4ArtDefines_Building.xml
- Steampunk_CIV4BuildingClassInfos.xml
- Steampunk_CIV4BuildingInfos.xml
- Steampunk_CIV4GameText.xml
- Steampunk_CIV4ArtDefinesSchema.xml
- Steampunk_CIV4BuildingsSchema.xml

And then another folder inside the Steampunk folder called "Art". In there you will stick the button/icon you just made.

And is it correct to assume the mod should be turned off by default until all of the xml is set up or it could cause bad things to happen if I tried to play C2C?

You will want it on so you can test it.

Then, in the ArtDefines_building xml, between the button tags I should write: Modules/Alt_Timelines/Steampunk/Municipal_Computer/Art/computing_engine_button.dds ?
(To keep with convention I should probably resave the button with caps at each word)

You don't need the Municipal_Computer stuff. You can have all your steampunk related era stuff in the same files. Note that "Steampunk" is the era and not your name. If this was Cyberpunk you would be doing that instead.
 
Does xml have any way to add text that isn't read by the program like how in java you can make comments by typing // for the program to ignore a line or /* and */ to open and close a block comment?

Edit: in art defines building if the building IS animated (mine is not, but for reference) What would you put in bAnimated. Also is it possible to add attachments to stuff you've already posted on this forum?
 
Does xml have any way to add text that isn't read by the program like how in java you can make comments by typing // for the program to ignore a line or /* and */ to open and close a block comment?

Edit: in art defines building if the building IS animated (mine is not, but for reference) What would you put in bAnimated

1) Comments in XML start with <!-- and end with -->. Note that there are some places in the Civ IV where commenting will make the parser ignore the rest of the XML in a list.

2)value 0 for not animated 1 for animated.
 
@steampunk1880

Your art define should look similar to this. Except with your own tag and the button address different.

Code:
		<BuildingArtInfo>
			<Type>ART_DEF_BUILDING_SILK_FARM</Type>
			<LSystem>LSYSTEM_1x1</LSystem>
			<bAnimated>0</bAnimated>
			<fScale>0</fScale>
			<fInterfaceScale>0</fInterfaceScale>
			<NIF>Art/empty.nif</NIF>
			<KFM/>
			<Button>Modules/Hydro/Crops/art/silkfarm.dds</Button>
		</BuildingArtInfo>
 
It's ok to add comments to the top right? I mean there's an empty one already there for you.
 
I made a cleaned with notes and a steampunk art defines building but I just realized they were saved as .txt files and... not .xml. I had been using notepad to edit the files and it doesn't give me the option to save as: type XML. What else do I need to save as type XML.
 
I made a cleaned with notes and a steampunk art defines building but I just realized they were saved as .txt files and... not .xml. I had been using notepad to edit the files and it doesn't give me the option to save as: type XML. What else do I need to save as type XML.

Just rename them to .xml instead of .txt
 
@Hoskuld. That worked.

A template to go in my tools folder, and one to go in the steampunk folder.

Responding to below: I'll make a note in my template to erase the notes in the working copy

Edit 10/31/11: Removed Attachments
 
They look good but I would not include your notes in the working copy. They just clutter up the file.

EDIT: spoke too soon. You will need to change this ...

Code:
<Civ4ArtDefines xmlns="x-schema:CIV4ArtDefinesSchema.xml">

to this ...

Code:
<Civ4ArtDefines xmlns="x-schema:Steampunk_CIV4ArtDefinesSchema.xml">

You will also need to change your schema to that name. Its important to make your schema name different from the core files so they do not conflict if they are different.
 
So in other words my CleanedWithNotes_Civ4ArtDefines_Building would need to have that changed to:

<Civ4ArtDefines xmlns="x-schema:CleanedWithNotes_CIV4ArtDefinesSchema.xml">

What needs to be done to the art defines schema?

<Schema xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes">

Above is unchanged first line after notes from copypasta CIV4ArtDefinesSchema.

Does something similar need to be done to any hypothetical Steampunk_CIV4GameText.xml ?

EDIT:
Oh I understand, just change the name of the ArtDefineSchema to what I put in the ArtDefines_building. Still, does nothing have to be done to the ArtDefinesSchmea beyond changing it's name before I can put it in the steampunk folder?
 
The schemas don't need changing at all except for their file name. Don't mes with anything inside of them.

Note that you will want to keep all your schemas the same name so for you we can just use Steampunk_CIV4ArtDefinesSchema.xml. Mine are Hydro_CIV4ArtDefinesSchema.xml.

Note its is just by chance you are working on a mod that has the same name as you.

EDIT: For example in the future you will have files like ...

- Cyberpunk_CIV4ArtDefines_Building.xml
- Cyberpunk_CIV4BuildingClassInfos.xml
- Cyberpunk_CIV4BuildingInfos.xml
- Cyberpunk_CIV4GameText.xml
- Steampunk_CIV4ArtDefinesSchema.xml
- Steampunk_CIV4BuildingsSchema.xml

Where the schema are the same.
 
Text file template goes in my tools folder, Finished text file goes in steampunk folder.

Renamed Buildings and ArtDefines schemata added to steampunk folder.

I guess the hard stuff starts tomorrow.

Edit 10/31/11: Removed attachments
 
Can someone better explain to me than the modiki what DefaultBuilding and VictoryThresholds in the Civ4BuildingClassInfos.xml does and what an active VictoryThresholds would look like?

I did read about DefaultBuilding in the Afforess/Hydro tutorial but I still don't understand how it works well enough to explain it succinctly in my notes.
 
Can someone better explain to me than the modiki what DefaultBuilding and VictoryThresholds in the Civ4BuildingClassInfos.xml does and what an active VictoryThresholds would look like?

I did read about DefaultBuilding in the Afforess/Hydro tutorial but I still don't understand how it works well enough to explain it succinctly in my notes.

I don't recall what DefaultBuilding does. All I know is when I make new buildings I write it like this <DefaultBuilding>BUILDING_CRAFT_HUT</DefaultBuilding>

The Wiki says ...

The default building used when there is no unique building replacing it

Not sure if that helps.

-----

And Victory Threshold triggers types of victories such as building the Accession gate enables Scientific Victory.

Code:
		<BuildingClassInfo>
			<Type>BUILDINGCLASS_ASCENSION_GATE</Type>
			<Description>TXT_KEY_BUILDING_ASCENSION_GATE</Description>
			<iMaxGlobalInstances>1</iMaxGlobalInstances>
			<iMaxTeamInstances>-1</iMaxTeamInstances>
			<iMaxPlayerInstances>-1</iMaxPlayerInstances>
			<iExtraPlayerInstances>0</iExtraPlayerInstances>
			<bNoLimit>0</bNoLimit>
			<bMonument>1</bMonument>
			<DefaultBuilding>BUILDING_ASCENSION_GATE</DefaultBuilding>
			<VictoryThresholds>
				<VictoryThreshold>
					<VictoryType>VICTORY_SCIENTIFIC</VictoryType>
					<iThreshold>1</iThreshold>
				</VictoryThreshold>
			</VictoryThresholds>
		</BuildingClassInfo>

I hope that helps.
 
Thanks Hydro.

BuildingClassInfo template and Building Class info done.

Edit 10/31/11: Removed attachments
 
Top Bottom