UFO:Alien Invasion

Development => Coding => Topic started by: Rodmar on October 10, 2015, 12:28:27 am

Title: What may the AI see?
Post by: Rodmar on October 10, 2015, 12:28:27 am
Hello,

I read some .lua files, and it looks like the actors (aliens, PHALANX, civilians, soldiers) only see each other, and think according to this shared (?) vision.

The syntax seems to be always:     ai.see("all", nameOfTeam)

May the AI see other items than team members?
May it see static, hand placed invisible actors? I'm thinking about the rescue zone, the exit of a transport or that of an UFO.
May it see dynamic items such as smoke/fire field, or a rendez-vous flare?
May it see (or rather, remember) past actions? Corpses, last seen enemies location, last wounded/shot locations, etc?

Also, by what value could the parameter "all" be replaced? ("self"?)
Title: Re: What may the AI see?
Post by: geever on October 10, 2015, 03:55:00 pm
Note that whatever you see in the LUA files is only true if you use the LUA-AI. As far as I know, it is unfinished and we're still using the C-AI by default.

-geever
Title: Re: What may the AI see?
Post by: Rodmar on October 13, 2015, 10:47:35 am
Lol, such an idiot am I. At least, this explains why the explore function in those files seems to not work properly...
Still, I hope that one day, the AI could see more than living actors (but adding soldiers, pilots, and "mission objective" teams, and having them defend themselves or acting as the mission requires them to do, is perhaps top priority as compared to seeing one's environment).

I know, and I fell free to code it myself ;).
Title: Re: What may the AI see?
Post by: ShipIt on October 14, 2015, 06:30:24 am
DarkRain improved the LUA-AI a lot. In 2.6-dev we use it, not sure about 2.5.
Title: Re: What may the AI see?
Post by: DarkRain on October 15, 2015, 03:28:08 am
Actually the LUA AI is unused at the moment in any version of the game, you can activate it by setting the g_luaai cvar, but if you want to test it you really should try 2.6, as the LUA AI in 2.5 is utterly useless, the current capabilities of the 2.6 LUA AI API are described at the start of the alien lua script which you can see here (http://sourceforge.net/p/ufoai/code/ci/master/tree/base/ai/alien.lua?force=True)