Jump to content

DCS: World Scripting Engine


Silver_Dragon

Recommended Posts

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

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
Edited by Silver_Dragon
Link to comment
Share on other sites

Si llega a funcionar esto, va a ser muy interesante para crear misiones. Según tengo entendido los warehouse de las bases se puede configurar para que se reabastezcan cada cierto tiempo de forma automática.

Pero si para que se reabastezcan se ha de mandar un convoy de una base a otra con cada vehículo una parte de la mercancía, esto sería lo interesante.

 

Saludos

Link to comment
Share on other sites

A ver, decentemente traducido, se puede establecer una variable (GT.warehouse=true). Permitiría que un Huey por ejemplo traslade cajas de munición a uno de estos edificios de camuflaje, y pueden ser usados por las unidades de tierra para rearmarse. Incluso se podría copiar el sistema para que un huey pueda rearmar la metralleta/combustible o que un avión pudiera trasvasar combustible a otro del mismo tipo.

 

Pero vamos, el tono es un poco de paja mental... nada sólido.

Link to comment
Share on other sites

  • 2 weeks later...

cambios de la 1.2.4, y parece que el despliegue de tropas dinamico esta disponible (en WIP)

http://forums.eagle.ru/showpost.php?p=1736992&postcount=6

 

The link for the scripting engine in the changelog isn't correct. Here is an accurate link on the wiki: http://en.wiki.eagle.ru/wiki/Scripting_Engine_Changelog

I'd like to highlight one of those entries because I feel that its awesomeness has not been made apparent and in my opinion is better than a Huey or 3d cockpit could ever be smile.gif... "coalition.addGroup() function was added"

Yes. This means that groups can be dynamically added to a mission after it has started via scripting and that respawning groups is now a possibility.
Link to comment
Share on other sites

 

cambios de la 1.2.4, y parece que el despliegue de tropas dinamico esta disponible (en WIP)

http://forums.eagle.ru/showpost.php?p=1736992&postcount=6

 

The link for the scripting engine in the changelog isn't correct. Here is an accurate link on the wiki: http://en.wiki.eagle.ru/wiki/Scripting_Engine_Changelog

 

I'd like to highlight one of those entries because I feel that its awesomeness has not been made apparent and in my opinion is better than a Huey or 3d cockpit could ever be smile.gif... "coalition.addGroup() function was added"

 

Yes. This means that groups can be dynamically added to a mission after it has started via scripting and that respawning groups is now a possibility.

 

Si el scripting engine parece ser que permite maravillas... por desgracia no esta al alcance de todos. Es mas, ¿hay en este escuadron alguien que sepa hacer cosas con el Scripting Engine?

Link to comment
Share on other sites

  • 2 months later...
Cambios en la 1.2.5

Since I cannot edit the wiki at the moment, here are the changes to the scripting engine with 1.2.5.

Changelog:
AI.Skill enum was added
Unit.getDescByName() function added
Controller.setOnOff() function was added
Controller.isTargetDetected() function was added
Functions for some trigger actions was added: trigger.action.activateGroup(), trigger.action.deactivateGroup(), trigger.action.setGroupAIOn(), trigger.action.setGroupAIOff(), trigger.action.groupStopMoving(),trigger.action.gr oupContinueMoving().
StopRoute AI Command was added.
Simplified function documentation:
trigger.action.activateGroup()
trigger.action.deactivateGroup()
trigger.action.setGroupAIOn()
trigger.action.setGroupAIOff()
trigger.action.groupStopMoving()
trigger.action.groupContinueMoving()
These are all scripting engine versions of the relevant trigger actions. Each accepts a group table and some of them are already accessible to the group class. For example:
trigger.action.activateGroup(Group.getByName('myGr oup')) is the same as:
Group.getByName('myGroup'):activate()
AI.skill enum is simply a table of skill constants
Code:
AI.Skill = {
AVERAGE,
GOOD,
HIGH,
EXCELLENT,
PLAYER,
CLIENT
}
Controller.setOnOff(Controller self, boolean value)
Sets the AI on or off based on the value passed. ONLY works on ground and naval groups.
Unit.getDescByName(TypeName typeName)
Returns the description of the related type name.
The follow is a copy/paste of the detection entry.
Code:
Conroller.Detection = {
VISUAL,
OPTIC,
RADAR,
IRST,
RWR,
DLINK
}
Code:
function
boolean detected,
boolean visible,
ModelTime lastTime,
Vec3 lastPos,
Vec3 lastVel
Controller.isTargetDetected(Controller self,
Object target,
[Conroller.Detection detection1,
Conroller.Detection detection2,
...
Conroller.DetectionN] or nil)
Code:
checks if the target is detected or not. If one or more detection method is specified the function will return true if the target is detected by at least one of these methods. If no detection methods are specified the function will return true if the target is detected by any method.
*target
Target to check.
*detection1 - detectionN
Detection methods of interest.
Return values:
*detected
True if the target is detected.
*visible
Has effect only if detected is true. True if the target is visible now.
*lastTime
Has effect only if visible is false. Last time when target was seen.
*lastPos
Has effect only if visible is false. Last position of the target when it was seen.
*lastVel
Has effect only if visible is false. Last velocity of the target when it was seen.
Link to comment
Share on other sites

  • 1 month later...
