Skip to content

snwfke/f10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

binoculars-solid f10

f10 is a simple, robust & easily modifiable ME CLI1 for DCS — using the F10 map.

Inspired by other mission systems, f10 is designed to be a plug-and-play solution for developers to add map marker commands to singleplayer or multiplayer missions.

Features

      Simple to learn.
      f10 is built to cater towards the inexperienced, this tooling has been battle-tested across many multiplayer servers.
      Learn more →
      Behaviour you can expect.
      The CLI has been thoroughly documented for you to better understand its nature, including the parser. Basic and minimal examples can also be found for AI behaviour, e.g. movement.
      Scalable & modular.
      f10's structure is scaled by the desired behaviour and modularised in command-to-schema translation, allowing it to be used as a cookie-cutter template.
      Learn more →

Getting started

Warning

If you're updating the script, you must re-add the file and then save the mission.

When defining your mission triggers, add the following condition and action:

Mission Editor Trigger GUI menu with 1 ONCE ON MISSION START, DO SCRIPT FILE "snwfke_f10.lua"

You may now add a separate DO SCRIPT action, or include another DO SCRIPT FILE. Here is a basic example of working with the ME environment:

local EventHandler = {}

function EventHandler:onEvent(event)
    -- in this example, the commands only apply after the map marker is deleted.
    if event.id == world.event.S_EVENT_MARK_REMOVED and event.text ~= "" then
        -- this gives us a Context class, with unit, (name) command, (name) and args (flags)
        cli = f10Cli(event.text)

        -- as long as the command name is detected, you can call methods from Context
        -- you can also define your own Context functions if you want to program behaviour
        if cli.command == "help" then
            playerGroupID = event.initiator:getGroup():getID()
            trigger.action.outTextForGroup(playerGroupID, cli:help(), 15)
        end
    end
end

Footnotes

  1. This is the abbreviation for a command-line interface, majorly responsible for allowing developers to execute commands on any given system.

About

A simple, robust & easily modifiable ME CLI for DCS — using the F10 map.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages