In yesterday’s post I wrote on how to create a mission in Minecraft using code. Now, if we need to create a world with special characteristics, one of the options we can consider is to define these options in a mission definition file, in XML format.
The definition scheme of the mission is quite broad, however, we can start with some basic attributes. For example, the definition of the terrain. For this we use the <FlatWorldGenerator /> element and in the generatorString attribute, we define some attributes to create a world in Minecraft.
There are pages such as Superflat Preset Generator, that allow us to create these definitions, for example, let’s use the definition shown in the following image
And in a few seconds we will be dead, since the 1st level that this definition creates is a floor of LAVA.
If we change the layers of our floor so that the lava is in the lower level
We can see that the world is more player friendly. Another important point is that as in the definition I have added the ability to have lakes, when the world is created, lakes will be added randomly in it.
In the following image we can see how after digging a bit we started to see the defined layers and also the random lakes in the landscape
At the end of the post I will leave the definition file, and in future posts I will explain how to load it and how to define attributes such as the name of the agent (Valentino), the name of the mission, etc.
Sample Xml Mission Definition code
|<?xml version="1.0" encoding="UTF-8" standalone="no" ?>|
|<Mission xmlns="http://ProjectMalmo.microsoft.com" xmlns:xsi="http://www.w3.org/2001/XMLSchemainstance" xsi:schemaLocation="http://ProjectMalmo.microsoft.com Mission.xsd">|
|<Summary>El Bruno Sample Mission from Xml definition</Summary>|
|<ServerQuitFromTimeUp description="" timeLimitMs="10000"/>|
|<min x="-1" y="-1" z="-1"/>|
|<max x="1" y="-1" z="1"/>|
Greetings @ Toronto
- El Bruno, Minecraft game interaction agents, missions definitions and recording with Project Malmo
- El Bruno, Learning to code with Minecraft? start with Hour of Code, MakeCode and Project Malmo
- Malmo, GitHub Home
- Malmo Mission Xml Schema
- Malmo Mission Xml Schema, FlatWorldGenerator
- Superflat Preset Generator