Current modding for the new tutorials

Post your mods and custom content here

Current modding for the new tutorials

Postby supermalparit » Wed May 21, 2014 7:49 pm

Hi,

I just wanted to post something about how the new tutorial will work.

Basically you set a bunch of images that are loaded when the game starts. Only the first image is shown on the tutorial panel, after that, based on some events the new images will be loaded. Here is a simple example:

Code: Select all
<campaign>
   <id />
   <name />

   <mission>
      <id />
      <name />
      <text /> (actually not used anymore, but the game still loads it)
      <allowBury />

      <tutorialImages>begin.png,trees.png,welldone.png</tutorialImages>
      <tutorialFlow>
         <flow>
            <!-- Begin image, it just loads the next image -->
            <newImageTriggers>
               <trigger>
                  <type>NO_TRIGGER</type>
               </trigger>
            </newImageTriggers>
         </flow>

         <flow>
            <!-- chop trees image, it makes blink the bottom menu and the trees, the new image is loaded when you collect some wood -->
            <blinkItems>palmtree,tree,tree2</blinkItems>
            <blinkBottom>chop</blinkBottom>
            <newImageTriggers>
               <trigger>
                  <type>COLLECT</type>
                  <param1>rmwood</param1>
                  <param2>1</param2>
               </trigger>
            </newImageTriggers>
         </flow>
      </tutorialFlow>
   </mission>
</campaign>


The <blinbkkBottom> in the example makes blink the half-circle in the bottom (in the case the menu is hidden) and the chop item.


The <flow> tag, actually, can also contain these new tags:

Code: Select all
<blinkPiles>rawmaterials</blinkPiles>
<blinkRight>walls,wooden,qwoodenwall</blinkRight>
<blinkProduction regularPlus="true" regularMinus="true" automatedPlus="true" automatedMinus="true">food,gathering,trees,qharvestpapple</blinkProduction>

In the example the game will make blink the raw material piles, the full path to the wooden wall item in the menu on the right and the full path to the harvest apples item (and the 4 +/-) in the production menu.
Xavi Canal
Image
User avatar
supermalparit
Towns team
 
Posts: 2444
Joined: Thu Oct 27, 2011 11:57 pm

Re: Current modding for the new tutorials

Postby soad2237 » Wed May 21, 2014 10:55 pm

What new tutorial? Are you now taking over the development again? What's the news?
soad2237
 
Posts: 2
Joined: Tue Feb 18, 2014 5:41 am

Re: Current modding for the new tutorials

Postby YetiChow » Thu May 22, 2014 1:02 am

soad2237 wrote:What new tutorial? Are you now taking over the development again? What's the news?


check out http://www.townsgame.com/forums/viewtopic.php?f=8&t=11495 :)

This info is for working with the upcoming improvements to the tutorial system, something I'll be very happy to start playing around with... it looks like the 'blinking' could be really useful for pointing out specific targets of combat missions, e.g. "kill the Goblin King" and have him blink... we'll have to see what else comes in that package, it would be great if we could also "ping" the minimap or maybe even move the camera to a particular coordinate...

The new trigger format looks interesting, I can imagine much more story-driven missions using that... for example, if there's a quest to reforge a mythical blade then the 'success' image could show the blade or the forging process; and then an image of Sir Punchwood holding the blade heroically; the next mission is to prepare for a great battle, and the picture for that could show the aftermath; and then the final mission to kill the specific boss could show the victory picture of Sir Punchwood standing over the dead boss, sword in hand and heroically posed looking into the distance.
What's that you're eating? A nice, juicy apple? You weren't supposed to eat that you fool, you were supposed to make it into a pie! - last words recorded words of Francis D'Avre before he went looking for snowcherries, but found a hungry Yeti instead.
User avatar
YetiChow
 
Posts: 3149
Joined: Wed Apr 25, 2012 9:26 am
Location: Cramped between a Yeti's small intestine and its stomach... trying not to dissolve!

Re: Current modding for the new tutorials

Postby Neuntoter » Thu May 22, 2014 11:26 pm

I can see using this in my DooM mod after I have some more structure placed. I am actually super excited about this system. Keep up the great work guys.
Image
http://www.moddb.com/company/enguised-studios

Currently working on the "DooM Towns" mod
&
Tik Tok Tank - an Enguised Studio original game
User avatar
Neuntoter
 
Posts: 30
Joined: Sat Nov 17, 2012 5:44 pm

Re: Current modding for the new tutorials

Postby supermalparit » Mon May 26, 2014 7:29 pm

We did some changes to the new tutorial, instead of just images we will use a text system like before but combined with the load of images. The text system is better mostly because the use of game languages.

This is the current tags the game uses:

