Author Topic: Random beasts?  (Read 1642 times)

hairy cat

  • Guest
Random beasts?
« on: 22 June 2010, 12:23:43 »
Hey!
Is it possible to create a scenario where you start with a faction and there are random beasts around that don't need ressouces to live?
If so, is it also possible to choose the location of each beast?
If it is, please say how to xml it.

Gabbe

  • Guest
Re: Random beasts?
« Reply #1 on: 22 June 2010, 13:10:44 »
make the "beasts" a faction and place them were you want, if this is not the case, lock this thread, glestimals do the job on GAE

hairy cat

  • Guest
Re: Random beasts?
« Reply #2 on: 22 June 2010, 14:52:28 »
well thats not exacly what i meant. I mean, how do i place EACH beast at an exact location? Do i really have to create a faction for every single one of them?

Gabbe

  • Guest
Re: Random beasts?
« Reply #3 on: 22 June 2010, 14:53:06 »
I don`t know any further, see if there is a guide on wiki.

ultifd

  • Airship
  • ********
  • Posts: 4,443
  • The Glest Video Guy :) The one and only. :P
    • View Profile
    • My Youtube Channel
Re: Random beasts?
« Reply #4 on: 22 June 2010, 17:15:33 »
Well, I don't know much about secnarios, but I think you can do what you...want to do?
Probably all you need to do is to decide where they should be, and then list the "X,Y" Coordinates... I guess.  :|

hairy cat

  • Guest
Re: Random beasts?
« Reply #5 on: 22 June 2010, 19:45:49 »
Probably all you need to do is to decide where they should be, and then list the "X,Y" Coordinates... I guess.  :|

Ah. Can you tell me how to do that please?

Well, I don't know much about secnarios, but I think you can do what you...want to do?

Oh, cool, the only problem is that i don't really know how to... Got a big deal to learn

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Random beasts?
« Reply #6 on: 22 June 2010, 23:03:47 »
Probably all you need to do is to decide where they should be, and then list the "X,Y" Coordinates... I guess.  :|

Ah. Can you tell me how to do that please?
See this to learn about lau, the scripting language used for glest's scenarios.

Also, military's scenarios have a lot of scripting (the most scripting is found in the End of Morning Scenarios).

Basically, the command is:
Code: [Select]
createUnit('unit_name', #1, {x, y})Where 'unit_name' is the exact name of the unit (all lowercase), #1 is the faction index, from 0-3 (ie: one for each of the four players), and {x,y} is pretty obvious.
Remember that the faction index must be the same faction that actually has that unit. So assuming player 0 is human and player 1 is the beasts, as well as you have a unit called 'beast' in the beast's faction, you could use:
Code: [Select]
createUnit('beast', 1, {55,20})to create a unit at 55x 20y. Note that x and y are in CELLS, not TILES. A map that is 128x128 is actually 256x256 tiles (each tile has 2x2 cells). The last row and column aren't usable.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

ElimiNator

  • Airship
  • ********
  • Posts: 3,391
  • The MegaGlest Moder.
    • View Profile
Re: Random beasts?
« Reply #7 on: 23 June 2010, 05:36:29 »
Just make a 1 faction for all of them and put it in the scenario folder (Only for MG) and specify in the scenario XML.
Get the Vbros': Packs 1, 2, 3, 4, and 5!

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: Random beasts?
« Reply #8 on: 25 June 2010, 09:38:50 »
and in MG they will not consume any food (by default)! So noone will die if there is a lack of food.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios