Jump to content

Recommended Posts

Posted (edited)

It is with great disappointment that I find that Lua scripting from within a mission is now useless in patch 1.1.0.9, mainly due to the removal of the print function. I had eventually expected ED to act against the security hole in their software that allowed people to modify files on the computer from within a mission; however, I never in my wildest dreams expected the SAFE print function to be removed. Even the official Lua site agrees that print() is a safe function:

 

http://lua-users.org/wiki/SandBoxes

 

So what gives? I certainly agree with removing io.write, os.execute, etc, but why print()? Without print, I don't even know of a way to determine what the contents of the new environment they put scripts in are. There may in fact be a way to tell lua to output to dcs.log, but how am I going to find it without doing a dump of _G to dcs.log via the print function?!

 

I can see why other modders have given up. ED just arbitrarily removes vital functions and variables modders need for no conceivable reasons at all. There goes the hundreds of hours I have spent writing code, building missions, etc, completely down the drain.

 

:no_sad:

Edited by Speed
  • Like 1

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.

  • Replies 112
  • Created
  • Last Reply

Top Posters In This Topic

Posted
We should stay with 1.08 for now. Seriously.

 

No, I would vote 1107.

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

Deleted by self because I was in a bad mood when I originally posted.

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

Tread carefully Gentlemen.

 

This will not turn into a soap-box of discontent. If you have a feature that you wish to reinstate, do so in the Wish-List thread, alternatively a constructive request to the relevant devs concerned. At present this is heading the wrong way down a one-way street..........We do not want to go there.

Novice or Veteran looking for an alternative MP career?

Click me to commence your Journey of Pillage and Plunder!

[sIGPIC][/sIGPIC]

'....And when I get to Heaven, to St Peter I will tell....

One more Soldier reporting Sir, I've served my time in Hell......'

Posted

It is quite disheartening that it seems each patch to the sim makes changes in regard to how LUA functions. It does bring into question the purpose of having the script trigger if the scripts can't actually work. I hope this was a mistake or a bug. Afterall NOTHING was listed in the patch changelog with regard to LUA.

 

Speed, does this break your I/O script?

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
...or will this be an end for many roads?

 

Until you have heard from a representative of ED on any given topic, there is never an end to any road.

 

All we ask is that all matters are dealt with in a calm and rational manner and in doing so solutions will no doubt be reached to the satisfaction of all.

Novice or Veteran looking for an alternative MP career?

Click me to commence your Journey of Pillage and Plunder!

[sIGPIC][/sIGPIC]

'....And when I get to Heaven, to St Peter I will tell....

One more Soldier reporting Sir, I've served my time in Hell......'

Posted
It is quite disheartening that it seems each patch to the sim makes changes in regard to how LUA functions. It does bring into question the purpose of having the script trigger if the scripts can't actually work. I hope this was a mistake or a bug. Afterall NOTHING was listed in the patch changelog with regard to LUA.

 

Speed, does this break your I/O script?

 

As far as I know it does render Speeds awesome realism enhancing I/O script to not work.

Posted

Alright, positive thinking it is:

 

I would also be very pleased when I see socket communication restored for my plugin called by Export.lua.

 

At first I did not understand what Speed meant as I could see some of my print at work in dcs.log... until I realized they were obliterated during the whole session, only to be restored at stop time.

 

But Sockets are not there either... Do other mods relying on socket work for those who are aware of this requirement for their running configuration ?

Posted

haha... yeah guys dont seem mad at the game... Ive heard these ED guys.... they know people...:gun_smilie:

 

Eh its just a game, thanks for the heads up speed. I take it the lua environments and functions library and howto is useless now?

Im sure they are working on a solution or will give us back something. The team has proven quite devoted to improving the game quite dramatically, I dont see why they would limit users now.. And of course if this is intending to be a series then I am sure they are more than willing to take input from their more experienced players.(i.e. the moderators/testers are the example and I wouldnt be surprised if one of them hasnt already expressed interest on this topic in the engineers channels.)

 

Who knows though.....

+1

Posted
....before it gets too ugly ;)

 

It will not ;)

Novice or Veteran looking for an alternative MP career?

Click me to commence your Journey of Pillage and Plunder!

[sIGPIC][/sIGPIC]

'....And when I get to Heaven, to St Peter I will tell....

