[TUTORIAL] Modular XML Modding With A New Dawn

Look back at your BuildingClassInfos. See if you can spot it. ;)
 
It is the default building. I don't have palace listed in mine. The one you are citing was just when we were cleaning up the files, not editing them. Look at post #4.
 
Yay it works! :D:D:D

Also in the cannery and artesian well it shows that it replaces the well! :D

In addition I updated the text file to have a more interesting description.

Yay!

Now I can start making buildings on my own! Woot! :goodjob:

Thanks for all the help Afforess! You rock! :king:
 

Attachments

  • Hydro_TownWell.rar
    26.4 KB · Views: 71
Thanks NBAfan. :D

I do however have a request for a future AND Tutorial, could you do a tutorial on how to make your own Civic like you did for the military civic or the ideology civic? I would really like to make a Garbage Civic, but I have no idea how to do that.

Adding a new civic column is easier than adding buildings, IMHO. Now that you've been impowered with the ability to understand XML files, I bet you could just copy my Ideology folder and figure it out..

However, I am open to giving any help I can. Just keep in mind writing this guide took like 4 hours, so I can't do it everyday. ;)
 
Ok I will take a crack at it after I am done with the water mod. However I am running into some problems ...

1. How to I put in a tech enabled feature such as "+1 Health with Sanitation tech"?

2. How to i put in requirements for other buildings. Such as building B requires building A to be built?

3. How do i enable bonuses for resources on a building?
 
The easiest way to find out is to look at how it's done for existing buildings, then copy that over to your file.
 
@Afforess

I would like to let you know of what I did do for the Water Pipes and Department of Water I created right on the first try. However there are a few stats I do not know how to add/enable. The stats I need help with are in red.

Water Pipes
Cost: 60
Unhealthy: +2

Requires: Canal System, Civil Service

Req Resources: Pottery OR Copper OR Lead OR Iron OR Aluminum OR Steel

Obsolete: -

Special Abilities

  • 15% Maintenance
  • +1 Health with Public Works.
  • Provides Fresh Water
  • Hamlet, Cottages, Villages, Towns +1 Gold
  • Given for FREE by "Department of Water"
  • +1 Production with Cement Resource
  • +1 Unhealthy with Lead Resource
  • +1 Unhealthy with Iron Resource
  • +1 Health with Chemicals
  • +1 Health with Plastics Tech
  • +1 Health with Nanotubes Resource

-------

Department of Water [National Project]
Cost: 600

Requires: Canal System, Civil Service

Obsolete: -

Special Abilities
  • 25% Maintenance
  • Gives FREE "Water Pipes" to every city.
  • +25% Production Speed with Public Works

In addition how to you add new stats to existing buildings in the game such as the aqueduct?
 

Attachments

  • dowater.jpg
    dowater.jpg
    209.1 KB · Views: 92
Some more questions that I can't seem to find examples for ...

- Pastures give +1 gold
- +1 Gold from Farms
- +1 Happiness from Civil Engineering (I can find health but not happiness)
- 5% boost to City Growth
- 5% boost to City Growth with Hills in the City Vicinity
- 5% boost to City Growth with Coast in the City Vicinity
 
At the moment, there is no way to make buildings give increased yield to different tiles.

For the production boost with public works, look at the civic files in the Better RoM folder, I use some of those modifiers there. However, since they are new tags, you will need to use the Better RoM schema file too.

For the boost to city growth look at the Modder's Guide or the example folder, both have that one listed.

As for a boost to city growth with a terrain in the vicinity, you are going to need to improvise, there is no XML tag that will work for that. You could require hills or coast, and give a boost separately, but not together.
 
At the moment, there is no way to make buildings give increased yield to different tiles.

For the production boost with public works, look at the civic files in the Better RoM folder, I use some of those modifiers there. However, since they are new tags, you will need to use the Better RoM schema file too.

For the boost to city growth look at the Modder's Guide or the example folder, both have that one listed.

As for a boost to city growth with a terrain in the vicinity, you are going to need to improvise, there is no XML tag that will work for that. You could require hills or coast, and give a boost separately, but not together.

Thank you! I figured out to do most everything and those I could not figure out I found an alternative solution.

I am so happy I able to make these! I am already nearly done. Who knows if I do not have too many bugs I might be done with the water mod today! :D
 
Ok I seem to have 3 errors that I can't seem to fix.

1.The text name for the Fire Hydrant will not show up.

2. It says I have a problem with TECH_REPLACEABLE_PARTS even though i looked it up and saw that is what the techs name was.

3. It says I have a problem with TECH_FIREFIGHTING even though I looked it up and saw that is what the techs name was.

Please help. :(

EDIT: [Removed Attachment]
 
@Afforess

Ok I seem to have 3 errors that I can't seem to fix.

1.The text name for the Fire Hydrant will not show up.

2. It says I have a problem with TECH_REPLACEABLE_PARTS even though i looked it up and saw that is what the techs name was.

3. It says I have a problem with TECH_FIREFIGHTING even though I looked it up and saw that is what the techs name was.

Please help. :( (See Attachment)

1. Gotta check the typos, it's in the BuildingInfo.XML you have TXT_KEY_FIRE_HYDRANTS instead of TXT_KEY_BUILDING_FIRE_HYDRANTS

2. Again, typos. you have TECH_REPLACABLE_PARTS instead of TECH_REPLACEABLE_PARTS under hand pump

3. Yet again, typos. Under FIRE_HANGER you have TECH_FIREFIGHTNG instead of TECH_FIREFIGHTING

Also, you might want to check grammar on "Fire Hanger" in the text file to "Fire Hangar"

NOTE: Get the Civ4 XML Editor from the downloads section, it works miracles when you try to organize and compare code either from entry to entry or file to file.
 
Top Bottom