Jump to content

Recommended Posts

Posted

I'm currently trying to get into lua scripting for DCS, but i find the documentation mediocre at best.

Perhaps ED could create an open, community driven wiki similar to Bohemia Interactive's community wiki, where every concept and command is not only listed and explained but where user's can add example code or discuss good practices regarding the topic at hand.
 

A good wiki might also help future chatbot AIs to help users with DCS scripts. Currently chatGPT seems very limited in regards to DCS specific classes/commands, whereas it's surprisingly good with basic lua...

  • Like 2

My improved* wishlist after a decade with DCS ⭐⭐⭐⭐🌟

*now with 17% more wishes compared to the original

Posted
8 hours ago, HC_Official said:

i know about the hoggitwiki, but i also find it a bit bare-bones to be honest. maybe i'm spoiled from that other game's wiki i mentioned in the original post.
i mostly miss example code and better explanation of the more esoteric concepts...

from all the games i learned to script for, DCS is the most difficult to get into.

related to this, DCS also seems to lack a good way (like a script console) to test lua code in engine and during runtime: i'm currently doing my first little functions and testing them seems very archaic.

My improved* wishlist after a decade with DCS ⭐⭐⭐⭐🌟

*now with 17% more wishes compared to the original

Posted

sadly hoggit is all we have and I think Grimes is the one who maintains it (ED doesnt seem to care at all)

u need to try dynamic loading of scripts , saves a crapload of time 

 

  • Like 1

No more pre-orders

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Posted
12 hours ago, HC_Official said:

sadly hoggit is all we have and I think Grimes is the one who maintains it (ED doesnt seem to care at all)

u need to try dynamic loading of scripts , saves a crapload of time 

 

I mean it's great that he does it. I guess it's a fantastic database to look things up, but it's not of great help for people just starting out.

I'm currently only starting with very simple functions. I haven't found good tutorials that help with that. Often tutorials want beginners to start with some scripting framework, which i think is a bad idea. I want to get the basics first... so i think your video is already too advanced for me unfortunately 😉

  • Like 1

My improved* wishlist after a decade with DCS ⭐⭐⭐⭐🌟

*now with 17% more wishes compared to the original

Posted (edited)
9 hours ago, twistking said:

I mean it's great that he does it. I guess it's a fantastic database to look things up, but it's not of great help for people just starting out.

I'm currently only starting with very simple functions. I haven't found good tutorials that help with that. Often tutorials want beginners to start with some scripting framework, which i think is a bad idea. I want to get the basics first... so i think your video is already too advanced for me unfortunately 😉

If your post is about a wishlist for ED to recognise - my suggestion is don't get your hopes up. @twistking is steering you away from hoping for ED to do something for a very good reason. Check out this to get an idea of how some incredible content creators have been treated by ED when looking for interaction with scripting and API. If this is what ended up happening with the creator of overlordbot, beginners wanting basic help have much less hope.

 

https://forum.dcs.world/topic/270863-expose-apis-for-f10-radio-transmissions-especially-new-marianas-atc/

 

This isn't to put ED down (as much as I am extremely disappointed in how RJ was treated) - but moreso just to give you a real indication of what to expect from ED so you can have more realistic expectations and work with what's more likely.

What Grimes has done - in expanding the scripting options for all of us (and others as well who have contributed) - is no small feat. Without them, I probably wouldn't even be involved with DCS today. They are significantly underrated, and even if the documentation has a lot to be desired - they do it all out of love for DCS and the community and their own generosity. 

On the other hand, if you're just looking for help by anyone and that video may appear beyond your capabilities, I would encourage you to push yourself and give MOOSE a try via some other video's, etc. Or try starting with one of their demo's. It does seem overwhelming at start (I remember when I started watching the video again, and still not getting it until I actually sat down and repeated it for myself - and then it all started making sense). In addition to this, you will find the community is quite helpful if you do get stuck on some basic stuff.

But just being realistic, you are almost infinitely more likely to get assistance from the community instead of ED.

What exactly do you want to achieve to start off with?

