Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: Creating new buildings

Hybrid View

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

    Default Creating new buildings

    I tried creating a new set of buildings for a new religion I added to the game. I copied the entry in EDB for the temple_muslim line of buildings, and changed it so that is should convert to the shia religion I added in game, and changed the name of the building line to temple_shia, and added _shia onto the names of the five individual building levels.

    However, I get a crash when the game tries to load. I guess there are other files I must edit to add a building to the game, but I don't know what...

  2. #2
    Polpolgio's Avatar Miles
    Join Date
    Jun 2008
    Location
    Barcelona, Europe
    Posts
    362

    Default Re: Creating new buildings

    I had also many problems with religious buildings, see my answer at the other post. And for solve your problem, tell me what does the log say. Thank you.

  3. #3

    Default Re: Creating new buildings

    The log doesn't say anything, I wish I could find a tutorial on how to add buildings...

    This is what I put:

    Code:
     
    building temple_shia
    {
        convert_to temple_muslim_castle
        religion shia
        levels small_masjid_shia masjid_shia minareted_masjid_shia jama_shia great_jama_shia 
        {
            small_masjid_shia city requires factions { egypt, } 
            {
                convert_to 0
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 1
                    religion_level bonus 2
                    agent_limit priest 1
                }
                material wooden
                construction  1 
                cost  800 
                settlement_min town
                upgrades
                {
                    masjid_shia
                }
            }
            masjid_shia city requires factions { egypt, } 
            {
                convert_to 1
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 1
                    religion_level bonus 4
                    agent_limit priest 1
                }
                material wooden
                construction  2 
                cost  1600 
                settlement_min large_town
                upgrades
                {
                    minareted_masjid_shia
                }
            }
            minareted_masjid_shia city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 2
                    religion_level bonus 6
                    agent_limit priest 2
                }
                material wooden
                construction  3 
                cost  3200 
                settlement_min city
                upgrades
                {
                    jama_shia
                }
            }
            jama_shia city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 2
                    religion_level bonus 8
                    agent_limit priest 2
                }
                material wooden
                construction  4 
                cost  6400 
                settlement_min large_city
                upgrades
                {
                    great_jama_shia
                }
            }
            great_jama_shia city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 3
                    religion_level bonus 10
                    agent_limit priest 2
                }
                material wooden
                construction  6 
                cost  10000 
                settlement_min huge_city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    Last edited by Caledonian Rhyfelwyr; February 13, 2009 at 03:38 PM.

  4. #4
    Polpolgio's Avatar Miles
    Join Date
    Jun 2008
    Location
    Barcelona, Europe
    Posts
    362

    Default Re: Creating new buildings

    Have you added the building entries and translate them at export_buildings.text (Inside Data/text)?

  5. #5
    Socal_infidel's Avatar PDER Piper
    Join Date
    Jan 2007
    Location
    Brooklyn USA
    Posts
    2,563

    Default Re: Creating new buildings

    Check out this thread. It's a Guide for Guilds but there is a section on how to add new guilds. Just ignore the guild specific stuff and you'll know which files to edit to add new building.

  6. #6

  7. #7

    Default Re: Creating new buildings

    Below is what I entered in each of the necessary files. I also edited the buildings file in the text folder, although that wouldn't be related to when I have the crash (just when the loading screen comes up having put the disk in).

    EXPORT_DESCR_BUILDINGS.TXT

    Code:
     
    building temple_shia
    {
        religion shia
        levels small_masjid_shia masjid_shia minareted_masjid_shia jama_shia great_jama_shia 
        {
            small_masjid_shia city requires factions { egypt, } 
            {
                convert_to 0
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 1
                    religion_level bonus 2
                    agent_limit priest 1
                }
                material wooden
                construction  1 
                cost  800 
                settlement_min town
                upgrades
                {
                    masjid_shia
                }
            }
            masjid_shia city requires factions { egypt, } 
            {
                convert_to 1
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 1
                    religion_level bonus 4
                    agent_limit priest 1
                }
                material wooden
                construction  2 
                cost  1600 
                settlement_min large_town
                upgrades
                {
                    minareted_masjid_shia
                }
            }
            minareted_masjid_shia city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 2
                    religion_level bonus 6
                    agent_limit priest 2
                }
                material wooden
                construction  3 
                cost  3200 
                settlement_min city
                upgrades
                {
                    jama_shia
                }
            }
            jama_shia city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 2
                    religion_level bonus 8
                    agent_limit priest 2
                }
                material wooden
                construction  4 
                cost  6400 
                settlement_min large_city
                upgrades
                {
                    great_jama_shia
                }
            }
            great_jama_shia city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 3
                    religion_level bonus 10
                    agent_limit priest 2
                }
                material wooden
                construction  6 
                cost  10000 
                settlement_min huge_city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    EXPORT_DESCR_BIULDING_ENUMS.TXT

    Code:
     
    temple_shia_name
    small_masjid_shia
    small_masjid_shia_desc
    small_masjid_shia_desc_short
    small_masjid_shia_northern_european_desc
    small_masjid_shia_northern_european_desc_short
    small_masjid_shia_mesoamerican_desc
    small_masjid_shia_mesoamerican_desc_short
    small_masjid_shia_middle_eastern
    small_masjid_shia_middle_eastern_desc
    small_masjid_shia_middle_eastern_desc_short
    small_masjid_shia_eastern_european_desc
    small_masjid_shia_eastern_european_desc_short
    small_masjid_shia_greek_desc
    small_masjid_shia_greek_desc_short
    small_masjid_shia_southern_european_desc
    small_masjid_shia_southern_european_desc_short
    masjid_shia
    masjid_shia_desc
    masjid_shia_desc_short
    masjid_shia_northern_european_desc
    masjid_shia_northern_european_desc_short
    masjid_shia_mesoamerican_desc
    masjid_shia_mesoamerican_desc_short
    masjid_shia_middle_eastern
    masjid_shia_middle_eastern_desc
    masjid_shia_middle_eastern_desc_short
    masjid_shia_eastern_european_desc
    masjid_shia_eastern_european_desc_short
    masjid_shia_greek_desc
    masjid_shia_greek_desc_short
    masjid_shia_southern_european_desc
    masjid_shia_southern_european_desc_short
    minareted_masjid_shia
    minareted_masjid_shia_desc
    minareted_masjid_shia_desc_short
    minareted_masjid_shia_northern_european_desc
    minareted_masjid_shia_northern_european_desc_short
    minareted_masjid_shia_mesoamerican_desc
    minareted_masjid_shia_mesoamerican_desc_short
    minareted_masjid_shia_middle_eastern
    minareted_masjid_shia_middle_eastern_desc
    minareted_masjid_shia_middle_eastern_desc_short
    minareted_masjid_shia_eastern_european_desc
    minareted_masjid_shia_eastern_european_desc_short
    minareted_masjid_shia_greek_desc
    minareted_masjid_shia_greek_desc_short
    minareted_masjid_shia_southern_european_desc
    minareted_masjid_shia_southern_european_desc_short
    jama_shia
    jama_shia_desc
    jama_shia_desc_short
    jama_shia_northern_european_desc
    jama_shia_northern_european_desc_short
    jama_shia_mesoamerican_desc
    jama_shia_mesoamerican_desc_short
    jama_shia__shiamiddle_eastern
    jama_shia_middle_eastern_desc
    jama_shia_middle_eastern_desc_short
    jama_shia_eastern_european_desc
    jama_shia_eastern_european_desc_short
    jama_shia_greek_desc
    jama_shia_greek_desc_short
    jama_shia_southern_european_desc
    jama_shia_southern_european_desc_short
    great_jama_shia
    great_jama_shia_desc
    great_jama_shia_desc_short
    great_jama_shia_northern_european_desc
    great_jama_shia_northern_european_desc_short
    great_jama_shia_mesoamerican_desc
    great_jama_shia_mesoamerican_desc_short
    great_jama_shia_middle_eastern
    great_jama_shia_middle_eastern_desc
    great_jama_shia_middle_eastern_desc_short
    great_jama_shia_eastern_european_desc
    great_jama_shia_eastern_european_desc_short
    great_jama_shia_greek_desc
    great_jama_shia_greek_desc_short
    great_jama_shia_southern_european_desc
    great_jama_shia_southern_european_desc_short
    DESCR_STRAT.TXT

    Code:
     
    faction egypt, balanced smith
    ai_label shia 
    denari 8000
    denari_kings_purse 1500
    settlement
    {
     level large_city
     region Egypt
     year_founded 0
     population 41500
     plan_set default_set
     faction_creator egypt
     building
     {
      type core_building large_stone_wall
     }
     building
     {
      type hinterland_farms farms+1
     }
     building
     {
      type barracks town_guard
     }
     building
     {
      type temple_shia minareted_masjid_shia
     }
     building
     {
      type city_hall council_chambers
     }
     building
     {
      type market market
     }
     building
     {
      type hinterland_roads roads
     }
     building
     {
      type port port
     }
    }
    settlement
    {
     level city
     region Nile_Delta
     year_founded 0
     population 20000
     plan_set default_set
     faction_creator egypt
     building
     {
      type core_building stone_wall
     }
     building
     {
      type hinterland_farms farms+1
     }
     building
     {
      type barracks town_guard
     }
     building
     {
      type temple_shia masjid_shia
     }
     building
     {
      type city_hall council_chambers
     }
     building
     {
      type market corn_exchange
     }
     building
     {
      type hinterland_roads roads
     }
     building
     {
      type port port
     }
    }
    settlement
    {
     level town
     region Cyrenaica
     year_founded 0
     population 1340
     plan_set default_set
     faction_creator egypt
     building
     {
      type core_building wooden_pallisade
     }
    }
    settlement
    {
     level town
     region Upper_Egypt
     year_founded 0
     population 1800
     plan_set default_set
     faction_creator egypt
     building
     {
      type core_building wooden_pallisade
     }
     building
     {
      type hinterland_farms farms
     }
     building
     {
      type barracks town_watch
     }
     building
     {
      type temple_shia small_masjid_shia
     }
    }
    settlement
    {
     level town
     region Gaza_Region
     year_founded 0
     population 3330
     plan_set default_set
     faction_creator egypt
     building
     {
      type core_building wooden_pallisade
     }
    }

  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Creating new buildings

    What happened to data\text\export_buildings?










  9. #9

    Default Re: Creating new buildings

    Code:
     
    {temple_shia_name}Mosques
    {small_masjid_shia}small_masjid_shia
    {small_masjid_shia_desc}DO NOT TRANSLATE
    {small_masjid_shia_desc_short}DO NOT TRANSLATE
    {small_masjid_shia_eastern_european_desc}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_eastern_european_desc_short}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_greek_desc}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_greek_desc_short}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_mesoamerican_desc}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_mesoamerican_desc_short}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_middle_eastern}Small Masjid
    {small_masjid_shia_middle_eastern_desc}Though producing imagery of people, the Holy Prophet and Allah Himself is against Islamic law, this has done nothing to prevent the Muslims from producing mosques that boast striking architecture and beautiful geometric artwork. This holds true, even for a poor town’s Small Masjid, where local Muslims meet daily for their prayers.
    {small_masjid_shia_middle_eastern_desc_short}A Small Masjid converts a very small percentage of the region to Islam, and improves happiness.
    {small_masjid_shia_northern_european_desc}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_northern_european_desc_short}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_southern_european_desc}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    {small_masjid_shia_southern_european_desc_short}DO NOT TRANSLATE - NOT MEANT FOR THIS CULTURE
    That's what the entries look like for that file, they're all spaced out so they're a bit difficult to copy/paste.

    Still I thought this file wasn't necessary for the game to load? shouldn't I just get the 'cannot display text' message or whatever it is if there was a problem in this file?

  10. #10
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Creating new buildings

    convert_to temple_muslim_castle
    Not sure if that doesn't clash in the EDB, you will need the castle line of the shia building if you reference it, and referenced it correctly.










  11. #11

    Default Re: Creating new buildings

    I since removed that line and it still crashes. I wasn't going to make a parallel castle line of the building because my mod only has cities.

    The only changes you can't see in my posts are that I also removed Egypt's entry in the original muslim_temple builings - could that be anything to do with it?

    I'm really stuck with this.

    EDIT: Also Egypt are still listed in the castle version of the muslim_temple buildings... could the issue be with their priests (presumably they can only have a priest of one kind of religion)?

    EDIT2: Adding Egypt to the original muslim_temple doesn't help either. Is there any extra files I need to edit since this is on Kingdoms (I'm using the Barebones mod folder)?

    EDIT3: Just to mention.. even though I made Egypt Shia in descr_sm_factions, the priests and temples still convert to the vanilla Islam religion, even though I don't think this should be the case...
    Last edited by Caledonian Rhyfelwyr; February 16, 2009 at 12:19 PM.

  12. #12

    Default Re: Creating new buildings

    Please help this is doing my head in!!!

  13. #13
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Creating new buildings

    1. Did you remove the 'convert to 1' and 'convert to 0' lines as well?
    2. Did you implement your religion as per one of tutorials?
    3. You can only have one religion per faction (unlike BI)










  14. #14

    Default Re: Creating new buildings

    1. I just tried that but it still crashes (it's just when the first screen with the game loading comes up - the guide here says that usually means a problem with EDB)
    2. Yeah the religions were working fine, I just can't add the buildings to them
    3. I made 'shia' the official religion for Egypt in descr_sm_factions. Do you mean religious buildings?

    Thanks for the help BTW, sorry I am so slow at this!

  15. #15
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Creating new buildings

    If you want to trace the error, remove the EDB entries by cut\paste into another document. If the error persists then it is somewhere else.
    Did you enter the religion in the descr_regions file for all settlements - and made sure the totals add up to 100?










  16. #16

    Default Re: Creating new buildings

    Yeah I've loaded the campaign fine with the religions I added, and I haven't changed their values since. But I will try your suggestion...

  17. #17
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Creating new buildings

    As others have said, always attack a problem piecemeal. Remove all new buildings except the first. Remove all text strings related to those buildings. Disregard ENUMs completely. Completely remove all new buildings from descr_strat.txt until things start to work.

    If it crashes still, please post the new building and text entries. Also make sure that the game runs fine without the building, and please confirm that when you put up your reply.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  18. #18

    Default Re: Creating new buildings

    Taking these building entries out of EDB did not work. I tried replacing all the edited files but I still get the same crash, I'm now really worried because I don't know what to do to save my mod - I'm sure I put back the only files I edited. I don't know what's going on here but I'm really stumped.

    EDIT: Phew, got things working again! Now I'll try it one step at a time...
    Last edited by Caledonian Rhyfelwyr; February 19, 2009 at 04:40 PM.

  19. #19

    Default Re: Creating new buildings

    Now that I've checked everythings working again OK, I edited the EDB again. Below is all that I have changed, I've touched no other files, and didn't remove Egyptian ownership of the normal Muslim_temple buildings.

    Code:
     
    building shia_mosque
    {
        religion shia
        levels mosque_one mosque_two mosque_three mosque_four mosque_five 
        {
            mosque_one city requires factions { egypt, } 
            {
                convert_to 0
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 1
                    religion_level bonus 2
                    agent_limit priest 1
                }
                material wooden
                construction  1 
                cost  800 
                settlement_min town
                upgrades
                {
                    mosque_two
                }
            }
            mosque_two city requires factions { egypt, } 
            {
                convert_to 1
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 1
                    religion_level bonus 4
                    agent_limit priest 1
                }
                material wooden
                construction  2 
                cost  1600 
                settlement_min large_town
                upgrades
                {
                    mosque_three
                }
            }
            mosque_three city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 2
                    religion_level bonus 6
                    agent_limit priest 2
                }
                material wooden
                construction  3 
                cost  3200 
                settlement_min city
                upgrades
                {
                    mosque_four
                }
            }
            mosque_four city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 2
                    religion_level bonus 8
                    agent_limit priest 2
                }
                material wooden
                construction  4 
                cost  6400 
                settlement_min large_city
                upgrades
                {
                    mosque_five
                }
            }
            mosque_five city requires factions { egypt, } 
            {
                capability
                {
                    agent priest  0  requires factions { egypt, } 
                    happiness_bonus bonus 3
                    religion_level bonus 10
                    agent_limit priest 2
                }
                material wooden
                construction  6 
                cost  10000 
                settlement_min huge_city
                upgrades
                {
                }
            }
        }
        plugins 
        {
        }
    }
    Does the above look OK?

  20. #20
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Creating new buildings

    That seems fine, just don't forget the castle line of the mosque.










Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •