if you start a scenario with the command ./glest --load_scenario=example_scenario
it really often crash with my scenario ( i tried it 3 times with another scenario but it don't crash ):
<?xml version="1.0" standalone="yes" ?>
<scenario>
<difficulty value="0"/>
<players>
<player control="cpu" faction="indian" team="1"/> <!-- waypoint -->
<player control="human" faction="tech" team="1"/>
<player control="cpu" faction="tech" team="1"/> <!-- the king (maybe at start or never) -->
<player control="cpu" faction="tech" team="2"/> <!-- team 2 -->
<player control="cpu-easy" faction="egypt" team="3"/>
<player control="cpu" faction="tech" team="2"/> <!-- team 2 -->
<player control="cpu" faction="tech" team="2"/> <!-- team 2 -->
<player control="cpu" faction="tech" team="2"/> <!-- team 2 -->
</players>
<map value="center_castle"/>
<tileset value="evergreen"/>
<tech-tree value="megapack"/>
<default-resources value="false"/>
<default-units value="false"/>
<fog-of-war value="false"/>
<default-victory-conditions value="false"/>
<scripts>
<startup>
disableAi(0)
disableAi(4)
disableAi(2)
disableAi(7)
disableConsume(1)
disableConsume(3)
giveResource('food', 7, 100);
--towers
for i=1, 10 do
createUnit('defense_tower', 3, startLocation(0))
createUnit('defense_tower', 3, startLocation(1))
createUnit('defense_tower', 3, startLocation(2))
createUnit('defense_tower', 3, startLocation(3))
createUnit('defense_tower', 3, startLocation(1))
createUnit('defense_tower', 3, startLocation(2))
createUnit('defense_tower', 3, startLocation(3))
createUnit('defense_tower', 3, startLocation(0))
createUnit('defense_tower', 3, startLocation(0))
createUnit('defense_tower', 3, startLocation(1))
createUnit('defense_tower', 3, startLocation(2))
createUnit('defense_tower', 3, startLocation(3))
createUnit('defense_tower', 3, startLocation(1))
createUnit('defense_tower', 3, startLocation(2))
createUnit('defense_tower', 3, startLocation(3))
createUnit('defense_tower', 3, startLocation(0))
end
--archers
createUnit('worker', 3, startLocation(1))
createUnit('worker', 3, startLocation(2))
createUnit('worker', 3, startLocation(3))
createUnit('worker', 3, startLocation(0))
createUnit('archer', 3, startLocation(1))
createUnit('archer', 3, startLocation(2))
createUnit('archer', 3, startLocation(3))
createUnit('archer', 3, startLocation(0))
createUnit('archer', 3, startLocation(1))
createUnit('archer', 3, startLocation(2))
createUnit('archer', 3, startLocation(0))
createUnit('archer', 3, startLocation(3))
--rest
createUnit('cow', 1, startLocation(6))
createUnit('archer', 1, startLocation(6))
createUnit('archer', 1, startLocation(6))
createUnit('horseman', 1, startLocation(6))
YouUnit=lastCreatedUnit()
for i=1, 10 do
createUnit ( "archer", 7, {startLocation(1)[1], startLocation(1)[2] - 60})
createUnit ( "swordman", 7, {startLocation(1)[1], startLocation(1)[2] - 60})
end
for i=1, 10 do
createUnit ( "archer", 7, {startLocation(1)[1], startLocation(1)[2] - 90})
createUnit ( "swordman", 7, {startLocation(1)[1], startLocation(1)[2] - 90})
end
for i=1, 10 do
createUnit ( "archer", 7, {startLocation(1)[1] + 60, startLocation(1)[2]})
createUnit ( "swordman", 7, {startLocation(1)[1] + 60, startLocation(1)[2]})
end
for i=1, 10 do
createUnit ( "archer", 7, {startLocation(1)[1] + 90, startLocation(1)[2]})
createUnit ( "swordman", 7, {startLocation(1)[1] + 90, startLocation(1)[2]})
end
createUnit('farm', 7, startLocation(4))
createUnit('cow', 7, startLocation(4))
createUnit('cow', 7, startLocation(4))
createUnit('farm', 7, startLocation(4))
createUnit('cow', 7, startLocation(4))
createUnit('cow', 7, startLocation(4))
createUnit('castle', 7, startLocation(4))
createUnit('swordman', 7, startLocation(4))
<!-- some attackers für gutes aussehen -->
createUnit('pyramid', 4, startLocation(7))
createUnit('desert_camp', 4, startLocation(7))
desertUnit=lastCreatedUnit()
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearman', 4, startLocation(7))
createUnit('spearman', 4, startLocation(7))
createUnit('spearman', 4, startLocation(7))
createUnit('spearman', 4, startLocation(7))
createUnit('spearman', 4, startLocation(7))
up=0
createUnit('barracks', 7, startLocation(1))
createUnit('guard', 7, startLocation(4))
createUnit('guard', 7, startLocation(4))
createUnit('guard', 7, startLocation(4))
barrackUnit=lastCreatedUnit()
barracksattacktimes=0
<!-- waypoint -->
createUnit('totem', 0, startLocation(5))
waypointUnit=lastCreatedUnit()
setCameraPosition(unitPosition(waypointUnit))
cell_event1 = registerCellTriggerEventForUnitToUnit(YouUnit,waypointUnit)
<!-- Dialog 1 -->
showMessage('chief1', 'chief')
showMessage('swordman1', 'swordman')
showMessage('info1', 'info')
objective= 'kill_enemy'
</startup>
<unitCreatedOfType type="spearman">
givePositionCommand(lastCreatedUnit(), 'attack', {startLocation(3)[1] + 5, startLocation(3)[2] + 5})
</unitCreatedOfType>
<unitCreatedOfType type="spearthrower">
givePositionCommand(lastCreatedUnit(), 'attack', {startLocation(3)[1] + 5, startLocation(3)[2] + 5})
</unitCreatedOfType>
<unitCreatedOfType type="guard">
givePositionCommand(lastCreatedUnit(), 'attack', {startLocation(3)[1] + 5, startLocation(3)[2] + 5})
</unitCreatedOfType>
<cellTriggerEvent>
--print('Cell Event ' .. triggeredCellEventId() )
if triggeredCellEventId() == cell_event1 then
setDisplayText('yeah')
setPlayerAsWinner(1)
setPlayerAsWinner(2)
endGame()
unregisterCellTriggerEvent(cell_event1)
end
</cellTriggerEvent>
<unitDied>
if unitCount(4)==2 then
giveResource('gold', 4, 1000);
giveResource('wood', 4, 1000);
giveResource('food', 4, 1000);
giveProductionCommand(desertUnit, 'spearthrower')
giveProductionCommand(desertUnit, 'spearthrower')
giveProductionCommand(desertUnit, 'spearman')
if up==0 then
giveUpgradeCommand(desertUnit, 'spear_weapons')
up=1
end
if unitCountOfType(7, 'cow')==0 and unitCountOfType(7, 'farm')==0 then
for i=1, 50 do
createUnit('spearthrower', 4, startLocation(7))
createUnit('spearman', 4, startLocation(7))
end
end
giveResource('gold', 7, 1000);
giveResource('wood', 7, 1000);
giveProductionCommand(barrackUnit, 'guard')
giveProductionCommand(barrackUnit, 'guard')
giveProductionCommand(barrackUnit, 'guard')
end
if lastDeadUnit()==YouUnit then
setDisplayText('ah')
setPlayerAsWinner(3)
setPlayerAsWinner(5)
endGame()
end
</unitDied>
</scripts>
</scenario>
(something with sound i think because at last it says on the loading screen "Starting music stream")