One more Soldier reporting Sir, I've served my time in Hell......'

Posted (edited)

Yes, chatIOlib is useless now, but that's not what's bothering me. ED absolutely had no choice but to eventually, one day, render chatIOlib broken, as my chatIOlib mod edited files on your computer. In 1108, all someone had to do is put into a mission a line like this:

 

os.remove[[C:\Windows]]

 

or something to that effect, and it would hose your windows install.

 

Similarly, someone could have embedded all sorts of nasty viruses into a mission. All you would need to do is run the mission.

 

At one point, someone could have even made a mission that stole your DCS log in information. Crap like that is how companies like Sony and Sega are getting hacked left and right. ED had to take action!

 

No, what really is the killing blow to scripting is the removal of the print function. I have a mod that will, using the print function, safely pass data out of any environment using the print function. Only strings, numbers, and tables of strings and numbers can be passed, and furthermore, those strings and numbers had to follow a specific format to even further ensure that they could not violate a computer's security.

 

I had this mod ready for two reasons:

 

1) The "mission" environment is secure already. But it still has the print function available. So, I wanted to pass data out of the mission environment to other Lua environments, because there are certain pieces of information you can only get in the mission environment

 

2) I knew the day would likely come when io.write, os.execute, etc, would be removed from the environment where scripts embedded into missions run. But seeing as print() is a safe function, and it's included in a safe environment ED already made, I never imagined it would be removed from scripts embedded in a mission!!!

 

But the print function is not just valuable for the personal reason that I have a mod built around it, it's valuable because it allows you to put little debugging messages into your code, it allows you to put little log messages into your code, it allows you to see what the global Lua environment looks like, etc., etc. It, whatever it is called in that particular language (printf in C, for example), is perhaps the most commonly used functions in all of computer programming. For example, without print, you cannot even do a "hello world" script!! Anyone who is knowledgeable about programming will understand the extreme importance of being able to access print, printf, etc, whatever it's called in that particular language. The print function is one of the most basic functions in any language, so it's really very odd to see it removed. I just hope this was an oversight on their part.

 

Anyway, I agree with Viper, I do not want to see this turned into a thread for bashing ED. I was really angry when I first posted the first posts here LOL, you should have seen what the initial post on this thread looked like the first time I hit "preview". I just had to take some time to go somewhere and cool off before I said something I regretted. The point is, I want to see this thread turned into a thread where the community expresses its desire for ED to throw us modders a bone here, and at least allow the print function to be called from within mission scripts. And maybe such a function exists, but as I said, how can I find out without finding someway of viewing the global Lua environment? Previously, there were two ways to view the global Lua environment, with print and with io.write, but both of these ways have been removed now.

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

Attempting to attract the attention of the powers-that-be to the topic.......please be patient.

Novice or Veteran looking for an alternative MP career?

Click me to commence your Journey of Pillage and Plunder!

[sIGPIC][/sIGPIC]

'....And when I get to Heaven, to St Peter I will tell....

One more Soldier reporting Sir, I've served my time in Hell......'

Posted (edited)
Alright, positive thinking it is:

 

I would also be very pleased when I see socket communication restored for my plugin called by Export.lua.

 

At first I did not understand what Speed meant as I could see some of my print at work in dcs.log... until I realized they were obliterated during the whole session, only to be restored at stop time.

 

But Sockets are not there either... Do other mods relying on socket work for those who are aware of this requirement for their running configuration ?

 

print has only been removed from whatever environment Lua scripts that are embedded into a unit's triggered actions exist in now. I do believe that print is still available in other Lua environments.

 

Edit: Yup, still available in net environment. I'll check server, mission, and config now...

 

Edit 2:

 

Ok, I can confirm that print has only been removed in the new Lua environment that ED has moved scripts embedded within missions to. When I run this code in every 10 frames within on_process within Scripts/net/server.lua:

 

net.dostring_in("mission", [[print('testing in mission')]])

net.dostring_in("server", [[print('testing in server')]])

net.dostring_in("config", [[print('testing in config')]])

net.dostring_in("export", [[print('testing in export')]])

 

Then I get this output in dcs.log:

 

00054.454 DEBUG dDispatcher::InitLow: testing in mission

00054.454 DEBUG WinMain: testing in server

00054.454 DEBUG Config: testing in config

00054.454 DEBUG LuaExport::LuaExportStart: testing in export

 