MIST v3 disponible (como un archivo adjunto en el enlace)

I think Mist v3 is ready for release so here it is. The big changes with this release is the integration of my "Spawn Clone Teleport" script directly into Mist. Also the DBs will now update if groups are dynamically added to the mission. After this release it is my intention is to release several smaller updates adding at least a few functions per release. At the moment the functions I have in mind are related to dynamically spawning groups and some useful features for that. Basically its everything I was going to put into sctv3.

V3 Changelog.
Message Functions
- mist.message.removeById added
- mist.message.remove functionality changed (see Syntax Changes note at bottom)
- miss.message.add updated to accept a vars.sound variable. This allows you to play audio messages with text messages.
- added mist.msgMGRS
- added mist.msgLL
- added mist.msgBR
- added mist.msgBRA
- added mist.msgBullseye
- added mist.msgLeadingMGRS
- added mist.msgLeadingLL
- added mist.msgLeadingBR
Updated Functions/Fixes
- Some Flag funcs now accept a toggle variable. This will set the flag to false when the conditions aren't met. Applies to:
-mist.flagFunc.units_in_polygon
-mist.flagFunc.units_in_zones
-mist.flagFunc.units_in_moving_zones
-mist.flagFunc.units_LOS
- mist.getRandPointInCircle now accepts both vec 2 and 3 coordinates
- fixed mist.getUnitsInZones and mist.getUnitsInMovingZones to return only activated units
- Fixed bug with DBs where countryId was the mission table index of the country table and not the actual country Id
- Reorganized documentation a bit
- Fixed bug with how functions called mist.toStringLL
- bug with mist.removeFunction should be fixed now.
Spawn Clone Teleport Script merged and renamed functions
-- Added mist.dbUpdate()
-- added mist.dynAdd()
-- added mist.getCurrentGroupData()
-- added mist.getGroupData()
-- added mist.getPayload()
-- added mist.teleportToPoint()
-- added mist.respawnInZone()
-- added mist.teleportInZone()
-- added mist.cloneInZone()
-- added mist.respawnGroup()
-- added mist.cloneGroup()
-- added mist.teleportGroup()
- added mist.isTerrainValid
Database Updates
- added alt and alt_type to units databases
- Added startTime to group tables
- Country names in DBs are all now lower case.
- added mist.DBs.dynGroupsAdded
- added mist.DBs.MEunits
- added mist.DBs.MEunitsByName
- added mist.DBs.MEunitsById
- added mist.DBs.MEunitsByCat
- added mist.DBs.MEunitsByNum
- added mist.DBs.MEgroupsByName
- added mist.DBs.MEgroupsById
- added mist.DBs.const
The following DBs now update as groups are dynamically spawned:
- mist.DBs.groupsById
- mist.DBs.groupsByname
- mist.DBs.units
- mist.DBs.unitsByName
- mist.DBs.unitsByCat
- mist.DBs.unitsByNum
If groups are dynamically spawned outside of Mist, the DBs will still update. NOTE: With DCS 1.2.5 this is ONLY true of aircraft and helicopters. Future patches might fix this, currently unknown at the moment. Also Mist will attempt to generate new group and unitIds if the new spawned group/unit Ids are close to what mist is currently using.
Syntax Changes/Stuff that could potentially mess with scripts
mist.message.remove updated so it accepts a self variable. This is mainly for mist to use the mist.message class, but it is accessible globally.
mist.message.removeById added; essentially has the same functionality as the old mist.message.remove, so if you had used mist.message.remove please change it to removeById
Several DBs now update for dynamically spawned groups. If a new groups spawns with the same name as an older group it will effectively replace the older group.
Country names in all DBs are all now lower case. This was changed so that dynamically spawned groups could be updated within the DBs.
mist.message.add now accepts a "sound" vars to play audio. Due to how it is implemented, Combined Arms players will be UNABLE hear any sounds.
Link to comment
Share on other sites

