Results 1 to 6 of 6

Thread: Unattackable Settlement

  1. #1

    Default Unattackable Settlement

    in some version of De Bello Mundi there's this script that basically prevents you from being able to click with your cursor on Rome thus preventing you from attacking it, but i am not sure it works for AI aswell, i also vaguely remember a mod where you couldnt attack an ally until you sent a diplomat to break the alliance

    Is it possible to make a settlement unattackable by both player and AI ? until certain conditions have been met, and what is a good, cheap and effective way to do it ?

    to give an example what i am trying to do specifically is to make Carthage unattackable until all other settlements owned by carthage have been taken

  2. #2
    Nikiforos XMike's Avatar Tiro
    Join Date
    Sep 2013
    Location
    always on Holy Ground
    Posts
    199

    Default Re: Unattackable Settlement

    this is the script from DBM which restricts the area around Rome:

    ;;;;;16) ROMAN CIVIL WAR SCRIPT


    monitor_event FactionTurnStart FactionIsLocal
    and FactionReligion catholic
    and not FactionExcommunicated
    if I_EventCounter triumph_counter < 1
    ;117=roma
    restrict_clickable_area 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
    end_if
    end_monitor


    monitor_event FactionExcommunicated FactionIsLocal
    ;117=roma
    restrict_clickable_area 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
    end_monitor


    monitor_event FactionExcommunicated FactionIsLocal
    and not I_IsFactionAIControlled romani
    and RandomPercent < 33
    faction_emerge papal_states romani 5 100.0 300.0 0.9 town false rebel1 Amulius 42
    create_unit rebel1, Samnites_Hoplite, num 9, exp 3, arm 0, wep 0
    set_faction_standing romani papal_states -0.8
    set_faction_standing papal_states romani -0.8
    historic_event guerra_civile
    end_monitor


    monitor_event FactionTurnStart FactionIsLocal
    and not I_IsFactionAIControlled romani
    and FactionReligion catholic
    and FactionExcommunicated
    if I_NumberOfSettlements papal_states = 0
    historic_event impero_romano
    end_if
    terminate_monitor
    end_monitor


    monitor_event FactionExcommunicated FactionIsLocal
    and I_SettlementOwner Roma = papal_states
    create_unit Roma, Samnites_Heavy_Cavalry, num 2, exp 1, arm 0, wep 0
    create_unit Roma, Roman_Equites, num 2, exp 1, arm 0, wep 0
    create_unit Roma, Roman_Principes, num 2, exp 1, arm 0, wep 0
    create_unit Roma, Roman_Militia, num 2, exp 1, arm 0, wep 0
    create_unit Roma, Roman_Archer, num 2, exp 1, arm 0, wep 0
    create_unit Roma, Roman_Velites, num 2, exp 1, arm 0, wep 0
    create_unit Roma, Roman_Hastato, num 2, exp 1, arm 0, wep 0
    create_unit Roma, Roman_Triaro, num 2, exp 1, arm 0, wep 0
    end_monitor

  3. #3
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Unattackable Settlement

    It doesnt work for AI afaik, only for players

  4. #4
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Unattackable Settlement

    Anyway, this command is utterly broken, see http://www.twcenter.net/forums/showt...rea%92-Command

    it pretty much makes the sea inaccessible, hence a huge issue

  5. #5
    bitterhowl's Avatar Campidoctor
    Join Date
    Feb 2011
    Location
    Russian Feodality
    Posts
    1,695

    Default Re: Unattackable Settlement

    I use same script for my Westeros mod and it works just fine. Sea region is 0 so it's acceptable with restrict command.

    My sister, do you still recall the blue Hasan and Khalkhin-Gol?
    Russian warship is winning. Proofs needed? Go find yourself!

  6. #6
    Jadli's Avatar The Fallen God
    Gaming Emeritus

    Join Date
    Dec 2013
    Location
    Czech Republic
    Posts
    8,528

    Default Re: Unattackable Settlement

    Ah, I see, great! I guess the originals threads didnt know about the method where you write the regions as numbers

Posting Permissions

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