Jump to content

Recommended Posts

Posted

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?

 

  • Like 2
  • Thanks 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 !

  • 1 month later...
Posted

I would also like to know about this, if there's an answer, cause some of us modder uses towns lua data

ChromiumDis.png

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.

  • 3 weeks later...
Posted

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 !

Posted (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 by cfrag
Posted

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

ChromiumDis.png

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.

Posted
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)

ChromiumDis.png

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.

  • 3 weeks later...
Posted

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)

ChromiumDis.png

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.

  • 3 weeks later...
Posted
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

  • Like 2
  • 2 weeks later...
Posted (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 by chromium

ChromiumDis.png

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.

  • 6 months later...
Posted
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?

  • Like 1
Posted
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.

 

ChromiumDis.png

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.

Posted (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 by okopanja
  • 2 months later...
Posted (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 by cfrag
  • Like 2
Posted

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()

 

  • Like 1
  • Thanks 2
Posted
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...