Jump to content

ops

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by ops

  1. Hey the new save handler is great already! It also allows for a few workarounds with dynamic spawns, and own script data. However, following things would really help a lot: Everything based on flags breaks currently -> save flag values/times in the mission, and reapply them on start (they are already saved in the debrief.log) (could reapply them in a custom save handler, but we don't have access to set the flag time) Dynamic spawned players are saved as NPC -> don't save units with IDs > 1000000 (dynamic player spawns) (could keep track and destroy on mission start, but it looks like a bug) Dynamic spawned NPCs lose their names -> save unit and group names of dynamic spawned units (currently they are named to "vehicle1" etc) (own saving not possible as we don't get access to current task data)
  2. Encountered major 2 problems when trying to use the save feature with dynamic spawns 1) Dynamic spawned clients get saved as Rookie NPC Expected: don't save dynamic clients at all, they should dynamic spawn again in the saved mission. Cause: currently all alive units get saved Proposed fix: do not save units with ID >= 1000000 (in me_exportToMiz.lua, parseDebriefing) 2) NPC spawned via coalition.addGroup lose their unit and group names Expected: unit and group names are retained (needed for scripting, and to not have "vehicle1" for a soldier) Cause: the miz export combines debriefing.lua with the mission file, as units are not present in mission, and names missing in debriefing.lua, generic names are used Proposed fix: add unit and group names to the debriefing.lua
  3. Hello, it's a nice start, unfortunately this is of extremely limited use. The feature doesn't even save the internal flag values. The tutorial video suggesting to base everything on absolute mission time, that's not very useful. Some way to hook into the save/load feature would be nice, so we can add missing stuff and initialize missions properly
  4. this is impossible. scripts in games are to control the game - when you remove the game part of this, there's nothing left. DCS exposes a lot of classes, modules, functions to the LUA environment it runs the scripts in. All that is obviously missing in a standalone LUA interpreter.
  5. GPT in real life works different that what media likes to claim. Everything non-trivial, it makes up a huge pile of nonsense, even with documentation. In your case, it made up a non-existing function... in many cases worse than some toddler using google make sure you're able to see errors in the log, there has to be one, you can't call undefined functions without getting an error. feeding back this error into GTP might solve your issue, but be prepared to end up with a big mess that's otherwise a few lines of code.
  6. Hi, for Singleplayer, you can use built-in functions of DCS, e.g.: local myaw = net.dostring_in("export", "return LoGetMagneticYaw()") myaw = tonumber(myaw) * (180 / math.pi) if myaw < 0 then myaw = myaw + 360 end trigger.action.outText("magnetic yaw: " .. tostring(myaw), 5, true)
  7. your second thing is not possible, can't animate other units, only read certain animation args
  8. you need a piece of script for this, e.g.: local function checkDistance(unit1, unit2, radius) local p1 = unit1:getPoint() local p2 = unit2:getPoint() return (p1.x-p2.x)*(p1.x-p2.x) + (p1.z-p2.z)*(p1.z-p2.z) + (p1.y-p2.y)*(p1.y-p2.y) < radius*radius end world.addEventHandler({ onEvent = function(self, event) if event.id == world.event.S_EVENT_SHOOTING_START then local red1 = Unit.getByName("red1-1") if red1 and checkDistance(event.initiator, red1, 1000) then trigger.action.setUserFlag("shot_near_red1", 1) end end end }) this will react on shooting near "red1-1" unit and set a flag back to the ME you can work with (set ROE, switch waypoint, ..) attached a demo mission, where red1 is doing orbit, and flees back home once blue shoots nearby snippets-react-on-shot.miz
  9. I checked one of the missions where someone had this error. It's no LUA or script issue, as no scripts are run when simply loading the mission. It turned out, there were thousands of coordinates in the waypoint "span" sections of ground units, for every ground unit. I guess this literally blew the limit of something in DCS. The waypoints weren't set by the user (some were stationary SAMs), there were also some paintings in the mission, almost as if a bug mixed up both. (salvaging mission is possible by manually editing out those huge "span" sections in the mission file).
  10. bumping, as recently the userfiles were brought up again. an "updated" date would tremendously increase the functionality. along with a searchbox in the same form (not the general fuzzy search in the top bar, but as additional filter)
  11. I don't think anything special happens when you press "FLY", it only closes the briefing window. (You can open the briefing window and close it during mission, no event or anything is fired, simulation continues running). what are you trying to accomplish?
  12. it's a fairly new function, see Scripts\Hooks\common.lua in DCS install dir, didn't test yet if it works (there is a bunch of events/callbacks that seem to not work)
  13. Hello, am enjoying the cargo features, especially in the Chinook. Two adjustments would be appreciated: 1) To properly function, the cargo statics need a CSV file each in installdir "Data" folder. Without, they glitch like crazy. Even the included L118 artillery, due to lack of such a file. Suggestion: have the game also check in "Saved Games/DCS/Data", so we don't need to modify install directory 2) I made a high number of cargo statics, equivalents to in-game units (up to ~10t). It would be nice for those who fit in the Chinook, to be able to have them as cargo container. This works out of the box, unfortunately the available space inside is quite restrictive. Suggestion: adjust the "area" and "far_wall_pos" in the InternalCargo settings of the Chinook, so a bit more can fit inside (1.5m only currently) Thanks for consideration!
      • 1
      • Like
  14. you can use net.dostring_in("gui") without desanitizing and with some trickery (dostring in "mission" and a_do_script) funnel results back into the mission env. but that data changes only on map updates anyway (if at all)
  15. This works for me too, without using the global F15FM table make_flyable('F-22A', current_mod_path..'/Cockpit/Scripts/', { 'F-15C', 'F15', old = 6 }, current_mod_path..'/Comm.lua') I found this as comment in some LUA file, which gave the hint that first parameter can also be used to reference origin/source fm via its module name (?) -- make_flyable ( obj_name, optional_cockpit path, optional_fm = {mod_of_fm_origin,dll_with_fm})
  16. Hello! bumping this topic, as it would greatly increase the usability of the userfiles section (at a guessed low effort) best regards
  17. Hi, the mission editor removes files when they are not in the dictionary, either in the root folder, or in the l10n/default folder. you can still add your own folders, that will not be touched, e.g. a "sounds" folder on the root level. you can use those with e.g. trigger.action.outSound('sounds/bla.ogg') similar works for images, unfortunately there is no trigger.action.outPicture, so you need to use this: net.dostring_in('mission', 'a_out_picture("images/test.jpg", 10, false, 0, "1", "1", 100, "0")')
  18. Hello, here's a piece of code that returns data of interest out of the terrain files that are readable (beacons, towns and radio) It either works GUI/server env, or in mission env with desanitized MissionScripting.lua (require and package need be available): -- "Afghanistan", "Caucasus", "Falklands", "Kola", "MarianaIslands", "Nevada", "Normandy", "PersianGulf", "Sinai", "Syria", "TheChannel" function getTerrainData(terrain) local hasBeacons, beacons = pcall(function() loadfile("./Mods/terrains/" .. terrain .. "/beacons.lua")() return beacons end) local hasRadio, radio = pcall(function() loadfile("./Mods/terrains/" .. terrain .. "/radio.lua")() return radio end) local hasTowns, towns = pcall(function() loadfile("./Mods/terrains/" .. terrain .. "/map/towns.lua")() return towns end) result = { beacons = hasBeacons and beacons or nil, radio = hasRadio and radio or nil, towns = hasTowns and towns or nil } return result end return getTerrainData("Kola")
  19. nice, even better! the difference is probably, his one is properly made while I did just some guesswork, didn't find this before
  20. was there any solution? shop is broken for me too. purchases don't work anymore, never had a problem before
  21. no idea what it does. tried it and shot guns at them but no explosion
  22. Cargo Cow Static Mod, can be slingloaded: unfortunately doesn't moo, no idea how the sounds work (let me know if you know how). install: put the attached file "entry.lua" in Saved Games\DCS\Mods\tech\CargoCow entry.lua
  23. Hello! Nice effort, this is useful. First, a trick for placement to work around "soft ground", use the almighty cow: select static type animal move the cow, she can go pretty much everywhere select type back to helipad I've put everything listed in this thread in a Static Template and checked Google Maps if it matches, Screenshots and Template attached. kola-helipads.stm
  24. absolute WORST customer experience EVER. so far I recommended the stuff, from now on I'll warn everyone. DO NOT BUY THIS STUFF, if you run into problems you're on your own, they will ask you to put hours into repairing the stuff YOURSELF, a fresh arrived item that's obviously broken.
  25. that just saves the default snapview position, and does not work with zoom axis. best would be if the limits could also be set per snap view, to make zooming work better. (also aware you can fiddle around with y saturation but it's not very convenient)
×
×
  • Create New...