Jump to content

Recommended Posts

Posted

I know how to insert and remove entry from a table loaded or created by a mission.

 

I would like to know if it's possibile to read, insert and remove entry from an external file table, that should be "persistent" from a mission to another, to be used in a sequence of correlated missions in my squad.

 

that could be extremely useful :)

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

47 view and no answer: I knew that it was difficult :lol:.

 

(I'm joking, I will patiently wait a guru answer with no hurry :P )

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)

(Yes, I'm back but currently at a low level of activity; I am slowly ramping up my activities as time allows between work and other projects.)

If you want to save data from the mission to the hard drive, you must modify MissionScripting.lua. Put a do - end closure before lfs and io are sanitized, and make local references to io and lfs inside that do - end closure. Now, you can write some global functions inside that do-end which will be able to "see" the lfs and io as upvalues, even though io and lfs will still be sanitized from the global environment. You might want to sanitize debug.getupvalue, however, as otherwise it can be used by a malicious mission creator to break into your do-end closure and get references to io and lfs. Unfortunately, however, sometime during like 1.2.4, Saint (accidentally or not, I donno) made Lua debugging dependent on the debug lib, so you might not get proper Lua error reporting if you sanitize away debug.getupvalue. That can be fixed however, if you start handling error reporting yourself using pcall, but that's a different can of worms, as you pretty much have to do debug reporting on a per-function basis. All that said, I'm not sure if debug.getupvalue is used at all for the internal bug reporting; all I know is that if you completely sanitize away debug, then you'll get a lot of "error in error reporting" messages.

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.

Posted

I already had desanitized the file as I build some export script before :), thanks to both of you for the answers: I'll try to use the MIST serialize functions to create a suitable export format for my needings :)

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.

  • Recently Browsing   0 members

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