Code: Select all
<!--
   Campaign tags.

   <campaign>
      <id /> -> Campaign ID (should be the folder name)
      <name /> -> Campaign name (this name is shown when you want to start a new game)
      <mission>
         <id /> -> Mission ID (should be the folder name)
         <name /> -> Mission name (this name is shown when you want to start a new game)
         <text /> -> Deprecated
         <allowBury /> -> true (default) or false. Indicates if you can start the map with a buried town in it

         <tutorialFlow> -> It will contain all the "tutorial" flow
            <flow> -> Inside the tutorial flow tag you can place from 1 to N <flow> tags to control the flow
               <title /> -> Title of the flow, it is displayed in the upper side of the tutorial panels
               <text /> -> Text of the flow, after the <title> the texts will be rendered. You can place from 1 to N <text>
               <image /> -> Little image to show on the upper left corner of the tutorial panels
               <startEvents /> -> A comma separated list of events that will start when the player reach the flow
               <nextMission />
                  -> If this tag is set a button will appear on the tutorial panels to advance to other mission
                  -> It should be the campaign and the mission IDs (the folder names) separated by a comma (IE. c2,m2)
               <blinkItems /> -> A comma separated list of items (from items.xml) to make them blink in this flow
               <blinkPiles /> -> A comma separated list of pile types to make them blink in this flow
               <blinkBottom /> -> A comma separated list of IDs from the bottom menu (actions or submenus) to make them blink in this flow
               <blinkRight /> -> A comma separated list of IDs from the menu on the right (actions or submenus) to make them blink in this flow
               <blinkProduction /> -> A comma separated list of IDs from the production menu (actions or submenus) to make them blink in this flow
               <blinkMinis /> -> A comma separated list of minimap icon names to make them blink in this flow

               <orderedTriggers /> true or false (default). Indicates if the triggers of this flow should be completed in order
               <triggers> -> Here are the list of triggers that the player should met (IN ORDER) to advance to the next flow
                  <trigger> -> Trigger tag
                     <type /> -> Trigger type. Possible values (COLLECT, BUILD, ZONE, KILL, PILE, SOLDIER, WASD, LAYERUPDOWN)
                     <param1 /> -> First parameter used for some trigger types
                     <param2 /> -> Second parameter used for some trigger types
                     <paramXYZ /> -> Used for the "PLACE" trigger type
                  </trigger>
               </triggers>
            </flow>
         </tutorialFlow>
      </mission>
   </campaign>


   blinkMinis values:
      flat -> Makes blink the flatten blocks mini icon
      grid -> Makes blink the grid mini icon
      flatcursor -> Makes blink the flatten blocks near the cursor tmini icon
      3dmouse -> Makes blink the 3d mouse mini icon
      settings -> Makes blink the settings mini icon
      levelup -> Makes blink the level up mini icon
      leveldown -> Makes blink the level down mini icon
      speedup -> Makes blink the speed up mini icon
      speeddown -> Makes blink the speed down mini icon
      pause -> Makes blink the resume/pause mini icon
      regularplus -> Makes blink the regular + on the production panel
      regularminus -> Makes blink the regular - on the production panel
      automatedplus -> Makes blink the automated + on the production panel
      automatedminus -> Makes blink the automated - on the production panel


   Trigger types:
      COLLECT -> param1 is the item ID, param2 is the number of items the player should build
      BUILD -> param1 is the building ID, param2 is the number of buildings the player should build
      ZONE -> param1 is the zone ID, param2 is the number of zones the player should build
      PILE -> param1 is the stockpile ID, param2 is the number of stockpiles the player should build
      SOLDIER -> param2 is the number of civilians that should be converted to soldiers
      WASD -> No params, it checks that the camera moves in the 4 directions (using keyboard or mouse)
      LAYERUPDOWN -> No params, it checks that the camera moves through the layers (using keyboard or mouse)
      ICONHIT -> param1 is the mini icon ID (the same ones as the blinkMinis tag), it checks the player hit on it (using mouse or keyboard)
      PLACE -> param1 is the item ID, paramXYZ are the coordinates where the item should be placed
      POPULATION -> param2 (TAKE CARE is not param1) is the minimum number of population you need to acomplish the trigger

-->
Xavi Canal
Image
User avatar
supermalparit
Towns team
 
Posts: 2444
Joined: Thu Oct 27, 2011 11:57 pm

Re: Current modding for the new tutorials

Postby Madara Uchiha » Mon May 26, 2014 8:51 pm

It's probably a bit too late now, but perhaps you should release a proper XSD file that properly places constraints and also documents what each tag means and what attributes is may have.

You know, code reads better than documentation.
Madara Uchiha
 
Posts: 120
Joined: Sat Nov 17, 2012 1:57 pm

Re: Current modding for the new tutorials

Postby supermalparit » Tue May 27, 2014 9:30 pm

Madara Uchiha wrote:It's probably a bit too late now, but perhaps you should release a proper XSD file that properly places constraints and also documents what each tag means and what attributes is may have.

You know, code reads better than documentation.


You are right, but as you said right now maybe is too late.


Btw, I just updated the last post with the new "blinkMinis" tag and the new "ICONHIT" trigger type.
Xavi Canal
Image
User avatar
supermalparit
Towns team
 
Posts: 2444
Joined: Thu Oct 27, 2011 11:57 pm

Re: Current modding for the new tutorials

Postby supermalparit » Fri Jun 13, 2014 10:15 am

Updated
Xavi Canal
Image
User avatar
supermalparit
Towns team
 
Posts: 2444
Joined: Thu Oct 27, 2011 11:57 pm

Re: Current modding for the new tutorials

Postby jacobhankins » Mon Aug 11, 2014 1:48 am

Thank you for this, this will actually help me a lot as i'm new into this game.
jacobhankins
 


Return to Modding

Who is online

Users browsing this forum: No registered users and 5 guests

cron