MegaGlest Forum

Modding and game content creation => Maps, tilesets and scenarios => Topic started by: hairy cat on 22 June 2010, 12:23:43

Title: Random beasts?
Post by: hairy cat 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.
Title: Re: Random beasts?
Post by: Gabbe 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
Title: Re: Random beasts?
Post by: hairy cat 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?
Title: Re: Random beasts?
Post by: Gabbe on 22 June 2010, 14:53:06
I don`t know any further, see if there is a guide on wiki.
Title: Re: Random beasts?
Post by: ultifd 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.  :|
Title: Re: Random beasts?
Post by: hairy cat 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
Title: Re: Random beasts?
Post by: Omega 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 (http://glest.110mb.com/lau.php) 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.
Title: Re: Random beasts?
Post by: ElimiNator 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.
Title: Re: Random beasts?
Post by: titi 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.