options in LuaAI.lua

options in LuaAI.lua

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

options in LuaAI.lua

Post by zwzsg »

C++ AI can have options. That is cool. Can LuaAI have options too?

I did try the following in my LuaAI.lua:

Code: Select all

return {
	{
		name="Kernel Panic AI",
		desc="Can now play all three factions and ONS!",
		version = 4,
		options =
		{
			{
				key="difficulty",
				name="AI Difficulty Level",
				desc="1 means, the AI plays very poor, 5 means, it gives its best",
				type   = 'number',
				def    = 3,
				min    = 1,
				max    = 5,
				step   = 1,
			},
		},
	},
	{
		name="Fair KPAI",
		desc="Does not build much more than opponents.",
	},
}
SpringLobby ignored the version and options fields.
- Maybe I am using the wrong syntax, in which case tell me the right one.
- Maybe AI options are not supported for LuaAI, in which case that is my feature request.

Note: I know SpringLobby support C++ AI options because for BaczekKPAI the option shows fine.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: options in LuaAI.lua

Post by hoijui »

engine/unitsync do not support LuaAI options.
the lobbies do to even know if an AI is Lua or not. there is certainly no change needed there.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: options in LuaAI.lua

Post by zwzsg »

Yeah, sorry, I wasn't clear, this is indeed an unitsync request, not a lobby request.
Post Reply

Return to “Feature Requests”