Difference between revisions of "WDL Scripting Changes"

From Nomad DB
(Created page with "{{Page_WDL}} Watch Dogs Legion ScriptHook uses the same framework as WD2 & MDE ScriptHook. However, there are notable Lua changes compared to their old coun...")
 
Line 15: Line 15:
 
* '''d3d:''' Render (outlined) rectangles, lines & text using Lua ([[ScriptHook: Rendering|Documented here]])
 
* '''d3d:''' Render (outlined) rectangles, lines & text using Lua ([[ScriptHook: Rendering|Documented here]])
 
* '''OnRender:''' Event callback in which rendering takes place ([[Event: Script:OnRender|Documented here]])
 
* '''OnRender:''' Event callback in which rendering takes place ([[Event: Script:OnRender|Documented here]])
 +
 +
'''1.1'''
 +
* [[d3d.DrawOutlinedRect]]
 +
* [[d3d.World2Screen]]
  
 
=== Lua Functions ===
 
=== Lua Functions ===
Line 22: Line 26:
 
* Renamed [[ScriptHook.ToggleWorldSpawner]] to [[ScriptHook.SetWorldSpawnerEnabled]]
 
* Renamed [[ScriptHook.ToggleWorldSpawner]] to [[ScriptHook.SetWorldSpawnerEnabled]]
 
* Renamed [[ScriptHook.ToggleWorldImpostor]] to [[ScriptHook.SetWorldImpostorEnabled]]
 
* Renamed [[ScriptHook.ToggleWorldImpostor]] to [[ScriptHook.SetWorldImpostorEnabled]]
 +
 +
'''1.1'''
 +
* [[ScriptHook.SetFelonySystemEnabled]], [[ScriptHook.IsFelonySystemEnabled]]
 +
* [[ScriptHook.StartFelonySearch]]
 +
* [[ScriptHook.SetFelonyHeatLevel]], [[ScriptHook.ClearFelonyHeatLevel]]
 +
 +
* [[ScriptHook.GetTimeShiftTargetTime]], [[ScriptHook.StartTimeShiftTransition]]
 +
* [[ScriptHook.SetVehicleMaterialOverride]]
 +
 +
* [[ScriptHook.GetCameraLookAt]]
 +
 +
* [[ScriptHook.IsHudElementVisible]], [[ScriptHook.SetHudElementVisible]]
  
 
==== Entity ====
 
==== Entity ====
Line 27: Line 43:
 
* Added [[ScriptHook.SetEntityPoolClearOnUnused]], [[ScriptHook.SetEntityIsPoolable]]
 
* Added [[ScriptHook.SetEntityPoolClearOnUnused]], [[ScriptHook.SetEntityIsPoolable]]
 
* Added [[ScriptHook.SetEntityPhysicsEnabled]], [[ScriptHook.SetEntityIsVisible]]
 
* Added [[ScriptHook.SetEntityPhysicsEnabled]], [[ScriptHook.SetEntityIsVisible]]
 +
 +
'''1.1'''
 +
* [[ScriptHook.GetEntityAABB]], [[ScriptHook.GetEntityLocalAABB]], [[ScriptHook.HasEntityUserLocalBBox]]
 +
* [[ScriptHook.RemoteEntity]]
 +
* [[ScriptHook.IsEntityLoaded]]
 +
* [[ScriptHook.IsEntityInitialized]]
 +
* [[ScriptHook.IsEntityAddedToWorld]]
 +
* [[ScriptHook.IsEntityMoving]]
 +
* [[ScriptHook.IsEntityShuttingDown]],
 +
* [[ScriptHook.IsEntitySleeping]], [[ScriptHook.SetEntitySleep]]
 +
* [[ScriptHook.SetEntityIsVisible]], [[ScriptHook.IsEntityVisible]]
  
 
Entity functions from WD2 were also ported to Legion:
 
Entity functions from WD2 were also ported to Legion:

Revision as of 19:40, 4 May 2021

Watch Dogs Legion ScriptHook uses the same framework as WD2 & MDE ScriptHook. However, there are notable Lua changes compared to their old counterparts.

Scripts

  • manifest.json: Keybinds from Scripts can now be modified in the StartupMenu, as long as they have a Text configured. (Documented here)
  • Config Values: It is now possible to store and load persistent data (e.g. for configuration). For example, the Trainer stores the noclip & freecam speeds using this method. (ScriptHook: Script Config).

UI

  • SimpleMenu: Updated design for Checkboxes
  • SimpleMenu: Added Text & List entry types (Documented here)
  • UI uses a new configuration system, which allows for fully configurable design using JSON files. These JSON files are located in data/ui and once modified, the UI style will update instantly.

Rendering

This feature isn't exactly new, but hasn't been used in past ScriptHook versions.

1.1

Lua Functions

1.1

Entity

1.1

Entity functions from WD2 were also ported to Legion:

Related Pages