View unanswered posts | View active topics It is currently Thu Nov 28, 2024 11:03 am



Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
 Basic Mission Making Tutorial - Lessons 01-10 
Author Message
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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 1218 times


Last edited by weegee on Fri Apr 18, 2014 1:23 pm, edited 14 times in total.

Fri Aug 14, 2009 11:39 pm
Profile
User avatar

Joined: Mon Oct 06, 2008 2:04 am
Posts: 1559
Reply with quote
Post Re: Basic Mission Making Tutorial - Lesson 01
Wait is this a mission about making missions?

Holy ♥♥♥♥!


Sat Aug 15, 2009 4:29 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: Basic Mission Making Tutorial - Lesson 01
Your even encouraging good coding habits in this. Anyway, it looks good so far. Nice commenting, ect.


Sat Aug 15, 2009 5:17 am
Profile
User avatar

Joined: Sat Nov 18, 2006 8:11 pm
Posts: 267
Reply with quote
Post 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


Sat Aug 15, 2009 7:33 am
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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 1138 times


Last edited by weegee on Fri Apr 18, 2014 1:24 pm, edited 3 times in total.

Sun Aug 16, 2009 8:20 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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 1053 times


Last edited by weegee on Fri Apr 18, 2014 1:24 pm, edited 3 times in total.

Mon Aug 17, 2009 7:35 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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?


Sat Dec 12, 2009 12:22 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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 989 times


Last edited by weegee on Fri Apr 18, 2014 1:24 pm, edited 3 times in total.

Sun Dec 13, 2009 11:27 pm
Profile
User avatar

Joined: Tue Dec 21, 2010 4:46 pm
Posts: 13
Reply with quote
Post 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


Fri Dec 24, 2010 3:05 pm
Profile ICQ
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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


Last edited by weegee on Sun Jan 30, 2011 2:00 am, edited 1 time in total.



Sat Jan 01, 2011 12:52 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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!


Last edited by weegee on Fri Jan 07, 2011 9:28 pm, edited 1 time in total.



Fri Jan 07, 2011 2:08 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Basic Mission Making Tutorial - Lessons 01-06
For additional information on that topic, see this thread.


Fri Jan 07, 2011 6:08 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post Re: Basic Mission Making Tutorial - Lessons 01-06
Neat, updated OP :)


Fri Jan 07, 2011 9:32 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Thu Jun 11, 2009 2:34 pm
Posts: 966
Location: Moscow, Russia
Reply with quote
Post 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 1018 times


Last edited by weegee on Fri Apr 18, 2014 1:25 pm, edited 2 times in total.

Sat Jan 15, 2011 12:45 am
Profile

Joined: Wed Apr 27, 2011 1:54 am
Posts: 5
Reply with quote
Post 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!


Last edited by charyoshi on Tue May 17, 2011 5:41 am, edited 1 time in total.



Fri May 06, 2011 4:04 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 24 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.053s | 15 Queries | GZIP : Off ]