mirror of
https://github.com/weyne85/DCS_mission_creating.git
synced 2025-08-15 13:17:20 +00:00
initial commit
This commit is contained in:
102
MOOSE/docs/beginner/ask-for-help.md
Normal file
102
MOOSE/docs/beginner/ask-for-help.md
Normal file
@@ -0,0 +1,102 @@
|
||||
---
|
||||
parent: Beginner
|
||||
nav_order: 06
|
||||
---
|
||||
# How to ask for help
|
||||
{: .no_toc }
|
||||
|
||||
1. Table of contents
|
||||
{:toc}
|
||||
|
||||
After you have tried to solve the problem on your own, you can also get help
|
||||
from the community.
|
||||
|
||||
{: .highlight }
|
||||
> But it is important to follow certain rules! Read them below.
|
||||
|
||||
## Communities
|
||||
|
||||
There are two ways to communicate with the community.
|
||||
The fastest way is to use Discord:
|
||||
|
||||
- <https://discord.gg/gj68fm969S>{:target="_blank"}
|
||||
|
||||
But if you don't like Discord, you are able to post in the DCS forum.
|
||||
Check out the MOOSE thread here:
|
||||
|
||||
- <https://forums.eagle.ru/showthread.php?t=138043>
|
||||
|
||||
## How to post requests
|
||||
|
||||
MOOSE is a community project and support is community based.
|
||||
|
||||
Please remember when posting a question:
|
||||
|
||||
- Before posting anything follow the [troubleshooting steps].
|
||||
- **Read your logs**.
|
||||
|
||||
### Formulate a good description
|
||||
|
||||
A post should contain the following:
|
||||
|
||||
- A description what you expected to happen and what actually happened.
|
||||
- Do not use vague words this stuff is hard to help with! Be specific.
|
||||
|
||||
- Describe what happens instead.
|
||||
- The less detail you offer, the less chance you can be helped.
|
||||
- Don't say it doesn't work. Or is it broken. Say what it actually does.
|
||||
|
||||
### Format your code
|
||||
|
||||
The easier your code is to read, the more likely you are to get a helpful answer. If your code is hard to read, some
|
||||
people who could help you may not even bother to read your code. Syntax Highlighting makes the code much clearer and
|
||||
easier to understand. Therefore:
|
||||
|
||||
- Post your code in Discord as formatted code:
|
||||
|
||||
- Wrap a single line of code in backticks \` like this:
|
||||
|
||||

|
||||
|
||||
- Multiple lines of code should be posted like this:
|
||||
|
||||

|
||||
|
||||
### Do not post a screenshot of your code
|
||||
|
||||
Your code is easy to read on a screenshot if you are using a good text editor or IDE, but if someone discovers an error
|
||||
in your code and wants to post a corrected version, they will have to type out the entire code. This could lead to them
|
||||
not helping you because it's too much work for them.
|
||||
|
||||
### Post your log
|
||||
|
||||
If the error message in the `dcs.log` does not tell you anything, then post it in the Discord.
|
||||
|
||||
- Post the important log lines with the error or warning messages. Format them like this:
|
||||
|
||||

|
||||
|
||||
### Send your mission when requested
|
||||
|
||||
Please don't just send your mission file. You have to manually extract the script from the file.
|
||||
It is better to send your script code and log lines beforehand.
|
||||
If this does not help, you may be asked to send your mission.
|
||||
|
||||
- Some complex problems need the mission (.miz file) also.
|
||||
|
||||
- But post your mission only when requested.
|
||||
- Try to simplify your mission if it is complex!
|
||||
- Try to avoid or delete MODs, because could prevent people from helping you.
|
||||
|
||||
There are people in the Discord and in the forum, who spend their free time to
|
||||
help you. <br />
|
||||
It is your responsibility to make their "work" as easy as possible.
|
||||
|
||||
Welcome to MOOSE and good luck!
|
||||
|
||||
## Next step
|
||||
|
||||
Last but not least some [tipps and tricks].
|
||||
|
||||
[troubleshooting steps]: problems.md
|
||||
[tipps and tricks]: tipps-and-tricks.md
|
||||
58
MOOSE/docs/beginner/demo-missions.md
Normal file
58
MOOSE/docs/beginner/demo-missions.md
Normal file
@@ -0,0 +1,58 @@
|
||||
---
|
||||
parent: Beginner
|
||||
nav_order: 04
|
||||
---
|
||||
|
||||
# Demo missions
|
||||
{: .no_toc }
|
||||
|
||||
1. Table of contents
|
||||
{:toc}
|
||||
|
||||
The best way to get comfortable with a Moose class is to try the demo missions
|
||||
of the class you want to learn. The Moose team created a lot of demo missions
|
||||
for most of the classes.
|
||||
|
||||
## Download demo missions
|
||||
|
||||
Go to the repository [MOOSE_MISSIONS]{:target="_blank"}, search the folder of
|
||||
the class, download the mission (`.miz`) and run them.
|
||||
|
||||
## Read the mission script
|
||||
|
||||
In the same folder a `.lua` file with the same name is placed which is the
|
||||
included mission script. You can watch these mission scripts easily online at
|
||||
GitHub to understand what is happening in the mission.
|
||||
|
||||
## Read documentation
|
||||
|
||||
Next step is to read the [documentation]{:target="_blank"} of the class to
|
||||
understand the code of the demo mission.
|
||||
|
||||
{: .note }
|
||||
> The documentation is quite long and might be confusing for beginners.
|
||||
> Start by looking at the description at the top of the documentation of a
|
||||
> class. It often contains examples and explanations. <br /><br />
|
||||
> Then search for the function names and look at the description of the
|
||||
> functions and its parameters.
|
||||
|
||||
## Make small changes to the script
|
||||
|
||||
Download the `.lua` file, change the parameters to suit your needs in
|
||||
[Notepad++]{:target="_blank"}, add it to the mission and rerun the mission.
|
||||
Observe what happens and adapt the code.
|
||||
|
||||
If you want to use more functions combine them all up.
|
||||
|
||||
{: .note }
|
||||
> But it is wise to do this in small steps. So it is easier to find errors.
|
||||
|
||||
## Next step
|
||||
|
||||
If the mission does not show the expected behaviour take a look at section
|
||||
[problems].
|
||||
|
||||
[MOOSE_MISSIONS]: https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop
|
||||
[documentation]: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/index.html
|
||||
[Notepad++]: https://notepad-plus-plus.org/downloads/
|
||||
[problems]: problems.md
|
||||
181
MOOSE/docs/beginner/hello-world-build.md
Normal file
181
MOOSE/docs/beginner/hello-world-build.md
Normal file
@@ -0,0 +1,181 @@
|
||||
---
|
||||
parent: Beginner
|
||||
nav_order: 03
|
||||
---
|
||||
|
||||
# Create your own Hello world
|
||||
{: .no_toc }
|
||||
|
||||
1. Table of contents
|
||||
{:toc}
|
||||
|
||||
This page will lead you step by step through the process of creating a mission
|
||||
with MOOSE. This time we include a simple mission script, which sends only
|
||||
a "Hello world" message to all players. But the steps are the same to add
|
||||
another mission script, which will do whatever class(es) you want to use.
|
||||
|
||||
## Create Mission script
|
||||
|
||||
At first we will create the mission script. It is a simple text file and can be
|
||||
changed with a lot of different tools. Theoretically even the Microsoft Notepad
|
||||
editor can be used. But it lacks a lot of features, which helps you to avoid
|
||||
errors.
|
||||
|
||||
For this guide we suggest you to download, install and use [Notepad++]{:target="_blank"}.
|
||||
|
||||
{: .important }
|
||||
> Windows hides filename extensions by default. So when you create a text file
|
||||
> and name it `hello-world.lua` it's name is `hello-world.lua.txt` in reality.
|
||||
> You must activate the display of the file name extension.
|
||||
> Open a `File Explorer`, switch to menu `View` and find the option
|
||||
> `File name extensions` in the section `Show/hide`. Activate it.
|
||||
|
||||
- Open a File Explorer.
|
||||
- Go to the subfolder `Missions` of your [Saved Games folder]{:target="_blank"}.
|
||||
- Create a new text file and name it `hello-world.lua`.
|
||||
- Add the following content and save the file:
|
||||
|
||||
`MESSAGE:New( "Hello World! This messages is printed by MOOSE", 35, "INFO" ):ToAll()`
|
||||
|
||||
## Get Moose
|
||||
|
||||
To download Moose click on the following link:
|
||||
|
||||
- [Moose_.lua from develop branch]{:target="_blank"}
|
||||
|
||||
Press `Ctrl + S` to save the file on your hard disk next to your mission script.
|
||||
|
||||
## Create the mission
|
||||
|
||||
- Start DCS.
|
||||
- In the main menu choose `MISSION EDITOR`.
|
||||
- Click on `create new mission`.
|
||||
- In the dialog `NEW MISSION SETTINGS`:
|
||||
- Choose map `Caucasus`.
|
||||
- In the drop box upper left choose `Modern` as coalition preset.
|
||||
- Click on `OK`.
|
||||
- The mission editor will load with a fresh new and empty mission.
|
||||
- Click on `File` in the menu bar and `SAVE` or Press `Ctrl + S`.
|
||||
- Open `My Missions` and save the file with the name `hello-world.miz`.
|
||||
|
||||
## Add Moose to the mission
|
||||
|
||||
- On the left side activate `TRIGGERS`:
|
||||
|
||||

|
||||
|
||||
- On the right side the `TRIGGERS` dialog opens with a lot of options.
|
||||
- Click on `NEW`, choose `4 MISSION START` as **TYPE**.
|
||||
- Give it the `Load MOOSE` as **NAME**.
|
||||
- Leave the **EVENT** option set to `NO EVENT`.
|
||||
- Optional: Choose a color for easy recognition (e.g. yellow).
|
||||
|
||||

|
||||
|
||||
- In the middle part the `CONDITIONS` will be shown.
|
||||
For this trigger we do not configure any conditions.
|
||||
|
||||

|
||||
|
||||
{: .important }
|
||||
> The trigger type `4 MISSION START` does not support `CONDITIONS`. <br />
|
||||
> So `CONDITIONS` must left blank when using it. <br />
|
||||
> **If you add a condition the trigger will never be executed!**
|
||||
|
||||

|
||||
|
||||
- On the right side `ACTIONS` is shown.
|
||||
- We need to click on `NEW`.
|
||||
- Choose **ACTION** `Do SCRIPT FILE` and ignore all other actions.
|
||||
- Click **OPEN** and navigate to the downloaded `Moose_.lua` file.
|
||||
- The result should look like this:
|
||||
|
||||

|
||||
|
||||
## Add the mission script
|
||||
|
||||
- Click on `NEW`, choose `1 ONCE` as **TYPE**.
|
||||
- Give it the `Load Mission Script` as **NAME**.
|
||||
- Leave the **EVENT** option set to `NO EVENT`.
|
||||
- Optional: Choose a color for easy recognition (e.g. green).
|
||||
- The result should look like this:
|
||||
|
||||

|
||||
|
||||
- Switch to the middle part, the `CONDITIONS` section. <br />
|
||||
For this trigger we add one condition:
|
||||
|
||||

|
||||
|
||||
- The combination of `1 ONCE` with `TIME MORE(1)` will ensure, that the mission
|
||||
script is executed 1 second after the mission is started.
|
||||
|
||||
- On the right side under `ACTIONS` you need to add the script:
|
||||
- Click on `NEW`.
|
||||
- Choose **ACTION** `Do SCRIPT FILE`.
|
||||
- Click **OPEN** and navigate to the created `hello-world.lua` file.
|
||||
|
||||
{: .important }
|
||||
> Most important is the fact, that the mission script (`hello-world.lua`)
|
||||
> is executed **after** `Moose_.lua`, because the mission script needs the
|
||||
> classes defined in `Moose_.lua`. And they are only available when `Moose_.lua`
|
||||
> is executed before the mission script.
|
||||
|
||||
## Test the mission
|
||||
|
||||
- Save the mission again.
|
||||
- Click on the green **Fly mission** cirlce on the left tool side bar.
|
||||
- It is an empty mission, so skip `BRIEFING` with `START` and then `FLY`.
|
||||
- You spawn as a spectator. After some seconds you will see this message in
|
||||
the upper right corner:
|
||||
|
||||

|
||||
|
||||
This is the same result as already seen in the last chapter, but this time you
|
||||
have create everything on your own.
|
||||
|
||||
{: .note }
|
||||
> You can use this mission as a template for your own missions. So you don't
|
||||
> need to do alle these steps again and again.
|
||||
|
||||
## Update mission script
|
||||
|
||||
- Open the `hello-world.lua` with Notepad++ again.
|
||||
- Change the text a little bit, like `Hello Dude! ...` and save the file.
|
||||
- Run the mission again.
|
||||
- The text will not be changed in the mission. Why?
|
||||
|
||||
{: .important }
|
||||
The mission editor copies the script into the mission file when you add it.
|
||||
Every change on the script file on your hard disk is not recognized by mission
|
||||
editor. **You have to add the file after each change again!**
|
||||
|
||||
There is also another method available to dynamically load mission scripts.
|
||||
But this method has some brawbacks and will be explained in the advanced section.
|
||||
|
||||
Now we add the mission script again:
|
||||
|
||||
- On the left side of the `TRIGGERS` dialog click on `Load Mission Script`.
|
||||
- On the right side under `ACTIONS` you need to add the script again:
|
||||
- Click **OPEN** and navigate to the created `hello-world.lua` file.
|
||||
- Save the mission and test it again.
|
||||
- Now the new text should be shown.
|
||||
|
||||
## Update Moose
|
||||
|
||||
Moose is constantly being developed so that new functionallity is added or
|
||||
existing errors are corrected. Also from time to time changes of the DCS
|
||||
scripting engine comes with a new DCS version. It may therefore be useful or
|
||||
necessary to update Moose.
|
||||
|
||||
- To update Moose download it again and add it again in the same way you did
|
||||
with the mission script in the last step.
|
||||
|
||||
## Next step
|
||||
|
||||
Let's move on to the [demo missions].
|
||||
|
||||
[Notepad++]: https://notepad-plus-plus.org/downloads/
|
||||
[Saved Games folder]: tipps-and-tricks.md#find-the-saved-games-folder
|
||||
[Moose_.lua from develop branch]: https://raw.githubusercontent.com/FlightControl-Master/MOOSE_INCLUDE/develop/Moose_Include_Static/Moose_.lua
|
||||
[demo missions]: demo-missions.md
|
||||
178
MOOSE/docs/beginner/hello-world.md
Normal file
178
MOOSE/docs/beginner/hello-world.md
Normal file
@@ -0,0 +1,178 @@
|
||||
---
|
||||
parent: Beginner
|
||||
nav_order: 02
|
||||
---
|
||||
|
||||
# Hello world mission
|
||||
{: .no_toc }
|
||||
|
||||
1. Table of contents
|
||||
{:toc}
|
||||
|
||||
## Let's see MOOSE in action
|
||||
|
||||
It is tradition that the first piece of code is a very simple example on showing
|
||||
a "Hello world!" to the user. We have prepared this example mission for you. So
|
||||
you can download and run it. Later on we will analyze it to explain the basics
|
||||
on how to add MOOSE to your own missions.
|
||||
|
||||
- Download the demo mission [001-hello-world.miz] by clicking on the link.
|
||||
- Put the .miz file into your Missions subfolder of your [Saved Games folder].
|
||||
- Start DCS, choose `MISSION` in the menu on the right side:
|
||||
|
||||

|
||||
|
||||
- Click on `My Missions`, choose the `hello-world` mission and click on `OK`.
|
||||
|
||||

|
||||
|
||||
- It is an empty mission, so skip `BRIEFING` with `START` and then `FLY`.
|
||||
- You spawn as a spectator. After some seconds you will see this message in
|
||||
the upper right corner:
|
||||
|
||||

|
||||
|
||||
Ok, that's all. There is nothing more to see in this mission. This is not
|
||||
particularly impressive and can also be achieved using standard Lua in DCS
|
||||
(i.e. without MOOSE), but we want to keep it simple at the beginning.
|
||||
|
||||
{: .note }
|
||||
> If the text don't show up, the mission might be corrupted. Please contact the
|
||||
> team on Discord for futher instructions.
|
||||
|
||||
## Let's take a look under the hood
|
||||
|
||||
- Go back to the main window and open the `MISSION EDITOR`.
|
||||
- Choose `open mission` navigate to `My Missions` and open 001-hello-world.miz.
|
||||
- On the left side activate `TRIGGERS`:
|
||||
|
||||

|
||||
|
||||
- On the right side the `TRIGGERS` dialog opens with a lot of options.
|
||||
- First take a look at the available triggers:
|
||||
|
||||

|
||||
|
||||
- You will see two:
|
||||
- One in yellow with type `4 MISSION START` and name `Load MOOSE` and
|
||||
- one in green with type `1 ONCE` and name `Load Mission Script`.
|
||||
|
||||
### Execution of Moose
|
||||
|
||||
- Click on the yellow one to show all of it options.
|
||||
|
||||
- In the middle part the `CONDITIONS` will be shown.
|
||||
For this trigger there are no conditions configured.
|
||||
|
||||

|
||||
|
||||
{: .important }
|
||||
> The trigger type `4 MISSION START` does not support `CONDITIONS`. <br />
|
||||
> So `CONDITIONS` must left blank when using it. <br />
|
||||
> **If you add a condition the trigger will never be executed!**
|
||||
|
||||
- On the right side the `ACTIONS` will be shown:
|
||||
|
||||

|
||||
|
||||
- A `DO SCRIPT FILE` is configured, which executes the file `Moose_.lua`
|
||||
|
||||
{: .highlight }
|
||||
> This is the execution of the Moose framework included in the mission as one single file. <br />
|
||||
> The difference between `Moose_.lua` and `Moose.lua` will be explained later. <br />
|
||||
> This doesn't matter at this time.
|
||||
|
||||
{: .important }
|
||||
> The trigger `4 MISSION START` will be executed **before** the mission is started! <br />
|
||||
> This is important, because Moose **must** be executed before other scripts, that want to use Moose!
|
||||
|
||||
### Execution of the mission script
|
||||
|
||||
- Now move back to the left `TRIGGERS` area and click on the green trigger <br />
|
||||
`1 ONCE (Load Mission Script ...)`
|
||||
|
||||

|
||||
|
||||
- The configured options will be shown. <br />
|
||||
In the middle part the `CONDITIONS` will be shown. <br />
|
||||
For this trigger there is one condition configured:
|
||||
|
||||

|
||||
|
||||
- The combination of `1 ONCE` with `TIME MORE(1)` will ensure, that the mission
|
||||
script is executed 1 second after the mission is started.
|
||||
|
||||
- On the right side the `ACTIONS` will be shown:
|
||||
|
||||

|
||||
|
||||
- A `DO SCRIPT FILE` is configured, which executes the file `001-hello-world.lua`.
|
||||
|
||||
{: .highlight }
|
||||
> This is the execution of the mission script, which you will create in the future.
|
||||
|
||||
{: .important }
|
||||
> Most important is the fact, that the mission script (`001-hello-world.lua`)
|
||||
> is executed **after** `Moose_.lua`, because the mission script needs the
|
||||
> classes defined in `Moose_.lua`. And they are only available when `Moose_.lua`
|
||||
> is executed before the mission script.
|
||||
|
||||
### Inspect the code of the mission script
|
||||
|
||||
The file `001-hello-world.lua` consists of following code:
|
||||
|
||||
```lua
|
||||
--
|
||||
-- Simple example mission to show the very basics of MOOSE
|
||||
--
|
||||
MESSAGE:New( "Hello World! This messages is printed by MOOSE", 35, "INFO" ):ToAll()
|
||||
```
|
||||
|
||||
- The first three lines starting with `--` are comments and will be ignored.
|
||||
|
||||
- Line 4 is the one with the "magic":
|
||||
|
||||
- With `MESSAGE` we use the class [Core.Message].
|
||||
|
||||
The part before the dot (Core) is the section where the class is placed.
|
||||
It is important for the Moose programmes to have a structure where the classes
|
||||
are placed. But in the code itself it is not used.
|
||||
|
||||
#### What is a class?
|
||||
|
||||
{: .highlight }
|
||||
> In object-oriented programming, a class is an extensible program-code-template
|
||||
> for creating objects, providing initial values for state (member variables)
|
||||
> and implementations of behavior (member functions or methods). <br />
|
||||
> *Source [Wikipedia:Class]{:target="_blank"}*
|
||||
|
||||
After the class name we call a method of that class. We do this with semicolon
|
||||
followed by the name of the method and a pair of round brackets.
|
||||
Here we call the method `New`, which creates a new MESSAGE object.
|
||||
|
||||
We give it three parameters within the round brackets, which are divided by commas:
|
||||
1. The text we want to show: `"Hello World! ..."`
|
||||
1. The time in seconds the messages should be visible: `35`
|
||||
1. And the type of message: `"INFO"`
|
||||
|
||||
- With `New` the MESSAGE object is created, but the message is still not printed
|
||||
to the screen.
|
||||
- This is done by `:ToAll()`. Another method of [Core.Message] which sends the
|
||||
message to all players, no matter if they belong to the RED or BLUE coalition.
|
||||
|
||||
If you you want to read more about [Core.Message] click on the link.
|
||||
The page with all the Methods and Fields is very long and this might be
|
||||
daunting, but for the copy and paste approach, you won't need it often.
|
||||
|
||||
And if you want to learn how to use more of that stuff, you will become
|
||||
compftable in filtering these informations fast.
|
||||
|
||||
## Next step
|
||||
|
||||
Now it is time to [create your own Hello world] mission.
|
||||
|
||||
[Saved Games folder]: ../beginner/tipps-and-tricks.md#find-the-saved-games-folder
|
||||
[hello-world demo mission]: https://raw.githubusercontent.com/FlightControl-Master/MOOSE_MISSIONS/master/Core/Message/001-hello-world.miz
|
||||
[Core.Message]: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Message.html
|
||||
[Wikipedia:Class]: https://en.wikipedia.org/wiki/Class_(computer_programming)
|
||||
[create your own Hello world]: hello-world-build.md
|
||||
19
MOOSE/docs/beginner/index.md
Normal file
19
MOOSE/docs/beginner/index.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
has_children: true
|
||||
nav_order: 2
|
||||
---
|
||||
|
||||
# Beginner
|
||||
|
||||
In this section we will add all informations needed for your first steps using
|
||||
MOOSE.
|
||||
|
||||
{: .note }
|
||||
> This documentation is WIP (work in progress) and it will take some time to
|
||||
> fill it with usefull and up to date informations. Please be patient and check
|
||||
> back here from time to time to see if there is anything new for you.
|
||||
|
||||
If you cannot find the information you are looking for here in the new
|
||||
documentation, please take a look at the [archive].
|
||||
|
||||
[archive]: ../archive/index.md
|
||||
106
MOOSE/docs/beginner/introduction.md
Normal file
106
MOOSE/docs/beginner/introduction.md
Normal file
@@ -0,0 +1,106 @@
|
||||
---
|
||||
parent: Beginner
|
||||
nav_order: 01
|
||||
---
|
||||
# Introduction
|
||||
{: .no_toc }
|
||||
|
||||
1. Table of contents
|
||||
{:toc}
|
||||
|
||||
This very short chapter is for people identifying as a consumer of MOOSE and not
|
||||
wishing to learn to script. This is a condensed FAQ and set of links to get you
|
||||
up and running. It specifically avoids any complexity.
|
||||
|
||||
## What is MOOSE?
|
||||
|
||||
[DCS] has included a [Simulator Scripting Engine] (short SSE). This SSE gives
|
||||
mission designers access to objects in the game using [Lua] scripts.
|
||||
|
||||
**M**ission **O**bject **O**riented **S**cripting **E**nvironment, is a
|
||||
scripting framework written in [Lua] that attempts to make the scripting of
|
||||
missions within DCS easier, simpler and shorter than with the standard methods.
|
||||
|
||||
MOOSE is over 5 MB of code, with as many words as the Bible and the core of it
|
||||
was written over several years by one person.
|
||||
|
||||
MOOSE is the brain-child of an talented programmer with the alias FlightControl.
|
||||
If you want to know more about this topic, check out FC’s [MOOSE for Dummies]
|
||||
videos on YouTube.
|
||||
|
||||
{: .note }
|
||||
> We recommend video playback at 1.5x speed, as FC speaks slowly and distinctly.
|
||||
|
||||
## What is Lua?
|
||||
|
||||
[Lua] is a lightweight, programming language designed primarily to be embedded
|
||||
in applications. It's main advantages are:
|
||||
|
||||
- It is fast,
|
||||
- it is portable (Windows, Linux, MacOS),
|
||||
- it is easy to use.
|
||||
|
||||
[Lua] is embedded in DCS, so we can use it without any modification to the game.
|
||||
|
||||
## What are scripts, frameworks and classes?
|
||||
|
||||
A script is a set of instructions in plain text read by a computer and processed
|
||||
on the fly. Scripts do not need to be compiled before execution, unlike exe
|
||||
files.
|
||||
|
||||
A framework is a structure that you can build software (or in this case missions)
|
||||
on. It serves as a foundation, so you're not starting entirely from scratch.
|
||||
It takes a lot of work off your hands because someone else has thought about it
|
||||
and provides ready-made building blocks for many situations.
|
||||
|
||||
These building blocks are called classes in object oriented programming.
|
||||
|
||||
## What can MOOSE do for me?
|
||||
|
||||
Whilst MOOSE can be used to write customised [Lua] scripts, you are probably not
|
||||
caring for learning [Lua] right now. Instead you can use a MOOSE script written
|
||||
by someone else by just copy and paste it. You can configure the basic settings
|
||||
of the classes to fit your needs in your mission.
|
||||
|
||||
Here are a few suggestions for well-known and popular classes:
|
||||
|
||||
- [Ops.Airboss] manages recoveries of human pilots and AI aircraft on aircraft
|
||||
carriers.
|
||||
- [Functional.RAT] creates random airtraffic in your missions.
|
||||
- [Functional.Range] (which counts hits on targets so you can practice),
|
||||
- [Functional.Fox] to practice to evade missiles without being destroyed.
|
||||
- and many more!
|
||||
|
||||
You will need to look through examples to know what functionallity you want to
|
||||
add to your missions.
|
||||
|
||||
## What if I don’t want to learn scripting?
|
||||
|
||||
The good news for you: You don't need to become a professional [Lua] programmer
|
||||
to use MOOSE. As explained already, you can copy and paste the code from example
|
||||
missions. You need some basics how to add triggers in the mission editor. But we
|
||||
will cover this later.
|
||||
|
||||
If you want to modify the behaviour of the classes slightly, some basics about
|
||||
the [Lua] synthax (the rules how to write the code) will help you to avoid
|
||||
errors.
|
||||
|
||||
The more customizations you want to make, the more knowledge about [Lua] you
|
||||
will need. But you can learn this step by step.
|
||||
|
||||
## Next step
|
||||
|
||||
We will start with a very simple demonstartion of MOOSE in the next section
|
||||
[Hello world mission].
|
||||
|
||||
[DCS]: https://www.digitalcombatsimulator.com/en/
|
||||
[Simulator Scripting Engine]: https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation
|
||||
[Lua]: https://www.lua.org/
|
||||
[MOOSE for Dummies]: https://www.youtube.com/watch?v=ZqvdUFhKX4o&list=PL7ZUrU4zZUl04jBoOSX_rmqE6cArquhM4&index=2&t=618s
|
||||
|
||||
[Ops.Airboss]: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Ops.Airboss.html
|
||||
[Functional.RAT]: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.RAT.html
|
||||
[Functional.Range]: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.Range.html
|
||||
[Functional.Fox]: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.Fox.html
|
||||
|
||||
[Hello world mission]: hello-world.md
|
||||
49
MOOSE/docs/beginner/problems.md
Normal file
49
MOOSE/docs/beginner/problems.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
parent: Beginner
|
||||
nav_order: 05
|
||||
---
|
||||
|
||||
# Problems
|
||||
{: .no_toc }
|
||||
|
||||
1. Table of contents
|
||||
{:toc}
|
||||
|
||||
## Something went wrong
|
||||
|
||||
If the mission shows not the expected behavior do the following steps:
|
||||
|
||||
1. Double check if you added the changed mission script to the mission again!
|
||||
1. Check if the triggers are configured as requested in the last sections:
|
||||
- To load MOOSE: `4 MISSION START`, nothing on `CONDITIONS`, `DO SCRIPT FILE` to load `Moose_.lua`.
|
||||
- To load mission script(s): `1 ONCE`, in `CONDITIONS` add `TIME MORE` = 1, `DO SCRIPT FILE` to load `yourscript.lua`.
|
||||
1. Double check if you have the right version of MOOSE (some classes need the develop branch).
|
||||
1. Try the newest version of MOOSE.
|
||||
|
||||
## Read the logs
|
||||
|
||||
The DCS log is a super important and useful log for the entire of DCS World.
|
||||
All scripting and other errors are recorded here. It is the one stop shop for
|
||||
things that occurred in your mission. It will tell you if there was a mistake.
|
||||
|
||||
1. Open the file `dcs.log` in the `Logs` subfolder in your DCS [Saved Games folder].
|
||||
|
||||
1. Search for the following line: `*** MOOSE INCLUDE END ***`
|
||||
- If it is included in the log, Moose was loaded.
|
||||
- If the line is not in the log check the triggers again!
|
||||
|
||||
1. Search for lines with `SCRIPTING` and `WARNING` or `ERROR` and read them.
|
||||
- This might help to find your error.
|
||||
|
||||
{: .note }
|
||||
> You will find a lot of warning and error lines in the log which are not
|
||||
> related to `SCRIPTING`. They are related to stuff from Eagle Dynamics or
|
||||
> Third Parties and you have to ignore them. EA does the same. ;o)
|
||||
|
||||
## Next step
|
||||
|
||||
If you don't find the error and/or don't understand the messages in the log file
|
||||
you can [ask for help].
|
||||
|
||||
[Saved Games folder]: tipps-and-tricks.md#find-the-saved-games-folder
|
||||
[ask for help]: ask-for-help.md
|
||||
56
MOOSE/docs/beginner/tipps-and-tricks.md
Normal file
56
MOOSE/docs/beginner/tipps-and-tricks.md
Normal file
@@ -0,0 +1,56 @@
|
||||
---
|
||||
parent: Beginner
|
||||
nav_order: 99
|
||||
---
|
||||
# Tipps and tricks
|
||||
{: .no_toc }
|
||||
|
||||
1. Table of contents
|
||||
{:toc}
|
||||
|
||||
This section we put a lot of usefull informations needed by beginners.
|
||||
|
||||
## Find the installation folder of DCS
|
||||
|
||||
It depends on the platform and the version you choosed to install:
|
||||
|
||||
- [DCS World Steam Edition]{:target="_blank"} from Steam.
|
||||
- To find the folder right click on the game in Steam.
|
||||
- Open Properties / Installed Files / Browse
|
||||
|
||||
- [DCS World Standalone installer]{:target="_blank"} from Eagle Dynamics website.
|
||||
- Default installation locations:
|
||||
- Stable: C:\Program Files\Eagle Dynamics\DCS World
|
||||
- OpenBeta: C:\Program Files\Eagle Dynamics\DCS World.Openbeta
|
||||
- If you changed the installation folder of the Standalone version, right
|
||||
click on the game icon, open Properties and click on `Open File Location`.
|
||||
|
||||
## Find the Saved Games folder
|
||||
|
||||
DCS creates a folder to store all user specific configuration and data.
|
||||
This folder can be found in your userprofile as subfolder of `Saved Games`.
|
||||
|
||||
The easiest way to find it, is to open search and paste the text below into it
|
||||
and press Enter:
|
||||
|
||||
```
|
||||
%userprofile%\Saved Games
|
||||
```
|
||||
|
||||
{: .note }
|
||||
> The text will work even if your Windows is installed with another language,
|
||||
> e.g. German. This is really usefull.
|
||||
|
||||
Depending on the DCS version you will find one of the following folders:
|
||||
|
||||
- DCS
|
||||
- DCS.openbeta
|
||||
|
||||
{: .note }
|
||||
> It is good idea to add the folder to the quick access area in the windows
|
||||
> explorer. You will use it very often!
|
||||
|
||||
For MOOSE users the folders `Missions`, `Logs` and `Config` are most important!
|
||||
|
||||
[DCS World Steam Edition]: https://store.steampowered.com/app/223750/DCS_World_Steam_Edition/
|
||||
[DCS World Standalone installer]: https://www.digitalcombatsimulator.com/en/downloads/world/
|
||||
Reference in New Issue
Block a user