性别保密
UID25220
库银 枚
好友
积分99
阅读权限95
在线时间 小时
最后登录1970-1-1
注册时间2010-12-12
|
本帖最后由 luckgaoan 于 2011-6-13 14:35 编辑
本贴目的是为了让喜欢修改的新童鞋少走弯路 先来说说历史战役脚本
打开bi\data\scripts\show_me script_12tpy_dates
我就以官渡之战来说明
- ;-------------------------------------------------------官渡之战
- monitor_event FactionTurnStart FactionType ostrogoths
- and I_TurnNumber < 59
-
- console_command diplomatic_stance ostrogoths lombardi allied
- end_monitor
- ;-------------------------------------------------------官渡之战
- monitor_event FactionTurnStart FactionType ostrogoths
- and I_TurnNumber > 59
- and I_NumberOfSettlements lombardi >= 1
- console_command diplomatic_stance ostrogoths lombardi war
- end_monitor
- ;-------------------------------------------------------官渡之战
- monitor_event FactionTurnStart FactionType lombardi
- and I_TurnNumber = 59
- and I_LocalFaction ostrogoths
- spawn_army
- faction lombardi
- character M-05-0023-Xm, general, age 25, x 119, y 118
- unit JiangJun_HeBei Aa
- unit Dageshi YuanShao
- unit Dageshi YuanShao
- unit Xiandengsishi YuanShao
- unit Xiandengsishi YuanShao
- unit Hebeichangqiangbin YuanShao
- unit Hebeichangqiangbin YuanShao
- unit Hebeichangqiangbin YuanShao
- unit Hebeichangqiangbin YuanShao
- unit Hebeizhongqibin YuanShao
- unit Hebeizhongqibin YuanShao
- unit Hebeizhongqibin YuanShao
- unit Hebeizhongqibin YuanShao
- unit Hebeizhongqibin YuanShao
- unit Hebeizhongbubin YuanShao
- unit Hebeizhongbubin YuanShao
- unit Hebeizhongbubin YuanShao
- unit Gongshou YuanShao
- unit Gongshou YuanShao
- unit Gongshou YuanShao
- end
- end_monitor
- ;-------------------------------------------------------官渡之战
- monitor_event FactionTurnStart FactionType ostrogoths
- and I_LocalFaction lombardi
- and I_TurnNumber = 59
- spawn_army
- faction ostrogoths
- character M-01-0003-Xm, named character, age 25, x 119, y 118
- unit JiangJun_ZhongYuan Aa
- unit Huben Wei
- unit Huben Wei
- unit Huben Wei
- unit Hubaoji Wei
- unit Hubaoji Wei
- unit Qinzou Wei
- unit Qinzou Wei
- unit Qinzou Wei
- unit Qinzou Wei
- unit Gongshou Wei
- unit Gongshou Wei
- unit Zhongyuanzhong Wei
- unit Zhongyuanzhong Wei
- unit Zhongyuanzhong Wei
- unit Zhongyuanzhongji Wei
- unit Zhongyuanzhongji Wei
- unit Zhongyuanchangqiang Wei
- unit Zhongyuanchangqiang Wei
- unit Zhongyuanchangqiang Wei
- end
- end_monitor
复制代码 这就是官渡之战的脚本了
解释一下
monitor_event FactionTurnStart FactionType ostrogoths
and I_TurnNumber < 59
console_command diplomatic_stance ostrogoths lombardi allied
end_monitor
曹操和袁绍在第60回合以前强制结盟
monitor_event FactionTurnStart FactionType ostrogoths
and I_TurnNumber > 59
and I_NumberOfSettlements lombardi >= 1
console_command diplomatic_stance ostrogoths lombardi war
end_monitor
60回合以后袁绍和曹操势力都存在的话,强制开战
monitor_event FactionTurnStart FactionType lombardi
and I_TurnNumber = 59
and I_LocalFaction ostrogoths
spawn_army
faction lombardi
character M-05-0023-Xm, general, age 25, x 119, y 118
袁绍势力存在
第60回合
我选择的是曹操
袁绍在x 119, y 118点爆出一25岁的将军
下面是这个将军的军队,可以任意加本势力军队
后面的类似,我就不赘述了
现在有战役了,那如何让电脑提醒呢?
打开bi\data\world\maps\campaign\barbarian_invasion descr_events
还以官渡之战说明
- ;官渡之战
- event historic the_martyrdom_of_saint_eusebius
- date 5 summer
复制代码
date 5 summer
是指剧本开始时间算起的第五年夏天,开始时间在descr_strat.txt文件中设定了。本来应该是一年只有两个回合,一个是夏季,一个冬季,所以每年第一个回合就是夏季,历史事件提醒出现,通过12回合脚本控制为一年11个夏天1个冬天,虽然第二个或以后的回合仍是夏季,历史事件已经提醒过就屏蔽了,不会重复判断。
the_martyrdom_of_saint_eusebius
这个是事件代码
打开bi\data\text historic_events
- {THE_MARTYRDOM_OF_SAINT_EUSEBIUS_TITLE} 官渡之戰爆發
复制代码 这个是提示
- {THE_MARTYRDOM_OF_SAINT_EUSEBIUS_BODY} 建安三年,袁紹擊敗公孫瓒,占有青、幽、冀、並四州之\n地。建安元年,曹操把漢獻帝挾持到許昌,形成“挾天子\n以令諸侯”的局面,取得政治上的優式。建安二年春,袁\n術在壽春稱帝。曹操即以“奉天子以令不臣”爲名,進討\n袁術並將其消滅。接著又消滅了呂布,利用張揚部內讧\n取得河內郡。從此曹操式力西達關中,東到兖、豫、徐\n州,控制了黃河以南,淮、漢以北大部地品,從而與袁\n紹形成沿黃河下遊南北對峙的局面。袁紹的兵力在當時\n遠遠勝過曹操,自然不甘屈居于曹操之下,他決心同曹\n操壹決雌雄。建安四年六月,袁紹挑選精兵10萬,戰馬\n萬匹,企圖南下進攻許昌,官渡之戰的序幕由此拉開。
复制代码 这个是说明
历史事件可以在罗马的上面改,也可以自己加
再来说说任务系统
我就以刘备任务为例说明
打开bi\data\scripts\show_me script_12tpy_dates
- ;------------------------------------------------------liuren
- monitor_event FactionTurnStart FactionIsLocal
- and I_LocalFaction empire_east
- if I_TurnNumber = 120
- and I_SettlementOwner C-0701-b-XvChang = empire_east
- console_command add_money 4000
- console_command create_unit J-0201-LiuBei "Xiaodaoshou Liubei" 1
- end_if
- if I_TurnNumber = 125
- and I_SettlementOwner C-0801-b-LuoYang = empire_east
- console_command add_money 8000
- console_command create_unit J-0201-LiuBei "YuLin BuBing" 1
- end_if
- if I_TurnNumber = 150
- and I_SettlementOwner C-0901-b-ChangAn = empire_east
- console_command add_money 30000
- console_command create_unit J-0201-LiuBei "YuLin BuBing" 1
- end_if
- if I_TurnNumber = 60
- and I_SettlementOwner C-1401-b-ChengDu = empire_east
- console_command add_money 10000
- console_command create_unit J-0201-LiuBei "Baierbin Liubei" 1
- console_command create_unit J-0201-LiuBei "Wudangfeijun Liubei" 1
- console_command create_unit J-0201-LiuBei "Zhugelu Liubei" 2
- end_if
- if I_TurnNumber = 80
- and I_SettlementOwner C-1425-b-HanZhong = empire_east
- console_command add_money 10000
- console_command create_unit J-0201-LiuBei "Bashuzhongbubin Liubei" 2
- end_if
- if I_TurnNumber = 160
- and I_SettlementOwner C-1302-b-JianYe = empire_east
- console_command add_money 30000
- console_command create_unit J-0201-LiuBei "Gongshou Liubei" 3
- end_if
- if I_TurnNumber = 50
- and I_SettlementOwner C-1101-b-XiangYang = empire_east
- console_command add_money 30000
- console_command create_unit J-0201-LiuBei "Zhonglu BaShu" 2
- end_if
- if I_TurnNumber = 180
- and I_SettlementOwner C-0301-b-YeCheng = empire_east
- console_command add_money 30000
- console_command create_unit J-0201-LiuBei "Bashuzhongqibin Liubei" 2
- end_if
- end_monitor
复制代码 这就是刘备的任务了
monitor_event FactionTurnStart FactionIsLocal
and I_LocalFaction empire_east
这段意思是,你选择了刘备
if I_TurnNumber = 120
and I_SettlementOwner C-0701-b-XvChang = empire_east
console_command add_money 4000
console_command create_unit J-0201-LiuBei "Xiaodaoshou Liubei" 1
end_if
如果在第120回合
许昌属于刘备
加钱4000
给刘备一支校刀手
下面类似,我就不赘述了
Ok,结束 还是那句话, 希望有想象力的童鞋做出有趣的脚本 本教程语言是自己斟酌,目的是让新手看懂。高手勿笑
有错误之处,请高手指正
|
评分
-
查看全部评分
|