Data Realms Fan Forums
http://forums.datarealms.com/

Basic Mission Making Tutorial - Lessons 01-10
http://forums.datarealms.com/viewtopic.php?f=8&t=16219
Page 1 of 2

Author:  weegee [ Fri Aug 14, 2009 11:39 pm ]
Post subject:  Basic Mission Making Tutorial - Lessons 01-10

Basic Mission Making Tutorial 01 - Simple empty mission

I'm going to write some tutorial lessons about missions. Every lesson will be a short one, where I'll explain some separate concept of mission making. This is the first and here I'll explain what is what in mission files and what script do you need to have an empty mission. Almost everything you need to know is written in the comments of attached Tutorial mission. If you want to know more about scene making, you MUST read Scene Making Tutorial by Zalo ( http://datarealms.com/forum/viewtopic.php?f=8&t=5882 ), I'll concentrate on mission scripting. To understand everything better you should read files in the following order:

    index.ini
    scenes.ini
    terrains.ini
    Scenes/MissionTutorial_01.ini
    Mission Activities.ini
    Scenes/Scripts/MissionTutorial_01.lua

More Mission Making Tutorials en route. I'll post them here as separate missions in separate messages so you could advance from one to another, compare what's changed and make reference links to specific parts of this tutorial. PM me about any technical error's, corrections or questions about this tutorial to keep this thread clean. Please, post any other mission making questions in separate threads.

Continue reading:
Triggers, timers, information and mission phase flow - http://www.datarealms.com/forum/viewtopic.php?p=301006#p301006
Spawning actors, weapons and controlling AI - http://www.datarealms.com/forum/viewtopic.php?p=301183#p301183
Adding simple mission objectives - http://forums.datarealms.com/viewtopic.php?p=323100#p323100
Difficulty levels - http://forums.datarealms.com/viewtopic.php?p=393295#p393295
Fog of war - http://forums.datarealms.com/viewtopic.php?p=394281#p394281
Making missions invisible for activity selection screen - http://forums.datarealms.com/viewtopic.php?p=395638#p395638
Using faction files and libraries in your missions - http://forums.datarealms.com/viewtopic.php?p=440623#p440623p
Using faction selection UI - http://forums.datarealms.com/viewtopic.php?p=491221#p491221
New stuff in B30 - http://forums.datarealms.com/viewtopic.php?p=549507#p549507

Useful threads:
Fog of War stuff - http://forums.datarealms.com/viewtopic.php?f=73&t=20705
How to make a mission playable in B24 - http://forums.datarealms.com/viewtopic.php?f=8&t=20627
How to make mission invisible to activity selection screen http://forums.datarealms.com/viewtopic.php?f=73&t=20928

Attachments:
MissionTut_01.rte.zip [28.89 KiB]
Downloaded 258 times

Author:  LowestFormOfWit [ Sat Aug 15, 2009 4:29 am ]
Post subject:  Re: Basic Mission Making Tutorial - Lesson 01

Wait is this a mission about making missions?

Holy ♥♥♥♥!

Author:  mail2345 [ Sat Aug 15, 2009 5:17 am ]
Post subject:  Re: Basic Mission Making Tutorial - Lesson 01

Your even encouraging good coding habits in this. Anyway, it looks good so far. Nice commenting, ect.

Author:  Foogooman [ Sat Aug 15, 2009 7:33 am ]
Post subject:  Re: Basic Mission Making Tutorial - Lesson 01

I'm so glad you decided to do this! Hopefully with your help we can start seeing more missions around here. Excellent work :D

Author:  weegee [ Sun Aug 16, 2009 8:20 pm ]
Post subject:  Basic Mission Making Tutorial - Lesson 02

Basic Mission Making Tutorial 02 - Triggers, timers, information and mission phase flow

In the second lesson of this tutorial I'll show how to check if an actor reached some area, how to use timers and trigger victory. You'll also know how you can build a mission that has several phases and several objectives and how you can show them to the player. You only need to check Scenes/Scripts/MissionTut_02.lua in attached mission for changes. Notice that mission tutorial module is now called MissionTut instead of MissionTutorial because CC editors hang when they notice the word "tutorial" somewhere in file paths.

Attachments:
MissionTut_02.rte.zip [32.09 KiB]
Downloaded 206 times

Author:  weegee [ Mon Aug 17, 2009 7:35 pm ]
Post subject:  Basic Mission Making Tutorial - Lesson 03

Basic Mission Making Tutorial 03 - Spawning actors, weapons and controlling AI

In the third lesson of this tutorial I'll describe how to spawn actors and dropships loaded with actors. You'll learn how to basically manipulate the AI and tell actors to do what you want. You need to check Scenes/Scripts/MissionTut_03.lua for changes. I removed some already unnecessary comments from the code.

You should also check out the Scenes/MissionTut_03.ini to see how you give weapons to added actors. You should NEVER drop weapons near actors for released missions. That's ok when you develop and debug, but once you have it released dropped weapons can lead to fail. The problem is that AI is unpredictable and you can't always guarantee that actors will take weapons. You can't also add more than one weapon this way. Game editors (no matter what you edit: scenes or areas) usually erase manually added weapons from <scene name>.ini file when you save them. You better place all actors at the end of the added objects in scene .ini, add weapons, select all troops and save them to separate text file. After each edit you can just copy-paste your troops from this backup file, just don't forget to alter it if you change troops positions. The end of the added objects in this .ini file is just before the AddBackgroundLayer statements. Now download attached mission and enjoy reading the code.

