Jump to content

DCS: Scripting Engine


Silver_Dragon

Publicaciones recomendadas

http://forums.eagle.ru/showpost.php?p=1 ... ostcount=1

 

Hello all

 

DCS: World has new powerful tool for experienced mission designers - the Scripting Engine. The system provides control overt game objects behavior during the mission by using lua scripts. All you need is to be a programmer. Experience in programming lua is welcomed, but lua is a simple language and it will not take a lot of time to learn it.

 

Scripting Engine can be used to perform the same actions the Trigger System and AI Tasking System developed for: group activation, text message, sound playing, AI task changing e.t.c. The Engine also provides access to game objects properties. Mission designers can add very complex logic into their missions because using of programming language instead GUI means no limitation on complexity.

 

The engine is documented on Eagle Dynamics wiki. http://en.wiki.eagle.ru/wiki/Simulator_ ... orld_1.2.1)

 

Many thanks to Speed - the enthusiast who has done great job in testing and design. Druid_ proposed multiple useful features now available in the Engine.

 

Of course Scripting System is far from being completed. I have wishlist of features ordered by their priority and they will being added in next releases.

Mas noticias desde el frente

Enlace al comentario
Compartir en otros sitios web

A mi pregunta sobre las capacidades del Scripting

 

http://forums.eagle.ru/showpost.php?p=1 ... stcount=25

It allows for more enhanced capabilities of what can happen within a mission. The scope of it really depends on what the mission builder wants to use the it for. It is possible to use it for very simple, mundane tasks, however it excels at complex logic and capabilities. For example a user could create an Integrated Air Defense Network between multiple groups and testing Line of Sight between the different radars and taking all sorts of other factors into account.

 

One of the most powerful and simple features of the SSE (Simulator Scripting Engine, as a few of us call it) is that you can use the text output in a highly customized format. Here is a screenshot from a test "Air Races" style mission I was making which kept track of aircraft laptimes. Btw, the laptimes are almost always the same because I had an AI aircraft flying the circuit

 

Screen_120701_200958.jpg

Mas noticias desde el frente

Enlace al comentario
Compartir en otros sitios web

  • 1 month later...

http://forums.eagle.ru/showthread.php?t=98616

Mission Scripting Tools Version 1.1

Expanded Lua Scripting Library for mission scripting by Speed and Grimes

 

What is it?

MIssion Scripting Tools (Mist) is a collection of Lua functions and databases that is intended to be a supplement to the standard Lua functions included in the simulator scripting engine. Mist functions and databases provide ready-made solutions to many common scripting tasks and challenges, enabling easier scripting and saving mission scripters time. The table mist.flagFuncs contains a set of Lua functions (that are similar to Slmod functions) that do not require detailed Lua knowledge to use. However, the majority of Mist does require knowledge of the Lua language, and, if you are going to utilize these components of Mist, it is necessary that you read the Simulator Scripting Engine guide on the official ED wiki.

 

Community Contributions

The purpose of Mist is to provide a set of scripts for the DCS community, by the DCS community. We are open to people contributing their own scripts into Mist, but we reserve the right to edit your script in any way we see fit before “officially†including it into Mist. Also, feel free to contribute ideas as for what scripts to develop next.

 

Usage Rights

Feel free to modify or redistribute Mist in any way you see fit, AS LONG AS you don’t try to steal our work and claim it as your own.

 

How to use it?

 

Mist is not a mod of the game files. You include it into your missions simply by using the DO SCRIPT or DO SCRIPT FILE trigger actions to load Mist at or near mission start.

 

Mist Guide

A full .pdf guide for Mist is included in the attached Mist v1_0.zip file.

 

Example DBs are also included.

 

 

Current feature overview

“Flag functions†– functions that can be used by persons with very little Lua knowledge. Functionally similar to many Slmod functions, these set a flag to true when they detect a certain game condition.

 

mist.flagFunc.mapobjs_dead_zones
mist.flagFunc.mapobjs_dead_polygon
mist.flagFunc.units_in_zones
mist.flagFunc.units_in_moving_zones
mist.flagFunc.units_in_polygon
mist.flagFunc.units_LOS

 

“Scripting functionsâ€- intended to be used within a larger Lua script. These require knowledge of the Lua language to use.

 

General
mist.scheduleFunction
mist.removeFunction
mist.addEventHandler
mist.removeEventHandler
mist.getGroupPoints
mist.getUnitsInZones
mist.getUnitsInMovingZones
mist.pointInPolygon
mist.getDeadMapObjsInZones
mist.getDeadMapObjsInPolygonZone
mist.getUnitsLOS
mist.getNorthCorrection
mist.getHeading
mist.getPitch
mist.getRoll
mist.getYaw
mist.getAoA
mist.getClimbAngle
mist.getAttitude

