Author Topic: Need Levels for Adventure Map!  (Read 4581 times)

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Need Levels for Adventure Map!
« on: June 22, 2011, 10:34:10 PM »
I need levels for my adventure map, it's just as coding a normal map, just keep some random algorithm, not the same map twice!!

Here is a neat examp+le for a classic 1vs1 map:


Code: [Select]
for i = 0,math.random(10,20) do

a = AddAsteroid(math.random(-10000,10000),math.random(-10000,10000))

if i == 0 then
a.Owner = 1
a:AddDysonTree()
a:AddSeedlings(10)
elseif i == 4 then
a.Owner = 2
a:AddDysonTree()
a:AddSeedlings(10)
else
if math.random() > 0.7 then
a.Owner = math.random(1,2)
a:AddDysonTree()
a:AddSeedlings(10)
else
a.Owner = 0
end
end

end

OpeningText = "You play a classic random map, this one contains nothing of special stuff!\n\nKill the enemy and win, they might have more than you, or less!"
MapTime = nil
Win = "conquest"
AIType = "normal"
LostMessage = "You couldn't beat the 1vs1 map, you cannot proceed further until you have!"
WinMessage = "You destroyed the opposite force and can now move on to the triangular map!"

Note the variables at the end, explaining them:

    OpeningText: The text in the textbox at the start of the map!
    MapTime: the amount of time the player has to finish the map.
    Win: type of winning, the two most common would be "conquest"(capture everything) and "time"(survive), even though you have a win named time, you can still use MapTime to create a time remaining to defeat :)
    AIType: the type of AI, the map can handle "infected" and "alien", which is the two types of AI's that exists. Now Alien AI only affects player 2, noone else, and the other empires are disfunctioning, if you want a multiAI fight, do infected AI!!!!!!!!!!!!!!!!!!!!!!
    Lost- and WinMessage: The text in the message box in the occasion :)

Else than that, you'll have to do a normal map generator :)