Сообщество Империал: Экономический скрипт Medieval 2: Total War - Сообщество Империал

Danya82

Экономический скрипт Medieval 2: Total War

Экономический скрипт Medieval 2: Total War
Тема создана: 16 августа 2019, 03:26 · Автор: Danya82
 Danya82
  • Imperial
Imperial
Форумчанин

Дата: 16 августа 2019, 03:26

Imp


Я написал экономический скрипт для АИ с целью уберечь АИ от ухода в минус по деньгам. Вот этот скрипт, variable заменяется на название фракции с помощью репликатора, атрибут disband проставляется в EDU:

Экономический скрипт (Раскрыть)


Но, мне сказали, что команда freeze_recruit_pool all работает для всех фракций, и соответственно неприменима.
С другой стороны из другого экономического скрипта я почерпнул вот это:

if I_CompareCounter turn_fid = 14
destroy_units milan, mercenary_unit
add_money milan -2147478647
add_money milan 2147483647
add_money milan 101
set_counter freeze_milan 0
set_event_counter freeze_recr_pool 1
end_if

То есть, если я напишу set_event_counter freeze_recr_pool 1, это будет работать?
     Dart Kovu Nazgul
    • Imperial
    Imperial
    Гранд-мофф

    Дата: 17 августа 2019, 13:12

    Danya82

    команда freeze_recruit_pool all работает для всех фракций

    На сколько я помню эта команда привязана не к фракциям а к провинциям. :038:
    т.е. префикс all в данном случаи сбросит найм во всех провинциях

    - - - Сообщение автоматически склеено - - -

    Danya82

    То есть, если я напишу set_event_counter freeze_recr_pool 1

    В данном случаи :
    - set_event_counter - это команда со счётчиком
    - freeze_recr_pool - это ПРОИЗВОЛЬНОЕ (придуманное авторами) имя счётчика
    - 1 - числовое значение в которое, этой строкой, введён счётчик

    Я так понимаю, вы решили что тут имеет какое то значение ПРОИЗВОЛЬНОЕ имя, но при желании эта строка могла выглядеть так:
    set_event_counter zamarozka_naima 1
       Danya82
      • Imperial
      Imperial
      Форумчанин

      Дата: 17 августа 2019, 17:37

      Но в campaign_script есть только вот что:

      monitor_event PreFactionTurnStart

      set_counter turn_fid 0
      set_event_counter CatholicLithuania 0
      set_counter christian_faction 0

      if I_CompareCounter new_fturn = 1
      set_event_counter is_the_ai 1
      end_if
      set_counter new_fturn 1

      set_event_counter freeze_recr_pool 0
      set_event_counter citadel_boost 0
      set_event_counter hanseatic_count -1 ; "Hanseatic System"

      ;--- "Faction Leader Global Traits"
      set_event_counter thinks_of_his_people 0
      set_event_counter wise_administrator 0
      set_event_counter strictly_religious 0
      set_event_counter protector 0
      set_event_counter merchant_skills 0
      set_event_counter greedy_ruler 0
      set_event_counter shady_connections 0

      end_monitor

      И вот это:

      if I_CompareCounter turn_fid = 1
      destroy_units egypt, mercenary_unit
      add_money egypt -2147478647
      add_money egypt 2147483647
      add_money egypt 101
      set_counter freeze_egypt 0
      set_event_counter freeze_recr_pool 1

      Я не понимаю, как этот счетчик привязывается к найму
         Frei von Sorgen
        • Imperial
        Imperial
        Форумчанин

        Дата: 17 августа 2019, 17:50


        Гляньте ЕДБ, прогоните поиском по названию ивента. Скорее всего там доступность найма войск подвязана на этот счётчик.
           Danya82
          • Imperial
          Imperial
          Форумчанин

          Дата: 17 августа 2019, 19:38

          Вот, спасибо. А в каком файле может использоваться freeze_milan, к примеру?
             Dart Kovu Nazgul
            • Imperial
            Imperial
            Гранд-мофф

            Дата: 17 августа 2019, 23:00

            Danya82

            А в каком файле может использоваться freeze_milan, к примеру?

            Если вы о замарозке действий фракции, фактически отключении её ИИ то команда следующая
            - freeze_faction_ai milan
            - unfreeze_faction_ai milan
            Правда что она конкретно морозит, а что нет, я не знаю. :038:
               Danya82
              • Imperial
              Imperial
              Форумчанин

              Дата: 11 сентября 2019, 15:22

              Вот, выкладываю экономический скрипт, который я сделал и с которым сейчас играю, хочу узнать мнение моддеров (особенно Булаток), насколько он хорош. variable это для GED's script replicator, который здесь нужно использовать:

              monitor_event PreFactionTurnStart FactionType variable
              set_event_counter Faction_Turn_variable 1
              log always Turn Start variable
              end_monitor
              
              
              monitor_event FactionTurnEnd FactionType variable
              set_event_counter Faction_Turn_variable 0
              log_always Turn End variable
              end_monitor
              
              
              monitor_event PreFactionTurnStart
              and I_IsFactionAIControlled
              and FactionIncome > 0
              if I_Event_Counter Faction_Turn_variable 1
              freeze_recruit_pool all false
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and Treasury < 1500
              and FactionIncome < 0
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and Treasury < 2500
              and FactionIncome < -500
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and Treasury < 4000
              and FactionIncome < -1000
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and Treasury < 6000
              and FactionIncome < -1750
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and Treasury < 9000
              and FactionIncome < -2750
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and Treasury < 13500
              and FactionIncome < -4000
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              declare_counter treasury
              
              
              monitor_event PreFactionTurnStart 
              and Treasury < 1500
              if I_Event_Counter Faction_Turn_variable 1
              set_counter treasury 1
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and Treasury < 2500
              if I_Event_Counter Faction_Turn_variable 1
              set_counter treasury 2
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and Treasury < 4000
              if I_Event_Counter Faction_Turn_variable 1
              set_counter treasury 3
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and Treasury < 6000
              if I_Event_Counter Faction_Turn_variable 1
              set_counter treasury 4
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and Treasury < 9000
              if I_Event_Counter Faction_Turn_variable 1
              set_counter treasury 5
              end_if
              end_monitor
              
              
              monitor_event PreFactionTurnStart 
              and Treasury < 13500
              if I_Event_Counter Faction_Turn_variable 1
              set_counter treasury 6
              end_if
              end_monitor
              
              
              monitor_event AddedToTrainingQueue 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and FactionIncome < 0
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              and I_CompareCounter treasury = 1
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event AddedToTrainingQueue 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and FactionIncome < -500
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              and I_CompareCounter treasury = 2
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event AddedToTrainingQueue 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and FactionIncome < -1000
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              and I_CompareCounter treasury = 3
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event AddedToTrainingQueue 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and FactionIncome < -1750
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              and I_CompareCounter treasury = 4
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event AddedToTrainingQueue 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and FactionIncome < -2750
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              and I_CompareCounter treasury = 5
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event AddedToTrainingQueue 
              and I_IsFactionAIControlled 
              and not IsCrusadeTargetFaction
              and not IsJihadTargetFaction
              and FactionIncome < -4000
              if I_Event_Counter Faction_Turn_variable 1
              and not I_FactionBesieged variable
              and I_CompareCounter treasury = 6
              freeze_recruit_pool all true
              end_if
              end_monitor
              
              
              monitor_event FactionTurnEnd 
              and I_IsFactionAIControlled
              and Treasury < 0
              and I_CompareCounter month == 1
              if I_Event_Counter Faction_Turn_variable 1
              destroy_units variable disband_3
              end_if
              end_monitor
              
              
              monitor_event FactionTurnEnd 
              and I_IsFactionAIControlled
              and Treasury < 0
              and I_CompareCounter month == 2
              if I_Event_Counter Faction_Turn_variable 1
              destroy_units variable disband_4
              end_if
              end_monitor
              
              
              monitor_event FactionTurnEnd 
              and I_IsFactionAIControlled
              and Treasury < 0
              and I_CompareCounter month == 3
              if I_Event_Counter Faction_Turn_variable 1
              destroy_units variable disband_5
              end_if
              end_monitor
                 Danya82
                • Imperial
                Imperial
                Форумчанин

                Дата: 15 сентября 2019, 21:48

                Извините, кто-нибудь может проверить мой экономический скрипт на ошибки? Заранее благодарен.
                   Danya82
                  • Imperial
                  Imperial
                  Форумчанин

                  Дата: 20 сентября 2019, 02:35

                  Новая версия
                  Спойлер (раскрыть)
                  При таком скрипте у компьютера практически нет шансов уйти в минус, а деньжат ему можно добавлять постепенно через консольную команду.
                     Похожие Темы
                    TСледующая игра в серии TW после Total War: Pharaoh
                    Гадаем на кофейной гуще
                    Автор T Thel
                    Обновление 15 мин. назад
                    СTotal War на каналах Thanatis'a
                    все о Total War от Thanatis'a
                    Автор T Thanatis
                    Обновление 21 мин. назад
                    TОбсуждение Total War: Pharaoh
                    Очередная часть серии игр Total War
                    Автор T Totmekr
                    Обновление 33 мин. назад
                    Воспользуйтесь одной из соц-сетей для входа
                    РегистрацияВход на форум 
                    «Империал» · Условия · Ответственность · Визитка · 16 апр 2024, 09:08 · Зеркала: Org, Site, Online · Счётчики