Utilities
mist.utils.makeVec2
mist.utils.makeVec3
mist.utils.toDegree
mist.utils.toRadian
mist.utils.deepCopy
mist.utils.round
mist.utils.dostring
mist.utils.basicSerialize
mist.utils.serialize
mist.utils.serializeWithCycles
mist.utils.oneLineSerialize
mist.utils.tableShow

Debug
mist.debug.dump_G
mist.debug.writeData
mist.debug.dumpDBs

Vector Operations in Vec3
mist.vec.add
mist.vec.sub
mist.vec.scalar_mult
mist.vec.dp
mist.vec.cp
mist.vec.mag

Demos
mist.demos.printFlightData

 

Databases- databases built for easier mission scripting. (Example DBs included with Mist v1_0.zip file).

STATIC DBs
Unit DBs
mist.DBs.units 
mist.DBs.unitsByName 
mist.DBs.unitsById 
mist.DBs.unitsByCat
mist.DBs.unitsByNum 

Group DBs
mist.DBs.groupsByName
mist.DBs.groupsById 


Zone DBs
mist.DBs.zonesByName 
mist.DBs.zonesByNum

Human-controllable unit DBs
mist.DBs.humansByName
mist.DBs.humansById 

Misc. static DBs
mist.DBs.navPoints 
mist.DBs.missionData

REAL-TIME DBs
mist.DBs.aliveUnits 
mist.DBs.deadObjects

 

 

Hay un archivo de ejemplo en el post de referencia

 

http://forums.eagle.ru/showpost.php?p=1 ... stcount=12

Here's the mist.demos.printFlightData function applied to weapons fired. For example, load the attached mission "Mist Weapon Flight Data.miz", select an F-15, and fire an AMRAAM- the mist.demos.printFlightData will output real-time flight data for the weapon:

 

AMRAAMflightdata.jpg

 

When applied to player aircraft, there's still some shakiness in the acceleration-based values that I need to sort out, but angular data and velocity works very well- "Mist Player Flight Data.miz" is mist.demos.printFlightData applied to the player aircraft.

 

mist.demos.printFlightData isn't really useful for mission scripting, that's why we put it in the "demos" table- it demonstrates some of the power of the Simulator Scripting Engine for collecting data about the game environment. You can embed Tacview-like data collecting into your mission itself, base mission logic off of it if you want, and if you "unsanitize" the io and lfs libraries in MissionScripting.lua, then you can even output your data to a file and graph it using like Excel or something.

Mas noticias desde el frente

Enlace al comentario
Compartir en otros sitios web

  • 2 months later...

http://forums.eagle.ru/showpost.php?p=1 ... stcount=72

Quick update: Speed and I are waiting for the 1.2.3 patch to release the next version of Mist.

 

The next version of Mist will have some speed and distance unit conversions along with coordinate display functions that have varying levels of accuracy. I am also working on some features for things fixed in the 1.2.3 patch. Specifically I want to take advantage of the new "mission tasks for ground units" feature that will be added with 1.2.3, and I am porting a text output script I had made to be more flexible.

 

 

Anyone feature requests?

Mas noticias desde el frente

Enlace al comentario
Compartir en otros sitios web

  • 2 months later...

Proximas cajas de munición que veremos en la 1.2.4, permitirá a los vehiculos recargar munición. La puede cargar el UH-1H. Del foro ruso (traducido horrorosamente):

 

http://forums.eagle.ru/showpost.php?p=1 ... ostcount=9

Caja (que se arrastra UH-1H Huey) si no se equivoca al estar relacionado con las "unidades de tierra", es decir que sólo lo puede terminar "GT.warehouse = true"

Esta es una prueba para la nueva tienda camo instalación recarga obras ... tipos de cajas.

Usted tiene el mismo plano da combustible a otro avión! Tal como algo de fuera de este "relleno" para copiar, alterar el sistema de contratación Ground "munición" Muertes del UH-1H Huey cuando las tierras ...

En fin solo una idea y opinión ...

 

522002_565744846780741_442197600_n.jpg

Mas noticias desde el frente

Enlace al comentario
Compartir en otros sitios web

Join the conversation

Puede publicar ahora y registrarse más tarde. Si tiene una cuenta, iniciar sesión para publicar con su cuenta.

Guest
Responder a este tema...

×   Pegar como texto enriquecido.   Pegar como texto sin formato

  Sólo se permiten 75 emoji.

×   Tu enlace se ha incrustado automáticamente..   Mostrar como un enlace en su lugar

×   Se ha restaurado el contenido anterior.   Limpiar editor

×   No se pueden pegar imágenes directamente. Carga o inserta imágenes desde la URL.

Cargando...
×
×
  • Crear nuevo...

Información importante

Términos de Uso