Announcing BGSC: Beginners Guide to Systems Coding - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 01-17-2019, 09:50 AM   #1
Sirius
Member
 
Sirius's Avatar
 
Join Date: Mar 2017
Location: North Carolina, USA
Posts: 476
Default Announcing BGSC: Beginners Guide to Systems Coding

Beginners Guide to Systems Coding
BETA ACCESS
___________________________________________________________
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)

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 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).

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 here: https://www.megabotix.com/wp-content...mation-dcs.mp4
  2. You need to have the current .EDM conversion plugin or one that works for 3DS Max. As of to requirement no. 1: ftp://srv0files.eagle.ru/mods/edm_plugins/

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

Links
Link: https://docs.google.com/document/d/1...it?usp=sharing
Version: v.1.0
__________________

"The average programmer now makes scripts that are more
idiot proof and user-friendly, but the average user only gets
stupider."


Spoiler:

PC Specs: AMD Ryzen 5, AMD Radeon RX 580, 24 GB DDR4, 128 SSD, 2 TB HDD
Modules: A-4E | AV-8BNA V/STOL, A-10C, AJS-37, C-101, F-14B, F-15C, F-86F, Ka-50, L-39, M-2000C, MiG-23UB, SA-342, Spitfire LF Mk. IX, Su-25A, Su-27, Su-33, UH-1H
Discord: Sirius#8952

Last edited by Sirius; 02-26-2019 at 09:42 AM. Reason: i ran out of discord nitro, #tag changed. :(
Sirius is online now   Reply With Quote
Old 01-17-2019, 01:45 PM   #2
Sirius
Member
 
Sirius's Avatar
 
Join Date: Mar 2017
Location: North Carolina, USA
Posts: 476
Default

Updates

In-depth Looks

(This post is reserved for future updates on the guide.)

Last edited by Sirius; 02-16-2019 at 09:17 PM.
Sirius is online now   Reply With Quote
Old 01-18-2019, 10:41 PM   #3
Kazansky222
Junior Member
 
Join Date: Jul 2018
Posts: 42
Default

This is very helpful thank you!
__________________
i5 8600K @5.1ghz, 32 GB 3200mhz RAM, GTX 1080ti, Windows 10, SSD, TM Warthog stick & throttle w/ 7.5cm ext, Pimax 5k+
Kazansky222 is offline   Reply With Quote
Old 01-18-2019, 11:29 PM   #4
Sirius
Member
 
Sirius's Avatar
 
Join Date: Mar 2017
Location: North Carolina, USA
Posts: 476
Default

Quote:
Originally Posted by Kazansky222 View Post
This is very helpful thank you!
No problem! I appreciate your kind words.
__________________

"The average programmer now makes scripts that are more
idiot proof and user-friendly, but the average user only gets
stupider."


Spoiler:

PC Specs: AMD Ryzen 5, AMD Radeon RX 580, 24 GB DDR4, 128 SSD, 2 TB HDD
Modules: A-4E | AV-8BNA V/STOL, A-10C, AJS-37, C-101, F-14B, F-15C, F-86F, Ka-50, L-39, M-2000C, MiG-23UB, SA-342, Spitfire LF Mk. IX, Su-25A, Su-27, Su-33, UH-1H
Discord: Sirius#8952
Sirius is online now   Reply With Quote
Old 01-19-2019, 01:34 AM   #5
Sirius
Member
 
Sirius's Avatar
 
Join Date: Mar 2017
Location: North Carolina, USA
Posts: 476
Default Jan 2019 Update

January 2019 Update
_______________________________

So far, things have gone off well for the guide this month! For almost 2 days now, this thread has already reached 1000 views and is slowly gaining recognition. (as a side-note and not intending to brag) We hope to make this guide even better in the future as more and more updates will come helping to expand the limiting knowledge on this subject with the Lua programming language.

With that being said, we do have a few updates that I would like to give on the current status of the guide.
  • Suggestions are now open! You are able to make a comment on the guide as to what is and is not helpful, or if you want to help to add more information. This, of course, will be looked at before making the changes.
  • More information has been added to the Training Missions section. This section, however, has currently been paused as there is a debate on whether or not this is needed within the guide and would fit more in a general spectrum for Mission Editor making.
  • Introduction to the Pointer types section. This section is still WIP but aims to help give users knowledge on what all of the different functions are for in the clickabledata.lua file for the systems coding guide.
  • "Completion" of the Helpers section. As it is currently listed as an incomplete section, all that is currently remaining is an image that shows how to set it up in 3DS Max. All the information you need is already written down, making the image just serve as a visual aid to ensure that everything is being done correctly.

This may be somewhat as a small update, this guide has set a new mark in helping modders learn how to code systems, which has been a huge feat since there has not yet been much knowledge expanding on said topic. We hope to add even more to the guide. We are also questioning still whether or not we should allow users to be able to download the files for systems coding as that contradicts one of our core beliefs of how a guide should work.

Sincerely,
Sirius.
__________________

"The average programmer now makes scripts that are more
idiot proof and user-friendly, but the average user only gets
stupider."


Spoiler:

