回到
顶部
意见
反馈
首页 > Mod工坊 > 全面战争 > 游戏攻略 > 中世纪2 > 汉魂3.0:汉魂全面战争脚本详解

汉魂3.0:汉魂全面战争脚本详解

2016-08-17 14:12:08| 来源: 佚名 |   已有[ ]人前来看过    | 已有[ ]人评论

汉魂全面战争3.0以及发布了,感谢大家一直对汉魂MOD网的支持,在此我们特别制作发布汉魂3脚本详解教程,此脚本方便大家更好的体验汉魂3.0
方便各位修改。注:此脚本通用所有中世纪2全面战争,故也作为中世纪2全面战争脚本修改教程友情发布!


1.关于一年八回合脚本

;----------8回合1年-----------

  declare_counter month
  set_counter month 1


;
注:红色部分为月份脚本依次为1-8个月
monitor_event FactionTurnStart FactionIsLocal ; set the season for each month
                        if I_CompareCounter month == 1 ;
                console_command season summer
                        end_if

                        if I_CompareCounter month == 2 ;
                console_command season summer
                        end_if
                        
                        if I_CompareCounter month == 3 ;
                console_command season summer
                        end_if

                        if I_CompareCounter month == 4 ;
                console_command season summer
                        end_if
                        
                        if I_CompareCounter month == 5 ;
                console_command season summer
                        end_if                        

                        if I_CompareCounter month == 6 ;
                console_command season summer
                        end_if
                        
                        
                        if I_CompareCounter month == 7 ;
                console_command season winter
                        end_if                        
                        
                        if I_CompareCounter month == 8
                console_command season winter
                        end_if                        
                        

;
注:第九个月为第二年的开始脚本运行                        
                        inc_counter month 1 ;advance the month
                        if I_CompareCounter month == 9 ;start a new year
                                                set_counter month 1  
                        end_if

end_monitor
注:脚本的意思的小于8回合天气为夏天,各位玩过全战的人都知道,冬天之后就是新的一年,故而,前面8个回合必须强制在夏天!
monitor_event FactionTurnEnd FactionType slave
                        and I_CompareCounter month < 8
                        console_command season summer
end_monitor



;注:end_monitor 为脚本结束语句


2.年龄脚本需要配合年份脚本一起运行
;;;年龄trait;;;
  monitor_event FactionTurnStart FactionIsLocal
        if I_CompareCounter month == 1
        set_event_counter DESCR 1
  end_if
        if I_CompareCounter month == 2
        set_event_counter DESCR 1
  end_if
        if I_CompareCounter month == 3
        set_event_counter DESCR 1
  end_if
        if I_CompareCounter month == 4
        set_event_counter DESCR 1
  end_if
        if I_CompareCounter month == 5
        set_event_counter DESCR 1
  end_if
        if I_CompareCounter month == 6
        set_event_counter DESCR 1
  end_if
        if I_CompareCounter month == 7
        set_event_counter DESCR 1
  end_if
        if I_CompareCounter month == 8
        set_event_counter DESCR 3
  end_if
        if I_CompareCounter month == 9
        set_event_counter DESCR 1
  end_if


        end_monitor  



注:代码与上述月份脚本相同不多做解释


3.外交脚本
;;;1) 外交脚本                        
        
;;;强制外交;;;
注:下面的代码含义是回合小于100回合那么强制papal_states(明朝)与 hre(孙传庭)结盟,也就是说,在100回合以内2个派系是强制同盟关系!
allied是同盟的代码同理下面的
war是战争的意思也就是说强制战争状态的意思


monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber < 100
console_command diplomatic_stance papal_states hre allied
console_command diplomatic_stance papal_states uzbek allied
console_command diplomatic_stance papal_states maratha allied
console_command diplomatic_stance papal_states sicily allied
console_command diplomatic_stance england saxons allied

end_monitor

注:以上为一段代码

monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber < 24
console_command diplomatic_stance papal_states france allied
console_command diplomatic_stance scotland maratha allied
console_command diplomatic_stance scotland uzbek allied
console_command diplomatic_stance hanhun_c maratha allied
console_command diplomatic_stance sulu uzbek allied
end_monitor

monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber < 40
console_command diplomatic_stance byzantium papal_states war
console_command diplomatic_stance moors papal_states war
console_command diplomatic_stance turks papal_states war
end_monitor

monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber < 16
console_command diplomatic_stance byzantium russia allied
console_command diplomatic_stance poland england allied
end_monitor

注:这里的代码含义是大于十二回合派系之间的关系变化
外交的友好度增加还是减少!
例如:set_faction_standing france papal_states -0.4 代码的含义就是关宁军与明朝在大于12回合后每回合减少0.4友好度!


monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber > 12
set_faction_standing france papal_states -0.4
set_faction_standing papal_states france -0.2
set_faction_standing france turks -1.0 
set_faction_standing turks france -1.0 
set_faction_standing france moors -1.0 
set_faction_standing moors france -1.0 
set_faction_standing france slave -1.0 
end_monitor

monitor_event FactionTurnStart FactionIsLocal
and I_TurnNumber > 32
and I_TurnNumber < 64
set_faction_standing byzantium france 1.0 
set_faction_standing france byzantium 1.0 
end_monitor




4.经济脚本

;;;2) 经济脚本

;;;劫掠;;;
注:以下代码是如果我是明朝那么每回合加400元
       如果我不是明朝那么每回合给明朝加1200元,以此类推,修改各自的派系代码即可!
monitor_event GeneralDevastatesTile FactionType papal_states
        if I_LocalFaction papal_states
                console_command add_money papal_states, 400
        end_if
        if not I_LocalFaction papal_states
                console_command add_money papal_states, 1200
        end_if
end_monitor



下面代码类同,只是加了个回合约束
        monitor_event FactionTurnStart not FactionIsLocal 
        and FactionType byzantium
        and I_TurnNumber < 96
        add_money byzantium, 3000
        end_monitor
        monitor_event FactionTurnStart FactionIsLocal
        and FactionType byzantium
        and I_TurnNumber < 32
        add_money byzantium, 23500
        end_monitor




;;;;负资金消除;;;
        monitor_event FactionTurnStart not FactionIsLocal
                and FactionType byzantium
                and Treasury < 0
                add_money byzantium, 20000
        end_monitor





5.下面是汉魂全面战争3.0的游戏脚本比较长,相同部分就省略了!
注:这里的脚本含义是回合大于等于24回合如果moors(大顺)是电脑and(和)明朝是电脑,和北京是明朝的,西安是大顺的
那么将触发脚本,给大顺添加50000元,以及刷出下列的兵种
;------------------------------------------------进军北京
monitor_event FactionTurnStart FactionIsLocal 
if I_TurnNumber >= 24
and I_IsFactionAIControlled moors
and I_IsFactionAIControlled papal_states
and  I_SettlementOwner C-0101-b-BeiPing = papal_states
and  I_SettlementOwner C-0901-b-ChangAn = moors
add_money moors 50000
spawn_army
faction moors
character        random_name, named character, age 23, x 235, y 314, label shunBJ1 ;注:这里的lable shunBJ1是作为一个变量,可以自己定义比如我可以定义为了label ming1,为的是作为下面脚本进攻部队的一个代码,好像是一个番号吧!作为记号使用!
traits  Jn1001 6 , Jn2000 1 , Jn3000 5 , Jn4000 6 , Jn5000 5 , jna1000 4 , jna2000 4 , JnA3000 3 , JnA4000 1 , JnA5000 1 , JnA6000 1 , JnB7000 2 , JnA8000 5 , JnA9000 8 , Jnxg4000 2 , B2120JnDB-A 1
unit                generalchuangjunjingruiqibing                        exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruidao                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruidao                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruidao                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruidao                                exp 1 armour 0 weapon_lvl 0
unit                shunjiangjun1                                exp 1 armour 0 weapon_lvl 0
unit                shunjiangjun1                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruigong                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruigong                                exp 1 armour 0 weapon_lvl 0
unit                dashunjingruidao                                        exp 1 armour 0 weapon_lvl 0
unit                dashunjingruidao                                        exp 1 armour 0 weapon_lvl 0
unit                dashunjingruidao                                        exp 1 armour 0 weapon_lvl 0
unit                dashunjingruidao                                        exp 1 armour 0 weapon_lvl 0
unit                Chuang_chosen_spearman                                exp 1 armour 0 weapon_lvl 0
unit                nongminpaotu                                exp 1 armour 0 weapon_lvl 0
unit                nongminpaotu                                exp 1 armour 0 weapon_lvl 0
unit                Chuang_bambard                                exp 1 armour 0 weapon_lvl 0
unit                Chuang_bambard                                exp 1 armour 0 weapon_lvl 0
        end

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''在此省略部分相同刷兵脚本代码

spawn_army
faction moors
character        random_name, named character, age 23, x 269, y 394, label shunBJ10
traits  Jn1001 6 , Jn2000 1 , Jn3000 5 , Jn4000 6 , Jn5000 5 , jna1000 4 , jna2000 4 , JnA3000 3 , JnA4000 1 , JnA5000 1 , JnA6000 1 , JnB7000 2 , JnA8000 5 , JnA9000 8 , Jnxg4000 2 , B2120JnDB-A 1
unit                generalchuangjunjingruiqibing                        exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruidao                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruidao                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruidao                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruidao                                exp 1 armour 0 weapon_lvl 0
unit                shunjiangjun1                                exp 1 armour 0 weapon_lvl 0
unit                shunjiangjun1                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruigong                                exp 1 armour 0 weapon_lvl 0
unit                chuangjunjingruigong                                exp 1 armour 0 weapon_lvl 0
unit                dashunjingruidao                                        exp 1 armour 0 weapon_lvl 0
unit                dashunjingruidao                                        exp 1 armour 0 weapon_lvl 0
unit                dashunjingruidao                                        exp 1 armour 0 weapon_lvl 0
unit                dashunjingruidao                                        exp 1 armour 0 weapon_lvl 0
unit                Chuang_chosen_spearman                                exp 1 armour 0 weapon_lvl 0
unit                nongminpaotu                                exp 1 armour 0 weapon_lvl 0
unit                nongminpaotu                                exp 1 armour 0 weapon_lvl 0
unit                Chuang_bambard                                exp 1 armour 0 weapon_lvl 0
unit                Chuang_bambard                                exp 1 armour 0 weapon_lvl 0

end

end_if


        terminate_monitor
        end_monitor

注:下面的脚本就是如果北京不是大顺的,那么shunbj1部队将强制进攻北京

end

        if I_CompareCounter QIANDU = 1
        and not I_SettlementOwner C-0101-b-BeiPing = moors
        siege_settlement shunBJ1, C-0101-b-BeiPing, maintain:保持进攻意识
        siege_settlement shunBJ1, C-0101-b-BeiPing, attack直接攻打城市
        end_if
        if I_CompareCounter QIANDU = 1
        and not I_SettlementOwner C-0105-b-FanYang = moors
        siege_settlement shunBJ2, C-0105-b-FanYang, maintain
        siege_settlement shunBJ2, C-0105-b-FanYang, attack
        end_if
        if I_CompareCounter QIANDU = 1
        and not I_SettlementOwner C-0303-b-Xindu = moors
        siege_settlement shunBJ3, C-0303-b-Xindu, maintain
        siege_settlement shunBJ3, C-0303-b-Xindu, attack
        end_if
        if I_CompareCounter QIANDU = 1
        and not I_SettlementOwner C-0305-b-ChangShan = moors
        siege_settlement shunBJ4, C-0305-b-ChangShan, maintain
        siege_settlement shunBJ4, C-0305-b-ChangShan, attack
        end_if
        if I_CompareCounter QIANDU = 1
        and not I_SettlementOwner C-0301-b-YeCheng = moors
        siege_settlement shunBJ5, C-0301-b-YeCheng, maintain
        siege_settlement shunBJ5, C-0301-b-YeCheng, attack
        end_if


terminate_monitor
end_monitor




6.;;;派系合并脚本,就是把一个势力的所有东西全部给另一个势力的脚本!;;;


;;;关宁军投降满清

        monitor_event FactionTurnEnd FactionType france
                and not FactionIsLocal;如果关宁军是电脑
                and I_TurnNumber >= 32;回合大于32
                and I_NumberOfSettlements france < 2;关宁军城市小于2
                and I_SettlementOwner C-0101-b-BeiPing = moors;北京城属于大顺军
                and I_IsFactionAIControlled byzantium;大清属于电脑势力
and RandomPercent < 50;触发几率小于百分之50

                give_everything_to_faction france byzantium true;将关宁军所有东西给予大清
                console_command kill_faction france;杀死关宁军这个派系
                historic_event WUDEFEAT ;触发吴三桂降清
                      terminate_monitor
        end_monitor

