Quest Tutorial 1 Simple Introduction

Discussion in 'Tutorials' started by coolblade23, Jul 10, 2019.

  1. coolblade23

    coolblade23 Champion

    Joined:
    Jun 1, 2019
    Messages:
    47
    Likes Received:
    58
    Trophy Points:
    18
    Intro

    Hey people ! Some of you might have recently decided to get into building custom scenarios and might have seen "quests" pop here and there in the process. I want to create a general tutorial on how to help people understand the basics of "quests" and what can be done with them.

    For the purpose of this first episode i will simply show you how to launch your first quest.

    Pre-settings

    For the porpoise of this tutorial we are going to define some terms.

    One of that term will be $root. $root will the path to where you have installed your AoE:Online game. An example of that would be:

    `D:\SteamGames\steamapps\common\Age Of Empires Online` - this will be our root path -> $root

    Process

    Step 1: Create a Custom Scenario

    We will start from 0 so that we have a clean work environment. Our first priority now is to create a custom scenario. Simply fire up the game from the celest launcher and select offline mode. From there simply access the "scenario editor" option and create your scenario. (make something basic, like 1 unit for yourself and one for your enemy, remember this is about quest and not flexing your scenario editor muscles)

    When saving the scenario, let us save all the maps for this tutorial series in a folder (keep things tidy!). Let us save the scenario as "TutorialQuestsScn/Tutorial1". You should be able to find the scenario now at $root/Scenario/TutorialQuestsScn/Tutorial1.age4scn


    Step 1.5: Create a Quest Folder if you do not have one

    Now you need a quest folder to store all the quest files that you will add during this tutorial. The path as to where you add this is important as it will be used as a standard to show up in your quest log.

    Navigate to $root and from there go into "DATA" and create a "Quests" folder.

    You should now have a folder structure like this: $root/DATA/Quests


    Step 2: Create a Quest file

    Now quests files are nothing more than an <xml> definition of rules. Those rules can and how to write them can be fairly complicated at first, but with a bit of practice anyone can get used to them eventually.

    I will avoid going into details outside the scope this tutorial but please not that the content of the quest <xml> is where the tricky part comes into play.

    Navigate to $root/DATA/Quests and create a file called "questtutorial1.quest".

    The ".quest" file extension tells the game that is now a quest file. The contents of a .quest file can be edited with your favorite text editor. I personally use [Sublime 3], but [notepad++] or the default windows note pad will do just as fine.

    Step 3: Edit the Quest file

    Now is where the magic happens. We open the quest file and it should be a blank text file. I will add some starting code that will represent the minimum requirements of what is needed to have the quest running in offline mod. It might look scary at first, but i will explain everything soon enough.

    HTML:
    <?xml version="1.0" encoding="utf-8"?>
    <quest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" uniqueid="3017000" version="117">
        <!-- map intro (start) -->
        <displayname>!questtutorial1</displayname>
        <level>40</level>
        <questtype>RandomMap</questtype>
        <!-- mapp intro (end) -->
    
        <!-- player settings (start) -->
        <playersettings id="1">
            <team>1</team>
            <color>1</color>
        </playersettings>
        <playersettings id="2">
            <team>2</team>
            <color>2</color>
        </playersettings>
        <!-- player settings (end) -->
    
        <randommap>
            <map>Celeste\Celeste_Loader</map>
            <mapvariables>
                <variable name="scenarioFile" type="String">TutorialQuestsScn/Tutorial1</variable>
            </mapvariables>
        </randommap>
    </quest>
    Once you copy-pasted that chunk of text in the .quest file, simply save the changes and close it.


    Step 4: Put the pieces together

    Time to test our hard work! Navigate back to the celest launcher and launch your game in offline mode. Once the game has launched select "Quest" , then select a civilization you would like to play as and then a list of quests should pop up. Normally ,at the top of the list you should see a name "!questtutorial1" -- you guessed it! -- it is your first quest. Congratz !!!

    For the next tutorial i will get into some explaining of what the above piece of code does and how it ties things together as well as maybe show some simple edits in the .quest file and how it can alter the scenario itself.

    From now on, this will know as the STC (standard template construct) and other tutorial quests will use this markup as a base.

    IMPORTANT NOTE: the .quest file will define only 2 players , one strictly blue in team one and one strictly red in team 2. Using more than 2 players in your scenario for the code above may cause some odd behavior.

    IMPORTANT NOTE: document may alter (cuz i am an idiot and i can't proof read) as i learn new things myself
     
  2. Loading...


  3. musictopia2

    musictopia2 Woad Raider

    Joined:
    Apr 8, 2019
    Messages:
    27
    Likes Received:
    15
    Trophy Points:
    3
    One major thing i noticed that is missing is this part.
    <numplayers>2</numplayers>

    that does right under the randommap area.
    that shows how many players there are.
    If you had a third player and set the tag to 3, will be no problem.
    If a person had more than 8 players, then it can only be set via quest file and even random map scripts.
     
  4. coolblade23

    coolblade23 Champion

    Joined:
    Jun 1, 2019
    Messages:
    47
    Likes Received:
    58
    Trophy Points:
    18
    I removed that one intentionally as it seemed the game coped with the change quite ok. I think in the background it adds by default the maximum number of players (8 players, even if only 2 are specified - NOTE: i have not confirmed this , i am just assuming).

    I am not saying that removing the player limit count is a good idea, i just wanted to have that template above as minimal as possible so that the scenario loader can load it with the quest specifications without crashing. (if you remove any property from there the loader will not be able to properly load your scenario , or your scenario will not even show up in the quest list)
     
  5. Exclusive0r

    Exclusive0r Immortal

    Joined:
    Nov 5, 2018
    Messages:
    396
    Likes Received:
    228
    Trophy Points:
    43
    Thanks for this . I'm still struggling with adding custom races ...
     
  6. coolblade23

    coolblade23 Champion

    Joined:
    Jun 1, 2019
    Messages:
    47
    Likes Received:
    58
    Trophy Points:
    18
    I will get to that one as well, but first most people need to learn how to walk before they run ;)
     
    Kenji03 likes this.
  7. Andy P XIII

    Andy P XIII Moderator
    Moderator

    Joined:
    Nov 14, 2017
    Messages:
    562
    Likes Received:
    837
    Trophy Points:
    93
    Thanks so much! I followed along and created my first quest all on my own. It isn't pretty, but it is a start.
     
    Exclusive0r and Kenji03 like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice