Results 1 to 30 of 269

Thread: The Complete EDB Guide - discussion

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: The Complete EDB Guide - discussion

    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

  2. #2
    Finder of Little Oddities Senior Member Makanyane's Avatar
    Join Date
    Jan 2006
    Posts
    2,220

    Default Re: The Complete EDB Guide - discussion

    To get round the Carthaginian problem you just need to remove one of the lookup lines for them at the top of descr_ui_buildings.

    Not sure what your original problem was, but on the later example where you are replacing militia_barracks with aztec_militia_barracks, I would have thought you should have been getting error messages. The normal militia_barracks is part of a trigger in export_descr_advice.txt - removing buildings that are mentioned in that normally gives you a message if you're using -show_err....

    I'd suggest fixing your EDB back to working condition and trying some a deliberate error in another file that you know should give error message, to make sure you are still getting -show_err messages, if you've got some other error somewhere blocking that it will add to your problems considerably.


    On rest of stuff if you're patched to 1.5 you don't need to add anything to the enums file. I'd suggest you put in text file references for each culture though, eg like
    {aztec_militia_barracks_eastern_desc}
    and then put the faction specific stuff in below it. So you have the culture reference as fail safe - not having text in there for anyone who ends up with building will give an errorless CTD, but not until you try to view the building...

    I've not tried the technique in your first bit of coding so can't really advise on that part.
    Not used mods before? Looking for something small and fun?!
    Download the:

  3. #3

    Default Re: The Complete EDB Guide - discussion

    Thank you for your help Makanyane.

    Its usually takes at least one question before I figure out where I went wrong.

    I did as you suggested and edited the EDB back to working perfectly then removed a coma from a the requires factions list and it gave me the expected error message.

    I also created graphic cards for all the building levels. I was hoping I could get away with just placing them into the desc_ui_buildings file, but that doesn't seem to work for me.

    I also went back through all my text and found I missed a word in only one of the building levels, this must have been the major issue. Now I have everything working, including the branched building tree.

    Thanks for the prompt reply. It led me to figuring out all my problems.

  4. #4

    Default Re: The Complete EDB Guide - discussion

    A couple small corrections for the list of building effects, based on what I see coded in the BI exe and EDB files:

    1) "population_fire_risk_bonus" -- the exe says just "fire_risk"
    2) "bodyguard" -- should be "upgrade_bodyguard", as used in the BI EDB
    RTR VII Developer

    Member thankful for this post:



  5. #5
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: The Complete EDB Guide - discussion

    Thx. Ham.

    Edited
    "One of the most sophisticated Total War mods ever developed..."

  6. #6
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: The Complete EDB Guide - discussion

    Just a small update - the "port" condition can be used for capabilities as well as building conditionals. So, for example, you can have a unit in a barracks that only is available in a coastal area (there is no CTD when right-clicking the unit name in the building scroll to bring up the unit info scroll). So no need for resource conditionals anymore in this context.

    Still awaiting response from Squid as to whether the port condition detects the actual coast or just the presence of the port in map_regions.tga though.

    Guide updated.
    Last edited by Dol Guldur; 06-25-2008 at 14:21.
    "One of the most sophisticated Total War mods ever developed..."

  7. #7
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: The Complete EDB Guide - discussion

    Sorry, I totally forgot about checking that. I removed the port from a coastal region in map_regions.txt, and the building linked to the port condition was not available to build. The port condition is linked to the white port pixels being present in map_regions.tga

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO