Page 1 of 1

Mod map AI presets

Posted: 08 Nov 2008, 12:16
by Agon
Hi,

I would like to have mod, map and AI presets like SpringLobby has them but the content can specify some presets.
And if the end user likes he can also create custom presets like in SpringLobby.

I'm mainly requesting this for AIs but I think maps and mods could use them, too.
In AIs I could have presets like: 'Easy' which disables cheating and special tactics.
'Normal' enables everything besides cheating and 'Hard' enables cheating, too.

Edit:
Example:
[Presets]
{
Easy
{
cheating = false;
tactics = false;
}
Normal
{
cheating = false;
tactics = true;
}
Hard
{
cheating = true;
tactics = false;
}
}
(Don't know if this is working lua code...)

Thank you in advance.

Re: Mod map AI presets

Posted: 08 Nov 2008, 12:38
by hoijui
an other way of doing it, which would need less new code in unitsync:

Code: Select all

local options = {
	{
		key="cheating",
		type   = 'bool',
		presets = {easy=false, norma=false, hard=true},
		def    = false,
	},
	{
		key="tactics",
		type   = 'bool',
		presets = {easy=false, norma=true, hard=false},
		def    = true,
	},
}

Re: Mod map AI presets

Posted: 13 Nov 2008, 10:45
by submarine
Imho this would not be very usefull, since none of the present AIs would support it.

You cant just disable cheating for KAI to get a weaker AI, infact you would get a non working AI since it has been designed with full los in mind.

On the other hand AAI would not profit from cheating very much (maybe a bit from full LOS, but I havent tested that)

I'm not sure about NTAI, maybe AF could comment on that

Re: Mod map AI presets

Posted: 13 Nov 2008, 12:58
by hoijui
Agon just used Easy, Normal, Hard and tactics anc cheating as examples. We do not want to discuss about the usefullness of these specifically, but about the format of presets in general (and if they may make sense).
An other example:
our AI supports options:
  • bool debug
  • string debugOptions
  • int logLevel (from 0=none till 5=very fine logging)
and presets:
  • Normal {debug=false, logLevel=1}
  • Debug {debug=true, debugOptions="{default options}" logLevel=5}
in practice, this may not be a good example either, but it is just about the idea and format of presets in general

Re: Mod map AI presets

Posted: 14 Nov 2008, 18:23
by Agon
I was more talking about future AI's and about the AI which I want to write.
And other persons could profit from it, too.