Which is, as far as I can tell, exactly the same output I got in 1108 when I did the same experiment.

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

Holy Crap Speed... I didnt know LUAs could do that sort of thing. It sucks that the missions will be lamer, but you are right in saying that those holes needed to be closed.

 

Im sorry to hear about all of your work getting dumped on bud... thats a rough one to swallow.

 

I got a feeling that ED will make a workaround.... they're on our side after all (only a handful like them left... so sad).

 

Maybe you should look at getting on the testers team so your input can be heard more directly.... or possibly have somne way of communicating more directly with the decsion makers involved with the ME... I mean you are onew of the top ME guys in our hobby.

 

I vote to promote Speed, ED!

Edited by jeffyd123

i7 8700K @ 4.4Ghz, 16G 3200 RAM, Nvidia 1080Ti, T16000 HOTAS, TIR5, 75" DLP Monitor

Posted

+1 on seeing this sorted.

 

We spend countless hours in the 1st VFW flying missions that use your script. It'd be a real shame to lose them as imho they offer a perfect multiplayer format

System specifications: Computer, joystick, DCS world, Beer

Posted
Holy Crap Speed... I didnt know LUAs could do that sort of thing. It sucks that the missions will be lamer, but you are right in saying that those holes needed to be closed

 

The problem is, a hole was closed that didn't exist. I don't think it's possible for print() to violate a computer's security.

 

If it comes down to it, I could always do a mission editor mod like STP Blindspot did that makes scripts run in the mission environment rather where ever they do now. In fact, I had already considered doing something similar, much further down the road, but I've never messed with the mission editor code, and I don't know where to start.

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

agreed, I meant the other holes...

 

the other method doesnt sound appealing (but my opinion isnt fact based).

Is there anything else that can be done just using the tools in the ME now?

 

Either way, I think the missions being made now are pretty good. Hopefully, the ME pros will get what you guys need to Next-Level the sim's missions.

i7 8700K @ 4.4Ghz, 16G 3200 RAM, Nvidia 1080Ti, T16000 HOTAS, TIR5, 75" DLP Monitor

Posted
Attempting to attract the attention of the powers-that-be to the topic.......please be patient.

 

Lol, just noticed this post, Viper.

 

Thanks for your help, and for encouraging everyone to keep a level head. I hope you can understand, from our point of view, how easy it is to over-react when stuff you've spent hundreds of hours working on gets trashed for inexplicable reasons.

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 (edited)
agreed, I meant the other holes...

 

the other method doesnt sound appealing (but my opinion isnt fact based).

Is there anything else that can be done just using the tools in the ME now?

 

Either way, I think the missions being made now are pretty good. Hopefully, the ME pros will get what you guys need to Next-Level the sim's missions.

 

It's not appealing, no, but it works. Data can be passed safely between the Lua environments (except for the new one) using the print function and an external VBscript script. I've done it, and since the VBscript makes the mod effectively multi-threaded, then it does not slow down DCS as far as I can tell. Other potential implementations include using Luasocket to pass data through memory, but in the end, you still have to make an external program/script that runs while DCS is running and that reads the contents of dcs.log.

 

As far as scripting goes, the work around of manually editing missions after unzipping them in notepad++ should actually still work. Scripts that are run in the mission file are run in the mission environment, where the print function is in fact available. But scripting with ME tools alone is pretty darned useless compared to what it was yesterday. But maybe I can continue mission building. The problem with continuing to build missions is that there is just about 1 person who will likely use the mod if it isn't integrated with the mission editor: me. And so, would any mission builders other than me actually be interested in using it? No. So I'm not sure if working on the mod is worth my time.

 

Only if I integrate it with some kind of mission editor mod could I imagine this mod actually being used by enough members of the DCS community to be worth my time making. Integrating it would be kinda awesome in itself though... so instead of having to call a chatIOlib function via a Lua script embedded in a unit's triggered actions, there would be, in this theoretical mission editor mod I am considering, new trigger actions and conditions.

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 always said KISS right?

 

I'm sure we can get this fixed via a hotfix perhaps. As Viper has said, it has been addressed to the higher echelons.

 

Fairplay speed, now keep calm and await to hear.

 

Come pay us a visit on YouTube - search for HELI SHED

Main Banner.PNG

  • Recently Browsing   0 members

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