Jump to content

SNAFU

Members
  • Posts

    772
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by SNAFU

  1. Updated to v4 in first post, fixed some issues with other scripts, when random AI planes was destroyed.
  2. Sure. Volunteer mission builders don´t depend on it, so either you deal with the fact or you don´t. I guess you know better than anybody else here , that a single, realistic and complex mission with voice overs, scripts, randomized to a little degree, with a realisitc briefing (even with the flight planner tool a good briefing can take you a day to make it) can easily be an effort of over an hundred hours. So if you have a job, other hobbies and a social life you can easily spent a year on making a decent mission. In this time you spent about 10% of the total time, reworking the mission due to patch-changes in AI behavior, trigger and other new issues caused by the reworking. Just for a consideration, now imagine a 3rd party developer team working at 110% capacity to stay in business has to go through all the debugging again everytime ED changes something in the basics, for example AI response to threats. I think they simply cannot effort that money/time wise. I don´t know how to do it better and don´t think that it is possible for ED to go on, without changing the fundamental structure, I am justing pointing out that this simple issue can be a huge problem for 3rd party developers.
  3. Just thought the same. Makeing missions for this software was pain since DCS started. With every little patch triggers have to rechecked, reworked and missions have to be tested and tested all over again. I am surprised that there are some masochits, who are still making missions at all, well, I am too, when I have some time to kill... But just when you have reworked a mission, the next patch is out and you start all over again. I wonder how 3rd party developers deal with this? They put their existence on the line with spending development time into DCS? But still it is the best simulation available. :joystick:
  4. I just checked this issue, but I couldn´t find a good solution. Its easy to remove all AI except a define type from the map, but client planes are not included and somehow I cannot get the mist-function refreshed, which creates a table. Another approach was to trigger different events, but this approach gets problems if I call units in events, which are not existing yet, when the function ist called. "On start up" event gets me a "pure virtual funciton error", whatever that is... I tried to call up a delayed function on the birth event, but still get an error I cannot get straight ... I simply cannot see it at the moment, or I just don´t understand, whatever... But testing in multiplayer enviroment I do not have any issues with AI taking over planes left by clients. I only have this issue in Mission editor enviroment. So I got lost and do not understand the problem with your server. Here the part where I gave up... it works once, even if I get en error message (I do not understand the cause, because the syntax usually works), but the next time it doesn´t work anymore... so here I gave up... (trigger messages are for debugging, and you see the try to delay the function, think it has issues calling up units not existing at the moment the event takes place...) playersbirth = {} function removeAIexcept() for a = 1, #playersbirth do trigger.action.outText("test1", 400000) --testing if playersbirth[a].unit~= nil then trigger.action.outText("test2", 400000) --testing actualunit = playersbirth[a].unit trigger.action.outText("test2", 400000) --testing if Unit.getPlayerName(actualunit) == nil then trigger.action.outText("test3", 400000) --testing actualgroup = actualunit:getGroup() trigger.action.outText("test4", 400000) --testing actualgroup:destroy() end end end local allairunitsstartTable = mist.utils.tableShow(playersbirth)--for testing trigger.action.outText("All planes on map: " ..allairunitsstartTable, 4) --testing return timer.getTime() + 10 end timer.scheduleFunction(removeAIexcept, nil , timer.getTime() + 5) removeidleplanes = {} function removeidleplanes:onEvent(event) if event.id == world.event.S_EVENT_BIRTH then if event.initiator~= nil then _leftunitname = event.initiator:getName() trigger.action.outText("btest2-".._leftunitname, 4) --testing timer.scheduleFunction(listPlayer, nil , timer.getTime() + 1) --[[ if Unit.isExist(Unit.getByName(_leftunitname)) then _leftunit = Unit.getByName(_leftunitname) trigger.action.outText("btest4-", 4) --testing _playername = Unit.getPlayerName(_leftunit) trigger.action.outText("btest5-".._playername, 4) --testing playersbirth[#playersbirth +1] = { unit = _leftunit, name = _playername } end --]] end end end world.addEventHandler(removeidleplanes) function listPlayer() if Unit.isExist(Unit.getByName(_leftunitname)) then _leftunit = Unit.getByName(_leftunitname) trigger.action.outText("btest4-", 4) --testing _playername = Unit.getPlayerName(_leftunit) trigger.action.outText("btest5-".._playername, 4) --testing playersbirth[#playersbirth +1] = { unit = _leftunit, name = _playername } end end
  5. ... "zukünftigen Pläne" war das Thema? Ich behaupte mal das nicht mehr als 20% der ED Kunden etwas von dem ED Forum wissen und von denen nur die hälfte auf die Idee kommen den Multiplayer-Icon zu drücken. Wenn man sieht was so auf den Public-Servern so ab geht auch nicht verwunderlich. Die KI verhält sich meist wesentlich realistischer als der typischen Online-Spieler und kann oft wesentlich besser zur Immersion beitragen. :smilewink: Ich habe mit 1.2.6 keine größeren Stabilitätsprobleme mehr, nur die kleinen Bugs alt und neu stören, sind aber keine Show-Stopper, solange sie mittelfristig behoben werden. Und das werden sie Erfahungsgemäß.
  6. In my tests the Controller.isTargetDetected(...,..., RADAR) works fine, but only with the RADAR of ground units. I never got this function working with airborne RADAR or using "nil" (all sensors?) as sensor type.
  7. Ok, did I mention, that this function requires MIST? But let me take a look tomorrow, when I have time. This is itching myself for some time, when I am hosting myself. The problem with left player planes doesn´t occure on our squadron server strangely...
  8. Ok, I guess that it would make issues to get the player who just left the unit... ;) I use the trigger messages to check if something works as intended and remove them in the end, but it usually helps to find out where a script stuck. I do not have a chance to fire up DCS and take a look before friday, but then I can take a look. I thought removing the plane previously used by player would be the most straight forward approach, but removing all AI units except the type "KC-135" should be "simple", too. I would start with repeating function like: local function removeAIexcept(_type) local exception = _type local allairunitsstart = nil local allairunitsstart = {} local allairunitsstart = mist.makeUnitTable('[plane]') allairunits = nil allairunits = {} for a = 1, #allairunitsstart do if Unit.getByName(allairunitsstart[a]) then if Unit.getPlayerName(Unit.getByName(allairunitsstart[a])) == nil then local AIunittype = Unit.getTypeName(Unit.getByName(allairunitsstart[a])) if AIunittype ~= exception then local AIunitgroup = Unit.getGroup(allairunitsstart[a]) AIunitgroup:destroy() end end end end return timer.getTime() + 2 end timer.scheduleFunction(removeAIexcept, "KC-135", timer.getTime() + 5)Again, I am currently travelling and have no chance to the check, so this is just theoretically... ;)
  9. I tried to use MIST to teleport a heli with "ramp start" to a point in the open field, hoping to get the possibility to start somewhere off an AF or FARP, but it didn´t work, as the player was kicked to spectator position the moment the heli was teleported. If it is possible with an AI chopper I don´t know. You would have to use MIST and a few lines of scripting to try.
  10. There are several different approaches to find a solution. Depends more or less on your sever operation. 1. Do you want random public players to be restricted to certain a) types? b) groups? c)airfields? 2. Do want to remove all AI controlled planes, which do not meet the criteria type "KC-135"? 3. Do you want to limit certain planes to certain to be used only by certain players? I didn´t test this, but you could try if it works: (This should remove every group left by a player) removeidleplanes = {} function removeidleplanes:onEvent(event) if event.id == world.event.S_EVENT_PLAYER_LEAVE_UNIT then local leftunit = event.initiator --if not working try = event.place local playername = Unit.getPlayerName(leftunit) trigger.action.outText(playername.." left his cockpit",5) local leftgroup = Unit.getGroup(leftunit) if Group.isExist(leftgroup) then leftgroup:destroy() trigger.action.outText("group removed",5) else trigger.action.outText("group does not exist",5) end end end world.addEventHandler(removeidleplanes)
  11. I use the MIST function as below to write a table, which lists all units IDs and types. Don´t know if it works in this way, because I just took it out of context of another script, but maybe it helps: local allunitsnametable = nil local allunitsnametable = {} local allunitsnametable = {'[red][plane]', '[blue][plane]'} local unittypetable = nil local unittypetable = {} local allunitsstart = nil local allunitsstart = {} local allunitsstart = mist.makeUnitTable(allunitsnametable) for a = 1, #allunitsstart do if Unit.getByName(allunitsstart[a]) then unittypetable[#unittypetable + 1] = { unitID = Unit.getID(Unit.getByName(allunitsstart[a])), unittype = Unit.getTypeName(Unit.getByName(allunitsstart[a])) } end end You could try to use Group.getUnits(...) with Unit.getTypeName: local grouparray = Group.getUnits(group)--group needs to be defined local groupunitnr1 = grouparray[1] if groupunitnr1 ~= nil then groupunitnr1type = Unit.getTypeName(groupunitnr1) else trigger.action.outText("request returned nil", 20) end
  12. Ok, so far I mainly play a West german only deck, in which I heavily rely on MANPADS and cheap Radar AAA to back up my Roland-SAMs, but do not use planes at all. I spread recon infantry over the map, try to support other players with logistics and defensive infantry, while establishing a tank perimeter around a sector I intend to defend. Usually I end up alone fighting on 3 sides. I also made a PACT deck, mainly consisting of BUKH, Shilkas, Speznaz and ATGM Infantry - somehow same playstyle, I would consider as pretty conservative and somehow my typical RTS playstyle, but I think I still miss a lot. Last game I had a team member deploying 9 FOBs (!). What is that about? Just playing artillery? Is a worthwhile approach? So I see, one point I really lack is a way to react fastly on new situations, with SEAD, Napalm or air cover, but is airpower in WALB really that essential? So far I try to avoid expensive units, are they simply essential?
  13. I recently got this game and it is nice for a fast skirmish if you only have 30mins left to kill. Now that I read the an excellent guide (https://docs.google.com/document/d/1-uURrYRBWlOFHMbZRSjCE0A6p9FGj2EhKD9SjvUmeug/edit#) I found and think I understood the basic game mechanics, I can at least hold my ground against a medium/ average AI. So I started MP 10vs10 pick up games and after 10 battles, in which I feel I fight against 3 or 4 other players on my own, I lost 7 out of 10 and ended 3 in a draw. Ok, I am not good, but I thought my short comings would be balanced somehow enough for at least one victory in 10 games? What are your experience in pick up games?
  14. I just read the Change log of the latest patch and am a little astonished that seemingly the small and "should be easy to fix" bugs as the frequency offset, TACAN dail knob issue, magnetic deviation etc. don´t get addressed. Besides this I want to remind that the RWR still indicates the Su-27 as a MiG-29. This should be something relatively easy to fix, but is there since I can remember... Besides I am sure it was already reported several times, I could find a post.
  15. I can confrim TACAN dail knob issues too. Sometimes the right one is ok, the left isnt, sometimes other way around. Is that anyhow related to the Radio frequency dial bug?
  16. units_LOS should do the same more or less. I just like the idea that that RCS, RWR and if sensor activated is coupled to this and you can define the type of sensor used, not only straight line. PS: units_LOS might be a good workaround to simulate AWACS radars, which I didn´t get to function. But you need to know the detecting range of AWACS types...
  17. Should be possible. Here is the function I use to define the "detectors". I use the type of the unit to define all "red" units of the type "55G6 EWR" or "1L13 EWR" as "detectors": -- lists all red EWR groups in a table local function getallredEWR()--ok local RedEWRtable = nil local RedEWRtable= {} local RedEWRtable = {'[red]'} local allredEWRstart = nil local allredEWRstart = {} local allredEWRstart = mist.makeUnitTable(RedEWRtable) allredEWRunits = nil allredEWRunits = {} for a = 1, #allredEWRstart do local possibleredEWRunit = Unit.getByName(allredEWRstart[a]) local possibleredEWRunittype = Unit.getTypeName(possibleredEWRunit) if possibleredEWRunittype == "55G6 EWR" or possibleredEWRunittype == "1L13 EWR" --or possibleredEWRunittype == "A-50" then local RedEWRgroup = Unit.getGroup(possibleredEWRunit) allredEWRunits[#allredEWRunits + 1] = { group = RedEWRgroup } end end local allredEWRunitsTable = mist.utils.tableShow(allredEWRunits) --trigger.action.outText("Red EWR on map table:" ..allredEWRunitsTable, 5)--ok return timer.getTime() + 60, allredEWRunits end timer.scheduleFunction(getallredEWR, nil, timer.getTime() + 15) This regularly creates a table of in which all groups are listed, which act as EWR "detectors". Then I use the following lines with the function: . .. ... blueintrudergroupdetected = false if #allredEWRunits > 0 then for j = 1, #allredEWRunits do local possibleblueintruder = Unit.getByName(allblueairunits[i].name)--table of all blue units of type airplane and helicopter local redEWRgroup = allredEWRunits[j].group local redEWRgroupcontroller = redEWRgroup:getController() blueintrudergroupdetected = Controller.isTargetDetected(redEWRgroupcontroller, possibleblueintruder, RADAR) end end ... .. . This sets the boolean "blueintrudergroupdetected" to true and you can use it for other parts... When I finished the script to a reasonable degree (I know, they are never finished) I will post it here, so you can see how I tried it. ;) (So far it works, still some issues with interceptors going crazy...) Note that Controller.isTargetDetected - function does not seem to work with AWACS units. It only works with ground radar, don´t ask me why...
  18. Well it`s funny, but for me, DCS has never been so stable as it is now for a long time... Occasionally I get a C++ Runtime error after 3hours, but before 1.2.6 it was even worse and DCSs average time to crash - ATC - was about 30minutes... :music_whistling: FC1 and BS1 was last ED product I remember, which ran "flawless"... guess I go used to it... :music_whistling:
  19. I think the TO is about the accuracy of the top mounted M2 0.5cal guns on the tanks. As the guns from a BRDM methinks they are manually operated by the crew, but I have more respect from these guns, than from a ZSU. IRL the tank commander would be worried about other stuff than trying to engage a jet with his spray gun, but I might be wrong. I was often surprised too, about the accuracy of the tanks MGs.
  20. Yes, I just wrote this to test, how the function works. You can replace the "trigger.outTest" with anything else, which shall happen when the unit is detected. I want to use the detect-funciton for a dynamic CAP/INTERCEPT script, I am currently working on. This script shall spawn or task free interceptors to engage the planes entering the polygon area and which are detected by the EWR radars. So far it works (surprisingly), but I still have to send the interceptors back to base after the intruder leaves the polygon area or is shot down. The spawned interceptors go rampage across the map otherwise after they have completed their task. To combine the detect-function with the polygon this would be an example which works for me: This creates points for the border: bluebordergroupname = 'blueborder' -- Name of group which waypoints define the blue border blueborderline = mist.getGroupPoints(bluebordergroupname) --table of points defining blue borderline blueborderlinevec3 = {} for r = 1, #blueborderline do blueborderlinevec3[#blueborderlinevec3 + 1] = { z = blueborderline[r].y, x = blueborderline[r].x, y = land.getHeight({x = blueborderline[r].x, y = blueborderline[r].y}) } --trigger.action.smoke({x=blueborderline[r].x, y=land.getHeight({x = blueborderline[r].x, y = blueborderline[r].y}), z=blueborderline[r].y}, trigger.smokeColor.Green)--check smoke --trigger.action.smoke({x=blueborderlinevec3[r].x, y=land.getHeight({x = blueborderlinevec3[r].x, y = blueborderlinevec3[r].z}), z=blueborderlinevec3[r].z}, trigger.smokeColor.Red)--check smoke end And with this you check the units inside this polygon: ... blueborderviolationcheck = mist.pointInPolygon(possibleredintruderpos3, blueborderlinevec3) if blueborderviolationcheck == true and intrudergroupdetected == true then ...
  21. After some testing I finally found the right syntax. For all the clueless scripters like me, here an Example that works: --EWR unit to be named 'testEWR' --Unit to be detected named 'testintruder' function checkifunitdetected() possibleblueintrudergroupdetected = false local possibleblueintruder = Unit.getByName('testintruder') local redEWRgroup = Group.getByName('testEWR') local redEWRgroupcontroller = redEWRgroup:getController() possibleblueintrudergroupdetected = Controller.isTargetDetected(redEWRgroupcontroller, possibleblueintruder, RADAR) if possibleblueintrudergroupdetected == true then trigger.action.outText("Intruder detected", 2) elseif possibleblueintrudergroupdetected == false then trigger.action.outText("Intruder NOT detected", 2) end return timer.getTime() + 5 end timer.scheduleFunction(checkifunitdetected, nil, timer.getTime() + 2)
  22. Since I couldn´t find any further documentation concerning these functions in the WIKI I am just asking here... Would this be the right Snytax for the "Controller.isTargetDetected()" function? lcoal possibleblueintruder = Unit.getByName('testintruder') local redEWRgroup = Group.getByName('testEWR') local redEWRgroupcontroller = redEWRgroup:getController() possibleblueintrudergroupdetected = Controller.isTargetDetected(redEWRgroupcontroller, possibleblueintruder, [Conroller.Detection.RADAR]) I want possibleblueintrudergroupdetected to be a boolean, which returns true if the unit with the name "testintruder" is detected by the radar of the group "testEWR".
  23. Well, this way it works local function getallredaircrafts()--ok local RedAircraftstable = nil local RedAircraftstable = {} local RedAircraftstable = {'[red][plane]', '[red][helicopter]'} local allredairunitsstart = nil local allredairunitsstart = {} local allredairunitsstart = mist.makeUnitTable(RedAircraftstable) local allredairunits = nil local allredairunits = {} for a = 1, #allredairunitsstart do if Unit.getByName(allredairunitsstart[a]) then allredairunits[#allredairunits + 1] = { name = allredairunitsstart[a] } end end local allredairunitsTable = mist.utils.tableShow(allredairunits) --checkmessage ok trigger.action.outText("Red aircraft on map table:" ..allredairunitsTable, 2) --ok return timer.getTime() + 10 end timer.scheduleFunction(getallredaircrafts, nil, timer.getTime() + 1)
  24. Ok, thanks. I have one option I didn´t test yet, with clearing the RedAircraftstable = {'[red][plane]', '[red][helicopter]'} evertime the function is called, by setting RedAircraftstable = {} infront. I also tried to just make the unit list once in the beginning and then to regularly make a fresh table with the units alive, but this broke a soon as a unit died too. And this would not update the list, if a unit is added dynamically. Since I have no idea how to access mist.DBs, this is my last straw I can see. Is there an example how to use DBs somewhere besides the ones in the MIST-subfolder? I see the structure but not how to access them via script.
×
×
  • Create New...