PC Specs: AMD Ryzen 5, AMD Radeon RX 580, 24 GB DDR4, 128 SSD, 2 TB HDD
Modules: A-4E | AV-8BNA V/STOL, A-10C, AJS-37, C-101, F-14B, F-15C, F-86F, Ka-50, L-39, M-2000C, MiG-23UB, SA-342, Spitfire LF Mk. IX, Su-25A, Su-27, Su-33, UH-1H
Discord: Sirius#8952
Sirius is online now   Reply With Quote
Old 01-19-2019, 02:45 AM   #6
Vibora
ED Testers Team
 
Vibora's Avatar
 
Join Date: Jul 2004
Location: Madrid
Posts: 7,048
Default

Congrats Sirius Keep up the good work
__________________
Roberto "Vibora" Seoane
Alas Rojas




Vibora is offline   Reply With Quote
Old 01-23-2019, 08:45 PM   #7
Voltrock
Junior Member
 
Voltrock's Avatar
 
Join Date: Sep 2018
Location: BXL
Posts: 24
Default

Thank you so lot, i hope to understand and maybe one day to contribute






I saw republic at war from EAW wasn't it??it is very good mod, i remember, i changed little things on it ^^
Voltrock is offline   Reply With Quote
Old 01-25-2019, 06:26 AM   #8
BlacleyCole
Senior Member
 
BlacleyCole's Avatar
 
Join Date: Dec 2017
Location: New Mexico
Posts: 1,442
Default

I would like to see more info on reading and setting the controls in the cockpit like being able to write a tutorial on startup and checking that the user did the checklist in the correct order and set the panels in the correct configuration before allowing the user to go to the next item the also able to check if the user is flying the correct heading and altitude if not let the ai letthem knowtheyare off course ands correction is needed.
__________________
BlackeyCole 20years usaf
XP-11. Dcs 2.5OB
Acer predator laptop/ i7 7720, 2.4ghz, 32 gb ddr4 ram, 500gb ssd,1tb hdd,nvidia 1080 8gb vram


New FlightSim Blog at https://blackeysblog.wordpress.com. Go visit it and leave me feedback and or comments so I can make it better
BlacleyCole is offline   Reply With Quote
Old 01-25-2019, 09:20 AM   #9
Sirius
Member
 
Sirius's Avatar
 
Join Date: Mar 2017
Location: North Carolina, USA
Posts: 476
Default

Quote:
Originally Posted by BlacleyCole View Post
I would like to see more info on reading and setting the controls in the cockpit like being able to write a tutorial on startup and checking that the user did the checklist in the correct order and set the panels in the correct configuration before allowing the user to go to the next item the also able to check if the user is flying the correct heading and altitude if not let the ai letthem knowtheyare off course ands correction is needed.
We do have some information of that on pages 16-17. Do you mean something by training procedures? There is a training mission part on page 30 but it's been paused so far.

I like your idea, some kind of AI correction in the code would indeed be very nice.
__________________

"The average programmer now makes scripts that are more
idiot proof and user-friendly, but the average user only gets
stupider."


Spoiler:

PC Specs: AMD Ryzen 5, AMD Radeon RX 580, 24 GB DDR4, 128 SSD, 2 TB HDD
Modules: A-4E | AV-8BNA V/STOL, A-10C, AJS-37, C-101, F-14B, F-15C, F-86F, Ka-50, L-39, M-2000C, MiG-23UB, SA-342, Spitfire LF Mk. IX, Su-25A, Su-27, Su-33, UH-1H
Discord: Sirius#8952
Sirius is online now   Reply With Quote
Old 01-27-2019, 06:19 PM   #10
Sirius
Member
 
Sirius's Avatar
 
Join Date: Mar 2017
Location: North Carolina, USA
Posts: 476
Default Mini-update

Dear all,

I have not spent awhile on the BGSC guide, (mainly due to personal life reasons) but I hope to finish the Training Missions section very soon. A new section, for coding systems for reacting to a damage model, is also being considered to help those wanting to re-create the outcomes of a damaged aircraft. An example of this would be the iconic F-14 Tomcat module to soon be released into DCS World as of the time of this writing. I have also noticed that the code for the electrical system sample in the guide shown is outdated, and as that result, I will be re-coding a new example for those to copy down.

The ability of those to download pre-coded files of the systems is also being considered, but this has been expressed as something that contradicts the belief of how the guide should work and teach the user instead of giving them free scripts. I hope to share more with you guys soon.

- Sirius
__________________

"The average programmer now makes scripts that are more
idiot proof and user-friendly, but the average user only gets
stupider."


Spoiler:

PC Specs: AMD Ryzen 5, AMD Radeon RX 580, 24 GB DDR4, 128 SSD, 2 TB HDD
Modules: A-4E | AV-8BNA V/STOL, A-10C, AJS-37, C-101, F-14B, F-15C, F-86F, Ka-50, L-39, M-2000C, MiG-23UB, SA-342, Spitfire LF Mk. IX, Su-25A, Su-27, Su-33, UH-1H
Discord: Sirius#8952
Sirius is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 03:01 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.