The ED wiki is still locked down due to spam, so I have uploaded the scripting engine documentation to the hoggit wiki. I'll also be working toward reformatting the documentation to be a little bit easier to use. But its going to take a long time to complete MIST and SSE documentation.

The changelog for 1.2.6 scripting engine is as follows.
atmosphere singleton was added
Unit.getCallsign() function was added
Airbase.getDescByName() function was added
Airbase.getCallsign() function was added
Controller.getDetectedTargets() and Controller.knowTarget() functions were added
Controller.isTargetVisible() was modified
Spot class was added
Group.getSize() now returns current size
Group.getInitialSize() function was added
Things of note:
As you can see getSize is now a "getCurrentSize" type of function. getInitialSize has been added and functions the way getSize worked up to 1.2.4.
atmosphere functions have been added to simply get the wind and turbulence values at a vec3 point.
Spot class allows you to spawn in a laser to illuminate a target with an IR pointer or for laser guided weapons.
Link to comment
Share on other sites

  • 3 weeks later...
Mist 3.1 (en archivo adjunto en el link al foro de ED)

 

Attached mist 3.1.
Changelog
- fixed bug with sending sounds to clients
- if an audio message is sent to a correct coalition or 'all', CA players will now hear it
- added speed entry to units DBs (applies only to aircraft)
- fixed typo with mist.respawnGroup returning a nil value
- modified mist.cloneGroup, mist.teleportGroup, mist.respawnGroup behavior if task variable is given.
--If task is anything except for a number, the task become the groups default route.
--if task is a number, then the route will be assigned after however many seconds you specify.
- mist.dynAdd now accepts a route variable as part of the table passed to it
- overloaded mist.dynAdd to accept route data if the points part of the table is missing ( groupTable.route[1]... instead of the correct format groupTable.route.points[1]...)
- fixed mist.getPayload, must now be sent a string
The plan for mist 3.2 is to fix anything else you guys discover, but also include some fun group manipulation functions. For example splitGroup, joinGroup. Stuff like that. Also once the 1.2.6 Open beta gets released I will release the first version of my IADS script.
In the mean time, I'll be working toward porting mist documentation to also be available via a wiki page. Until we get the ED wiki back I'll be updating the info on the Hoggit Wiki. I'll also update the scripting engine wiki pages there as needed for 1.2.5 and 1.2.6.
St3v3f thanks again for testing that and providing thorough results and methods. Just to be informational the problems with the bugs were...
1 and 2: Adding alt and alt_type to DBs caused a knock-on effect where a default speed was not assigned to the units. Thus I added speed to the DBs and created an additional check to add speed if its not there.
4 and 5. The aircraft didn't get fuel as part of its payload, thus it crashes. The payload script has been updated to check if its been passed a string value.
Generally speaking payloads in the scripting engine are currently a pain to deal with. To spawn a group you need the mission editor data which generally consists of CLSIDs for weapons, the scripting engine does not have access to CLSIDs. Also the getFuel() function returns the fuel state between 0 and 1 (or more if fuel tanks are on). Spawning an aircraft uses the actual fuel weight, which again is not accessible to the scripting engine.
@wolle, You will now find 2.5 pages worth of documentation on mist.dynAdd
Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Some pretty cookies are used in this website