In function worldmap@GenerateEncounter there should be this part of code:
uint16 startX = 0, startY = 0;
if( not map.GetEntireCoords( 0, 0, startX, startY ) )
{
Log( "Default entire not found." );
return null;
}
fe.StartHexX = startX;
fe.StartHexY = startY;
StartHexY and StartHexY should be the coordinates of place where you will spawn. You can change it like in the following example to have random spawn location:
uint16 startX = 0, startY = 0;
Entire[] entires;
ParseEntires(map, entires, 0); //0 - entire num
if(entires.length() == 0)
{
Log( "Default entire not found." );
return null;
}
uint index = Random(0, entires.length() - 1);
fe.StartHexX = entires[index].HexX;
fe.StartHexY = entires[index].HexY;
In the example above, you will also have to include entire.fos to the script.
#include "entire.fos"