; 注:红色部分为月份脚本依次为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
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
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
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
and I_TurnNumber >= 32
give_everything_to_faction hre moors true
console_command kill_faction hre
historic_event CHANGERELMOORS
terminate_monitor
end_monitor
7,建立南明脚本
注:如果我不是史可法 (maratha) 几率小于50 我不是大明 大明城市小于等于1
回合大于24回合
北京不属于大明
满足上述条件将触发南明建立脚本
monitor_event FactionTurnEnd FactionType maratha
and not FactionIsLocal
and RandomPercent < 50
and I_IsFactionAIControlled papal_states
and I_NumberOfSettlements papal_states >= 1
and I_TurnNumber >= 24
and not I_SettlementOwner C-0101-b-BeiPing = papal_states
give_everything_to_faction maratha papal_states true
historic_event CHANGERELTURKS
terminate_monitor
end_monitor
monitor_event PreFactionTurnStart FactionIsLocal
and I_LocalFaction papal_states 如果我是明朝
and I_TurnNumber >= 18 大于等于18个回合
and RandomPercent < 50 几率小于百分之50
and not I_SettlementOwner C-1302-b-JianYe = papal_states 南京不属于大明
and not I_SettlementOwner C-0701-b-XvChang = papal_states 开封不属于大明
;;;;;;;;;;;;;;;;;;;;;;武将来投;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;郑成功 monitor_event SettlementTurnStart SettlementName C-1310-b-JianAn and SettlementIsLocal and I_NumberOfSettlements poland < 1 and not I_CharacterExists M-18-0445-Xm and I_LocalFaction papal_states
if I_LocalFaction papal_states spawn_army faction papal_states