Results 1 to 11 of 11

Thread: Making farms destructible

  1. #1

    Default Making farms destructible

    I've searched for over an hour for information on this subject so please forgive me if this has been answered before.

    I carefully read the EDB guides I could find for clues about making farms destructible. All I could find was a vague indication that you might be able to remove the word "hinterland_" from the beginning of the building tree in the EDB file.

    I've tried that, and when I go to test it in a campaign, the game kicks me back to the selection screen to choose single player, Imperial campaign, etc.

    I tried changing the names in data/text/export_buildings.txt to match, same error.

    I tried also changing the names in the enums file in /data, same error.

    What am I doing wrong? Is there some easy way to toggle whether farms are destructible?

    Thanks for any help!

    Scott

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

    Default Re: Making farms destructible

    Turn on -show_err on the target line of your Rome shortcut and it might give you an error message telling you where the error is.

    Keep in mind that if you change EDB there are many other files that make use of the information there and need to be changed if changes are made to EDB. My guess is you haven't changed the references to the farms in any of descr_stat, export_descr_character_traits, export_descr_ancillaries, export_descr_advice, and probably a few other files I can't remember. Also if you changed the name of any of the building level then you need to rename all the pictures that go with the building levels that had their name changed or provide new name mapping in descru_ui_buildings.

    EDIT: The easiest way to find which files you'll need to change is to do a search on your data directory for files which have the original name of the buiding as content, then one by one open those files and update the name. This of course won't help with the image issue if that came up.
    Last edited by Squid; 03-13-2008 at 18:12.

    -Trait/Ancillary/Building Editor

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

  3. #3

    Default Re: Making farms destructible

    I had a similar problem today, and the error message will not show till you exit RTW.
    Owner and Operater of PC and Console Games forum.

  4. #4

    Default Re: Making farms destructible

    The most likely problem is that when a game loads up it checks desc_strat.txt in the campaign folder. You have to remove "hinterland" from every farm reference in every city. The UI pictures don't mention "hinterland", so you're ok there, unless you change the name of the farm building levels.

  5. #5

    Default Re: Making farms destructible

    GaiulsJulius that did the trick, thanks so much for that little bit of knowledge, it really made my day!!!


    And thanks to the others who tried to help as well, it's really cool that there is a place for people like me to ask these questions to people who will take the time to try to answer them. So, thanks!

  6. #6

    Default Re: Making farms destructible

    @ scott2978: No problem, I'm just glad you got it working! It can be very frustrating.

  7. #7

    Default Re: Making farms destructible

    So how do I make the palace building destructible? Or any other undestructible building? I am playing this mod where there is this one custom-made religious building that is not destructible and it's messing up the population contentment. So what are the tags that makes a building undestructible? (it's not a farm nor a palace nor a road)
    Last edited by ThePianist; 02-16-2009 at 06:42.
    Finished EB campaigns:
    Sweboz 1.0

  8. #8

    Default Re: Making farms destructible

    The "core" buildings cannot become destructible. The rest can, by removing the "hinterland_" prefix the trees have in their entry's name in export_descr_buildings.txt. (You will then need to edit any other references to those building trees in other files)

    Mods however might be using indestructible buildings as markers or to block a specific type of crash, so you should probably not change it.
    Last edited by Aradan; 02-16-2009 at 12:55.

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

  9. #9

    Default Re: Making farms destructible

    Thanks to your help, I found the building:
    The lines of code in export_descr_buildings is here. It looks like a lot, but only a few lines are relevant:

    building hinterland_unique2
    {
    levels unique_base_2 villa_jovis muro_pianto constantine_column grotta_ercole carthage_bath terme_caracalla
    {
    unique_base_2 requires factions { roman, } and hidden_resource no_access
    {
    capability
    {
    }
    construction 1
    cost 400
    settlement_min city
    upgrades
    {
    villa_jovis
    muro_pianto
    constantine_column
    grotta_ercole
    carthage_bath
    terme_caracalla
    }
    }
    villa_jovis requires factions { roman, } and hidden_resource capri
    {
    capability
    {
    law_bonus bonus 5
    happiness_bonus bonus 3
    }
    construction 6
    cost 6400
    settlement_min city
    upgrades
    {
    }
    }
    muro_pianto requires factions { roman, } and hidden_resource jerusalem
    {
    capability
    {
    religious_belief judaism 5
    happiness_bonus bonus 3
    }
    construction 5
    cost 2200
    settlement_min city
    upgrades
    {
    }
    }

    ........(some other code).....
    }
    plugins
    {
    }
    }


    This muro_pianto, I would like to make it a destructible building, like how the Acropolis in EB can be destroyed. Otherwise I'd have to take jerusalem again and again to keep it in the ERE and i don't want to do that. The building gives +5 of Judaism, and there are 5 surrounding Christian provinces. Extra unrest of +85% and the population is growing nearing 24000.


    I would like to make a new building class, only for that building. I would first remove all the muro_pianto lines from the previous paragraph, then:

    building specialbuilding
    {
    levels unique_base_100 muro_pianto
    {
    unique_base_100 requires factions { roman, } and hidden_resource no_access
    {
    capability
    {
    }
    construction 1
    cost 400
    settlement_min city
    upgrades
    {
    muro_pianto
    }
    }
    }


    muro_pianto requires factions { roman, } and hidden_resource jerusalem
    {
    capability
    {
    religious_belief judaism 5
    happiness_bonus bonus 3
    }
    construction 5
    cost 2200
    settlement_min city
    upgrades
    {
    }
    }
    }
    }

    That's merely the original paragraph with all the other buildings removed, only muro_pianto remaining, with a new building class "specialbuilding" and a new building level "unique_base_100"

    and I add this paragraph to export_decr_buildings.txt
    I add specialbuilding to:
    export_descr_buildings
    export_buildings
    export_descr_buildings_enums
    descr_strat (modifying it accordingly in the jerusalem paragraph)

    I add unique_base_100 to:
    export_descr_buildings
    export_descr_buildings_enums
    export_buildings


    Do I seem to be doing things correctly?
    Last edited by ThePianist; 02-17-2009 at 06:46.
    Finished EB campaigns:
    Sweboz 1.0

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

    Default Re: Making farms destructible

    I haven't checked in detail, looks like you've got right idea, you need to check descr_strat for all instances of hinterland_unique2... and simpler way to fix your problem might be to just to comment out or remove the religious_belief line

    if you definitely want to destroy the building search the EB script (in data/scripts/show_me)
    for any reference to muro_pianto in case that building is needed for something in the running of the script
    Not used mods before? Looking for something small and fun?!
    Download the:

  11. #11

    Default Re: Making farms destructible

    Quote Originally Posted by Makanyane View Post
    and simpler way to fix your problem might be to just to comment out or remove the religious_belief line
    Woohoo, I never thought of that one and it is so simple! Thanks a lot!
    Finished EB campaigns:
    Sweboz 1.0

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