Difference between revisions of "BGSC"

From DCS World Wiki - Hoggitworld.com
m (Sirius moved page BGED to BGSC: Re-named declaration)
(No difference)

Revision as of 19:06, 15 January 2019

Beginners Guide to ESM Development


Introduction

WARNING: Everything shown here in this thread does not represent the final product and is subject to change at different times during its development.

As for a long time now in DCS, we have seen a rapid growth and progression of mods being released by the community, for the community. Many of them here are just simple mods, that involve new models imported, graphic/texture fixes, and flyable aircraft. Out of all of these many flyable aircraft that we have seen released in the modding subforums here, only a mere percent of them have we call an ESM. As seem from the title, the 3 letters "ESM" is an abbreviated term that stands for "External Systems Model," a folder with a set amount of files containing code that define the systems of an aircraft. This can range from any type of aircraft, from helicopter to plane; from a starship to a flying Port-a-John. However, there has always been this one lacking issue when it came to developing an ESM inside of DCS: where to start. When many people first begin trying to code one, they are often feared by the amount of files that they have to look through and get an understanding of how things work on the inside, which can often convince those at first to not bother at all with the idea of learning one. Not only that, but to build onto that with the fact that not many in the DCS modding community are knowledgeable of how to make one themselves.

Because of that, we have here to present a work in progress (WIP) state of a document of mine, that has spent the last few months in the making. This guide is by far one of the most in-depth, giving step by step procedures on how to code your own systems. This does not mean, however, that you are able to just copy and paste this code and say that you just learned it. In this guide you will be given pictures of systems code, and set files that will help you start off. From there, everything you see is something you have to write in your files yourself. This helps the user learn by participating in the document about what functions and events do what within the DCS API. In no means is this guide finished, and everything will be constantly worked on to the fullest of my extent, along with anyone who are willing to help contribute.

With that being said, there are a set of prerequisites in order for you to correctly follow through with this guide. Here they are listed below. (These are also stated as so in the guide)

Programming

1. You need to know how to make a basic mod structure. This includes the gear positions, canopy, pylons, cockpit implementation, and collision model apart of the folder structure.

2. You need to know how Lua works. If you have absolutely no idea or are foreign to the subject of programming itself, then it may be very unlikely that you are going to get far in learning how to program an ESM for DCS World. It is highly recommended for someone to understand how to code anything in a programming language, more preferably Lua itself in order to understand what code you are going to be dealing with.

3. You need to know how to work with debugging and working with certain code statements within DCS. The code infrastructure that the DCS API works with, especially when dealing with Lua, acts as a framework. (A framework is a predefined set of functions to write inside of a script that is being inherited by an overall class like script or package) Being able to debug your own code (ie. using the dcs.log folder in your C:\Users\<< insert username here >>\Saved Games\DCS\Logs directory) is a huge must in order to find out the issue in your script(s).

3D Modeling

1. You need to know how to animate models in 3DS Max by using the argument number method. If you are unaware of this, or have no idea whatsoever on how to do this, then please go there. [1]

2. You need to have the current .EDM conversion plugin or one that works for 3DS Max. As of to requirement no. 1. [2]

If you would like to participate or contribute in this guide, then please contact the author either via. Discord at Sirius#0793 or by in the forums.

Links

Link: Coming 17 January 2019.

Version: v.1.0