翔鹰帝国网|帝国时代论坛|帝国时代系列|神话时代
 找回密码
 注册翔鹰会员(昵称)
搜索
查看: 1135|回复: 3

[求助] 只想改ai投降条件应该怎么写?

 关闭 [复制链接]

1

主题

0

精华

6

积分

扈从

耕战
0
鹰币
10
天龙币
0
回帖
1
附庸关系0
发表于 2016-8-23 08:09:36 | 显示全部楼层 |阅读模式
用的是高清版1.12。

想改成全部摧毁便投降,其他功能原来的就好。
回复

使用道具 举报

16

主题

0

精华

1701

积分

侯爵

耕战
305
鹰币
30
天龙币
0
回帖
76
附庸关系0
发表于 2016-12-10 10:55:44 | 显示全部楼层

最簡單的方法就是 把RESIGN全刪掉
回复

使用道具 举报

454

主题

65

精华

25万

积分

教皇

耕战
42935
鹰币
1441126
天龙币
10
回帖
5687

翔鹰建站十周年大纪念章特级帝国勋章特级翔鹰勋章特级嘉禾勋章一级皇家勋章鹰之智者蛟龙勋章十字军勋章大冒险家狂熊勋章

附庸关系2
发表于 2016-12-10 19:39:56 | 显示全部楼层
原版默認AI投降條件代碼參見
https://www.hawkaoe.net/bbs/thread-113544-1-1.html
標準AI在60015號文件petersen resign.per; 注意官方戰役AI另外包括scenario resign.per


回复

使用道具 举报

454

主题

65

精华

25万

积分

教皇

耕战
42935
鹰币
1441126
天龙币
10
回帖
5687

翔鹰建站十周年大纪念章特级帝国勋章特级翔鹰勋章特级嘉禾勋章一级皇家勋章鹰之智者蛟龙勋章十字军勋章大冒险家狂熊勋章

附庸关系2
发表于 2016-12-10 19:59:53 | 显示全部楼层
HD版Promisory.per2投降動作在29400至29413行

(defrule
        (timer-triggered resign-timer)
        (player-in-game any-ally)
=>
        (tribute-to-player this-any-ally wood 99999)
        (tribute-to-player this-any-ally food 99999)
        (tribute-to-player this-any-ally gold 99999)
        (tribute-to-player this-any-ally stone 99999)
        (resign))
(defrule
        (timer-triggered resign-timer)
(not        (player-in-game any-ally))
=>
        (resign))

計時器 resign-timer 觸發條件在29261-29391 行

(defrule
(or        (player-in-game any-human-enemy)
        (not        (player-in-game any-human-ally)))
        (strategic-number sn-military-level <= -1); -3
        (population < 50)
(nand        (player-in-game any-ally)
        (players-population any-ally >= 75))
        (players-population any-enemy >= 175)
=>
        (enable-timer resign-timer 5)
        (disable-self))

(defrule
        (strategic-number sn-military-level <= -1); -3
(or        (nand        (player-in-game any-ally)
                (players-population any-ally >= 75))
        (not        (player-in-game any-ally)))
        (unit-type-count-total villager < 1)
        (unit-type-count-total monk < 1)
        (building-type-count town-center < 1)
        (building-type-count monastery < 1)
=>
        (enable-timer resign-timer 5)
        (disable-self))

(defrule
(or        (player-in-game any-human-enemy)
        (and        (population <= 1); scout
                (housing-headroom <= 0)))
        (unit-type-count-total villager < 1)
        (unit-type-count-total monk < 1)
        (building-type-count market < 1)
        (building-type-count dock < 1)
        (building-type-count town-center < 1)
        (building-type-count monastery < 1)
=>
        (enable-timer resign-timer 5)
        (disable-self))

(defrule
;        (player-in-game any-human-enemy)
        (strategic-number sn-military-level <= -1); -3
(or        (nand        (player-in-game any-ally)
                (players-population any-ally >= 60))
        (not        (player-in-game any-ally)))
;        (building-type-count town-center < 1)
        (population < 5)
        (players-population any-enemy >= 60)
;(not        (player-in-game every-ally))
=>
        (enable-timer resign-timer 5)
        (disable-self))

(defrule
;        (player-in-game any-human-enemy)
        (strategic-number sn-military-level <= -1); -3
(or        (nand        (player-in-game any-ally)
                (players-population any-ally >= 75))
        (not        (player-in-game any-ally)))
;        (building-type-count town-center < 1)
        (population < 10)
        (players-population any-enemy >= 90)
;(not        (player-in-game every-ally))
=>
        (enable-timer resign-timer 5)
        (disable-self))

(defrule
;        (player-in-game any-human-enemy)
        (strategic-number sn-military-level <= -1); -3
(or        (nand        (player-in-game any-ally)
                (players-population any-ally >= 75))
        (not        (player-in-game any-ally)))
;        (building-type-count town-center < 1)
        (population < 22)
        (players-population any-enemy >= 120)
;(not        (player-in-game every-ally))
=>
        (enable-timer resign-timer 5)
        (disable-self))

(defrule
        (player-in-game any-human-enemy)
        (strategic-number sn-military-level <= -1); -3
(or        (nand        (player-in-game any-ally)
                (players-population any-ally >= 75))
        (not        (player-in-game any-ally)))
;        (building-type-count town-center < 1)
        (population < 35); potentially more in the rule below
        (players-population any-enemy >= 150)
;(not        (player-in-game every-ally))
=>
        (enable-timer resign-timer 5)
        (disable-self))

(defrule
        (player-in-game any-human-enemy)
        (strategic-number sn-military-level <= -1); -3
(or        (nand        (player-in-game any-ally)
                (players-population any-ally >= fourty-percent-pop))
        (not        (player-in-game any-ally)))
;        (building-type-count town-center < 1)
        (population < 60)
        (population < twenty-five-percent-pop)
        (players-population any-enemy > eighty-five-percent-pop)
;(not        (player-in-game every-ally))
=>
        (enable-timer resign-timer 5)
        (disable-self))

回复

使用道具 举报

本版积分规则

排行榜|小黑屋|翔鹰帝国

GMT+8, 2024-12-4 16:25 , Processed in 0.211507 second(s), 60 queries , File On.

Powered by Hawk Studio  QS Security Corp.® Licensed

Copyright © 2001-2023, Hawkaoe.net All Rights Reserved

快速回复 返回顶部 返回列表