I've been trying to edit the EDB file for the better part of a day now, but whenever I add a new building, the game simply crashes at start up. I've been modding for a year now and have managed to change just about everything in the game, including settlement plans, but adding a building, which seems simple enough has, completely stumped me.
Here is what I am doing.
At first, I'll admit I attempted to bite off a bit more than I coud chew by attempting to follow not only this Guide to EDB but also trying more advanced editing found here: Adding 500+ Buildings
As I was editing the EDB I not only had both the Complete Guide to EDB and the above thread open, but also this tutorial: Building editing, building adding, guide
I am trying to create a new building set that I named: barracks_aztec
I have also kept the original barracks set, just removed the factions I want to use in the barracks_aztec.
I am also trying to create a branched barracks tree that will be based on whether or not a specific temple is built in the city. This way we can have recruitment specific to the existance of that specific temple.
At first I followed the EDB Guide and the 500+ and came up with this;
Code:
;building barracks_aztec
;{
; levels aztec_militia_barracks warrior_missile_barracks warrior_heavy_infantry_barracks elite_warrior_barracks house_of_eagle_warriors_quauhcalli priest_missile_barracks priest_heavy_infantry_barracks elite_priest_barracks
; {
; aztec_militia_barracks requires factions { pontus, dacia, }
; {
; capability
; {
; }
; construction 2
; cost 600
; settlement_min village
; upgrades
; {
; warrior_missile_barracks
; priest_missile_barracks
; }
; }
; warrior_missile_barracks requires factions { pontus, dacia, }
; {
; capability
; {
; }
; construction 3
; cost 800
; settlement_min large_town
; upgrades
; {
; warrior_heavy_infantry_barracks
; }
; }
; warrior_heavy_infantry_barracks requires factions { pontus, dacia, }
; {
; capability
; {
; }
; construction 4
; cost 1600
; settlement_min large_town
; upgrades
; {
; elite_warrior_barracks
; }
; }
; elite_warrior_barracks requires factions { pontus, dacia, }
; {
; capability
; {
; }
; construction 5
; cost 3200
; settlement_min city
; upgrades
; {
; house_of_the_eagle_warriors_quauhcalli
; }
; }
; house_of_the_eagle_warriors_quauhcalli requires factions ( dacia, pontus, }
; {
; capability
; {
; }
; construction 7
; cost 6400
; settlement_min large_city
; upgrades
; {
; }
; }
; priest_missile_barracks requires factions { pontus, dacia, }
; {
; capability
; {
; }
; construction 3
; cost 800
; settlement_min large_town
; upgrades
; {
; priest_heavy_infantry_barracks
; }
; }
; priest_heavy_infantry_barracks requires factions { pontus, dacia, }
; {
; capability
; {
; }
; construction 4
; cost 1600
; settlement_min large_town
; upgrades
; {
; elite_priest_barracks
; }
; }
; elite_priest_barracks requires factions { pontus, dacia, }
; {
; capability
; {
; }
; construction 5
; cost 3200
; settlement_min city
; upgrades
; {
; house_of_the_eagle_warriors_quauhcalli
; }
; }
; }
; plugins
; {
; }
;}
Which made the game crash at start up. I was also adding all the building levels to desc_ui-buildings so that I could perhaps test it with out creating all the building cards.
When it didn't work, I ; out all the code and the game loaded fine.
The next step was to see if I screwed up the other files that needed to be edited. So, I edited a building in the vanila barracks line:
Code:
building barracks
{
levels muster_field aztec_militia_barracks city_barracks army_barracks royal_barracks
{
muster_field requires factions { barbarian, carthaginian, armenia, egyptian, }
{
capability
{
}
construction 2
cost 600
settlement_min town
upgrades
{
aztec_militia_barracks
}
}
aztec_militia_barracks requires factions { barbarian, numidia, armenia, egyptian, }
{
capability
{
}
construction 3
cost 1200
settlement_min large_town
upgrades
{
city_barracks
}
}
city_barracks requires factions { barbarian, carthaginian, armenia, egyptian, }
{
capability
{
}
construction 4
cost 2400
settlement_min city
upgrades
{
army_barracks
}
}
army_barracks requires factions { carthaginian, armenia, egyptian, }
{
capability
{
}
construction 6
cost 4800
settlement_min large_city
upgrades
{
royal_barracks
}
}
royal_barracks requires factions { seleucid, roman, }
{
capability
{
}
construction 7
cost 9600
settlement_min huge_city
upgrades
{
}
}
}
plugins
{
}
}
This is the coding in export_desc_building_enums:
Code:
aztec_militia_barracks
aztec_militia_barracks_desc
aztec_militia_barracks_desc_short
aztec_militia_barracks_pontus_desc
aztec_militia_barracks_pontus_desc_short
aztec_militia_barracks_dacia_desc
aztec_militia_barracks_dacia_desc_short
aztec_militia_barracks_armenia_desc
aztec_militia_barracks_armenia_desc_short
aztec_militia_barracks_barbarian_desc
aztec_militia_barracks_barbarian_desc_short
aztec_militia_barracks_numidia_desc
aztec_militia_barracks_numidia_desc_short
aztec_militia_barracks_egyptian_desc
aztec_militia_barracks_egyptian_desc_short
And here it is in export_desc_building
Code:
{aztec_militia_barracks} Militia Barracks
{aztec_militia_barracks_desc} WARNING! This baseline description should never appear on screen!
{aztec_militia_barracks_desc_short} WARNING! This baseline description should never appear on screen!
{aztec_militia_barracks_pontus_desc}
Militia and light infantry warriors were an essential part of every Mesoamerican army. Usually positioned at the rear of the battle line they would help fend off enemy attacks and assist the noble and elite warriors to take as many captives as possible.
{aztec_militia_barracks_pontus_desc_short}
Militia barracks train militia and light infantry warriors who were an essential part of every Mezoamerican army.
{aztec_militia_barracks_dacia_desc}
Militia and light infantry warriors were an essential part of every Mesoamerican army. Usually positioned at the rear of the battle line they would help fend off enemy attacks and assist the noble and elite warriors to take as many captives as possible.
{aztec_militia_barracks_dacia_desc_short}
Militia barracks train militia and light infantry warriors who were an essential part of every Mezoamerican army.
{aztec_militia_barracks_armenia_desc}
Militia and light infantry warriors were an essential part of every Mesoamerican army. Usually positioned at the rear of the battle line they would help fend off enemy attacks and assist the noble and elite warriors to take as many captives as possible.
{aztec_militia_barracks_armenia_desc_short}
Militia barracks train militia and light infantry warriors who were an essential part of every Mezoamerican army.
{aztec_militia_barracks_barbarian_desc}
Militia and light infantry warriors were an essential part of every Mesoamerican army. Usually positioned at the rear of the battle line they would help fend off enemy attacks and assist the noble and elite warriors to take as many captives as possible.
{aztec_militia_barracks_barbarian_desc_short}
Militia barracks train militia and light infantry warriors who were an essential part of every Mezoamerican army.
{aztec_militia_barracks_numidia_desc}
Militia and light infantry warriors were an essential part of every Mesoamerican army. Usually positioned at the rear of the battle line they would help fend off enemy attacks and assist the noble and elite warriors to take as many captives as possible.
{aztec_militia_barracks_numidia_desc_short}
Militia barracks train militia and light infantry warriors who were an essential part of every Mezoamerican army.
{aztec_militia_barracks_egyptian_desc}
Militia and light infantry warriors were an essential part of every Mesoamerican army. Usually positioned at the rear of the battle line they would help fend off enemy attacks and assist the noble and elite warriors to take as many captives as possible.
{aztec_militia_barracks_egyptian_desc_short}
Militia barracks train militia and light infantry warriors who were an essential part of every Mezoamerican army.
I also read that the carthiginian culture sometimes gives things problems with desc_ui_buildings so I followed the steps in the building editing tuorial and removed it.
Still the game crashed.
Then I went ahead and created new graphic files for aztec_militia_barracks and placed them in all the cutlure UI folders and named them appropriatly. And still is crashed. Everytime, its a CTD with no errors.
I am running the files out of a mod folder, so I don't know if there's anything else I need to do because of this.
Also, is there anything more I need to do to create a new building group other than writing it in the EDB and then adding barracks_aztec_name to EDBE and EB?
Sorry for the long post, but I wanted to show all my steps and my coding to make it easier for someone to see my mistakes and learn where I went wrong. Any help would be greatly appreciated, I've looked over all the coding and can't find any mistakes, but I'm not perfect.
Thanks ahead of time.
-Rama
Bookmarks