AWESOME!
I immediatly tested it and it looks awesome, didn't do much resistance against it though.
After I made it fight MAI and it...Showed resistance, but MAI beat it... I only tried once and it might be the environment that changed the course of the fight.
I can releast the map here if you want me to, but your choice(disabled the win/loss functions) :)
EDIT:
Also fix the not colonising players empty asteroids, even though that seems like a rare thing to happen, it's simple to fix. Use IsBarren() to find out if the asteroid is barren and then tell what to do with the asteroid. I also do speed tests, and MAI is very effective at speed tests as well as normal-speed tests.
The way you did your "vs" file broke my AI, meaning it would always lose. I've updated the file and my AI now loses 99% of the time ;D. I did notice your AI uses information a human player wouldn't have though; whereas mine doesn't. My AI would still lose though as it's not as good!
This attachment is the fixed version of our two AI's going at it. I've also changed the colour scheme a little and auto-zoomed, so the whole map is always on the screen and lastly I changed the win/lose conditionals to print which AI won :P
It's sadly fun to have on in the background when I can't be bothered to play.
I think I'm going to make an AI vs AI template map (this code is far too messy to use!), so I can make an AI wars thread! ;D
Oh and Pilchard, if you haven't already recoded most of your AI, It would be nice if you set your AI's behaviour to only use Globals. As then I could easily intergrate it into my future AI wars thread.
For example..
if GetAsteroid(n):GetNumSeedlings >= Globals.Structures.TreeCost
GetAsteroid(n):PlantDysonTree(2)
end
instead of...
if GetAsteroid(n):GetNumSeedlings >= 10 then
GetAsteroid(n):PlantDysonTree(2)
end
Doesn't matter if you don't bother though, I'm sure I'd get around to it myself at some point, heh
That was quick coding! Yeah, I wouldn't mind seeing it if you don't mind.
To remove the player from the game without getting an error, you need to set every asteroid to an owner of 2 or above. Then you can change them all back to neutral in LevelLogic().
If you wanted a blank screen (but wanted to add asteroids later in LevelLogic(), you can do the following.
function LevelSetup()
Globals.G.Asteroids=(0)
Globals.G.EnemyFactionsMin=(0)
Globals.G.EnemyFactionsMax=(0)
Globals.G.StartingSeedlings=(0)
Globals.G.StartingSeedlingsPlayer=(0)
Globals.G.GreysMin=(0)
Globals.G.GreysMax=(0)
Globals.G.GreysProbability=(0)
a = AddAsteroid(30000, 30000) -- Set's the maps size in positive directions
a.Owner = 2
a = AddAsteroid(-30000,-30000) -- Set's the maps size in negative directions
a.Owner = 2
end
function LevelLogic()
GetAsteroid(1):Die()
GetAsteroid(0):Die()
coroutine.yield -- very important!
-- enter your code!
end
The latter is more useful if you want to make a game in eufloria with no asteroids present really.