You must be logged in to post messages.
Please login or register

AI & RM Scripting
Moderated by Sebastien, Leif Ericson

Hop to:    
Welcome! You are not logged in. Please Login or Register.2 replies
Age of Kings Heaven » Forums » AI & RM Scripting » Doing to bad->change side and too-many-hits->change side
Bottom
Topic Subject:Doing to bad->change side and too-many-hits->change side
Zungen
Squire
posted 12-11-19 04:15 PM CT (US)         
So, let's say I want to make your allies change side if you are doing too badly.

(defrule
(doing-badly)
=>
(set-stance soon_to_be_former_ally enemy)
)

Now, what criteria would you use to quantify doing badly? How would you implement it? Maybe a player score ratio or whatever, but I wouldn't know how to implement it.



Now, another question. If I wanted a player to declare another player enemy after some (some times not so) friendly fire, I would think that just saying

set-strategic-number sn-hits-before-alliance-change 5

or something like that would work. However, default value of sn-hits-before-alliance-change is 3, but in Attila 1 in AoC, Persians don't change stance with Scythians even when they are being attacked. Unless that number is changed in AI script.

[This message has been edited by Zungen (edited 12-11-2019 @ 06:18 PM).]

AuthorReplies:
Leif Ericson
Seraph Emeritus
posted 12-11-19 11:42 PM CT (US)     1 / 2       
For the first part, this would probably be similar to what people use in resign conditions. This is often having low villager and military pop and any enemy having a lot more military.

For the second, I don't think that strategic number actually works consistently (ever?). I haven't tested it. I think most scripters just change alliance whenever someone changes alliance against them.

(players-stance any-ally enemy) => (set-stance this-any-ally enemy)

~`o~|\  Join the fresh and exciting AI Ladder for its fourth season!
 `  |_\
       |    Learn the joy of AI scripting in my guide: The World of AI Scripting
______|______
 \        /
   .....Hinga Dinga Durgen! - SpongeBob
  `-=<.__.>=-
Zungen
Squire
posted 12-12-19 07:49 AM CT (US)     2 / 2       
RE 1: that makes sense. Maybe even 0 town centers.

RE 2: the situation here is a little complicated. I have 3 players, A, B and C. A and B are allied, B and C are allied. A and C are enemies.

A base is embedded in B base and needs to destroy B eventually, but I don't want A getting smart and start ground attacking B base. I could just use triggers and say 'too many B destroyed buildings=>change stance' BUT I don't want C accidentaly destroying B buildings with onagers and B declaring A enemy because of it.
You must be logged in to post messages.
Please login or register

Hop to:    

Age of Kings Heaven | HeavenGames