Jump to content

LUA scripting - help me find a way.


Recommended Posts

Since I've found extended version of lua script that makes it possible to hide/unhide objects in mission editor, i can see that functionality of mission editor can be easily expanded or corrected, and all is needed is knowledge of LUA scripting language.

I am familiar with programming in few languages, scripting for different games and systems (including iSeries ;-)) but... after a general lecture of resources avaliable in i-net (the common ones), i still have difficulty to understand some LUA-specific aspects of this language. After review of some materials from i-net, i can see, that syntax and logic is similar to other languages and there's no need to point me to basics. What i am unable to understand is how it's procedures are called from inside of game engine, how is functioning mechanism (event driven?) that makes procedures to be called, what structure of directories must be kept (if any), how to find out naming convention of game's objects.

Does anybody here can point out, where i can find not-so-basic details about LUA scripting language?

Natural Born Kamikaze

-------------------------

AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Logitech G940 HOTAS, Turtle Beach VelocityOne Rudder.

Link to comment
Share on other sites

Hi, I think there is rather limited with tutorial kind of stuff for LUA on the internet, but there is some floating around. The C++ communities maybe have some info. I think to buy one or two of the books which they advertise on the lua.org site is a alternativ. Btw. i knew that eventually there was going to be someone who wanted to start researching on files other than the "user spesific" files supplied with the sim, this is good in some ways, but something tells me that this can also be the start of a dangerous direction if not done with close supervision by ED or other qualified LUA programmers.

 

Just a thought :-)

System spec:

Intel Core i7 920@4.2Ghz (stable, 65degC fully loaded), EVGA GTX-780, Asus P6T Deluxe V2 v.5.04 BIOS, Saitek X52, 1TB/500GB WD HD for system/storage. Kingston SSD 120 GB for DCS, 250GB Samsung 840 SSD for the rest. 16GB Kingston KHX1600C9D3 Memory, 9 GB Pagefile, EK HFX-240 Watercooling, Corsair HX-1000 PSU. HAF-932 Tower, TrackIR-5, Win64Ult

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

I know what You mean by "dangerous direction", but for now I am focused just on enchancement of mission editor. On the other hand, there are games like OFP, or ARMA, that offer good documentation of scripting feature and modding tools, and look how great it is used by modders. Enough to mention ACE, or Warfare mods. I know that where is opportunity, there is potential for abusive solutions, but I think, community quickly verifies what products are usefull against all the crap created by irresponsible persons.

Natural Born Kamikaze

-------------------------

AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Logitech G940 HOTAS, Turtle Beach VelocityOne Rudder.

Link to comment
Share on other sites

Sorry, WYSIWYG

The question then is, if there is plan to "give power to people" in future. I have a strong feeling confirmed by lecture of forum and especially wishlist threads, that products could gain rating and consequently interest more people, with such a move.

Natural Born Kamikaze

-------------------------

AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Logitech G940 HOTAS, Turtle Beach VelocityOne Rudder.

Link to comment
Share on other sites

Am making some utility for BS these days just to improve the replay of missions point of view for myself. Its not gonna mess with the CRITICAL code of BS and i make it in a productive and easy language like VB. Maybe its gonna be usefull for someone else later when i've finished it and tested it well.

 

The real problem with coding or better generating more complex missions is always the Waypoint/Lat/Long/Alt part. The rest is much easier. I have done alot of research on these variables and the relationship to the x,y variables in the mission files but its timeconsuming to get something usefull out of it. But lets think a little about it here. Do we really need 5 or six waypoints to the target? I guess it would be more fun to generate just 2 waypoints (Takeoff and Target point) and let the player study maps to choose the best route. This would make it alot easier to generate code for a mission...anyway there are something which always comes to my mind and that is that making a mission generator is suppressing the creativity by mission designers, and the work of a good designer will always be ALOT better so unless there is gonna be a standstill in the making of missions i wont start any major effort on making a MG.

 

Btw. after what i've found about the LUA files in BS most everything u see BEFORE u are inside the cockpit is run by the LUA interpreter as a script so this should give an idea about whats possible when making addons AND the disasterous effect it can have to mess with these files...if u study the file "me_mission.lua" while refering to the LUA docs u can see most of the work going on in the ME and its a complex piece of code...not good to mess with :-)


Edited by xracer

System spec:

Intel Core i7 920@4.2Ghz (stable, 65degC fully loaded), EVGA GTX-780, Asus P6T Deluxe V2 v.5.04 BIOS, Saitek X52, 1TB/500GB WD HD for system/storage. Kingston SSD 120 GB for DCS, 250GB Samsung 840 SSD for the rest. 16GB Kingston KHX1600C9D3 Memory, 9 GB Pagefile, EK HFX-240 Watercooling, Corsair HX-1000 PSU. HAF-932 Tower, TrackIR-5, Win64Ult

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

The question then is, if there is plan to "give power to people" in future. I have a strong feeling confirmed by lecture of forum and especially wishlist threads, that products could gain rating and consequently interest more people, with such a move.

 

I think the most important parts hardcoded in .dll and .exe files :(

Atop the midnight tarmac,

a metal beast awaits.

To be flown below the radar,

to bring the enemy his fate.

 

HAVE A BANDIT DAY !

 

[sIGPIC][/sIGPIC]

"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." - R. Buckminster Fuller (1895 - 1983), American Architect, Author, Designer, Inventor, and Futurist

Link to comment
Share on other sites

  • Recently Browsing   0 members

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