I am just a beginner so I have a long way to go but can some one give me a pointer as to show where to get the files. I am just trying to learn how to make one a building that’s from one civ and make it available to another. example from Hausa to India
This should probably be in the modding topic, not general discussion.
First, get Resource Manager over yonder: [v.0.4] Resource Manager - Viewing, comparing, creating and extracting files from Age of Empires III .BAR archive
Find where your game is installed, if it’s on Steam you just mosey on over but if you’re on the Microsoft Store version good luck as you’ll need to get permissions set up for your WIndowsApps folder to even see the game’s files and it’s a bit of a headache but eventually you’ll get in and get modding.
For enabling buildings it’s going to be simple. You’ll need to look in the Data.bar with Resource Manager, search for techtreey and use the Extract setting, making sure to toggle the Auto-Convert to XML option. While in there you may as well extract and convert protoy.xml as that is where all the units and buildings are defined.
Within the techtreey file you are going to find the Age0 techs, which govern the starting units, techs, buildings, special abilities, and anything else that determines what a civ has access to at the start of the game. If you for some reason can’t CTRL+F your way into finding the exact ones you need, consult the civs.xml file in Data.bar which lists them. Now, The Asian Dynasties’ Age0s use subtechs instead of one big mess to sort through, so you can go into ypAge0IndiansBuildings and see their buildings.
Once you’re at ypAge0IndianBuildings it should be clear what you would need to do to Enable new buildings. Find the building in Hausa’s age0 (DEAge0Hausa), copy+paste the Enable code into the India Age0, and you might be all set. I don’t recall how many buildings India has off hand, but there is a limit as only so many will fit on the villagers’ UI so you may only have room for 1-3 new buildings without putting more work in to make it function, such as by adding a special builder unit or enabling a building to train wagons, etc.
Head on over to the Additive Data Mods page as you’re going to want to learn how to set up a techtreemods.xml file and it will show you examples of how to code changes to existing techs. If that’s too scary you can just mod the techtreey.xml itself and chuck that into a local mod folder, but it’s much easier to just do it as techtreemods so that it’s not going to break and need to be redone when an update comes out (which one is in the pipeline and being tested right now). https://support.ageofempires.com/hc/en-us/articles/360062106732-Additive-Data-Mods
<techtreemods>
<tech name='ypAge0IndiansBuildings'>
<effects>
<effect mergeMode='add' type="Data" amount="1.00" subtype="Enable" relativity="Absolute">
<target type="ProtoUnit">dePalace</target>
</effect>
</effects>
</tech>
</techtreemods>
Once you have your file coded, head on over to C:\Users\USERNAME\Games\Age of Empires 3 DE\NUMBERS\mods\local and then make a new folder called Indian Buildings or whatever you want it called, and within that you need to mirror the folders that the game uses, so for this you’d make a Data folder within your Indian Buildings or whatever folder, then put your techtreemods.xml file in the Data folder, and you’re good to go. Verify it’s toggled on in the in-game mod menu.
Depending on which building exactly you’re wanting you may need to do more work, such as making a protomods.xml to add Indian units to that building’s build list (or coding it to add those units to that building in the techtreemods), making that building’s techs Obtainable in India’s Age0, and so forth.
<protomods>
<Unit name='Stable'>
<train row="0" page="0" column="2">TexasRangerRider</train>
<tech row="0" page="1" column="2">GuardTexasRanger</tech>
<tech row="0" page="1" column="2">ImperialTexasRanger</tech>
</Unit>
</protomods>
You can mod the building’s animfile (located in ArtBuildings.bar, referenced in the building’s entry in the protoy.xml file) to make it have an Indian building’s appearance. Some buildings’ anim files will be coded so that the appearance Component is determined by the Culture, with submodels, so you’d carefully copy+paste the submodels out of an Indian building, put them into the other building’s file (making sure they all have unique submodel names), then code the culture component for Indian, plugging in the Indian building’s submodel names. If you don’t know the exact culture name to use, you can consult the civs.xml where it is defined for each civ. As with the techtreemods.xml, any modded building files would have to be mirrored where the game has them, so a modded palace.xml would go into your mod’s Art\buildings\african_civs\palace folders.
Hopefully I explained everything well enough so you be on your way to having fun modding to your heart’s desire.
Sorry I wasn’t paying attention to the different topic selections but thank you for the help
Thank you for explaining most of the things i needed. I just have a few more questions what im trying to do is make the consulate available for the Hausa
Do I copy the entire code of Hausa civ code and then insert the Indian code that enables the consulate at the end? And if so is anywhere within that civ or at a specific spot?
Well, that in particular is going to be more complex than the reverse (moving Hausa stuff to India), so you’ve got good news and bad news.
Good: Getting the Consulate onto Hausa is just like the India example, you’d need to put that Enable code for the building into the DEAge0Hausa and also add the Obtainable code for Consulate techs from India.
<effect type="TechStatus" status="obtainable">ypBigConsulateBritish</effect>
<effect type="TechStatus" status="obtainable">ypBigConsulateFrench</effect>
<effect type="TechStatus" status="obtainable">ypBigConsulateOttomans</effect>
<effect type="TechStatus" status="obtainable">ypBigConsulatePortuguese</effect>
<effect type="TechStatus" status="obtainable">ypPickConsulateTech</effect>
Bad: Consulate uses Export, Hausa has Influence, so you’re very likely going to need to do work just to get it functioning. Africa uses DEAfricanInfluenceCosts tech which converts costs of units and techs to Influence, so it may just be a matter of sitting down and coding all the Consulate techs and units into that tech to convert them over to Influence. (Edit: it censored DE African Influence Costs tech name for some reason)
<effect type="Data" amount="1.00" subtype="CalculateInfluenceCost" calctype="1" relativity="Assign">
<target type="techWithFlag">YPConsulateTech</target>
</effect>
<effect type="Data" amount="0.00" subtype="Cost" resource="Trade" relativity="Assign">
<target type="techWithFlag">YPConsulateTech</target>
</effect>
<effect type="Data" amount="0.00" subtype="Cost" resource="Food" relativity="Assign">
<target type="techWithFlag">YPConsulateTech</target>
</effect>
<effect type="Data" amount="0.00" subtype="Cost" resource="Wood" relativity="Assign">
<target type="techWithFlag">YPConsulateTech</target>
</effect>
<effect type="Data" amount="0.00" subtype="Cost" resource="Gold" relativity="Assign">
<target type="techWithFlag">YPConsulateTech</target>
</effect>
Hopefully that will be all you need to do as it will only be a bit time consuming to track down all the things you need to punch in there and convert. The alternative would be to just make your own Consulate options that use Influence by default, which would be a more advanced project to undertake for a newbie modder.
As long as you’re putting the code into the age0 effects, it doesn’t matter where it is within it (if you look at them like Age0Spanish they are usually haphazard with things wherever the dev happened to be at the time).
alright thanks for the help Im going to give it a try