Difference between revisions of "BGSC"
|Line 30:||Line 30:|
If you would like to participate or contribute to this guide, then please contact the author either via. Discord at '''Sirius#
If you would like to participate or contribute to this guide, then please contact the author either via. Discord at '''Sirius#''' or by in the forums.
=== Links ===
=== Links ===
Latest revision as of 06:57, 7 September 2019
Beginners Guide to Systems Coding
WARNING: Everything shown here in this guide is not final and does not represent the official outcome determined. This guide is still very much WIP and will be constantly worked on.
Hello, everybody. As for a long time now in DCS, we have seen 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 seen 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. However, for keeping thing simple, this guide will be referred to as BGSC, abbreviated for the Beginners Guide to Systems Coding. This can range from any type of aircraft, from a 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 number 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, I 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 is 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)
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 core 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).
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. 
2. You need to have the current .EDM conversion plugin or one that works for 3DS Max. As of to requirement no. 1: 
If you would like to participate or contribute to this guide, then please contact the author either via. Discord at Sirius#0002 or by in the forums.