Jump to content

Recommended Posts

Posted

Something I'd love to see is some interface from where we could read some info (like position, and maybe some more stuff) from active game objects in a parseble way, in realtime. For instance:

 

<type="a10" x=525625.92, y=433234.54, z=1085.53 state="flying"... [other interesting stuff here]>
<type="mk83" x=624325.25, y=113234.23, z=982.12 state="falling"... [other interesting stuff here]>

This would open up fantastic opportunities for cool and useful user created software. For instance, one could create a mission commander map tool where somebody could follow the mission in realtime (without starting the sim. it could even be presented on a squadron website). Or one could even create an interface for using those variables to make stuff happen in a different game. I'd love to see/make a middleware program that enabled us to drop a bomb in a DCS sim, read that info and through some clever scripting spawn that bomb in a game like Arma2. Voila, Close air support, flying above your friends who can't stand flight sims, but like the ground fighting.

 

The possibilites would be endless. Stuff like this (i.e mod-friendliness and UGC in general) usually helps any game stay alive for much longer as well. So I think it'd be beneficial for everyone. And I think that the extra work involved wouldn't be unreasonable.

 

What do you think? Would it be a reasonable wish? :)

 

And please flame me if this is already possible through LUA! (I didn't make a through search to be honest) Hats off in that case.

Posted

[sIGPIC][/sIGPIC]

Daniel "EtherealN" Agorander | Даниэль "эфирныйн" Агорандер

Intel i7 2600K @ 4.4GHz, ASUS Sabertooth P67, 8GB Corsair Vengeance @ 1600MHz, ASUS GTX 560Ti DirectCU II 1GB, Samsung 830series 512GB SSD, Corsair AX850w, two BENQ screens and TM HOTAS Warthog

DCS: A-10C Warthog FAQ | DCS: P-51D FAQ | Remember to read the Forum Rules |

|
| Life of a Game Tester
Posted (edited)

It's already in the game, and it's been around for years. It's the "Export" Lua environment. See C:\Program Files\Eagle Dynamics\DCS A-10C\Config\Export\Export.lua.

 

Additionally, the net Lua environment function net.dostring_in lets you access, from the "net" environment, not only the "Export" Lua environment, but the "server" (aka "main simulation"), "mission", and "config" environments as well (though the config env is pretty useless AFAIK).

 

This is what a Slmod export of active game objects currently looks like:


active_units = 
{
   [16843521] = 
   {
       ["id"] = 16843521,
       ["coalition"] = "blue",
       ["x"] = -336927.19050026,
       ["name"] = "Springfield 11",
       ["z"] = 645464.7590065,
       ["objtype"] = "F-16c",
       ["group"] = "blue_F-16C",
       ["mpname"] = "Springfield 11",
       ["y"] = 2360.1114781925,
   }, -- end of [16843521]
   [16847617] = 
   {
       ["id"] = 16847617,
       ["coalition"] = "blue",
       ["x"] = -365475.71875,
       ["name"] = "check 1 1",
       ["z"] = 613928.3125,
       ["objtype"] = "M1025 HMMWV",
       ["group"] = "blue_Check point_Group",
       ["mpname"] = "check 1 1",
       ["y"] = 16.175945281982,
   }, -- end of [16847617]
   [16851713] = 
   {
       ["id"] = 16851713,
       ["coalition"] = "blue",
       ["x"] = -356169.15625,
       ["name"] = "Unit #93",
       ["z"] = 617641.4375,
       ["objtype"] = "M1025 HMMWV",
       ["group"] = "blue_Batumi_Defence_GRP",
       ["mpname"] = "Unit #93",
       ["y"] = 9.9645166397095,
   }, -- end of [16851713]
   [16855809] = 
   {
       ["id"] = 16855809,
       ["coalition"] = "blue",
       ["x"] = -317835.15625,
       ["name"] = "kob 1 4",
       ["z"] = 637077.125,
       ["objtype"] = "M1126 Stryker ICV",
       ["group"] = "blue_Kobuleti_BD_Vhcls",
       ["mpname"] = "kob 1 4",
       ["y"] = 18.933778762817,
   }, -- end of [16855809]
   [16794625] = 
   {
       ["id"] = 16794625,
       ["coalition"] = "red",
       ["x"] = -372866.84375,
       ["name"] = "Unit #18",
       ["z"] = 628098.875,
       ["objtype"] = "ZU-23 Emplacement Closed",
       ["group"] = "New Vehicle Group",
       ["mpname"] = "Unit #18",
       ["y"] = 179.93560791016,
   }, -- end of [16794625]
   [16868097] = 
   {
       ["id"] = 16868097,
       ["coalition"] = "blue",
       ["x"] = -280875.71875,
       ["name"] = "sen 1 8",
       ["z"] = 647442.875,
       ["objtype"] = "M973 Avenger",
       ["group"] = "blue_Senaki_defence",
       ["mpname"] = "sen 1 8",
       ["y"] = 13.450103759766,
   }, -- end of [16868097]
   [16806913] = 
   {
       ["id"] = 16806913,
       ["coalition"] = "red",
       ["x"] = -376043.15625,
       ["name"] = "Unit #182",
       ["z"] = 610084,
       ["objtype"] = "",
       ["group"] = "red_EWR 55G6_SUP_Vehs",
       ["mpname"] = "Unit #182",
       ["y"] = 1001.9532470703,
   }, -- end of [16806913]
   [16876289] = 
   {
       ["id"] = 16876289,
       ["coalition"] = "blue",
       ["x"] = -285673.15625,
       ["name"] = "kut 1 24",
       ["z"] = 685165.125,
       ["objtype"] = "leopard-2",
       ["group"] = "blue_Kutasi_defence",
       ["mpname"] = "kut 1 24",
       ["y"] = 45,
   }, -- end of [16876289]
   [16843777] = 
   {
       ["id"] = 16843777,
       ["coalition"] = "blue",
       ["x"] = -337687.78091145,
       ["name"] = "Springfield 21",
       ["z"] = 647695.55634117,
       ["objtype"] = "F-16c",
       ["group"] = "blue_F-16C #001",
       ["mpname"] = "Springfield 21",
       ["y"] = 2365.044263968,
   }, -- end of [16843777]
   [16847873] = 
   {
       ["id"] = 16847873,
       ["coalition"] = "blue",
       ["x"] = -365565.4375,
       ["name"] = "check 1 2",
       ["z"] = 613926.5625,
       ["objtype"] = "M1025 HMMWV",
       ["group"] = "blue_Check point_Group",
       ["mpname"] = "check 1 2",
       ["y"] = 13.852561950684,
   }, -- end of [16847873]
   [16851969] = 
   {
       ["id"] = 16851969,
       ["coalition"] = "blue",
       ["x"] = -355692,
       ["name"] = "Unit #94",
       ["z"] = 617115.6875,
       ["objtype"] = "M1025 HMMWV",
       ["group"] = "blue_Batumi_Defence_GRP",
       ["mpname"] = "Unit #94",
       ["y"] = 9.9645175933838,
   }, -- end of [16851969]
   [16856065] = 
   {
       ["id"] = 16856065,
       ["coalition"] = "blue",
       ["x"] = -318182.28125,
       ["name"] = "kob 1 5",
       ["z"] = 634900,
       ["objtype"] = "leopard-2",
       ["group"] = "blue_Kobuleti_BD_Vhcls",
       ["mpname"] = "kob 1 5",
       ["y"] = 18,
   }, -- end of [16856065]
   [16794881] = 
   {
       ["id"] = 16794881,
       ["coalition"] = "red",
       ["x"] = -372866.84375,
       ["name"] = "Unit #19",
       ["z"] = 628090,
       ["objtype"] = "brdm-2",
       ["group"] = "New Vehicle Group",
       ["mpname"] = "Unit #19",
       ["y"] = 179.51208496094,
   }, -- end of [16794881]
   [16868353] = 
   {
       ["id"] = 16868353,
       ["coalition"] = "blue",
       ["x"] = -282070,
       ["name"] = "sen 1 9",
       ["z"] = 646397.125,
       ["objtype"] = "M973 Avenger",
       ["group"] = "blue_Senaki_defence",
       ["mpname"] = "sen 1 9",
       ["y"] = 12,
   }, -- end of [16868353]
   [16872449] = 
   {
       ["id"] = 16872449,
       ["coalition"] = "blue",
       ["x"] = -285191.71875,
       ["name"] = "kut 1 9",
       ["z"] = 683055.125,
       ["objtype"] = "M1025 HMMWV",
       ["group"] = "blue_Kutasi_defence",
       ["mpname"] = "kut 1 9",
       ["y"] = 45,
   }, -- end of [16872449]
   [16880641] = 
   {
       ["id"] = 16880641,
       ["coalition"] = "blue",
       ["x"] = -355541.71875,
       ["name"] = "hawk 1 1",
       ["z"] = 617441.6875,
       ["objtype"] = "hawk ln",
       ["group"] = "blue_Batumi_Air_Defence_GRP",
       ["mpname"] = "hawk 1 1",
       ["y"] = 9.9645166397095,
   }, -- end of [16880641]
   [16844033] = 
   {
       ["id"] = 16844033,
       ["coalition"] = "blue",
       ["x"] = -338535.64460576,
       ["name"] = "Springfield 31",
       ["z"] = 650197.50566196,
       ["objtype"] = "F-16c",
       ["group"] = "blue_F-16C #002",
       ["mpname"] = "Springfield 31",
       ["y"] = 2369.9692255568,
   }, -- end of [16844033]
   [16848129] = 
   {
       ["id"] = 16848129,
       ["coalition"] = "blue",
       ["x"] = -365574.5625,
       ["name"] = "check 1 3",
       ["z"] = 613952,
       ["objtype"] = "M1025 HMMWV",
       ["group"] = "blue_Check point_Group",
       ["mpname"] = "check 1 3",
       ["y"] = 13.692094802856,
   }, -- end of [16848129]
   [16852225] = 
   {
       ["id"] = 16852225,
       ["coalition"] = "blue",
       ["x"] = -356114.84375,
       ["name"] = "Unit #95",
       ["z"] = 618115.6875,
       ["objtype"] = "M1025 HMMWV",
       ["group"] = "blue_Batumi_Defence_GRP",
       ["mpname"] = "Unit #95",
       ["y"] = 9.9645166397095,
   }, -- end of [16852225]
   [16856321] = 
   {
       ["id"] = 16856321,
       ["coalition"] = "blue",
       ["x"] = -317526.5625,
       ["name"] = "kob 1 6",
       ["z"] = 636691.4375,
       ["objtype"] = "leopard-2",
       ["group"] = "blue_Kobuleti_BD_Vhcls",
       ["mpname"] = "kob 1 6",
       ["y"] = 20.065155029297,
   }, -- end of [16856321]
   [16795137] = 
   {
       ["id"] = 16795137,
       ["coalition"] = "red",
       ["x"] = -372176.5625,
       ["name"] = "Unit #20",
       ["z"] = 628746.3125,
       ["objtype"] = "ZU-23 Emplacement Closed",
       ["group"] = "New Vehicle Group #001",
       ["mpname"] = "Unit #20",
       ["y"] = 192.74244689941,
   }, -- end of [16795137]
   [16868609] = 
   {
       ["id"] = 16868609,
       ["coalition"] = "blue",
       ["x"] = -282018.5625,
       ["name"] = "sen 1 10",
       ["z"] = 647888.5625,
       ["objtype"] = "M973 Avenger",
       ["group"] = "blue_Senaki_defence",
       ["mpname"] = "sen 1 10",
       ["y"] = 12.186066627502,
   }, -- end of [16868609]
   [16872705] = 
   {
       ["id"] = 16872705,
       ["coalition"] = "blue",
       ["x"] = -284483.15625,
       ["name"] = "kut 1 10",
       ["z"] = 682483.6875,
       ["objtype"] = "M973 Avenger",
       ["group"] = "blue_Kutasi_defence",
       ["mpname"] = "kut 1 10",
       ["y"] = 45,
   }, -- end of [16872705]
   [16811521] = 
   {
       ["id"] = 16811521,
       ["coalition"] = "red",
       ["x"] = -372237.47661921,
       ["name"] = "Pilot #6",
       ["z"] = 628464.84544914,
       ["objtype"] = "mi-8mt",
       ["group"] = "red_Mi-8MT",
       ["mpname"] = "Pilot #6",
       ["y"] = 484.66275437759,
   }, -- end of [16811521]
   [16880897] = 
   {
       ["id"] = 16880897,
       ["coalition"] = "blue",
       ["x"] = -355253.15625,
       ["name"] = "hawk 1 2",
       ["z"] = 617138.875,
       ["objtype"] = "hawk ln",
       ["group"] = "blue_Batumi_Air_Defence_GRP",
       ["mpname"] = "hawk 1 2",
       ["y"] = 9.9674978256226,
   }, -- end of [16880897]
   [16844289] = 
   {
       ["id"] = 16844289,
       ["coalition"] = "blue",
       ["x"] = -299396.08130884,
       ["name"] = "Ford 41",
       ["z"] = 603385.93408144,
       ["objtype"] = "f-18c",
       ["group"] = "F/A-18C_#001",
       ["mpname"] = "Ford 41",
       ["y"] = 2364.1951846259,
   }, -- end of [16844289]
   [16848385] = 
   {
       ["id"] = 16848385,
       ["coalition"] = "blue",
       ["x"] = -365543.71875,
       ["name"] = "check 1 4",
       ["z"] = 613957.125,
       ["objtype"] = "M1126 Stryker ICV",
       ["group"] = "blue_Check point_Group",
       ["mpname"] = "check 1 4",
       ["y"] = 14.502878189087,
   }, -- end of [16848385]
   [16852481] = 
   {
       ["id"] = 16852481,
       ["coalition"] = "blue",
       ["x"] = -360367.84093703,
       ["name"] = "maho 1 1",
       ["z"] = 623271.27085591,
       ["objtype"] = "M1025 HMMWV",
       ["group"] = "blue_Maho_resistance",
       ["mpname"] = "maho 1 1",
       ["y"] = 41.745383856186,
   }, -- end of [16852481]
   [16856577] = 
   {
       ["id"] = 16856577,
       ["coalition"] = "blue",
       ["x"] = -317579.4375,
       ["name"] = "kob 1 7",
       ["z"] = 636910,
       ["objtype"] = "M973 Avenger",
       ["group"] = "blue_Kobuleti_BD_Vhcls",
       ["mpname"] = "kob 1 7",
       ["y"] = 18,
   }, -- end of [16856577]
   [16795393] = 
   {
       ["id"] = 16795393,
       ["coalition"] = "red",
       ["x"] = -372163.4375,
       ["name"] = "Unit #21",
       ["z"] = 628767.6875,
       ["objtype"] = "brdm-2",
       ["group"] = "New Vehicle Group #001",
       ["mpname"] = "Unit #21",
       ["y"] = 190.25761413574,
   }, -- end of [16795393]
......
and so on.

I think you get the picture :)

Edited by Speed

Intelligent discourse can only begin with the honest admission of your own fallibility.

Member of the Virtual Tactical Air Group: http://vtacticalairgroup.com/

Lua scripts and mods:

MIssion Scripting Tools (Mist): http://forums.eagle.ru/showthread.php?t=98616

Slmod version 7.0 for DCS: World: http://forums.eagle.ru/showthread.php?t=80979

Now includes remote server administration tools for kicking, banning, loading missions, etc.

  • Recently Browsing   0 members

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