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

[交流] 每10秒显示村民状态

[复制链接]

14

主题

0

精华

1165

积分

伯爵

耕战
100
鹰币
320
天龙币
0
回帖
30
附庸关系0
 楼主| 发表于 2020-6-4 22:36:04 | 显示全部楼层 |阅读模式
本帖最后由 wangzhen 于 2020-6-5 01:39 编辑

侦察村民 想吧资源存储量 采集工人分配到资源存储量比较少  食物采集 牧羊工 农夫 采果 猎人数量调整
#load-if-defined UP-AVAILABLE
(load "Promi\const")
#end-if
(defconst gl-lumberwork 101);砍树工
(defconst gl-goldwork 102)  ;采金工
(defconst gl-stonework 103) ;采石工
(defconst gl-sheepwork 104) ;牧羊人
(defconst gl-farmerwork 105);农夫
(defconst gl-foragerwork 106);采果工
(defconst gl-hunterwork 107) ;猎人
(defconst gl-fishwork 108)   ;渔夫

(defconst gl-lumber-resource 110);树木资源
(defconst gl-gold-resource 111)  ;金矿资源
(defconst gl-stone-resource 112) ;石矿资源
(defconst gl-forage-resource 113);果树资源
(defconst gl-local-total 114)
(defconst gl-local-last 115)
(defconst gl-remote-total 116)
(defconst gl-remote-last 117)


(defrule
(true)
=>
    (set-goal gl-hunterwork 0)
        (set-goal gl-fishwork 0)
        (set-goal gl-lumberwork 0)
        (set-goal gl-goldwork 0)
        (set-goal gl-stonework 0)
        (set-goal gl-sheepwork 0)
        (set-goal gl-farmerwork 0)
        (set-goal gl-foragerwork 0)
        (set-strategic-number sn-placement-zone-size 0)
        (set-strategic-number sn-placement-fail-delta 1)
        (set-strategic-number sn-percent-civilian-gatherers  20)
    (set-strategic-number sn-percent-civilian-builders  80)
        ;(set-strategic-number sn-enable-new-building-system  1)
        (set-strategic-number sn-enable-training-queue  1)
        (set-strategic-number sn-maximum-food-drop-distance -1)
        (set-strategic-number sn-maximum-wood-drop-distance -1)
        (set-strategic-number sn-maximum-gold-drop-distance -1)
        (set-strategic-number sn-maximum-stone-drop-distance -1)
        (set-strategic-number sn-maximum-hunt-drop-distance 8)
        (set-strategic-number sn-mill-max-distance 15)
        (up-set-timer c: 1 c: 10)
        (up-set-timer c: 2 c: 10)
        (up-set-timer c: 3 c: 10)
        (disable-self)
)   

(defrule
(true)
=>
    (set-strategic-number sn-preferred-mill-placement 0)
        (set-strategic-number sn-cap-civilian-explorers 0)
        (set-strategic-number sn-percent-civilian-explorers 0)
        (set-strategic-number sn-percent-enemy-sighted-response 100)
        (set-strategic-number sn-hits-before-alliance-change 25)
        (set-strategic-number sn-number-explore-groups 1)
        (set-strategic-number sn-percent-attack-soldiers 0)
        (set-strategic-number sn-task-ungrouped-soldiers 0)
        (set-strategic-number sn-number-attack-groups 0)
        (set-strategic-number sn-enemy-sighted-response-distance 10)
        (set-strategic-number sn-total-number-explorers 0)
        (set-strategic-number sn-relic-return-distance 0)
(disable-self)
)
(defrule
(timer-triggered 1)
=>
(up-full-reset-search)
(up-find-local c: villager-class c: 240)
(up-remove-objects search-local object-data-language-id != lid-villager-lumberjack)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d人砍树" g: gl-local-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(up-full-reset-search)
(up-find-local c: villager-class c: 240)
(up-remove-objects search-local object-data-language-id != lid-villager-gold-miner)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d人采金" g: gl-local-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(up-full-reset-search)
(up-find-local c: villager-class c: 240)
(up-remove-objects search-local object-data-language-id != lid-villager-stone-miner )
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d人采石" g: gl-local-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(disable-timer 1)
(enable-timer 1 10)
)

