Jump to content


ED Closed Beta Testers Team
  • Posts

  • Joined

  • Last visited

Everything posted by PravusJSB

  1. Yea the above would work fine but it's been a long time since I played with that and I can't recall how to do it however, you would need to be confident with Lua and to use a Hook on the backend to enable you to do it dynamically with code.
  2. Im almost certain you could do what you wanted in a single player mission, but not in multiplayer.
  3. Yes, I remove a number of Cat'5' items in my server.
  4. make sure you're not setting the altitude too high, other thn that not sure why the airspeed wouldn't be achieved as you set it on the waypoint.
  5. The first line tells you, wherever PatrolZone is being passed, start there. It's nil for whatever reason and it needs to be something.
  6. Add a do script with a loadfile call to an external file, then load all your custom lua from there.
  7. but like you said, if you had no bottleneck then the gains will be small, for me it was vastly different.
  8. Thats positive, thanks for testing. Yea 2 units of data isnt enough to go on, but it does seem like the timings might be a thing. I'm on much older hardware, 6700K@4.6 2080S so every little helps for me.
  9. Something I made to visualise POI's in Syria, although can apply anywhere. In this instance I was looking for helipads and what kind of buildings were around them, highlighting hospitals. It's a simple bit of code and the output can be very robust. POI_with_helipads_syria.lua
  10. @edmuss That sir is a complex topic and I have a lot of information about it, and it's very frame of reference dependant. In general and overclocking aside I'd say ensure you have no hardware bottlenecks and dont be greedy with settings. A common mistake I see people make is with a bottleneck to the GPU, which can be seen with low GPU utilisation, people lower their settings and it gets worse. Instead try to understand the bottleneck and mitigate it and normally upping a GPU related settings much much higher can ease or fix the issue, as it slows the GPU down and brings it back inline with the CPU. I saw a big improvement each step i got the core latency down and stable. For reference i get zero stutters, zero tiny spikes, butter smooth, Syria, RiftS, visual fidelity high.
  11. Hi, I have messed around with settings and setup a lot over the years trying to get the best VR experience and one thing that I did do which made a huge difference is memory overclocking, more specifically I sacrificed speed for tight timings. I have not seen anyone ever talk about timings and I always wanted to write something but I appreciate that this type of overclock is not for the feint of heart. I wondered if anyone else had seen similar results or has the skill and inclination to give it a go and confirm it is indeed a great way to boost performance. i managed to get my timings to 13-15-15-28 @3000 (32Gb) and importantly a 1T command rate.
  12. Also bear in mind that the speeds on the tasking are in metres per second (i think) and the altitude is in metres, so you’ll have to make appropriate conversations when creating a new or modifying existing tasks.
  13. Mission event id 15 fires when birthed on pressing fly i think.
  14. PravusJSB

    Why Lua?

    It's fast, and flexible, and when you have so many fast moving objects to update across clients it works a treat. On the flip side the syntax is easy to learn but much harder to master, and if you have Lua written in a bad way it can bring the whole thing down and debugging it isn't as straight forward as most. I love it, I think it fits DCS well. I tried built a ML application that took mission data at runtime and it was so cool, Python is a cool language and Lua 5.1 feels dated compared, but it was so slow I abandoned it and moved onto other things.
  15. I've not done any kind of robust testing on it, but from experience, yes.. sometimes it can be a performance hit. It depends on the objects used, how many players, what they're doing, what the rest of the mission is doing and scale.
  16. No, you're trying to call a C function that isn't exposed to the mission luaState, you cannot do that. The function above is the correct one for the OP's question, it resides in 'gui' and 'export' luaState so scripting in those states will achieve what he wants. Further to that I've not looking into this at all, just shooting from the hip so to speak.
  17. You cannot just call any function you find, they all exist in different environments. I would hazard a guess that function would reside in the actual code for the module and thus its own lua state youre not going to get access to. And yes, things work on 'self' in MP, but not to call on other Clients.
  18. There are many errors in the way this is written, but I think the key reason it doesn't work is that the net.load_mission is not available to the 'mission luaState'. Try this... local function load_next_miz() local code = [[ _G.net.load_next_mission() ]] return pcall(net.dostring_in, 'gui', code) end
  19. The function behind this is 'a_cockpit_perform_clickable_action' which lives in the global env on a client's 'mission luaState' and whilst I've never had a play with it myself I don't see why you couldn't use it on yourself / your own aircraft with a script but it would not work on a MP server for a client for example.
  20. The getAmmo method called on the unit should return an array of tables (for each pylon and guns), does it not work on players? Here's and example of how i use it.. local function has_air2air(group_name,detail) local GRP = Grp.get(group_name) local UNITS = GRP:units() local details = {} for i = 1,#UNITS do local ammo = UNITS[i]:getAmmo() for pylon = 1,#ammo do if ammo[pylon].count > 0 and ammo[pylon].desc.category == 1 and ammo[pylon].missileCategory == 1 then if not detail then return true elseif detail then if ammo[pylon].desc.displayName then if not details[ammo[pylon].desc.displayName] then details[ammo[pylon].desc.displayName] = ammo[pylon].count else details[ammo[pylon].desc.displayName] = details[ammo[pylon].desc.displayName] + ammo[pylon].count end end end end end end if detail then return details else return false end end
  21. It's harder than you think to keep this thread updated, but we have recently released a large document detailing how to use and what this server offers, you can find it easily on our discord. We have just started to implement the V4 of the core logic which enables the AI to 'think' and make decisions, something pretty special and which the refactor started in Sep '21.
  22. This thread might help you out;
  23. Are you looking to query the ‘Callsign’? If so you’d have to get the group with the group’s name as you have done above, then with each group ask for the Units or a specific unit of the group then query using the method ‘getCallsign’. Otherwise I might not be fully understanding what string you want to match against as if it’s the groups name then what you have already should work fine.
  24. No you get me all wrong, I'm not suggesting what to do, because looking at what you're taking away you're over complicating it. I'm just giving you the information about what's expensive to do. It doesn't mean don't do it, just be mindful and if you need to do it in excess then think about how to phase/schedule/cache/stack it out into the world for the least performance hit. You should really avoid ME as much as possible, make your assets in there is you want/not sure how to make them on the fly without a reference, late activate them and then if you can design with code calling the assets when needed or If you don't know how to do that yet then for sure, design in the ME. Have it all late activated (spawning everything and deleting is mental) and then activate when needed. EDIT: That code wasnt MIST data it was the mission data which is stored in 'env.mission', the same data MIST copies from to store again.
  25. There's a lot of info in here now, and some of it is not quite right or misleading, I don't have time to point it all out but about spawning, some important info; Dynamically spawning an aircraft is expensive, it's expensive at a moment in time but in terms of load on the mission it's transient and is not too much to worry about unless you're spawning more than one-two groups of 4 however, Ground Units for some reason are vastly more so, and they 'reverberate' CPU load for about 20-30 seconds as the units are shared with the clients, spawning 1 or 2 is OK sure, but it gets exponentially more expensive the higher you go and the more clients connected. Especially if there is more than a few units in the group. Consider, it's not only the units, their task, route etc that needs to be shared, but every single radar/datalink etc alive in your mission now needs to pick these up and figure out if they have LOS and know the them etc. Secondly, you don't need much info to spawn a group so it's not hard to build up a DB of info to make a group on the fly. Finally, the Mist framework is good for sure, but why make that DB of existing units when it already exists and isn't hard to iterate for example this is part of a tiny little class I have to retrieve ME declared assets; spmCore.side = { "neutrals", "red", "blue" } -- ME object name, side as an enum -- cats are string, plane, helicopter, ship, vehicle, static function spmCore.find(name,side,cat) if not side then return false end local data = env.mission.coalition[spmCore.side[side+1]] for j = 1,#data.country do if data.country[j][cat] then local Data = data.country[j][cat].group for i = 1,#Data do if Data[i].name == name then return deepCopy(Data[i]) end end end end return false end
  • Create New...