Yup, AI scripting for sure.
For the random answer from villagers: set a trigger
Trigger0: (doesn't loop)
Condition: Object Selected (villie)
Condition: Object Visible (Villie)
Effect: Tribute 1 stone from GAIA to dummy player with AI
Effect: activate trigger 1
Effect: activate trigger 2
Effect: activate trigger 3Now the AI:
(defrule
(stone-amount equal 1);detects when there's 1 stone
=>
(cc-add-resource stone equal -1);clears the stockpile, preventing the trigger from firing incessantly
(generate-random-number 2); generates a number, that can be either 1 or 2. The higher the number is, the greater are the possibilities
)(defrule
(random-number equal 1); if 1 was the number generated
=>
(cc-add-resource wood equal 1); adds 1 wood
)(defrule
(random-number equal 2); if 2 was the number generated
=>
(cc-add-resource food equal 1); adds 1 food, not wood
)Then detect the newly added resource:
Trigger1:
Condition: accumulate attribute -> wood = 1
Effect: (chat 1)
Effect: Tribute 1 wood from dummy to GAIA, clearing the stockpile and preventing the trigger from firing incessantly)
Effect: deactivate trigger 2Trigger2:
Condition: accumulate attribute -> food = 1
Effect: (chat 2, different than 1)
Effect: Tribute 1 food from dummy to GAIA, clearing the stockpile and preventing the trigger from firing incessantly)
Effect: deactivate trigger 1Trigger 3:
Condition: Object not visible (villie)
Effect: Activate trigger 0
Why didn't I looped trigger 0? To prevent the AI from generating numbers and the game from displaying instructions incessantly.
EDIT: taunting is good, but it stops to work as soon as you reload a saved game.
Anyway, use the rule:
(taunt-detected 1 X)
Where X stands for the taunt.
[This message has been edited by Cesar Bernardi (edited 05-26-2006 @ 07:09 PM).]