Jump to content

Recommended Posts

Posted

I came across this video recently about using AI to build scripts. I am not a programmer and know very little about scripting (just enough to use already made ones in my missions) so I was excited about the possibilities and started to dive right in by trying to create an ArtySpotter script that could be used by both red and blue teams in MP at the same time. Well, after two days of frustration I finally got it, though a much simpler version than I'd originally started out to do. Here is some of the lessons I learned:

1. Learn to ask the right questions! Keep it simple, direct but accurate.

2. Ask operational questions to see if the script will do what you think it will do. For instance I would ask, "If I as a red player puts a map marker on the map will I get a message?" "What message will be displayed." "Can a single red player and single blue player use artillery at the same time?" I would ask countless questions like this and often the AI answer wouldn't be what I wanted but many times the AI would make suggestions and all I would have to do is say "yes make these changes"

3. Even if you think it's right, TEST. I found in this case it wouldn't work in SP and had to put it up on the server to test. If I got an error I could even take a picture of the error on the screen and download it to the AI and it could figure it out. The AI could even add debugging lines to help figure out problems. You can also upload to the AI the dcs log files for it to analyze.

4. Try to keep it simple (at least for first run). Get the basics working the way you want and tested before trying to add additional features. What threw me off is I was asking for too much at the beginning and made it much too complicated. Yes I'd like to do actual ballistics based on real artillery on the map but I had to scale back for this one to get something working. Hoping to add more complicated features later.

 

 

 

Posted
8 hours ago, Kliegmann said:

I have been using Chatgpt and Gemini for several things, not for coding yet, but I've tossed around the idea of trying it with Python for IL2

Unfortunately it can’t read my direct miz file but it can certainly lua script

Posted

Been getting better and now have two successful scripts (running on my server now). I've found that when troubleshooting it is best to give the AI the dcs.log, and one time I got a crash with msg onscreen that I took a picture of and sent it and the AI could read and use that too!

Here's an interesting idea for a script I may work on next. Giving a commander (in an airplane like what I've done in YK2 to voluntarily declare war) the ability through the F10 menu, to choose and control certain units to be activated. My specific idea for now is to put say 10 different EWR radar sites on the map but the commander can only activate 5 at one time. It would definitely provide some strategic thinking and the opposite side wouldn't necessarily know which ones were active and to try to destroy.

Posted

I've wanted to try and use ChatGPT for lua scripting, but haven't dedicated a ton of time to it.

I wanted to figure out if there was a way to fix the OpForAC and BluForAC  scripts:

https://www.digitalcombatsimulator.com/en/files/3332275/

https://www.digitalcombatsimulator.com/en/files/3335913/

They work great in single player.  Not so much in multiplayer.

I actually ran them through OpenAI, but I couldn't get them to work.  If you're having success, I'll try it again.

Posted
Just now, Klaiber said:

I've wanted to try and use ChatGPT for lua scripting, but haven't dedicated a ton of time to it.

I wanted to figure out if there was a way to fix the OpForAC and BluForAC  scripts:

https://www.digitalcombatsimulator.com/en/files/3332275/

https://www.digitalcombatsimulator.com/en/files/3335913/

And actually ran them through OpenAI, but I couldn't get them to work.  If you're having success, I'll try it again.

Try using the o3-mini-high as it seems to be the best for coding. You also have to ask the right questions including things like “If the player sees or does this what will happen” type questions. 

Posted
9 minutes ago, Flyboy said:

Try using the o3-mini-high as it seems to be the best for coding. You also have to ask the right questions including things like “If the player sees or does this what will happen” type questions. 

Yeah, I've noticed that it depends a lot on what you feed it and how you frame your queries.

Posted

Building the prompt is the hardest part about it.  Also, keep in mind for anything long winded, you'll have to remind the AI about things its already done.  Something that I've done is I build the prompt in chatgpt, then port it over to Gemini to rewrite it, then put it back into chatgpt.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...