Page 1 of 1

Problem with AI command, Help!

Posted: Tue Apr 02, 2024 12:32 pm
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

Re: Problem with AI command, Help!

Posted: Thu Apr 18, 2024 12:10 pm
by GamesGod
Hi, u need read cpsb file, tutorial how create functions :)

Re: Problem with AI command, Help!

Posted: Fri Apr 19, 2024 3:55 am
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