Attachments:
MissionTut_03.rte.zip [31.26 KiB]
Downloaded 211 times

Author:  weegee [ Sat Dec 12, 2009 12:22 am ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-03

I wanted to make the fourth lesson for this tutorial but it seems that I covered anything. Any suggestions about what should be added here?

Author:  weegee [ Sun Dec 13, 2009 11:27 pm ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-03

Basic Mission Making Tutorial 04 - Simple mission objectives.

In the fourth lesson of this tutorial I'll describe how you can add different objectives to your mission and check for winning conditions. I've included four simple objectives here: "Clear the area" , "Assassinate single target", "Obtain item" and "Evacuate". As usual you need to check Scenes/Scripts/MissionTut_04.lua for changes.

Attachments:
MissionTut_04.rte.zip [35.62 KiB]
Downloaded 183 times

Author:  Raseri [ Fri Dec 24, 2010 3:05 pm ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-04

I have an idea about the content of a new tutorial.
1) The order for the enemies to move in a certain point

2) The order to perform certain actions (jump, lie on the floor, Go to the right for 5 seconds and so on)
3) Forced opening and closing doors (when a player enters a certain zone)
4) Forced release of cargo from the ship, ordered the ship to pick up a unit from the ground
5) Forced throwing and picking up weapons

6) Create special effects (computer monitors, alarms, landing lights, smoke and fire)
7) Creation of rockets and bullets at a given speed and direction

8) Creation of friendly soldiers, which can not be controlled

9) Detach parts of objects

Author:  weegee [ Sat Jan 01, 2011 12:52 pm ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-05

Basic Mission Making Tutorial 05 - Difficulty levels

Today's lesson will be very short but useful. Current difficulty setting selected by the slide bar is stored simply in
Code:
self.Difficulty

where self is your current Activity. It contains integer values from 0 to 100 where 0 is the easiest and 100 is the hardest selection available.

You can also use a set of constants to determine which difficulty level was chosen by player. These are:
Code:
GameActivity.CAKEDIFFICULTY
GameActivity.EASYDIFFICULTY
GameActivity.MEDIUMDIFFICULTY
GameActivity.HARDDIFFICULTY
GameActivity.NUTSDIFFICULTY
GameActivity.MAXDIFFICULTY

Author:  weegee [ Fri Jan 07, 2011 2:08 am ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-05

Basic Mission Making Tutorial 06 - Fog of war

So today's topic is the new fancy feature of B24. No complete missions this time, I'm too lazy for that and a couple of lines of code would be more than enough.

To enable fog of war for any team use:
Code:
SceneMan:MakeAllUnseen(resolution_vector , team)

where resolution_vector is a vector which specifies fog resolution, for example with Vector(1,1) you can make fog of war revealable pixel by pixel, while Vector(25 , 25) will make fog of war revealable by 25x25 pixel tiles. Default activities currently use 25x25 size.

Example:
Code:
SceneMan:MakeAllUnseen(Vector(25, 25), Activity.TEAM_1)




To reveal one tile of fog of war use:
Code:
SceneMan:RevealUnseen(x , y , team)

where x and y are the screen coordinates of tile you want to reveal. Tile size is set by MakeAllUnseen.

Example:
Code:
SceneMan:RevealUnseen(100, 100, Activity.TEAM_1)



You can also reveal fog of war by using SceneMan:CastSeeRay() but I didn't get how it works from the original Prospecting.lua script :)


Finally as you may notice default actors are almost blind, so of you want you missions to be playable with fog of war you might want to create custom actors which see further. To change sight distance of an actor add or change SightDistance attribute in actor's definition.

Example:
Code:
AddActor = AHuman
   CopyOf = Dimitri
   PresetName = Dimitri Sniper
   Description = Dimitri. Sniper.
   AddToGroup = Actors
   Buyable = 0
   AimDistance = 300
   SightDistance = 2000


That's all folks!

Author:  Roast Veg [ Fri Jan 07, 2011 6:08 pm ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-06

For additional information on that topic, see this thread.

Author:  weegee [ Fri Jan 07, 2011 9:32 pm ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-06

Neat, updated OP :)

Author:  weegee [ Sat Jan 15, 2011 12:45 am ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-06, 08

Basic Mission Making Tutorial 08 - Launching additional missions from main activity while hiding them from the main activity selection screen.

This time it's a little bit complicated but it seems to be the only way to solve the issue. Biggest thanks to TheLastBanana, Mail2345, Roast Veg and all the other guys from this http://forums.datarealms.com/viewtopic.php?f=73&t=20928 thread. This is lesson is just the implementation of the ideas discussed there. Read Lua code from included mission, everything is explained in comments as usual.

And yeah I've miscounted lesson lumbers so we've lost Lesson 7 because I'm too lazy to change all mission files from 08 to 07. I'll fill it with something later if I'll find something useful or unknown or unexplained or whatever.

Attachments:
MissionTut_08.rte.zip [30.28 KiB]
Downloaded 186 times

Author:  charyoshi [ Fri May 06, 2011 4:04 am ]
Post subject:  Re: Basic Mission Making Tutorial - Lessons 01-06, 08

I've been reading through the first 2 tutorials, and I'm slowly figuring things out, but i cant actually test any of your missions here that you've made. The closest I can do is to select the level you've made in a prospecting mission. Whenever i try to play tutorial_01 or tutorial_02, it makes me assign players to 2 teams but it only allows for one team to be assigned.

How do i play the mission levels on their actual missions? I duno lol :???:

EDIT: sweet! weegee fixed up the old missions for B24!

thanks weegee!

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/