Results 1 to 9 of 9

Thread: Destructable Defenses

  1. #1

    Question Destructable Defenses

    Does anyone know how to make walls destructable from the campaign map? I love playing as barbarians but hate occupying settlements with higher than lvl 3 defenses. If anyone could explain to me how to edit that I would be extremely grateful.

  2. #2
    Honorary Argentinian Senior Member Gyroball Champion, Karts Champion Caius's Avatar
    Join Date
    Aug 2006
    Location
    I live in my home, don't you?
    Posts
    8,114

    Default Re: Destructable Defenses

    Welcome to the otg!
    I dont know any solution for you




    Names, secret names
    But never in my favour
    But when all is said and done
    It's you I love

  3. #3
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Destructable Defenses

    Welcome to the .org Ghengis.

    Can't walls be demolished in the normal way? (Other click then press the demolish button)

  4. #4
    Assistant Mod Mod Member GiantMonkeyMan's Avatar
    Join Date
    May 2005
    Location
    plymouth - scrubbing Beirut's toilet with a cat...
    Posts
    886

    Default Re: Destructable Defenses

    i think it is hard-coded, walls connot be destroyed normally on the campaign map and i don't think that there is any other way to do it... it is like government buildings/roads in that you can't get rid of them

    sorry
    GMM

  5. #5
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Destructable Defenses

    Well I never knew that...

  6. #6

    Default Re: Destructable Defenses

    I found out with BI, if only you could destroy the walls on those WRE inner empire cities that are prone to rebellion, life would be easier. Somewhere someone told me how to change a file so you could destroy normally indestructable campaign buildings... ill try to remember.
    Hegemonia Lead Modeller.

  7. #7
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Post Re: Destructable Defenses

    One thing you could do would be to use the damage_wall console command in a background script. Each time this command is used with the "breach" switch, a breach is created in a randomly selected wall. For instance, suppose your script contains event monitors (one for each settlement) like this:

    Code:
    monitor_event GeneralCaptureSettlement SettlementName Rome
        and FactionIsLocal
        and SettlementBuildingExists >= stone_wall
        console_command damage_wall Rome breach
        console_command damage_wall Rome breach
    end_monitor
    Then, if one of your armies captures Rome, 2 breaches are automatically created in the city's walls. The damage to the walls can be repaired, but doesn't have to be. If you're attacked, the enemy will try to attack through the breaches. This means that there won't be any siege of course.

    I've tested the damage_wall console command in a script and it works as advertised. The rest of the script above hasn't been tested but must be mostly correct. If anyone is interested, I'll make sure it (or something similar to it) works.

    [EDIT: fixed a couple of problems with the script]
    Last edited by Atilius; 09-21-2006 at 21:18.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



  8. #8

    Default Re: Destructable Defenses

    I'd be interested!
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  9. #9
    Bibliophilic Member Atilius's Avatar
    Join Date
    Oct 2005
    Location
    America Medioccidentalis Superior
    Posts
    3,837

    Default Re: Destructable Defenses

    I did some testing with the following script:

    Code:
    script
    
    declare_counter loop_counter
    set_counter loop_counter=0
    
    monitor_event GeneralCaptureSettlement SettlementName Arretium
        and FactionCultureType barbarian
        and SettlementBuildingExists >= stone_wall
        console_command damage_wall Arretium breach
        console_command damage_wall Arretium breach
    end_monitor
    
    while compare_counter loop_counter=0
    end_while
    
    end_script
    This script will cause a couple of breaches in Arretium's walls if it's captured by a barbarian faction and the city has any level stone walls. It could be made faction specific by replacing

    Code:
        and FactionCultureType barbarian
    with

    Code:
        and FactionType germans
    As expected, the script caused a couple breaches in Arretium's (stone) walls when I captured the city playing as the Germans. The Romans laid seige to the city soon after. I didn't really expect this: I thought they would immediately attack through the breaches. Instead, they built a ram, some ladders, and a siege tower. A few turns later they attacked using only the siege tower, but most of their troops poured through the breach. (The other breach was on the opposite side of the city.) I was able to repel the attack and another army attacked a few turns later, having built a couple of rams. As usual, fire from my towers set the rams alight and the troops attacked through the breach again.

    It might be worthwhile to repeat this experiment making more breaches in the walls. Perhaps this would induce the attackers to attack without building seige engines first.

    Here's a short discussion on extending the above script to work for all settlements on the map:

    In order to make this work for ALL settlements, an event monitor would be required for every settlement. There's also problem with the line

    Code:
    monitor_event GeneralCaptureSettlement SettlementName Narbo Martius
    or for the event monitor for any two-word settlement name. The SettlementName condition requires the name string (not the name "tag") but fails to parse the string correctly if it consists of two words. The solution for Narbo Martius to use
    Code:
    monitor_event GeneralCaptureSettlement region_id=43
    instead. You can determine what a settlement's region_id is using the show_cursorstat console command.

    Fortunately, the damage_wall console command accepts the settlement name "tag", so it's satisfied with Narbo_Martius. (Appropriate settlement name "tags" are found enclosed in curly braces in the file text\imperial_campaign_region_and_settlement_names.txt)
    Last edited by Atilius; 09-21-2006 at 21:19.
    The truth is the most valuable thing we have. Let us economize it. - Mark Twain



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