keith5475 Posted December 13, 2023 Posted December 13, 2023 In off times there are very few people in my server, So I would like to have some AI in there to give low population players some stuff to shoot down, or interfere with their bombing missions. But when prime time hits and players fill up they will disappear for higher quality game play. Ive not been able to figure out a way to do this. Thanks for the help in advance.
Dangerzone Posted December 14, 2023 Posted December 14, 2023 (edited) 6 hours ago, keith5475 said: In off times there are very few people in my server, So I would like to have some AI in there to give low population players some stuff to shoot down, or interfere with their bombing missions. But when prime time hits and players fill up they will disappear for higher quality game play. Ive not been able to figure out a way to do this. Thanks for the help in advance. Yes there is. I've come across this before - I just can't think of the name off the top of my head, but there was some sort of AI-Balancer that would remove planes (or maybe tell them to go land) when human players joined in. If I recall correctly I think it was even capable to respawn in a replacement AI plane in a position where a human player had just quit the server if it was mid-air. I just can't think of what it was called, but maybe someone else here knows what I'm talking about (more than I do ) and will be able to point you in the right direction. Edit: Oh - it's part of MOOSE. Might be worth checking this out: Edited December 14, 2023 by Dangerzone
DD_Friar Posted December 14, 2023 Posted December 14, 2023 Have a look at the excellent DML, It is a very powerful way to do scripting without knowing how to do scripting. You can have counters and then fire a trigger when they get to a certain level. You just place trigger zones and give the zone some parameters. the author @cfrag is very helpful as well. its 5 stars from me! Visit the Dangerdogz at www.dangerdogz.com. We are a group based on having fun (no command structure, no expectations of attendance, no formal skills required, that is not to say we can not get serious for special events, of which we have many). We play DCS and IL2 GBS. We have two groups one based in North America / Canada and one UK / Europe. Come check us out.
waterman Posted December 14, 2023 Posted December 14, 2023 (edited) cfrags Fantastic DML is super powerful - i used it to create random trains on a timetable around london in Normandy 2 ( well cfrag told me what to do ! ). Just a few boxes ( Lego Bricks ) that interact with each other and theres a simple railway sequence operating. 100 % recomend you learn the DML way of controlling things its fantastic. Also make sure you download the updates as cfrag is always working on the project. Thankyou for your wonderful work cfrag ! Edited December 15, 2023 by waterman
cfrag Posted December 14, 2023 Posted December 14, 2023 (edited) <blush> thank you so much for the kind words, @DD_Friar and @waterman - it means a lot to me when people enjoy DML . 12 hours ago, keith5475 said: I would like to have some AI in there to give low population players some stuff to shoot down, or interfere with their bombing missions. But when prime time hits and players fill up they will disappear for higher quality game play. Ive not been able to figure out a way to do this. There are multiple parts of doing this. The first is - of course - to count the number of players that are in-game. There's no prefab DCS trigger for that so you'd resort to some scripting. Here's a small script that counts the number of players (non-AI) currently in the game; local coas = {0, 1, 2} local count = 0 for idx, coa in pairs(coas) do count = count + #coalition.getPlayers(coa) end trigger.action.outText("there are <" .. count .. "> players in-game", 30) You can probably condense the code, I've tried to make it a bit readable and serviceable. Once you have the number of players comes the more difficult stuff: if there are less than "x" players, you want to add (dynamically spawn) AI aircraft. If the number of players grows, you want to reduce the number of aircraft. Reducing should not be the issue, spawning them dynamically can be. Both would require scripting if the server is to be online for any significant time. If you go scripting, there are very nice frameworks available that you can use. One of them happens to be DML, which I am involved in. Below please find a sample DML-based script that - after 5 seconds - counts the number of players in the game (based on above script), and then proceeds to (continuously) count the number of blue players that currently are inside the green zone and outputs a message whenever that number changes. Those are merely examples; other frameworks will work just as well. demo - Players in the Zone.miz Edited December 14, 2023 by cfrag 1
Recommended Posts