Problem with AI command, Help!

Upload your latest creations here.
Please note that by posting comments to posts in this forum you forfeit your personal copyright on whatever you post. AI Scripters reserves the right to re-use objective comments in script reviews without requiring the posting author's permission. Credit, where appropriate will be given in such cases.
Post Reply
luks1990
Forumer
Posts: 1
Joined: Tue Apr 02, 2024 12:17 pm

Problem with AI command, Help!

Post by luks1990 »

Hello everyone, I've been doing an AI for a few days, but I got stuck in one part. I'm going to be specific, for example, I am training riders and I need to develop chain barding but to do so I need to stop the production of riders to collect resources and then resume production, could someone explain to me how to do this? I would really appreciate it! thanks

GamesGod
Swami
Posts: 114
Joined: Fri May 20, 2016 4:01 am
Location: Russia

Re: Problem with AI command, Help!

Post by GamesGod »

Hi, u need read cpsb file, tutorial how create functions :)
Developer of GamesGod AI

User avatar
FireBall37
Swami
Posts: 176
Joined: Sat Aug 22, 2020 10:49 pm

Re: Problem with AI command, Help!

Post by FireBall37 »

luks1990 wrote:
Tue Apr 02, 2024 12:32 pm
Hello everyone, I've been doing an AI for a few days, but I got stuck in one part. I'm going to be specific, for example, I am training riders and I need to develop chain barding but to do so I need to stop the production of riders to collect resources and then resume production, could someone explain to me how to do this? I would really appreciate it! thanks
I think this should work:

(defrule
(can-train knight-line)
(or
(up-research-status c: ri-scale-barding < research-complete)
(up-research-status c: ri-chain-barding >= research-pending)
)
=>
(train knight-line)
)

that should stop training knights when chain barding is available and hasn't been researched yet

Post Reply