Edited by Dangerzone
  • Like 2
Posted
11 hours ago, twistking said:

 I want to get the basics first... so i think your video is already too advanced for me unfortunately 😉

watch it again slowly pause if necessary, this will save you a massive amount of time doing any DCS scripting, because it allows u to  reload code without having to exit and mission and re-load the file (which takes ages)

  • Like 2
  • Thanks 1

No more pre-orders

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Posted (edited)
On 10/17/2024 at 6:32 AM, Dangerzone said:

If your post is about a wishlist for ED to recognise - my suggestion is don't get your hopes up. @twistking is steering you away from hoping for ED to do something for a very good reason. Check out this to get an idea of how some incredible content creators have been treated by ED when looking for interaction with scripting and API. If this is what ended up happening with the creator of overlordbot, beginners wanting basic help have much less hope.

 

https://forum.dcs.world/topic/270863-expose-apis-for-f10-radio-transmissions-especially-new-marianas-atc/

 

This isn't to put ED down (as much as I am extremely disappointed in how RJ was treated) - but moreso just to give you a real indication of what to expect from ED so you can have more realistic expectations and work with what's more likely.

What Grimes has done - in expanding the scripting options for all of us (and others as well who have contributed) - is no small feat. Without them, I probably wouldn't even be involved with DCS today. They are significantly underrated, and even if the documentation has a lot to be desired - they do it all out of love for DCS and the community and their own generosity. 

On the other hand, if you're just looking for help by anyone and that video may appear beyond your capabilities, I would encourage you to push yourself and give MOOSE a try via some other video's, etc. Or try starting with one of their demo's. It does seem overwhelming at start (I remember when I started watching the video again, and still not getting it until I actually sat down and repeated it for myself - and then it all started making sense). In addition to this, you will find the community is quite helpful if you do get stuck on some basic stuff.

But just being realistic, you are almost infinitely more likely to get assistance from the community instead of ED.

What exactly do you want to achieve to start off with?

 

I would really like to understand the basics first. I often have some small things in my missions that are either too tedious to do with the trigger system or simply not possible.
For example as my first tiny "project" i tried to write a script that checks the position of a specified redfor group's leader against the position of multiple specified (blue) aircraft's position. If the distance between the redfor group leader and one of the blufor pilots is below a certain distance, the redfor group gets switched to ROE "open fire, tasked only", when the distance is above that distance again it gets switched back to ROE "return fire".
So basically a little script that would go together with a CAP area task and would prevent the red CAP flight from engaging enemies that are too far away.

Regarding the lua scripting that's quite simple, but i struggle with the DCS specific commands. For example i don't udnerstand how to correctly use that ai controller thing to toggle ROE (the wiki has no code examples) and i'm not sure what's the correct syntax to get the leader from the specified redfor group, or if it even makes sense to get the leader (what happens when leader RTBs. is he still the leader? should i check the distance against all group members just to be sure?)

I think it would already help to see some comparable simple functions to get an understanding of how the dcs specific commands work in practice and what's general good practice in regards to those commands (for example the leader? does it even make sense to check against the leader or should i check against every member to make the script more robust?)...

Edited by twistking

My improved* wishlist after a decade with DCS ⭐⭐⭐⭐🌟

*now with 17% more wishes compared to the original

Posted (edited)
On 10/17/2024 at 8:35 AM, HC_Official said:

watch it again slowly pause if necessary, this will save you a massive amount of time doing any DCS scripting, because it allows u to  reload code without having to exit and mission and re-load the file (which takes ages)

i understand. ok... will do that then 🙂

this seems to be a big issue with DCS however, no? shouldn't there be a dev lua console that let's you run lua code in realtime, change variables etc.?
... similar to what that bohemian milsim sandbox game does? it's very important feature for beginners and experts alike... also super helpful for server admins to troubleshoot or modify things during the mission...

Edited by twistking

My improved* wishlist after a decade with DCS ⭐⭐⭐⭐🌟

*now with 17% more wishes compared to the original

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...