AI Greetings

From The DarkMod Wiki
Revision as of 15:31, 18 December 2010 by Springheel (talk | contribs) (New page: ''--set up by greebo'' The greeting code has been overhauled. Our AI now exhibit more realistic greeting behaviour and actually respond to an incoming greeting. Rough data: - AI have a ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

--set up by greebo

The greeting code has been overhauled. Our AI now exhibit more realistic greeting behaviour and actually respond to an incoming greeting.

Rough data:

- AI have a 30% chance of doing a greeting when they encounter a friendly AI within 250 units

- AI emit an internal "Communication Message" to the greeted AI (which triggers the response)

- AI won't greet the same AI again (is possible again after 3 minutes)

- AI will look at the other AI for the time of the greeting

- AI need to be able to see and must face each other before greeting starts


Ok, this code is now in SVN to choose the response sound for greetings:

First, the "rank" spawnarg is checked (is integer valued). A "rank" of "0" means "no rank". The smallest rank is 1.

If both AI have a rank > 0, then "snd_response_positive_superior" is chosen if otherRank > myRank.

If no rank information is available, this fallback logic comes into play:

If the AI itself is a superior (Noble, Elite, Priest) the ordinary "snd_response_positive" is chosen.

If the AI itself is not a superior, the other person is checked. If the other person is considered superior (Noble, Priest, Elite), the "superior" sound is chosen, otherwise the ordinary sound is used.