This is the official forum for the free, fan-made Age of Empires III modification, Wars of Liberty.

Welcome to the New Forum

We hope you enjoy the official new forum of the Wars of Liberty mod for Age of Empires III! Visit this thread to get acquainted with the new forum, and let us know if there's anything we can fix. Feel free to dismiss this message at any time by clicking the "X" in the top right corner.

Thanks!
The Wars of Liberty Team

Forum rules

  • Welcome to The Library! This forum is for asking questions about modding, and sharing maps, mods, and other creations.
  • The official language in this forum is English.
  • Be nice to other members, don't spam comments or smilies, and don't do anything illegal.
  • Posts that don't fit this forum will be moved or deleted.
 
User avatar
daMarshal
Topic Author
Jesuit Priest
Jesuit Priest
Posts: 31
Joined: Wed May 31, 2017 3:44 am
Location: United States
Favorite Civilization: British

How to make a Homecity Unit Card?

Wed Dec 27, 2017 9:12 pm

Hi, sorry for the noob question, but how exactly do you make a new unit card that can be sent from the home city. Also, how can you make the unit upgrade automatically or to a certain level? For example, the Pontifical guard card, and how the zouave is upgraded to a corporal version.
"It is the mark of an educated mind to be able to entertain a thought without accepting it."
- Aristotle
 
User avatar
Circle of Ossus
Independentista
Independentista
Posts: 151
Joined: Fri Mar 31, 2017 9:48 am
Location: Belgium
Favorite Civilization: Romanians

Re: How to make a Homecity Unit Card?

Thu Dec 28, 2017 1:55 pm

I've since long no more modded aoe3, but I will try to answer:
- in the homecity file, you can design a new card; it will reference to a tech. You will have to assign this card to a building/advisor.

Code: Select all

<card>
 <name>HCBoneguardArmy2</name>
 <maxcount>1</maxcount>
 <level>35</level>
 <prereqtech>HCBoneguardArmy1</prereqtech>
 <age>2</age>
 <displayunitcount>11</displayunitcount>
 <infiniteinlastage>1</infiniteinlastage>
 </card>

	<building>
		<name>Academy</name>
...
		<obtainabletechs>
...
			<tech x="5.3" y="4.0">HCBoneguardArmy1</tech>
			<tech x="5.3" y="5.0">HCBoneguardArmy2</tech>
			<tech x="5.3" y="6.0">HCBoneguardArmy3</tech>
			...
		</obtainabletechs>

	</building>
	<Tech name="HCBoneguardArmy2" type="Normal">
		<DBID>9009</DBID>
		<DisplayNameID>71069</DisplayNameID>
		<Cost resourcetype="Ships">1.0000</Cost>
		<ResearchPoints>35.0000</ResearchPoints>
		<Status>UNOBTAINABLE</Status>
		<Icon>units\spc\boneguard\boneguard_age2_icon_64x64</Icon>
		<RolloverTextID>71070</RolloverTextID>
		<Flag>HomeCity</Flag>
		<Effects>
			<Effect type="Data" amount="6.00" subtype="FreeHomeCityUnit" unittype="BoneguardAge2" relativity="Absolute">
				<Target type="Player"/>
			</Effect>
			<Effect type="Data" amount="5.00" subtype="FreeHomeCityUnit" unittype="Boneguard" relativity="Absolute">
				<Target type="Player"/>
			</Effect>

			<Effect type="Data" amount="1.00" subtype="FreeHomeCityUnit" unittype="CrateofXP" relativity="Absolute">
				<Target type="Player"/></Effect>
		</Effects>
	</Tech>
- You can make units upgrade automatically with age up. See the PostImperial, civspecific techs (you set the upgrade status="active" when you advance in age.
 
User avatar
daMarshal
Topic Author
Jesuit Priest
Jesuit Priest
Posts: 31
Joined: Wed May 31, 2017 3:44 am
Location: United States
Favorite Civilization: British

Re: How to make a Homecity Unit Card?

Thu Dec 28, 2017 6:10 pm

So, I tried what your instructions said, and I totally crashed the latest WOL version that I've been using. It looks like I'm just going to leave modding to the more professional or experienced modders. Thanks for the help though!!
"It is the mark of an educated mind to be able to entertain a thought without accepting it."
- Aristotle
 
User avatar
Will
Wars of Liberty Team
Wars of Liberty Team
Posts: 12
Joined: Tue Mar 14, 2017 4:14 am
Location: Sydney, Australia
Favorite Civilization: Ethiopians

Re: How to make a Homecity Unit Card?

Wed Jan 10, 2018 8:13 pm

Hey daMarshal,
Don't be too afraid of crashing to give modding a go. I still make the game crash occasionally and it's always because of some super simple bit of text that's missing in the code. Like accidentally putting </unit> twice or forgetting an important semi-colon. It's very easily fixed.
I hope you aren't discouraged.
Image
 
User avatar
daMarshal
Topic Author
Jesuit Priest
Jesuit Priest
Posts: 31
Joined: Wed May 31, 2017 3:44 am
Location: United States
Favorite Civilization: British

Re: How to make a Homecity Unit Card?

Thu Jan 11, 2018 4:31 pm

Okay, so if I wanted to add a WOL original unit to an original civ, like a  repeating 8 Corporal Zouave card for the French, how exactly would I do that? Also, I've done a little modifying to my copy by adding/moving some home city cards. Primarily they are units that would make up colonial armies like, Sepoys, Gurkhas, Askari, Escorts, and a few others. How can you have them update with every age up? Primarily to their  veteran and guard status equivalent? Sorry for all the questions, I'm just curious.
"It is the mark of an educated mind to be able to entertain a thought without accepting it."
- Aristotle
 
User avatar
AlistairJah
Intern
Intern
Posts: 287
Joined: Wed Sep 06, 2017 10:10 am
Location: Madagascar
Favorite Civilization: French
Contact:

Re: How to make a Homecity Unit Card?

Fri Jan 12, 2018 4:45 pm

Hey daMarshall! Since the day I began to script WoL's AI, I never modded again, so I will just guide you with non-coder words.
First, you can find the card's name in data/stringtabley.xml by using the search function of your text editor - for Notepad++ for example, it's Ctrl+F. When you find that card, you will see <String ID="XXXXXX">CARDNAME</String> where XXXXXX is a number.
Copy that number and open data/techtreey.xml. Using the search function of your text editor, search for the number you've just copied. You'll find the card's techtree version - the standard is HCCardName for non-shipment cards, and HCShipUnitName for shipments, but some cards may have different name, like the African ones.
Copy that card-in-techtree-version, and open a homecity file - for French, it's data/homecityfrench.xml, and follow Circle of Ossus' instructions. I hope I helped you - if not, you can also search for MisterSCP's aoe3 modding guides on YouTube. However I cannot remember if he made a homecity guide or not.
(fr) Regarde à travers et vois le cygne et ce qui vit au-delà de l'au-delà.

Who is online

Users browsing this forum: No registered users and 1 guest