davidp57 Posted July 20, 2023 Posted July 20, 2023 Hi, I'm the main maintainer of a set of lua scripts, in which we manage named points. Until now, I've been getting town coordinates data from the terrain makers by parsing the towns.lua file provided in the terrain folders, and using them to populate a database of known points. In the Sinai map, however, this file is empty. Is this because it's not yet ready, or did it become obsolete with the new map technology? 2 1 Zip - VEAF :pilotfly: If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !
chromium Posted September 2, 2023 Posted September 2, 2023 I would also like to know about this, if there's an answer, cause some of us modder uses towns lua data Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
davidp57 Posted September 21, 2023 Author Posted September 21, 2023 Anything? Bumping this thread up in hope someone will notice it. Zip - VEAF :pilotfly: If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !
cfrag Posted September 28, 2023 Posted September 28, 2023 (edited) On 9/21/2023 at 9:12 AM, davidp57 said: Anything? I've been monitoring this interesting thread, and now I have to ask, fearing that the answer is "no" since you mention that you parse the luas. So, after I tried myself and failed, my question is this: Is the information available/encoded in towns.lua available during the mission's execution from SME (i.e. if yes, what table contains that towns information)? Edited September 28, 2023 by cfrag
chromium Posted September 28, 2023 Posted September 28, 2023 No, but it' freakingly easy to import them cause that file is a simple table... you can basically copy and paste it to your sxript and then use the coordinate see functions to convert into a table of town names and vec3 position Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
davidp57 Posted September 28, 2023 Author Posted September 28, 2023 Well, yes, except for Sinai ^^ Zip - VEAF :pilotfly: If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !
chromium Posted September 28, 2023 Posted September 28, 2023 2 ore fa, davidp57 ha scritto: Well, yes, except for Sinai ^^ This is not fun. (it is, but it's wrong to admit it XD) Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
chromium Posted October 15, 2023 Posted October 15, 2023 bump, at least to get an answer of any type. (i.e. won't be done here, or won't be done in any future maps cause it's not needed anymore, etc) Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
OnReTech Posted November 3, 2023 Posted November 3, 2023 On 7/20/2023 at 4:48 PM, davidp57 said: Hi, I'm the main maintainer of a set of lua scripts, in which we manage named points. Until now, I've been getting town coordinates data from the terrain makers by parsing the towns.lua file provided in the terrain folders, and using them to populate a database of known points. In the Sinai map, however, this file is empty. Is this because it's not yet ready, or did it become obsolete with the new map technology? I asked this question to the support, I'll let you know how they answer me, thanks 2
chromium Posted November 17, 2023 Posted November 17, 2023 (edited) Il 3/11/2023 at 07:47, OnReTech ha scritto: I asked this question to the support, I'll let you know how they answer me, thanks Any news @OnReTech? Thanks Edited November 17, 2023 by chromium Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
Sulfa Posted May 19, 2024 Posted May 19, 2024 On 11/3/2023 at 12:47 AM, OnReTech said: I asked this question to the support, I'll let you know how they answer me, thanks @OnReTech Its almost been a year. Anything? 1
okopanja Posted May 19, 2024 Posted May 19, 2024 (edited) Would be interesting to know if place search for NS430/Ka50 still works on this map... Edited May 19, 2024 by okopanja
chromium Posted May 19, 2024 Posted May 19, 2024 19 minuti fa, okopanja ha scritto: Would be interesting to know if place search for NS430/Ka50 still works on this map... Is this related to the topic? Didn't knew that the towns.lua file is a prerequisites for them to work. Author of DSMC, mod to enable scenario persistency and save updated miz file Stable version & site: https://dsmcfordcs.wordpress.com/ Openbeta: https://github.com/Chromium18/DSMC The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.
okopanja Posted May 19, 2024 Posted May 19, 2024 (edited) 19 minutes ago, chromium said: Is this related to the topic? Didn't knew that the towns.lua file is a prerequisites for them to work. Very relevant: if the function does not work in any of these modules you can claim 100% legal bug report for the map. E.g. I have both modules, but not the Sinai. Also, yesterday I added towns.lua info to my own mod, and read about file missing today. I optimistically executed towns.lua without checking for file presence Edited May 19, 2024 by okopanja
cfrag Posted August 12, 2024 Posted August 12, 2024 (edited) Good news: the Aug-09 update added towns.lua, containing some 730 entries. Yay! Oh, and I also found a way to access that file from SME in a fully sanitized DCS, good stuff! Edited August 12, 2024 by cfrag 2
cfrag Posted August 13, 2024 Posted August 13, 2024 Since a couple of interested souls requested this, here's my quick method to import a map's Towns.Lua file into the scripting environment (and adding map-local coordinates) without having to parse anything nor having to de-sanitize DCS: twn = {} function twn.start() -- get my theater local theater = env.mission.theatre -- map naming oddities if theater == "SinaiMap" then theater = "Sinai" end local path = "./Mods/terrains/" .. theater .. "/map/towns.lua" -- assemble command local command = 't = loadfile("' .. path .. '"); if t then t(); return net.lua2json(towns); else return nil end' local json = net.dostring_in("gui", command) if json then towns = {} traw = net.json2lua(json) local count = 0 for name, entry in pairs (traw) do local p = coord.LLtoLO(entry.latitude, entry.longitude,0) entry.p = p towns[name] = entry count = count + 1 end else trigger.action.outText("no towns accessible.", 30) return false end return true end twn.start() 1 2
okopanja Posted August 13, 2024 Posted August 13, 2024 11 minutes ago, cfrag said: Since a couple of interested souls requested this, here's my quick method to import a map's Towns.Lua file into the scripting environment (and adding map-local coordinates) without having to parse anything nor having to de-sanitize DCS: twn = {} function twn.start() -- get my theater local theater = env.mission.theatre -- map naming oddities if theater == "SinaiMap" then theater = "Sinai" end local path = "./Mods/terrains/" .. theater .. "/map/towns.lua" -- assemble command local command = 't = loadfile("' .. path .. '"); if t then t(); return net.lua2json(towns); else return nil end' local json = net.dostring_in("gui", command) if json then towns = {} traw = net.json2lua(json) local count = 0 for name, entry in pairs (traw) do local p = coord.LLtoLO(entry.latitude, entry.longitude,0) entry.p = p towns[name] = entry count = count + 1 end else trigger.action.outText("no towns accessible.", 30) return false end return true end twn.start() Nice, kind of annoying the nobody did enforce the naming consistancy.
Recommended Posts