(defrule
(timer-triggered 2)
=>
(up-full-reset-search)
(up-find-local c: villager-class c: 240)
(up-remove-objects search-local object-data-language-id != lid-villager-shepherd)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d人吃羊" g: gl-local-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(up-full-reset-search)
(up-find-local c: villager-class c: 240)
(up-remove-objects search-local object-data-language-id != lid-villager-farmer)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d人种田" g: gl-local-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(up-full-reset-search)
(up-find-local c: villager-class c: 240)
(up-remove-objects search-local object-data-language-id != lid-villager-forager)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d人采果" g: gl-local-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(disable-timer 2)
(enable-timer 2 10)
)

(defrule
(timer-triggered 3)
=>
(up-full-reset-search)
(up-find-local c: villager-class c: 240)
(up-remove-objects search-local object-data-language-id != lid-villager-hunter )
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d人打猎" g: gl-local-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(up-full-reset-search)
(up-find-local c: villager-class c: 240)
(up-remove-objects search-local object-data-language-id == lid-villager-fisherman )
(up-remove-objects search-local object-data-language-id == lid-villager-hunter )
(up-remove-objects search-local object-data-language-id == lid-villager-forager)
(up-remove-objects search-local object-data-language-id == lid-villager-farmer)
(up-remove-objects search-local object-data-language-id == lid-villager-shepherd)
(up-remove-objects search-local object-data-language-id == lid-villager-stone-miner )
(up-remove-objects search-local object-data-language-id == lid-villager-gold-miner)
(up-remove-objects search-local object-data-language-id == lid-villager-lumberjack)
(up-remove-objects search-local object-data-language-id == lid-villager-builder )
(up-remove-objects search-local object-data-language-id == lid-villager-repairer)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d人闲着" g: gl-local-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(disable-timer 3)
(enable-timer 3 10)
)


(defrule
(taunt-detected 1 6)
=>
(up-full-reset-search)
(up-reset-filters)
(up-filter-status c: status-resource c: list-active)
(up-find-resource c: wood c: 240)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d树木" g: gl-remote-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(up-full-reset-search)
(up-reset-filters)
(up-filter-status c: status-resource c: list-active)
(up-find-resource c: gold c: 240)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d金矿" g: gl-remote-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(up-full-reset-search)
(up-reset-filters)
(up-filter-status c: status-resource c: list-active)
(up-find-resource c: stone c: 240)
(up-get-search-state gl-local-total)
(up-chat-data-to-all "有%d石矿" g: gl-remote-total)
(set-goal gl-local-total 0)
(set-goal gl-local-last 0)
(set-goal gl-remote-total 0)
(set-goal gl-remote-last 0)
(acknowledge-taunt 1 6)
)



回复

使用道具 举报

183

主题

9

精华

2万

积分

教皇

耕战
3329
鹰币
16946
天龙币
0
回帖
1200

翔鹰建站十周年纪念章

附庸关系3
发表于 2020-6-5 00:42:39 | 显示全部楼层
所以你想表达什么吗?
只发代码的话,有点让人难以体会你的意图啊
索引:
Userpatch 实用技术贴索引←点击进入
决定版精品贴大索引←点击进入

战役:
《 兔与豹》——柔弱奴隶公主  猛兽口中求生←点击进入
《敛由国的统一》←点击进入

殊途战役制作群 QQ: 616317226
翔鹰帝国Ⅱ:决定版交流群 QQ: 112822759
回复

使用道具 举报

本版积分规则

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

GMT+8, 2024-12-20 22:29 , Processed in 0.126975 second(s), 36 queries , File On.

Powered by Hawk Studio  QS Security Corp.® Licensed

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

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