Good!

Before continuing to analyze the sections that have an xml file with the definition of a mission in Minecraft, I will share a small ConsoleApp sample project which creates from scratch the necessary elements to interact in a Minecraft mission.

The function that initializes the mission from a file is


private static void InitMissionSpecs()
{
var missionXmlDefinition = File.ReadAllText("SampleMission.xml");
_mission = new MissionSpec(missionXmlDefinition, false);
_mission.requestVideo(640, 480);
var recordedFileName = $"./mission_data{DateTime.Now:hh mm ss}.tgz";
_missionRecord = new MissionRecordSpec(recordedFileName);
_missionRecord.recordCommands();
_missionRecord.recordMP4(20, 400000);
_missionRecord.recordRewards();
_missionRecord.recordObservations();
}

In line 4 we can see the definition in plain xml mode can be used in the MissionSpec() constructor. From this moment, the mission is created with the parameters of the file.

It is possible, once created about writing some values, as for example in line 5 where I define the video quality with which the mission will be executed.

 

Sample Project en GitHub link

Greetings @ Toronto

El Bruno

References

 

4 responses to “#VS2017 – Sample ConsoleApp to initialize missions in #Minecraft with Xml #ProjectMalmo”

  1. […] El Bruno, Sample ConsoleApp to initialize missions in Minecraft using an Xml file definition […]

    Like

  2. […] El Bruno, Sample ConsoleApp to initialize missions in Minecraft using an Xml file definition […]

    Like

  3. […] El Bruno, Sample ConsoleApp to initialize missions in Minecraft using an Xml file definition […]

    Like

  4. […] El Bruno, Sample ConsoleApp to initialize missions in Minecraft using an Xml file definition […]

    Like

Leave a reply to #VS2017 – Commands with the basic movements for an #Minecraft Agent with #ProjectMalmo – El Bruno Cancel reply

Discover more from El Bruno

Subscribe now to keep reading and get access to the full archive.

Continue reading