注:汉魂全面战争主要合并代码放出上同自己看
;;;派系合并;;;

;;;关宁军投降满清

        monitor_event FactionTurnEnd FactionType france
                and not FactionIsLocal
                and I_TurnNumber >= 32
                and I_NumberOfSettlements france < 2
                and I_SettlementOwner C-0101-b-BeiPing = moors
                and I_IsFactionAIControlled byzantium
and RandomPercent < 50

                give_everything_to_faction france byzantium true
                console_command kill_faction france
                historic_event WUDEFEAT 
                      terminate_monitor
        end_monitor

;;;李自成占领西安

        monitor_event FactionTurnEnd FactionType hre
                and not FactionIsLocal
                and I_TurnNumber >= 40
                and I_SettlementOwner C-0901-b-ChangAn = hre
                and I_IsFactionAIControlled moors
and RandomPercent < 60
                give_everything_to_faction hre moors true
                console_command kill_faction hre
                historic_event DESMUGHAL event/GXCA.bik
                      terminate_monitor
        end_monitor

;;;順攻灭明朝

        monitor_event FactionTurnEnd FactionType papal_states
               and not FactionIsLocal
               and I_SettlementOwner C-0101-b-BeiPing = papal_states
               and I_SettlementOwner C-0901-b-ChangAn = moors

               and I_IsFactionAIControlled moors
               and I_IsFactionAIControlled papal_states
               and I_NumberOfSettlements papal_states < 12
               and I_TurnNumber >= 32
               and RandomPercent < 50
                
                give_everything_to_faction papal_states moors true
                historic_event SHUNINVASION
                      terminate_monitor
        end_monitor

;;;江东镇投降满清

        monitor_event FactionTurnEnd FactionType portugal
                and not FactionIsLocal
                and I_TurnNumber >= 20
                and I_SettlementOwner C-0106-b-ChangLi = byzantium
                and I_IsFactionAIControlled byzantium
and RandomPercent < 50

                give_everything_to_faction portugal byzantium true
                console_command kill_faction portugal
                historic_event JIN_EREDE_EVENT
                      terminate_monitor
        end_monitor




;;;刘良佐投降满清

        monitor_event FactionTurnEnd FactionType hanhun_c
                and not FactionIsLocal
                and I_TurnNumber >= 30
                and I_SettlementOwner C-0704-b-ZhanChun = byzantium
                and I_IsFactionAIControlled byzantium
and RandomPercent < 50

                give_everything_to_faction hanhun_c byzantium true
                console_command kill_faction hanhun_c
                historic_event CHENGDISCO
                      terminate_monitor
        end_monitor

;;;刘泽清投降满清

        monitor_event FactionTurnEnd FactionType sulu
                and not FactionIsLocal
                and I_SettlementOwner C-0601-b-ChenLiu = byzantium
                and I_IsFactionAIControlled byzantium
and RandomPercent < 50

                and I_TurnNumber >= 30
                give_everything_to_faction sulu byzantium true
                console_command kill_faction sulu
                historic_event CHENGDIMIL
                      terminate_monitor
        end_monitor

;;;左梦庚投降满清

        monitor_event FactionTurnEnd FactionType scotland
                and not FactionIsLocal
                and I_IsFactionAIControlled byzantium
and RandomPercent < 50

                and I_SettlementOwner C-1302-b-JianYe = byzantium
                and I_TurnNumber >= 30
                give_everything_to_faction scotland byzantium true
                console_command kill_faction scotland
                historic_event ENGWAR
                      terminate_monitor
        end_monitor

;;;郑成功攻占台湾

        monitor_event FactionTurnEnd FactionType england
                and not FactionIsLocal
                and I_TurnNumber >= 80
                and I_SettlementOwner C-1310-b-JianAn = poland
                and I_SettlementOwner C-1608-b-MY-TaiWan = england
                and I_IsFactionAIControlled england

                give_everything_to_faction england poland true
                console_command kill_faction england
                historic_event UNZEN_ERUPT
                      terminate_monitor
        end_monitor



;;;李自成攻陷陕西

        monitor_event FactionTurnEnd FactionType hre
                and not FactionIsLocal
                and I_IsFactionAIControlled moors
                and I_SettlementOwner C-0901-b-ChangAn = moors






  • |
  • |

热门排行榜