Ideas for Unique Units and Buildings.

sandman, amazing work. You really took a load of peoples shoulders here by doing this :)
 
My internet just came back on (was broken for 2 days) and the first thing I do is come to this forum to see that sandman has finished all the UU's! Dang sandman, goodjob! I was looking forward to doing some of those but you seemed to nab 'em all in the week I wasn't here. Anyways, Nice Job Dude! :thumbsup:
 
My internet just came back on (was broken for 2 days) and the first thing I do is come to this forum to see that sandman has finished all the UU's! Dang sandman, goodjob! I was looking forward to doing some of those but you seemed to nab 'em all in the week I wasn't here. Anyways, Nice Job Dude! :thumbsup:

LOL :lol: Thank You!
 
@sandman730


Ok let's try this again. :D

This should work, here are the files you need.
 

Attachments

  • World2009.zip
    24.8 KB · Views: 85
@Joecoolyo- I hope this helps. You just have to edit two files. Please download the zip files attached to this post, it contains the two files from our mod that you have to use.


Adding a unique building:

Download and install notepad++ (or jedit if you use a Mac)


Open the following file:

assets/XML/Buildings/Civ4buildingsInfos.xml

this will be referred to as the buildinginfos file.


Search for the building your unique building will replace. You want to find it inside <type> tags. So if your unique building replaces the library, you want to find this:

<Type>BUILDING_LIBRARY</Type>

This is the entry you want to copy, which you will then modify to create your building. Copy all of the data between the <BuildingInfo> and </BuildingInfo> tags.

Go to the bottom of the file, and paste it in right above the </BuildingInfos> tag.

It is very important to copy everything perfectly.


The top few lines of your new entry will look like this:

Code:
			<BuildingInfo>
			<BuildingClass>BUILDINGCLASS_LIBRARY</BuildingClass>
			<Type>BUILDING_LIBRARY</Type>
			<SpecialBuildingType>NONE</SpecialBuildingType>
			<Description>TXT_KEY_BUILDING_LIBRARY</Description>
			<Civilopedia>TXT_KEY_BUILDING_LIBRARY_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_LIBRARY_STRATEGY</Strategy>
			<Advisor>ADVISOR_SCIENCE</Advisor>
			<ArtDefineTag>ART_DEF_BUILDING_LIBRARY</ArtDefineTag>



Change this to something like this:

Code:
			<BuildingInfo>
			<BuildingClass>BUILDINGCLASS_[COLOR="Blue"]LIBRARY[/COLOR]</BuildingClass>
			<Type>BUILDING_[COLOR="Red"]YOURUB[/COLOR]</Type>
			<SpecialBuildingType>NONE</SpecialBuildingType>
			<Description>TXT_KEY_BUILDING_[COLOR="Red"]YOURUB[/COLOR]</Description>
			<Civilopedia>TXT_KEY_BUILDING_[COLOR="Red"]YOURUB[/COLOR]_PEDIA</Civilopedia>
			<Strategy>TXT_KEY_BUILDING_[COLOR="Red"]YOURUB[/COLOR]_STRATEGY</Strategy>
			<Advisor>ADVISOR_SCIENCE</Advisor>
			<ArtDefineTag>ART_DEF_BUILDING_[COLOR="BLUE"]LIBRARY[/COLOR]</ArtDefineTag>


The instances of LIBRARY that are in blue, you leave alone. Do not edit the BUILDINGCLASS tag, or the ArtDefineTag for now!

Where you see the red, you put in the name you give your building. Not the name as displayed in the game, so all caps and no spaces. for example, NEWLIBRARY.

Once you have done this, you have created a second building, with the same proprieties as a library.

Now you want to make the improvements to the building. That is what the rest of the tags are for. I won't try to explain them all here, the best place to go to find what you need to know about these is here.

If you want, for the first buildings you try, you can tell me the improvements you want to make, and then I can tell you what tags you have to change.


After you get that done, all you have to do is define the text tags. That is where the second file you have to edit comes in. Open the file:

assets/XML/Text/World2009_Buildings_CIV4GameText.xml

Scroll to the bottom. Right above the </Civ4GameText>, paste in this:

Code:
<TEXT>
<Tag>TXT_KEY_BUILDING_[COLOR="Red"]YOURUB[/COLOR]</Tag>
<English>[COLOR="green"]In game building name[/COLOR]</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_BUILDING_[COLOR="Red"]YOURUB[/COLOR]_PEDIA</Tag>
<English>[COLOR="green"]civilopedia entry[/COLOR]</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_BUILDING_[COLOR="Red"]YOURUB[/COLOR]_STRATEGY</Tag>
<English>[COLOR="green"]Unique BUilding strategy.[/COLOR]</English>
</TEXT>


Change all the red text to what you have named your building. The first green text is what you want your building to be called in the game. The second is the civilopedia entry. The third is strategy, which generally describes the extra bonuses the building gets. You don't have to do all the civilopedia entries right away, you can leave them just saying "civilopedia entry", but all these tags have to be in the file.

I hope that makes sense.
 

Attachments

  • buildingfiles.zip
    28.3 KB · Views: 86
Here's my attempt at adding a UB via XML. I added the Mexican UB, the Maquiladora, which is a factory with +3 trade routes given to the city. Here are the attached file with the edited stuff. Hopefully it works DVS :D
 

Attachments

  • buildingfiles.zip
    33.7 KB · Views: 69
Wow, great work buddy.

One tiny misstep, other than that, perfect!

In the buildinginfos file, you put your new entry beneath the </BuildingInfos>, not above it. Note the difference between </BuildingInfo> and </BuildingInfos>.

There is only one </BuildingInfos> tag in the file, and it should always be on the second last line.

After I switched that around, everything worked perfectly. Amazing for a first attempt.
 
Joecoolyo and sandman730, I'm sure the whole team is glad to have you guys helping with XML now, in addition to the research you have already done here! Huge contributions.

Most areas are covered now, we are well on our way. :cheers:
 
Wow, great work buddy.

One tiny misstep, other than that, perfect!

In the buildinginfos file, you put your new entry beneath the </BuildingInfos>, not above it. Note the difference between </BuildingInfo> and </BuildingInfos>.

There is only one </BuildingInfos> tag in the file, and it should always be on the second last line.

After I switched that around, everything worked perfectly. Amazing for a first attempt.

Thanks dude, I'll get to work on the other UB's ASAP
 
Haha, nevermind, I just said something stupid. I should be ashamed!

Keep the good work guys! I'd love to see this mod finished! :goodjob:
 
lol, ok Arlborn! Don't sweat it.

Glad to have you interested in our mod, and contributing to our forum. Welcome. :)
 
remake20 doesn't have a lot of time these day, so maybe not half.

Why not... one of you work from the top of the list down, and the other, from the bottom up!

Just a suggestion, you two can figure something out I'm sure.

P.S. remake20 has already added UB for Japan. Should have told you that Joecoolyo, sorry.
 
I haven't had much time and only got the Jap. UB. DVS, can you get us the updated list and I'll split it in half.
 
Good idea DVS. Double post
 
So, I work from bottom you work from top? Sofar we have finished the Japanese UB and the Mexican UB just for clarification.
 
I would still like the updated list the we can check off. Sure I'll start from top. BTW what is the Canadian UB a UB of?
 
Top Bottom