Refactor: NPC perception rules out of AiHandler, split NpcAiService / NpcHelperService
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with the design skill and the review findings A3 and A4 from split/09-perceptions; then trace perception handling across AiHandler, NpcAiService, and NpcHelperService. Map the proposed service responsibilities and Reflex registration before implementation. Done means the responsibilities are moved as described with no behavior change; the performance notes are optional.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follow-up from the review of split/09-perceptions (architecture-reviewer findings A3 + A4).
Problem
AiHandler(adapter, ~720 lines) decides AI rules: loop rate, daily-state check,CallStateEnd, looking away
(ForgetHeroAfterLookingAwaychangesAttitudeTemp),PERC_MOVENPC,PERC_ASSESSBODY. None of it is testable
without a scene, and following one perception means reading AiHandler, NpcAiService and NpcHelperService.NpcAiService(~1,100 lines) andNpcHelperService(~620 lines) each took on a new responsibility: passive
perception broadcast/delivery, the body search, sight lines through alpha-tested polygons,Wld_DetectItem.
Proposal
NpcPerceptionService(new): passive perception broadcast + delivery,ExecutePassivePerception,
FindClosestSensedBody, and the body ofExecuteActivePerceptions(incl.PERC_MOVENPC,PERC_ASSESSBODY,
looking away).NpcSightDomain(new, owned byNpcHelperService):CanSee/CanSense,IsSightBlocked, see-through caches.NpcAiServicekeeps the state lifecycle and also getsCallStateEnd, the loop-rate and daily-state checks.AiHandlerkeeps only the Unity part:_npcPerceptionService.TickPerceptions(NpcData)and the state calls.Wld_DetectItemand the item distances could move to aWld_*/item service.
Plan with the design skill first (new service + Reflex registration), then implement. No behaviour change.
Related performance notes from the same review (can be done during the move):
FindClosestSensedBodywalks the whole NpcCache with a raycast per candidate on every perception tick.Wld_DetectItemwalks the whole VobCache per call.
- Ngôn ngữ chính
- C#
- Star
- 33
- Fork
- 1
- Merge trung bình
- 1 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 56
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Gothic-Unity-Project/Gothic-Unity
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Gothic-Unity-Project/Gothic-Unity#487 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
Gothic-Unity-Project/Gothic-Unity#494 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 49/100
Gothic-Unity-Project/Gothic-Unity#489 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
Gothic-Unity-Project/Gothic-Unity#488 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Gothic-Unity-Project/Gothic-Unity#486 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của Gothic-Unity-Project/Gothic-Unity
Issue tương tự
-
bug github_actions
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
endercodezz/BYDLO#336 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
sebastienros/jint#4449 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:bulk-filed clawsweeper:needs-security-review clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:security issue-rating: 🦞 diamond lobster P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openclaw/openclaw-windows-node#2010 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
imazen/imageflow-dotnet#72 · 1 bình luận ·