Manual Addendum: Scenario Editor
* The “Add Unit” window now remembers all selection filters used on the last unit addition and re-applies them whenever called up. This makes it easier to rapidly add different but similar units.
* You can now edit aircraft names and delete specific aircraft directly through the Air-Ops window.
* New event trigger: Unit Detected. Fires when a unit (flexibly filtered from side-wide down to specific unit) is detected by the specified side.
* New event-engine addition: Event Conditions. Conditions are managed and added to/removed from events just like triggers and actions. An event without conditions fires normally (probability check etc.). If conditions are present, all of them must be satisfied in order for the event to fire.
* Added new realism option: Unlimited Aircraft Weapons. When enabled, aircraft have unlimited loadout packs available even if their bases are not loaded with weapons at all. This is not recommended for realistic prolonged scenarios (it makes airpower too omnipotent) but can be useful for quick experimentation.
* Added first event condition: Side posture. (e.g. Side-A must consider Side-B as [friendly|neutral|unfriendly|hostile]). The condition also has an optional “NOT” operator (e.g. Side-A must not consider Side-B as friendly).
* Significant addition to patrol missions: Prosecution Area. Prosecution Areas (PAs) act much like a forbidden zone in that contacts appearing within them are marked for interception, but they also _restrict_ the extent at which interceptions will happen. So if you want your fighters to e.g. be triggered only by bandits within 200nm of a protected HVU instead of “waking up” to contacts thousands of miles away, PAs are the solution.
PAs Act as a “leash” for assets on a patrol; they effectively determine the extent to which the patrol assets can give chase to receding targets. If the bandit moves out of the PA, the defender is forbidden to follow (though it can still engage with weapons if feasible). This solves the problem of patrol assets over-extending themselves during interception, quite often falling victims to feints/traps.
PAs are supported in the UI by modifications to the Mission Editor UI, and are populated by reference points in the same way as existing patrol areas. They are empty by default, and in this case the AI behavior is the same as before (intercept bandits far away etc.), to facilitate existing scenarios. Units that are assigned to a patrol with a prosecution area will target & engage only contacts that are within this area (or their patrol area). If they are not on patrol or their patrol does not have a prosecution area, the existing AI rules apply. This makes it possible to create SAM ambushes (shoot at far less than max range), divide areas of responsibility for multiple patrol forces etc.
For PAs to work, the patrol option “Investigate targets outside contact area” needs to be enabled. The doctrine option “engage targets of opportunity” _overrides_ the prosecution area limit.
* Grouping land units with ammo dump type units with matching weapons records for replenishment. This allows for reloads which means that SAM, artillery and land units can be replenished.
* Added sprint-and-drift behavior for units that are part of a surface or sub group (the most common case requiring this behavior). This behavior is enabled by going in the formation editor, selecting the desired unit, and ticking the checkbox “Sprint and Drift” on the formation editor toolbar.
*When rebuilding a scenario with the latest database, the simulator will automatically re-shuffle the aircraft and move those that are ready in less than 60 minutes to the flight deck. Ditto when readying an aircraft in the scenario editor and selecting ‘Ready Immediately’. It may be worth noting that the simulator is not topping up the deck completely, it is keeping some free space on the deck for the recovery cycles since landing aircraft may have to park there in case all elevators are busy.
* Major new addition: Lua scripting. See here for details and examples: http://www.warfaresims.com/?p=3565 Special reserved variable for Event Engine: UnitX. This is a global (scenario-wide) variable representing the active unit responsible for firing any of these triggers:
- Unit is damaged
- Unit is destroyed
- Unit is detected
- Unit enters an area
- Unit remains in area
So whichever unit causes of the above triggers to fire, it gets tagged as “UnitX”. You can then use this special variable as a reference in any Lua-mapped function that takes a unit’s name/ObjectID as a parameter (so for example you can dictate “whichever unit enters this area will get assigned to this mission”).
* New Event Trigger type: “Scenario is loaded”. This fires immediately once a scenario is loaded from file and before it is presented to the player/editor, _if_ the scenario current datetime is at or before the “start of scenario” datetime. This enables doing initial setup actions (e.g. randomize unit locations) before the player starts the scenario.
* New Scen-Edit feature: Clone a unit (ie. copy a unit and also copy all customizations of the original). The keyboard shortcut is Shift + C. The only limitaton currently is that modifications to an aircraft’s loadout (extra weapons etc.) are not copied.
* Major new ScenEdit feature in v1.07: Scenario Attachments (a.k.a. auto-bundling). See detailed description here: http://www.warfaresims.com/?p=3710
NEW IN v1.08
* Added “Reset All Side Scores” button on Losses & Expenditures window.
* New side-level option (editable on “Edit Sides” window): Can Auto-track civilians. When enabled, the selected side automatically detects and tracks civilian/commercial units. This simulates access to publicly available traffic sources like AIS, and can be handy for piracy & law-enforcement scenarios.
* Various tweaks to mission editor UI.
NEW IN v1.09
* New Lua action: Change the side of a unit
* New Lua action: Explode a warhead.
* New event condition: “Scenario Has Started”. Useful for scripting actions that you want to happen only at the very beginning of a scenario (e.g randomizing start positions).
* New attachment type: Local video file (local = stored on hard drive, not streamed e.g. YouTube). Has option for full-screen or windowed mode, and optional delay before playing. The video file must be in WMV format (the “Movie Maker” application included in Windows can easily convert almost any media format to WMV).
* When adding new aircraft, if the player does not specify a callsign, one is automatically assigned.
* FIXED: Right-click while in “add unit” status opens up the “Add Unit” window in addition to panning the map.
NEW IN v1.10
NEW IN v1.11
* NEW: Spatial polygon validation: All windows with area editors now have a ‘Validate Area’ button that allows the player to quickly determine if the polygon used for the area (exclusion zone etc.) is valid or not. The simulator will also display the polygon in the tactical map. This includes areas used by the event engine. Furthermore, all areas in a scenario are validated on load, and the player will be presented with warnings if the scenario contains invalid polygons.
* FIXED: When cloning an EE SimEvent, the lists of Triggers/Conditions/Actions pointed to the very same instances (thus when e.g. removing a trigger, the trigger would be removed from both events).
NEW IN v1.11 SR1
* SBR/Clone tweak: The cloned unit gets the same heading as the original unit.
* You can now enable/disable non-navigation zones and exclusion zones, in two ways:
a) Through the UI, as the grids on the relevant windows have an extra “Is Active” checkbox for each zone entry.
b) Through Lua. Usage example:
mySide = VP_GetSide({Name=”US”})
myZone = mySide:getnonavzone(“AAW Zone 1”) [Alternative for excl. zone: myZone = mySide:getexclusionzone(“Forbidden Zone 1”)]
myZone.isactive = “True”/”False”
Inactive no-navigation zones are not rendered on the map at all. Inactive exclusion zones are rendered with a dash line (instead of solid).
NEW IN v1.11 SR4
* ScenEdit Tweak: The “DB Migration” window displays visual confirmation of the target DB.
NEW IN v1.11 SR7
Large number of new & updated Lua methods:
Updated Lua function: ScenEdit_SetUnit() – added keys: COURSE, SPEED/THROTTLE, PROFICIENCY, DEPTH, REFUEL, FUEL
Updated Lua function: ScenEdit_AddUnit() – added keys: BASE
Updated Lua function: ScenEdit_AssignUnitToMission() – added keys: ESCORT (for strike missions)
Updated Lua function: ScenEdit_SetDoctrine() – added keys: ESCORT, additional doctrines, withdraw/docking
Updated Lua function: ScenEdit_SetReferencePoint() – added keys: TYPE, RELATIVETO, LOCKED
Updated Lua function: ScenEdit_SetLoadout() – allow READYING a/c to be updated
Updated Lua function: ScenEdit_RunScript() – allow to run from attachmentRepo attached to scenario
Updated Lua function: ScenEdit_UseAttachment() – fixed to allow Lua Scripts
New Lua function: ScenEdit_AddWeaponToUnitMagazine(table) – reload magazines
New Lua function: ScenEdit_AddReloadsToUnit(table) – reload unit mounts
New Lua function: ScenEdit_GetSideOptions(table) / ScenEdit_SetSideOptions(table) – adjust side awareness, proficiency
New Lua function: ScenEdit_SetUnitDamage(table) – damage components
New Lua function: ScenEdit_AddMission(side,..) / ScenEdit_GetMission(side,mission,…) / ScenEdit_SetMission(side,mission,…)
New Lua function: ScenEdit_DeleteMission(side,mission,…)
New Lua function: ScenEdit_AssignUnitAsTarget(contact(s),mission)
New Lua function: ScenEdit_GetReferencePoints(table) – returns table of reference point details
New Lua function: VP_GetContact(table) – get table of contacts
New Lua function: ScenEdit_RefuelUnit(table) – make unit refuel as per AAR doctrine
New Lua function: ScenEdit_SetEvent(‘EventNameOrId’, table) / ScenEdit_GetEvent(‘EventNameOrId’)
New Lua function: ScenEdit_GetSpecialAction(table) / ScenEdit_ExecuteSpecialAction(‘EventNameOrId’)
New Lua function: ScenEdit_GetContacts(side) – contacts from the side’s perspective
New Lua function: ScenEdit_GetContact(table) – a contact’s details
New Lua function: ScenEdit_FillMagsForLoadout(table) – fill magazine with a number of a specific loadout
New Lua function: ScenEdit_AttackContact(attacker, contact, table) – automatic or using specific weapon
New Lua function: ScenEdit_UpdateUnit(table) – updates sensor/mounts on unit
New Lua function: ScenEdit_SetDoctrineWRA(table) / ScenEdit_GetDoctrineWRA(table) – WRA doctrine
New Lua function: ScenEdit_UpdateEvent(eventName, table) – update Lua script on selected event
New Lua function: ScenEdit_GetWeather( table ) – at scenario or unit level
New Lua function: Tool_DumpEvents() – dumps out all events to an XML file in ‘\Scenarios’; useful to examine all events without clicking-through the ScenEdit UI
New exposed Lua object: unit [ mounts, magazines, base (hosted at), proficiency, components, mission (returns mission object rather than name),group (returns mission object rather than name), fuelstate, weaponstate, manualSpeed, manualAltitude, AirborneTime, loadoutdbid, throttle, weather, method :filterOnComponent (filter components on a type eg sensor), :rangetotarget( contact id) ]
New exposed Lua object: side [ awareness, proficiency ]
New Lua object: group [ unitlist ]
New Lua object: mission [ unitlist, targetlist, starttime, endtime, active, SISH, AAR, plus ‘mission specific details’ ]
New exposed Lua object: referencePoint [ locked, relativeTo ]
New exposed Lua object: contact [ type, potentialmatches, side (contact’s), missile_defence, age, fromside (who made the contact), FilterOut, weather, method :DropContact() ]
New exposed Lua object: doctrine [ additional doctrines ]
General Lua:
* ADDED: Lua: Add plotted course when inserting unit
* ADDED: Lua Function: Return to port
* Lua commands and response (incl. errors) are now stored to text files on [CMANO]\Logs\LuaHistory_[date & time] .
* NLua library upgraded to 1.3.2 (kudos to MichaelM!)
* Improved error reporting – attempts to show which command and/or line failed
* Improved in-event error handling
* Added Lua history file in \Logs folder
* Allow true/false for boolean values
* Added executing Lua scripts to log (note that this may cause large files!)
* “Copy unit ID from editor” method can handle multiple units
* Added option on Event that can controls logging to the game log; ON by default, but useful for an event that fires quite often
* Lua: Tool_DumpEvents writes to a file (file located in \scenarios as “[scenario title] + events.xml”)
* Lua: Contact type as string and number
* Lua: Doctrine – withdraw & deploy settings
* Lua: Added event names to RunScript
* Lua: carry over event name to RunScript in Sandbox
* Lua: Fixed unitname keyword for SetLoadout()
* Lua: Added ‘unitname’ to Doctrine inline with standard naming
* Lua: Improved error handling. Errors are displayed and execution stops when running in console mode. When running from special-actions, the function returns NIL but the script continues to run. The error is shown in the Lua variable ‘_errmsg_’ and the function in ‘_errfnc_’
Refer to Command Lua (http://commandlua.github.io) for more detailed explanation of exposed objects and functions.
NEW IN v1.12
NEW IN v1.13
* MAJOR NEW: All-new Lua Console v2
* Added warning pop-up to scen authors: When activating AC damage, make sure to deep-rebuild scenario
* Lua: added OODA to unit wrapper
* Lua: SE_AddZone() for no-nav and exclusion zones
* Lua: Added Event handling through Lua
* Lua: Zone wrapper: add property .markas
* Lua: SetUnit() allow .base to be set to change assigned base (using base=nil will make it pick the closest base)
* Lua: SetUnit() – don’t add contact for own side
* Lua: Unit wrapper .autodetectable property (Added new contact code as per the SetUnit() one)
* Lua: Time triggers firing multiplle times (For specific time trigger, it needs to only fire once. If it then fails a condition or probability check, it wont fire this trigger again.)
* Lua: User-driven function checks
* Lua Event: 6,12,24 hour events
* Lua: Option to TransferCargo() (Only for crossloading to ships at the moment. Added property ‘hostedUnits’ to unit wrapper to show boat/aircraft embarked.
* Add hotkey for copying GUID on map (Ctrl+C). This is useful outside of the editor when trying to write Lua scripts.
* Lua: SE_TransferCargo handles other platforms (Improved. Now uses aircraft, facility,ship,submarine platforms. Allows multiple loads to destination unit accounting for existing space used.)
* Lua: TargetFilter() infer subtype from unitclass
* Lua: add weapon details to unit wrapper
* Lua: Contact wrapper – fix and additional properties: speed, heading, altitude, detectedBySide, BDA, emmissions, detectionBy, fixed the side returns that gave the actual object rather than the matching Lua wrapper.
* Lua: Added property firingAt, firedOn
* Lua: tweaked SetLoadout(), property readytime on unit wrapper
* Lua: TransferCargo, UnloadCargo
* Lua: added unitType filters to VP_Side() object (fixed case where weapon target is null, e.g. when weapon is a sonobouy)
* Lua: added new property to all Lua wrappers – .fields (Lists the name of all properties and methods in the wrapper. Useful for verifying names if in doubt!)
* Lua: added new mode to UpdateUnit() (Can now add/remove weapon records)
* Lua: SetUnitSide – handle changing a group unit
* Lua: add :inArea(zone) to unit and contact wrapper
* Lua: added reference to current event on condition (Should be possible to refer to event attributes when checking conditions. The current event reference is called for actions and
triggers)
-SetLoadout() to default some values if passed
-TimeToReady defaults to the loadout ready time
-IgnoreMagazines defaults to false
-unit.readytime – time for aircraft/ship to be ready
* Lua: added wrapper for events, EventX
* Lua: Fixed SE_DeleteMission causing exception
* Lua: Fixed error in XML parsing for SE_GetEvent()
* Lua: Fixed Clone of Event Condition LuaScript
* Lua: added ‘Base’ to SE_SetUnit() + added option to HostParent() to assign a base rather than ‘host’ it. [Not really needed as the new SetUnit() handles setting a base now]
* Fixed: Lua mission wrapper ‘OnStation’ missing (Added to Patrol and Support)
* Lua: SE_GetFormation() and unit/group wrapper
1. Gets info about a formation
2. unit.formation – can change info on unit station keeping
3. group.lead – change group’s lead unit
* Lua: Tool_Bearing()
* Lua: Add LUA_World_GetPointFromBearing()
* Lua: AddReferncePoint() – allow multiple points and bearing/distance
* Lua: Added Area to UnitDetected trigger
* Lua: Fix interactive console printing if old console not opened
* Lua: suppress the doubling up in the history file
* Lua: use of dynamic event for air/ship ops state changing (e.g. aircraft landing)
* Lua: ActiveUnit wrapper now also exposes a unit’s sensors (.sensors property)
* Lua: Added “isOperating” property to ActiveUnit wrapper