https://db.nomad-group.net/api.php?action=feedcontributions&user=SpeckBomber&feedformat=atomNomad DB - User contributions [en]2024-03-28T19:42:11ZUser contributionsMediaWiki 1.34.1https://db.nomad-group.net/index.php?title=Category:WD2_Lua&diff=1298Category:WD2 Lua2020-10-27T18:46:39Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Not every function is documented in this wiki, check out a [[WD2 Lua Functions|full list of Lua functions]].</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=SetPhysicsEnabled&diff=1296SetPhysicsEnabled2020-10-27T18:45:02Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Enables or disables an entity's physics (for entities that have any type of physics component).<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
SetPhysicsEnabled(targetEntityId, enabled)<br />
</syntaxhighlight><br />
* '''targetEntityId''' (string): [[EntityId|ID]] of the entity to set the physics state of<br />
* '''enabled''' (number): Physics state to set (0 = disabled, 1 = enabled)<br />
<br />
== Example ==<br />
Disables the local player's physics.<br />
<syntaxhighlight lang="lua"><br />
SetPhysicsEnabled(GetLocalPlayerEntityId(), 0)<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=StopEntityNetHackHighlight&diff=1295StopEntityNetHackHighlight2020-10-27T18:44:53Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Stops an entity from being highlighted with an outline in NetHack mode that was previously highlighted using [[StartEntityNetHackHighlight]].<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
StartEntityNetHackHighlight(entityId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): The [[EntityId|ID]] of the entity to stop highlighting in NetHack mode<br />
<br />
== Example ==<br />
<syntaxhighlight lang="lua"><br />
StartEntityNetHackHighlight(GetLocalPlayerEntityId())<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[StartEntityNetHackHighlight]]<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=StartEntityNetHackHighlight&diff=1294StartEntityNetHackHighlight2020-10-27T18:44:46Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Highlights an entity in the specified color in NetHack mode. Outlines can be seen through obstaces in the line of sight. This function has to be called while NetHack is disabled, it won't work while NetHack is enabled. Additionally, the highlight will be removed when NetHack is disabled.<br />
<br />
When not in NetHack mode this function will also apply an outline to the player as if the same <code>colorId</code> was passed to [[StartEntityHighlight]], however it will be very faint and barely visible. This highlight will also be disabled once NetHack mode is exited.<br />
<br />
{{Warning|This function is not used by any scripts in WD2 and some aspects are not fully implemented, as sometimes mentioned in the list below.}}<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
StartEntityNetHackHighlight(entityId, colorId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): The [[EntityId|ID]] of the entity to be highlighted in NetHack mode<br />
* '''colorId''' (string): The [[#Colors|color]] to use for the highlight<br />
<br />
== Example ==<br />
Highlights the local player in green when using NetHack.<br />
<syntaxhighlight lang="lua"><br />
StartEntityNetHackHighlight(GetLocalPlayerEntityId(), 3)<br />
</syntaxhighlight><br />
<br />
== Parameters ==<br />
=== Colors ===<br />
{| class="wikitable"<br />
! ID<br />
! Color<br />
|-<br />
| 0, 9<br />
| Light Gray fill, White outline<br />
|-<br />
| 2, 11<br />
| White outline, fades from translucent to solid<br />
|-<br />
| 3, 5, 6, 12, 16<br />
| Green fill, fades from translucent to solid<br />
|-<br />
| 4, 8, 13, 17<br />
| Red fill, fizzy effect<br />
|-<br />
| 7, 10<br />
| Light Gray fill, White outline, fizzy effect, fades from translucent to solid<br />
|-<br />
| 14, 38, 39<br />
| Light Gray fill<br />
|-<br />
| 15, 24, 32, 37<br />
| Blue fill, fades from translucent to solid<br />
|-<br />
| 18, 20, 21, 22<br />
| Blue fill, translucent<br />
|-<br />
| 23, 25, 26, 27<br />
| Blue fill<br />
|-<br />
| 28<br />
| Red fill, fades from translucent to solid<br />
|-<br />
| 29, 31<br />
| Blue-Green-ish glitching<br />
|-<br />
| 30, 40<br />
| Bright Red fill<br />
|-<br />
| 33<br />
| Pulsating Red Particle A-Posing Marcus on top of your Marcus<br />
|-<br />
| 34<br />
| A-Posing White Marcus only visble when occluded<br />
|-<br />
| 35<br />
| Golden fill<br />
|-<br />
| 36<br />
| Golden fill, fades from translucent to solid<br />
|-<br />
| 41<br />
| Purple fill<br />
|}<br />
<br />
== Related Pages ==<br />
* [[StopEntityNetHackHighlight]]<br />
* [[StartEntityHighlight]]<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=TeleportEntity&diff=1293TeleportEntity2020-10-27T18:44:27Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Teleports the target entity to the destination entity.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
TeleportEntity(targetEntityId, destinationEntityId, useLoadingScreen, useFadeToBlack)<br />
</syntaxhighlight><br />
* '''targetEntityId''' (string): [[EntityId|ID]] of the entity to be teleported<br />
* '''destinationEntityId''' (string): [[EntityId|ID]] of the entity to teleport to<br />
* '''useLoadingScreen''' (number): Whether to show a loading screen if the player teleports into a new map area (0 = false; 1 = true)<br />
* '''useFadeToBlack''' (number): Whether to use a fade to black animation before teleporting the player (0 = false; 1 = true)<br />
<br />
== Example ==<br />
<syntaxhighlight lang="lua"><br />
TeleportEntity(GetLocalPlayerEntityId(), "2083162933598368435", 0, 0)<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=GetEntityName&diff=1292GetEntityName2020-10-27T18:44:19Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Retrieves the name from an [[Entity|entity]].<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
GetEntityName(entityId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): [[EntityId|ID]] of the target entity<br />
* '''Returns''' (string): Name of the specified entity<br />
<br />
== Example ==<br />
<syntaxhighlight lang="lua"><br />
local entityName = GetEntityName(GetLocalPlayerEntityId())<br />
print(entityName) -- returns "player.MainCharacter.PawnPlayer.Aiden2"<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=World_Loading_Unit&diff=1291World Loading Unit2020-10-27T18:44:13Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
'''World Loading Units''' (WLUs) are layers containing [[Entity|entities]]. They can be loaded and unloaded on demand as long as the specific WLU is currently not loaded yet.<br />
<br />
Each entity in a WLU has a defined ID, position and orientation, and, like all other entities, uses components to define its properties.<br />
WLUs are mostly used to load mission-specific objects. Additionally, the game world itself is made up of WLUs as well.<br />
<br />
== Files ==<br />
WLU files are located in the "worlds/windy_city/generated/wlu" directory inside the game archives and use the file extension "xml.data.fcb", whereas the file name must begin with "wlu_data_".<br />
<br />
== Lua ==<br />
WLUs can be loaded by name using the [[LoadMissionLayer]] function. Entities inside of WLUs can be referred to at any time, but will not be valid until the corresponding WLU has been loaded.<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=IsAlive&diff=1290IsAlive2020-10-27T18:43:57Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Checks if an [[EntityId]] is alive.<br />
<br />
== Syntax ==<br />
<pre><br />
IsAlive(EntityId)<br />
</pre><br />
<br />
* '''[[EntityId]]''' of the Entity to check<br />
* '''Returns: number''' indicating 0 for dead, 1 for alive<br />
<br />
== Example ==<br />
This functions checks if the Local Player exists and is alive.<br />
<br />
<syntaxhighlight lang="lua"><br />
local function IsLocalPlayerValid()<br />
local plyId = GetLocalPlayerEntityId()<br />
if plyId == GetInvalidEntityId() then<br />
return false<br />
end<br />
return IsAlive(plyId) == 1<br />
end<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[EntityId]]<br />
* [[GetLocalPlayerEntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=IsAlive&diff=1289IsAlive2020-10-27T18:43:26Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_MDE}}<br />
Checks if an [[EntityId]] is alive.<br />
<br />
== Syntax ==<br />
<pre><br />
IsAlive(EntityId)<br />
</pre><br />
<br />
* '''[[EntityId]]''' of the Entity to check<br />
* '''Returns: number''' indicating 0 for dead, 1 for alive<br />
<br />
== Example ==<br />
This functions checks if the Local Player exists and is alive.<br />
<br />
<syntaxhighlight lang="lua"><br />
local function IsLocalPlayerValid()<br />
local plyId = GetLocalPlayerEntityId()<br />
if plyId == GetInvalidEntityId() then<br />
return false<br />
end<br />
return IsAlive(plyId) == 1<br />
end<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[EntityId]]<br />
* [[GetLocalPlayerEntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=SpawnEntityFromArchetype&diff=1286SpawnEntityFromArchetype2020-10-27T18:41:17Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Spawns an [[Entity|entity]] of the specified [[Archetype|archetype]] at the specified position.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
SpawnEntityFromArchetype(archetype, xPos, yPos, zPos, xRot, yRot, zRot)<br />
</syntaxhighlight><br />
* '''archetype''' (string): [[Archetype]] of the target entity<br />
* '''xPos''' (number): X component of the target spawn position coordinates<br />
* '''yPos''' (number): Y component of the target spawn position coordinates<br />
* '''zPos''' (number): Z component of the target spawn position coordinates<br />
* '''xRot''' (number): X component of the target spawn orientation in Degrees<br />
* '''yRot''' (number): Y component of the target spawn orientation in Degrees<br />
* '''zRot''' (number): Z component of the target spawn orientation in Degrees<br />
* '''Returns''' (string): [[EntityId|ID]] of the spawned entity.<br />
<br />
== Example ==<br />
The example below spawns a bike at the player's position and prints the name of the [[Entity|entity]].<br />
<syntaxhighlight lang="lua"><br />
local archetype = "{5a8ef904-070b-4706-8c23-788f6b82a30e}"<br />
local destinationEntity = GetLocalPlayerEntityId()<br />
local destX, destY, destZ = GetEntityPosition(destinationEntity, 0), GetEntityPosition(destinationEntity, 1), GetEntityPosition(destinationEntity, 2)<br />
local rotX, rotY, rotZ = GetEntityAngle(destinationEntity, 0), GetEntityAngle(destinationEntity, 1), GetEntityAngle(destinationEntity, 2)<br />
local spawnedEntity = SpawnEntityFromArchetype(archetype, destX, destY, destZ, rotX, rotY, rotZ)<br />
local spawnedEntityName = GetEntityName(spawnedEntity)<br />
print(spawnedEntityName) -- returns "Vehicle_Bike.Bike.Bike_01"<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[Archetype]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=StartHelicopterBhv&diff=1285StartHelicopterBhv2020-10-27T18:41:06Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Starts the specified behavior on a helicopter to either follow a path, fly to an [[Entity|entity]] or chase a [[Pawn|pawn]].<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
StartHelicopterBhv(helicopterEntity, pathOrPos, target, config)<br />
</syntaxhighlight><br />
* '''helicopterEntity''' (string): The [[EntityId|ID]] of the target helicopter the behavior should be started on<br />
* '''pathOrPos''' (string): The [[EntityId|ID]] of the path to follow or the entity to reach<br />
* '''target''' (string): The [[EntityId|ID]] of the pawn to follow (if a chase behavior was specified)<br />
* '''config''' (string): The behavior to use on the helicopter (corresponds to an item in the '''HelicopterBhvSetup''' library)<br />
<br />
== Example ==<br />
To make the helicopter follow the player.<br />
<syntaxhighlight lang="lua"><br />
StartHelicopterBhv(helicopterEntity, GetInvalidEntityId(), GetLocalPlayerEntityId(), "HelicopterBhvSetup.1978142222")<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[StopHelicopterBhv]]<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=StopHelicopterBhv&diff=1284StopHelicopterBhv2020-10-27T18:40:45Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Stops a behavior on a helicopter that was previously started using [[StartHelicopterBhv]].<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
StopHelicopterBhv(helicopterEntity)<br />
</syntaxhighlight><br />
* '''helicopterEntity''' (string): The [[EntityId|ID]] of the helicopter to stop a behavior on<br />
<br />
== Example ==<br />
To unassign the current behavior of the specified helicopter.<br />
<syntaxhighlight lang="lua"><br />
StopHelicopterBhv(helicopterEntity)<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[StartHelicopterBhv]]<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=ForceHackIngredient&diff=1283ForceHackIngredient2020-10-27T18:40:35Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Hacks the specified hackable entity (entities that have a ''CHackingComponent'').<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
ForceHackIngredient(targetEntityId, hackerEntityId)<br />
</syntaxhighlight><br />
* '''targetEntityId''' (string): [[EntityId|ID]] of the entity to be hacked<br />
* '''hackerEntityId''' (string): [[EntityId|ID]] of the hacking entity<br />
<br />
== Example ==<br />
Spawns the spider drone and hacks it to take control over the drone.<br />
<syntaxhighlight lang="lua"><br />
local spiderDrone = SpawnEntityFromArchetype("{a0b8ae08-00fc-4458-9fcd-f70dc6ba6b7e}", 0, 0, 0, 0, 0, 0)<br />
ForceHackIngredient(spiderDrone, GetLocalPlayerEntityId())<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[SpawnEntityFromArchetype]]<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CAIAgentManager:GetAIAgentsOfGroupFromLUA_v2&diff=1282CAIAgentManager:GetAIAgentsOfGroupFromLUA v22020-10-27T18:40:04Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Retrieves the entity IDs of AI agents from the specified agent type.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
CAIAgentManager_GetInstance():GetAIAgentsOfGroupFromLUA_v2(agentType, affiliation, group, health, hostility)<br />
</syntaxhighlight><br />
* '''agentType''' (string): Target AI agent [[#Type|type]]<br />
* '''affiliation''' (number): Target AI agent [[Affiliation|affiliation]]<br />
* '''group''' (string): currently unknown, usually empty string<br />
* '''health''' (number): Target AI agent [[#Health|health state]]<br />
* '''hostility''' (number): Target AI agent [[#Hostility|hostility type]]<br />
* '''Returns''' (table): Table containing entity IDs<br />
<br />
== Example ==<br />
Retrieves AI agent entities that are part of the SFPD and are hostile towards the player.<br />
<syntaxhighlight lang="lua"><br />
local agentsList = CAIAgentManager_GetInstance():GetAIAgentsOfGroupFromLUA_v2("Human", 1, "", 1, 1)<br />
local str = table.concat(agentsList, ", ")<br />
print(str) -- returns a string containing the entity IDs of the specified agents<br />
</syntaxhighlight><br />
<br />
== Parameters ==<br />
=== Type ===<br />
{| class="wikitable"<br />
! Name<br />
|-<br />
| All<br />
|-<br />
| Human<br />
|-<br />
| ...<br />
|}<br />
<br />
=== Health ===<br />
{| class="wikitable"<br />
! ID<br />
! State<br />
|-<br />
| 0<br />
| Alive<br />
|-<br />
| 1<br />
| Any<br />
|-<br />
| ...<br />
|}<br />
<br />
=== Hostility ===<br />
{| class="wikitable"<br />
! ID<br />
! State<br />
|-<br />
| 0<br />
| Any<br />
|-<br />
| 1<br />
| Enemy<br />
|-<br />
| 2<br />
| Not Enemy<br />
|-<br />
| ...<br />
|}<br />
<br />
== Related Pages ==<br />
* [[CAIAgentManager]]<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[Pawn]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=Affiliation&diff=1281Affiliation2020-10-27T18:39:55Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Pawns can be ''affiliated'' to one of the game's [[#Factions|factions]]. The effects of this can include a civilian being able to enter affiliated restricted zones and more.<br />
<br />
== Factions ==<br />
{| class="wikitable"<br />
! ID<br />
! Internal Name<br />
! Localized Name<br />
|-<br />
| 1<br />
| SFPD<br />
| SFPD<br />
|-<br />
| 2<br />
| CorruptCop<br />
| Corrupt Cops<br />
|-<br />
| 3<br />
| OPD<br />
| OPD<br />
|-<br />
| 4<br />
| AFI<br />
| FBI<br />
|-<br />
| 5<br />
| P_8<br />
| Prime_Eight<br />
|-<br />
| 8<br />
| Emergency<br />
| Emergency<br />
|-<br />
| 9<br />
| T_13<br />
| Tezcas<br />
|-<br />
| 11<br />
| Boys<br />
| Auntie Shu Boys<br />
|-<br />
| 12<br />
| Ridaz<br />
| 580s<br />
|-<br />
| 13<br />
| UZulu<br />
| Umeni<br />
|-<br />
| 14<br />
| Bratva<br />
| Bratva<br />
|-<br />
| 17<br />
| Wolves<br />
| Sons of Ragnarok<br />
|}<br />
Note: For specific functions, the required IDs might differ.<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[Pawn]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=RemoveEntity&diff=1280RemoveEntity2020-10-27T18:39:46Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Removes the specified entity.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
RemoveEntity(entityId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): [[EntityId|ID]] of entity to remove.<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=FelonyStartChase&diff=1279FelonyStartChase2020-10-27T18:39:37Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Starts a systemic chase of the specified [[Affiliation|faction]] on the specified [[Pawn|pawn]].<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
FelonyStartChase(targetEntityId, felonyType, felonyLevel, startAction)<br />
</syntaxhighlight><br />
* '''targetEntityId''' (string): [[EntityId|ID]] of the [[Pawn|pawn]] to start the chase on<br />
* '''felonyType''' (number): [[#Factions|ID]] of the [[Affiliation|faction]] to chase the target entity<br />
* '''felonyLevel''' (number): Felony level to start the chase at (1 - 5)<br />
* '''startAction''' (number): Behavior to start the chase with (2 = default; 3 = search)<br />
<br />
== Example ==<br />
Starts a police chase on the local player.<br />
<syntaxhighlight lang="lua"><br />
FelonyStartChase(GetLocalPlayerEntityId(), 0, 3, 2)<br />
</syntaxhighlight><br />
<br />
== Parameters ==<br />
=== Factions ===<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Police<br />
|-<br />
| 1<br />
| FBI<br />
|-<br />
| 3<br />
| Prime_Eight<br />
|-<br />
| 6<br />
| Tezcas<br />
|-<br />
| 9<br />
| Auntie Shu Boys<br />
|-<br />
| 10<br />
| 580s<br />
|-<br />
| 11<br />
| Umeni<br />
|-<br />
| 12<br />
| Bratva<br />
|-<br />
| 15<br />
| Sons of Ragnarok<br />
|}<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[Pawn]]<br />
* [[Affiliation]]<br />
* [[FelonyStartChaseObj]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=FelonyStartChaseObj&diff=1278FelonyStartChaseObj2020-10-27T18:39:27Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Starts a chase of the specified [[Affiliation|faction]] on the specified [[Pawn|pawn]] using custom chase parameters.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
FelonyStartChaseObj(targetEntityId, felonyType, customChaseLevel, startAction)<br />
</syntaxhighlight><br />
* '''targetEntityId''' (string): [[EntityId|ID]] of the [[Pawn|pawn]] to start the chase on<br />
* '''felonyType''' (number): [[#Factions|ID]] of the [[Affiliation|faction]] to chase the target entity<br />
* '''customChaseLevel''' (string): The custom chase parameters to use (corresponds to an item in the '''ChaseLevelParameters''' library)<br />
* '''startAction''' (number): Behavior to start the chase with (2 = default; 3 = search)<br />
<br />
== Example ==<br />
Starts a police chase with custom parameters on the local player.<br />
<syntaxhighlight lang="lua"><br />
FelonyStartChaseObj(GetLocalPlayerEntityId(), 0, "ChaseLevelParameters.9223372068194800362", 2)<br />
</syntaxhighlight><br />
<br />
== Parameters ==<br />
=== Factions ===<br />
{| class="wikitable"<br />
! ID<br />
! Name<br />
|-<br />
| 0<br />
| Police<br />
|-<br />
| 1<br />
| FBI<br />
|-<br />
| 3<br />
| Prime_Eight<br />
|-<br />
| 6<br />
| Tezcas<br />
|-<br />
| 9<br />
| Auntie Shu Boys<br />
|-<br />
| 10<br />
| 580s<br />
|-<br />
| 11<br />
| Umeni<br />
|-<br />
| 12<br />
| Bratva<br />
|-<br />
| 15<br />
| Sons of Ragnarok<br />
|}<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[Pawn]]<br />
* [[Affiliation]]<br />
* [[FelonyStartChase]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=HideEntity&diff=1277HideEntity2020-10-27T18:39:18Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Hides the specified entity. This does not affect any child entities that are bound to the target.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
HideEntity(entityId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): [[EntityId|ID]] of entity to hide<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[ShowEntity]]<br />
* [[HideCameraClippedEntity]]<br />
* [[ShowCameraClippedEntity]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=ShowEntity&diff=1276ShowEntity2020-10-27T18:39:09Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Unhides a previously hidden entity. This does not affect any child entities that are bound to the target.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
ShowEntity(entityId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): [[EntityId|ID]] of entity to unhide<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[HideEntity]]<br />
* [[HideCameraClippedEntity]]<br />
* [[ShowCameraClippedEntity]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=HideCameraClippedEntity&diff=1275HideCameraClippedEntity2020-10-27T18:38:51Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Hides the specified entity and any child entities that are bound to the target.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
HideCameraClippedEntity(entityId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): [[EntityId|ID]] of entity to hide<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[ShowCameraClippedEntity]]<br />
* [[HideEntity]]<br />
* [[ShowEntity]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=ShowCameraClippedEntity&diff=1274ShowCameraClippedEntity2020-10-27T18:38:45Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Unhides a previously hidden entity and any child entities that are bound to the target.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
ShowCameraClippedEntity(entityId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): [[EntityId|ID]] of entity to unhide<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[HideCameraClippedEntity]]<br />
* [[HideEntity]]<br />
* [[ShowEntity]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=StopEntityHighlight&diff=1273StopEntityHighlight2020-10-27T18:38:36Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Stops an entity from being highlighted with an outline that was previously highlighted using [[StartEntityHighlight]].<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
StopEntityHighlight(entityId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): The [[EntityId|ID]] of the entity to stop highlighting<br />
<br />
== Example ==<br />
<syntaxhighlight lang="lua"><br />
StopEntityHighlight(GetLocalPlayerEntityId())<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[StartEntityHighlight]]<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=OpenDoor&diff=1272OpenDoor2020-10-27T18:38:10Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Opens the specified door entity (entities that have a ''CDoorComponent'').<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
OpenDoor(doorEntityId, instant, openToMaxAngle)<br />
</syntaxhighlight><br />
* '''doorEntityId''' (string): [[EntityId|ID]] of the door entity to open<br />
* '''instant''' (number): Whether to open the door instantly or not (0 or 1)<br />
* '''openToMaxAngle''' (number): Whether to open the door to its maximum angle or not (0 or 1)<br />
<br />
== Example ==<br />
Opens the specified door entity.<br />
<syntaxhighlight lang="lua"><br />
OpenDoor("123", 1, 1)<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[CloseDoor]]<br />
* [[SetDoorLockState]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=StartEntityHighlight&diff=1271StartEntityHighlight2020-10-27T18:37:59Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Outlines an entity the specified color. If the specified entity is a pawn, its current vehicle will be outlined instead. Outlines can be seen through obstaces in the line of sight.<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
StartEntityHighlight(entityId, colorId)<br />
</syntaxhighlight><br />
* '''entityId''' (string): The [[EntityId|ID]] of the entity to be highlighted<br />
* '''colorId''' (string): The [[#Colors|color]] to use for the highlight<br />
<br />
== Example ==<br />
Creates a blue outline on the local player.<br />
<syntaxhighlight lang="lua"><br />
StartEntityHighlight(GetLocalPlayerEntityId(), 3)<br />
</syntaxhighlight><br />
<br />
== Parameters ==<br />
=== Colors ===<br />
[[File:StartEntityHighlight-Colors.png|750px|thumb|right|Example of available highlight colors on the player]]<br />
{| class="wikitable"<br />
! ID<br />
! Color<br />
|-<br />
| 0<br />
| White<br />
|-<br />
| 1<br />
| Yellow<br />
|-<br />
| 2<br />
| Red<br />
|-<br />
| 3<br />
| Blue<br />
|-<br />
| 4<br />
| Green<br />
|-<br />
| 5<br />
| Purple<br />
|-<br />
| 6<br />
| Orange<br />
|}<br />
<br />
== Related Pages ==<br />
* [[StopEntityHighlight]]<br />
* [[Entity]]<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CloseDoor&diff=1270CloseDoor2020-10-27T18:37:48Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Closes the specified door entity (entities that have a ''CDoorComponent'').<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
CloseDoor(doorEntityId, instant)<br />
</syntaxhighlight><br />
* '''doorEntityId''' (string): [[EntityId|ID]] of the door entity to close<br />
* '''instant''' (number): Whether to close the door instantly or not (0 or 1)<br />
<br />
== Example ==<br />
Closes the specified door entity.<br />
<syntaxhighlight lang="lua"><br />
CloseDoor("123", 1)<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[OpenDoor]]<br />
* [[SetDoorLockState]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=SetDoorLockState&diff=1269SetDoorLockState2020-10-27T18:37:32Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Locks or unlocks the specified door entity (entities that have a ''CDoorComponent'').<br />
<br />
== Syntax ==<br />
<syntaxhighlight lang="lua"><br />
SetDoorLockState(doorEntityId, lockState)<br />
</syntaxhighlight><br />
* '''doorEntityId''' (string): [[EntityId|ID]] of the door entity to set the lock state of<br />
* '''lockState''' (number): Lock state to set (0 = unlock; 1 = lock)<br />
<br />
== Example ==<br />
Closes the specified door entity.<br />
<syntaxhighlight lang="lua"><br />
SetDoorLockState("123", 0)<br />
</syntaxhighlight><br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[OpenDoor]]<br />
* [[CloseDoor]]<br />
<br />
[[Category:WD2 Lua]] [[Category: WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=GetInvalidEntityId&diff=1268GetInvalidEntityId2020-10-27T18:37:21Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
This function returns an invalid [[EntityId|Entity ID]]. The returned value is a string with '''18446744073709551615''', the decimal representation of hex value '''FFFFFFFFFFFFFFFF'''. Since Lua 5.1 cannot handle 64-Bit Integers, the returned type is a string.<br />
<br />
== Syntax ==<br />
<pre><br />
GetInvalidEntityId()<br />
</pre><br />
* '''Returns: string'''<br />
<br />
== Related Pages ==<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]]<br />
[[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=GetDistance3D&diff=1267GetDistance3D2020-10-27T18:37:04Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Retrieves the distance between two entities in 3D world space.<br />
<br />
== Syntax ==<br />
<pre><br />
GetDistance3D(entityA, entityB)<br />
</pre><br />
<br />
* '''entityA''' (string): [[EntityId|ID]] of the first entity<br />
* '''entityB''' (string): [[EntityId|ID]] of the second entity<br />
* '''Returns''' (number): Distance between the specified entities in 3D world space<br />
<br />
== Related Pages ==<br />
* [[EntityId]]<br />
* [[GetDistance2D]]<br />
* [[CalculateDistanceViaRoad]]<br />
<br />
[[Category:WD2 Lua]]<br />
[[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=GetDistance2D&diff=1266GetDistance2D2020-10-27T18:36:52Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Retrieves the distance between two entities in 2D world space.<br />
<br />
== Syntax ==<br />
<pre><br />
GetDistance2D(entityA, entityB)<br />
</pre><br />
<br />
* '''entityA''' (string): [[EntityId|ID]] of the first entity<br />
* '''entityB''' (string): [[EntityId|ID]] of the second entity<br />
* '''Returns''' (number): Distance between the specified entities in 2D world space<br />
<br />
== Related Pages ==<br />
* [[EntityId]]<br />
* [[GetDistance3D]]<br />
* [[CalculateDistanceViaRoad]]<br />
<br />
[[Category:WD2 Lua]]<br />
[[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CalculateDistanceViaRoad&diff=1265CalculateDistanceViaRoad2020-10-27T18:36:42Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Retrieves the road distance between two entities in 3D world space.<br />
<br />
== Syntax ==<br />
<pre><br />
CalculateDistanceViaRoad(entityA, entityB, maxDistanceToRoad)<br />
</pre><br />
<br />
* '''entityA''' (string): [[EntityId|ID]] of the first entity<br />
* '''entityB''' (string): [[EntityId|ID]] of the second entity<br />
* '''maxDistanceToRoad''' (number): Maximum distance any of the specified entities can have to the road before the pathfinding request becomes invalid<br />
* '''Returns''' (number): Road distance between the specified entities in 3D world space<br />
<br />
== Related Pages ==<br />
* [[EntityId]]<br />
* [[GetDistance2D]]<br />
* [[GetDistance3D]]<br />
<br />
[[Category:WD2 Lua]]<br />
[[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=GetReticleHitEntity&diff=1264GetReticleHitEntity2020-10-27T18:36:30Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Retrieves the entity that is being aimed at. This only works when the reticle is on the screen.<br />
<br />
== Syntax ==<br />
<pre><br />
GetReticleHitEntity()<br />
</pre><br />
* '''Returns''' (string): [[EntityId|ID]] of the entity that is being aimed at<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[GetReticleHitLocation]]<br />
<br />
[[Category:WD2 Lua]]<br />
[[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=GetReticleHitLocation&diff=1263GetReticleHitLocation2020-10-27T18:36:20Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Retrieves the position where the player is currently aiming at. This returns 0, 0, 0 when the player is looking in the air.<br />
<br />
== Syntax ==<br />
<pre><br />
GetReticleHitLocation()<br />
</pre><br />
* '''Returns''' (table): Position of the reticle in world space<br />
<br />
== Related Pages ==<br />
* [[Entity]]<br />
* [[EntityId]]<br />
* [[GetReticleHitEntity]]<br />
<br />
[[Category:WD2 Lua]]<br />
[[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=GetEntityPosition&diff=1262GetEntityPosition2020-10-27T18:35:59Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
Retrieves a position from an [[Entity|entity]].<br />
<br />
== Syntax ==<br />
<pre><br />
GetEntityPosition(entityId, component)<br />
</pre><br />
<br />
* '''entityID''' (string): [[EntityId|ID]] of the target entity<br />
* '''component''' (number): Coordinate component to return (0 = x; 1 = y; 2 = z)<br />
* '''Returns''' (number): position component<br />
<br />
== Example ==<br />
<syntaxhighlight lang="lua"><br />
local lplayerId = GetLocalPlayerEntityId()<br />
if lplayerId ~= GetInvalidEntityId() then<br />
local x = GetEntityPosition(lplayerId, 0)<br />
local y = GetEntityPosition(lplayerId, 0)<br />
local z = GetEntityPosition(lplayerId, 0)<br />
<br />
print("Position: ", x, y, z)<br />
end<br />
</syntaxhighlight ><br />
<br />
== Related Pages ==<br />
* [[EntityId]]<br />
<br />
[[Category:WD2 Lua]]<br />
[[Category:WD2 Entity]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=WD2_ScriptHook:_Lua_Functions&diff=1257WD2 ScriptHook: Lua Functions2020-10-27T18:34:54Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
[[WD2 ScriptHook|ScriptHook]] registers custom [[Lua]] functions to the game's scripting system. These functions extend the [[WD2 Lua Functions|built-in Lua functions]] and [[WD2 Lua Classes|Game classes]] and provide additional functionality.<br />
<br />
==Generic==<br />
<br />
*[[include]]<br />
<br />
===Script===<br />
<br />
*[[WD2 ScriptHook: Script Table|Script()]]<br />
*[[ScriptHook.RegisterKeyHandler]]<br />
*[[ScriptHook.RegisterCommand]]<br />
<br />
===UI===<br />
<br />
*[[UI.SimpleMenu]]<br />
*[[UI.SimpleTextInput]]<br />
*[[ScriptHook.ShowNotification]]<br />
*[[ScriptHook.IsIngameUIEnabled]]<br />
<br />
==Game Functions==<br />
===Player===<br />
<br />
*[[ScriptHook.AddInventoryItem]]<br />
*[[ScriptHook.Teleport]]<br />
*[[ScriptHook.SetGraphicKitModel]]<br />
*[[ScriptHook.SetLocalPlayerNoclip]]<br />
*[[ScriptHook.HasLocalPlayerNoclip]]<br />
<br />
===Entity===<br />
<br />
*[[ScriptHook.SpawnEntityFromArchetypeHash]]<br />
*[[ScriptHook.GetArchetypeHashByEntityId]]<br />
*[[ScriptHook.GetGraphicKitModelByEntityId]]<br />
*[[ScriptHook.SetEntityGraphicKitModel]]<br />
*[[ScriptHook.GetAllEntities]]<br />
*[[ScriptHook.GetEntitiesInRange]]<br />
*[[ScriptHook.GetEntitiesWithComponent]]<br />
*[[ScriptHook.GetEntityComponents]]<br />
*[[ScriptHook.EntityHasComponent]]<br />
*[[ScriptHook.GetEntityClassName]]<br />
<br />
===Vehicle===<br />
<br />
*[[ScriptHook.RepairLocalPlayerVehicle]]<br />
<br />
===Felony===<br />
<br />
*[[ScriptHook.ToggleFelonySystem]]<br />
*[[ScriptHook.SetHeatLevel]]<br />
*[[ScriptHook.ClearHeatLevel]]<br />
<br />
===Game===<br />
<br />
*[[ScriptHook.SetProgression]]<br />
*[[ScriptHook.ToggleWorldSpawner]]<br />
*[[ScriptHook.IsWorldSpawnerEnabled]]<br />
*[[ScriptHook.ToggleWorldImpostor]]<br />
*[[ScriptHook.IsWorldImpostorEnabled]]<br />
<br />
===Camera===<br />
<br />
*[[ScriptHook.CameraSetCustom]]<br />
*[[ScriptHook.CameraReset]]<br />
*[[ScriptHook.SetLocalPlayerFreeCamera]]<br />
*[[ScriptHook.HasLocalPlayerFreeCamera]]<br />
<br />
==Utility==<br />
===timer===<br />
<br />
*[[timer.Create]]<br />
*[[timer.Simple]]<br />
*[[timer.Get]]<br />
*[[timer.Remove]]<br />
*[[timer.RemoveIfExists]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=WD2_ScriptHook:_Virtual_File_System&diff=1254WD2 ScriptHook: Virtual File System2020-10-27T18:34:17Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
The Virtual File System (''VFS'') can be used to override original game files, without the need to repack the .fat/dat archives. Any file you place inside ''data/vfs'' will override the game files, if the file type is supported.<br />
<br />
== File Support ==<br />
{| class="wikitable" width="100%"<br />
|-<br />
! File Extension !! Supported<br />
|-<br />
|.xml<br />
|rowspan="5"|Yes<br />
|-<br />
|.obj<br />
|-<br />
|.lua<br />
|-<br />
|.fcb<br />
|-<br />
|.ini<br />
|-<br />
|.bin<br />
|rowspan="8"|Untested<br />
|-<br />
|.vecres<br />
|-<br />
|.rml<br />
|-<br />
|.mskel<br />
|-<br />
|.dat<br />
|-<br />
|.fzl<br />
|-<br />
|.bnk<br />
|-<br />
|.loc<br />
|-<br />
|.xbg<br />
|rowspan="2"|Currently not supported.<br />
Support will be added in the near future.<br />
|-<br />
|.xbt<br />
|}<br />
<br />
== Contributing ==<br />
As you can see from the table above, we have not yet tested all file types. If you encourter any issues, or find a working file type, please contact us and help us to keep the list up-to-date. For more information, read [[Contributing]].<br />
<br />
== Related Pages ==<br />
* [[WD2 ScriptHook]]<br />
<br />
[[Category:WD2 ScriptHook]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=ScriptHook:_Console&diff=1249ScriptHook: Console2020-10-27T18:33:01Z<p>SpeckBomber: </p>
<hr />
<div>The in-game Console can be opened using '''F1''', unless you modify config.json to change the Key binding. It can be used to manage script loading/unloading and is extended by [[ScriptHook: Console Commands|custom Console Commands]] from [[ScriptHook: Script|Scripts]].<br />
<br />
[[File:Wd2sh console.jpeg|thumb]]<br />
== Built-in Commands ==<br />
==== help ====<br />
Print a full list of available commands, including [[ScriptHook: Console Commands|custom commands]] from [[ScriptHook:_Script|Script]].<br />
<br />
==== lua_run [code] ====<br />
Execute a Lua string.<br />
<br />
==== lua_dumpstack ====<br />
Print Lua stack.<br />
<br />
==== clear ====<br />
Clear console output.<br />
<br />
==== load [script] ====<br />
Load a [[ScriptHook:_Script|Script]] by name. The [script] parameter refers to the Script's directory name below ''data/scripts''.<br />
<br />
==== unload [script] ====<br />
Unload a [[ScriptHook:_Script|Script]].<br />
<br />
==== reload [script] ====<br />
Reload a [[ScriptHook:_Script|Script]].<br />
<br />
==== reloadall ====<br />
Reload all [[ScriptHook:_Script|Scripts]].<br />
<br />
== Trainer ==<br />
The [[ScriptHook: Trainer|Trainer]] provides console commands to interact with the game's world.<br />
<br />
== Related Pages ==<br />
* [[ScriptHook: Console Commands]]<br />
<br />
[[Category:ScriptHook]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=ScriptHook:_Console&diff=1248ScriptHook: Console2020-10-27T18:32:47Z<p>SpeckBomber: </p>
<hr />
<div>{{Page_WD2}}<br />
The in-game Console can be opened using '''F1''', unless you modify config.json to change the Key binding. It can be used to manage script loading/unloading and is extended by [[ScriptHook: Console Commands|custom Console Commands]] from [[ScriptHook: Script|Scripts]].<br />
<br />
[[File:Wd2sh console.jpeg|thumb]]<br />
== Built-in Commands ==<br />
==== help ====<br />
Print a full list of available commands, including [[ScriptHook: Console Commands|custom commands]] from [[ScriptHook:_Script|Script]].<br />
<br />
==== lua_run [code] ====<br />
Execute a Lua string.<br />
<br />
==== lua_dumpstack ====<br />
Print Lua stack.<br />
<br />
==== clear ====<br />
Clear console output.<br />
<br />
==== load [script] ====<br />
Load a [[ScriptHook:_Script|Script]] by name. The [script] parameter refers to the Script's directory name below ''data/scripts''.<br />
<br />
==== unload [script] ====<br />
Unload a [[ScriptHook:_Script|Script]].<br />
<br />
==== reload [script] ====<br />
Reload a [[ScriptHook:_Script|Script]].<br />
<br />
==== reloadall ====<br />
Reload all [[ScriptHook:_Script|Scripts]].<br />
<br />
== Trainer ==<br />
The [[ScriptHook: Trainer|Trainer]] provides console commands to interact with the game's world.<br />
<br />
== Related Pages ==<br />
* [[ScriptHook: Console Commands]]<br />
<br />
[[Category:ScriptHook]]</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=WD2_ScriptHook:_Instructions&diff=580WD2 ScriptHook: Instructions2020-05-08T19:42:38Z<p>SpeckBomber: </p>
<hr />
<div>__NOTOC__ <br />
==Installation==<br />
Please make sure you game has launched at least once (until the main menu is open) before installing ScriptHook.<br><br />
'''Current Version:''' {{WD2SH:CurrentVersion}} - See our [[WD2 ScriptHook: Changelog|Changelog]]{{warning|'''Multiplayer is disabled''' while ScriptHook is installed. If you want to play online again, please use the Uninstaller.}}<br />
<br />
====Installer====<br />
<br />
#'''[https://links.nomad-group.net/wd2sh-release Download Installer]'''<br />
#'''Run the installer''', Windows SmartScreen will show up - we do not have a signing certificate yet. Confirm running the executable.<br />
#Click '''Next''', please check and make sure that the correct path is filled in, you can find it ''<code>Uplay -> Watch_Dogs 2 -> Properties -> Local files</code>'' and ''<code>Steam -> right click on Watch_Dogs 2 -> Properties -> Tab "Local files" -> browse local files</code>''<br />
#'''Confirm''' the license agreement.<br />
#'''Done'''<br />
<br />
====ZIP-Archive====<br />
<br />
#[https://links.nomad-group.net/wd2sh-release-zip '''Download ZIP archive''']<br />
#'''Extract''' the contents into <code>Watch_Dogs2/bin/</code><br />
#Make sure that you have '''VC Redistributable 2015-2019 (x64)''' installed, you can download it [https://aka.ms/vs/16/release/vc_redist.x64.exe here]<br />
<br />
====Configuration====<br />
Check out [[WD2 ScriptHook: config.json|this guide]] to find out how you can configure ScriptHook.<br />
=====Uninstall=====<br />
Inside your game folder:<br />
<pre>Watch_Dogs2/bin/uninstall-scripthook.exe</pre><br />
<br />
==Supported Platforms & Versions==<br />
{| class="wikitable"<br />
!Platform<br />
!Supported<br />
!Minimum Version<br />
!Current Version<br />
|-<br />
|'''Steam'''<br />
|'''Yes'''<br />
|1.0.9<br />
|1.0.9<br />
|-<br />
|'''Epic Games'''<br />
| rowspan="2" |'''Yes'''<br />
|1.0.10 Normal<br />
| rowspan="2" |1.0.10 Normal<br />
|-<br />
|'''Uplay'''<br />
|1.0.9 Normal<br />
|-<br />
|'''Uplay Plus'''<br />
|'''Yes'''<br />
|1.0.10 Plus<br />
|1.0.10 Plus<br />
|-<br />
|''Pirated''<br />
| colspan="3" |''Unsupported''<br />
|}<br />
<br />
==Usage==<br />
The game can be '''started directly from Uplay or Steam'''. Once you are in the main menu, a Message Box should appear informing you that the initialization was successful. It also denotes that the '''multiplayer is disabled''' while ScriptHook is enabled.<br />
<br />
After loading the game, a notification should be visible on the top-right corner of the screen.<br />
You can use the following keys:<br />
<br />
*'''F4''' - Opens our [[WD2 ScriptHook: Trainer|Trainer]] menu<br />
*'''F1''' - Opens our [[WD2 ScriptHook: Console|Console]]<br />
<br />
====Menu Controls====<br />
{{WD2SH:MenuControls}}<br />
<br />
====Ingame Console====<br />
The [[WD2 ScriptHook: Console|Console]] is mostly targeted for developers and modders. Most of the functionality from the [[WD2 ScriptHook: Trainer|Trainer menu]] is also existing in the console. For a list of commands, type ‘help’.<br />
<br />
==Help==<br />
If you need any help, please do not hesitate to contact us and our community on our discord.</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=WD2_ScriptHook:_Instructions&diff=570WD2 ScriptHook: Instructions2020-04-26T11:04:31Z<p>SpeckBomber: add C++ 2019 x64 redist link</p>
<hr />
<div>__NOTOC__ <br />
==Installation==<br />
Please make sure you game has launched at least once (until the main menu is open) before installing ScriptHook.<br><br />
'''Current Version:''' {{WD2SH:CurrentVersion}} - See our [[WD2 ScriptHook: Changelog|Changelog]]{{warning|'''Multiplayer is disabled''' while ScriptHook is installed. If you want to play online again, please use the Uninstaller.}}<br />
<br />
====Installer====<br />
<br />
#'''[https://links.nomad-group.net/wd2sh-release Download Installer]'''<br />
#'''Run the installer''', Windows SmartScreen will show up - we do not have a signing certificate yet. Confirm running the executable.<br />
#Click '''Next''', please check and make sure that the correct path is filled in, you can find it ''<code>Uplay -> Watch_Dogs 2 -> Properties -> Local files</code>'' and ''<code>Steam -> right click on Watch_Dogs 2 -> Properties -> Tab "Local files" -> browse local files</code>''<br />
#'''Confirm''' the license agreement.<br />
#'''Done'''<br />
<br />
====ZIP-Archive====<br />
<br />
#[https://links.nomad-group.net/wd2sh-release-zip '''Download ZIP archive''']<br />
#'''Extract''' the contents into <code>Watch_Dogs2/bin/</code><br />
#Make sure that you have '''VC Redistributable 2019 (x64)''' installed, you can download it [https://aka.ms/vs/16/release/vc_redist.x64.exe here]<br />
<br />
====Configuration====<br />
Check out [[WD2 ScriptHook: config.json|this guide]] to find out how you can configure ScriptHook.<br />
=====Uninstall=====<br />
Inside your game folder:<br />
<pre>Watch_Dogs2/bin/uninstall-scripthook.exe</pre><br />
<br />
==Supported Platforms & Versions==<br />
{| class="wikitable"<br />
!Platform<br />
!Supported<br />
!Minimum Version<br />
!Current Version<br />
|-<br />
|'''Steam'''<br />
|'''Yes'''<br />
|1.0.9<br />
|1.0.9<br />
|-<br />
|'''Epic Games'''<br />
| rowspan="2" |'''Yes'''<br />
|1.0.10 Normal<br />
| rowspan="2" |1.0.10 Normal<br />
|-<br />
|'''Uplay'''<br />
|1.0.9 Normal<br />
|-<br />
|'''Uplay Plus'''<br />
|'''Yes'''<br />
|1.0.10 Plus<br />
|1.0.10 Plus<br />
|-<br />
|''Pirated''<br />
| colspan="3" |''Unsupported''<br />
|}<br />
<br />
==Usage==<br />
The game can be '''started directly from Uplay or Steam'''. Once you are in the main menu, a Message Box should appear informing you that the initialization was successful. It also denotes that the '''multiplayer is disabled''' while ScriptHook is enabled.<br />
<br />
After loading the game, a notification should be visible on the top-right corner of the screen.<br />
You can use the following keys:<br />
<br />
*'''F4''' - Opens our [[WD2 ScriptHook: Trainer|Trainer]] menu<br />
*'''F1''' - Opens our [[WD2 ScriptHook: Console|Console]]<br />
<br />
====Menu Controls====<br />
{{WD2SH:MenuControls}}<br />
<br />
====Ingame Console====<br />
The [[WD2 ScriptHook: Console|Console]] is mostly targeted for developers and modders. Most of the functionality from the [[WD2 ScriptHook: Trainer|Trainer menu]] is also existing in the console. For a list of commands, type ‘help’.<br />
<br />
==Help==<br />
If you need any help, please do not hesitate to contact us and our community on our discord.</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=WD2_ScriptHook:_Changelog&diff=569WD2 ScriptHook: Changelog2020-04-22T21:01:08Z<p>SpeckBomber: </p>
<hr />
<div><noinclude>'''Current Version: {{WD2SH:CurrentVersion}}'''</noinclude><br />
{| class="wikitable" width="100%"<br />
|-<br />
!Version<br />
!Build Number!!Release Date!!Changes<br />
|-<br />
!1.0.1<br />
|'''r127'''<br />
|22.04.20<br />
|<br />
Added a user-friendly Message Box for unsupported game versions<br /><br />
Installer: Added option to select distribution (Uplay, Uplay Plus, Steam)<br /><br />
Trainer: Moved Camera menu to its own category<br /><br />
Trainer: Added option to toggle "Ingame HUD"<br /><br />
Trainer: Added "Unlock all clothes", "Unlock all emotes" options (Inventory)<br /><br />
Lua: Added ScriptHook.IsIngameUIEnabled()<br /><br />
Fixed crashes that could occur in Noclip / Freecam<br /><br />
Fixed crash that was related to the world's boundary system<br /><br />
Fixed Noclip / Freecam not working properly after the Player dies<br /><br />
Fixed Noclip / Freecam keys A & D doing fly up / fly down<br /><br />
Fixed mouse not working Freecam<br /><br />
Fixed possible crashes in some custom Lua functions<br /><br />
Fixed possible crash in Discord integration<br /><br />
Removed leftover files inside data/vfs<br />
|-<br />
! rowspan="2" |'''1.0.0'''<br />
|'''r99'''||17.04.20||Removed some leftover assets<br />
|-<br />
|'''r97'''||17.04.20||'''Initial public release'''<br />
|}<br />
<noinclude><br />
==Related Pages==<br />
<br />
*[[WD2 ScriptHook]]<br />
<br />
[[Category:WD2 ScriptHook]]<br />
</noinclude></div>SpeckBomberhttps://db.nomad-group.net/index.php?title=Template:WD2SH:CurrentVersion&diff=568Template:WD2SH:CurrentVersion2020-04-22T20:59:09Z<p>SpeckBomber: </p>
<hr />
<div>1.0.1 (Build r127, 22.04.2020)</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=WD2_ScriptHook:_Troubleshooting&diff=530WD2 ScriptHook: Troubleshooting2020-04-18T13:36:09Z<p>SpeckBomber: added freqently asked questions</p>
<hr />
<div>This page contains troubleshooting advices and freqently asked questions.<br />
<br />
== Troubleshooting ==<br />
<br />
====EAC: "Untrusted File"====<br />
[[File:WD2-EAC-launch-arg-uplay.png|350px|thumb|right]]<br />
In some cases, Easy Anti Cheat messages (“untrusted file” or similar) may appear. <br />
If this happens, please add the following command line argument in Uplay or steam: '''-eac_launcher'''<br />
<br />
''Uplay application -> Watch_Dogs 2 -> Properties -> Command Line Arguments''<br />
<br />
''Steam application -> right click on Watch_Dogs 2 -> Properties -> set launch options''<br />
<br />
=== Game crash on Startup ===<br />
Please try to install the [https://aka.ms/vs/16/release/vc_redist.x64.exe VC Redistributables (x64)].<br />
<br /><br />
<br />
== Frequently asked questions ==<br />
Q: Where do I find the game path for Steam or Uplay? A: This is answered [[WD2 ScriptHook: Instructions#Installation|here]]<br />
<br />
Q: Can I play online with it? A: No. If you want to play online again, you have to uninstall the mod. Simply use our uninstaller which is located in your game folder<br />
Watch_Dogs2/bin/uninstall-scripthook.exe<br />
Q: Which game versions and plattforms are supported? A: We only support the latest game versions on PC. For Uplay version 1.0.10 and for steam version 1.0.9. PS4 and Xbox One is not supported.</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=WD2_ScriptHook:_Instructions&diff=529WD2 ScriptHook: Instructions2020-04-18T13:19:52Z<p>SpeckBomber: added steam game location</p>
<hr />
<div>==Installation==<br />
Please make sure you game has launched at least once (until the main menu is open) before installing ScriptHook.<br />
<br />
#'''[https://links.nomad-group.net/wd2sh-release Download]'''<br />
#'''Run the installer''', Windows SmartScreen will show up - we do not have a signing certificate yet. Confirm running the executable.Click '''Next''', please check and make sure that the correct path is filled in, you can find it in ''Uplay -> Watch_Dogs 2 -> Properties -> Local files. Steam -> right click on Watch_Dogs 2 -> Properties -> Tab "Local files" -> browse local files''<br />
#'''Confirm''' the license agreement.<br />
#'''Done'''<br />
<br />
Check out [[WD2 ScriptHook: config.json|this guide]] to find out how you can configure ScriptHook.<br />
<br />
{{warning|'''Multiplayer is disabled''' while ScriptHook is installed. If you want to play online again, please use the uninstaller.}}<br />
===Uninstall===<br />
Inside your game folder:<br />
<pre>Watch_Dogs2/bin/uninstall-scripthook.exe</pre><br />
<br />
==Usage==<br />
The game can be '''started directly from Uplay or Steam'''. Once you are in the main menu, a Message Box should appear informing you that the initialization was successful. It also denotes that the '''multiplayer is disabled''' while ScriptHook is enabled.<br />
<br />
After loading the game, a notification should be visible on the top-right corner of the screen.<br />
You can use the following keys:<br />
<br />
*'''F4''' - Opens our [[WD2 ScriptHook: Trainer|Trainer]] menu<br />
*'''F1''' - Opens our [[WD2 ScriptHook: Console|Console]]<br />
<br />
==Menu Controls==<br />
{{WD2SH:MenuControls}}<br />
<br />
==Ingame Console==<br />
The [[WD2 ScriptHook: Console|Console]] is mostly targeted for developers and modders. Most of the functionality from the [[WD2 ScriptHook: Trainer|Trainer menu]] is also existing in the console. For a list of commands, type ‘help’.<br />
<br />
==Help==<br />
If you need any help, please do not hesitate to contact us and our community on our discord.</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CDominoBoxResource&diff=359CDominoBoxResource2020-04-15T14:31:43Z<p>SpeckBomber: Created page with "<noinclude>Use CDominoBoxResource_GetInstance to get an instance of '''CDominoBoxResource'''. === Methods ===</noinclude> * CDominoBoxResource:LoadResource * CDomin..."</p>
<hr />
<div><noinclude>Use [[CDominoBoxResource_GetInstance]] to get an instance of '''CDominoBoxResource'''.<br />
<br />
=== Methods ===</noinclude><br />
* [[CDominoBoxResource:LoadResource]]<br />
* [[CDominoBoxResource:RegisterBox]]<br />
* [[CDominoBoxResource:RegisterGlobals]]<br />
* [[CDominoBoxResource:RegisterLibrary]]<br />
<noinclude><br />
{{WD2SH:GameClassFooter}}<br />
</noinclude></div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CSequenceManager&diff=356CSequenceManager2020-04-15T14:30:27Z<p>SpeckBomber: Created page with "<noinclude>Use CSequenceManager_GetInstance to get an instance of '''CSequenceManager'''. === Methods ===</noinclude> * CSequenceManager:AddDominoEntity * CSequence..."</p>
<hr />
<div><noinclude>Use [[CSequenceManager_GetInstance]] to get an instance of '''CSequenceManager'''.<br />
<br />
=== Methods ===</noinclude><br />
* [[CSequenceManager:AddDominoEntity]]<br />
* [[CSequenceManager:ClearDominoEntityPool]]<br />
* [[CSequenceManager:DominoForceStopSequence]]<br />
* [[CSequenceManager:DominoGetEntityAtAnchor]]<br />
* [[CSequenceManager:DominoGetSequenceSyncPointName]]<br />
* [[CSequenceManager:DominoLoopSequence]]<br />
* [[CSequenceManager:DominoModifySequenceEntry]]<br />
* [[CSequenceManager:DominoPauseSequence]]<br />
* [[CSequenceManager:DominoResumeSequence]]<br />
* [[CSequenceManager:DominoSkipSequence]]<br />
* [[CSequenceManager:DominoStartAtSyncPoint]]<br />
* [[CSequenceManager:DominoStartAtSyncPointWithMetaId]]<br />
* [[CSequenceManager:DominoStartSequence]]<br />
* [[CSequenceManager:DominoStartSequenceFromBeginning]]<br />
* [[CSequenceManager:DominoStartSequenceFromBeginningWithMetaId]]<br />
* [[CSequenceManager:DominoStartSequenceWithMetaId]]<br />
* [[CSequenceManager:DominoStopSequence]]<br />
* [[CSequenceManager:GetSequenceDominoName]]<br />
* [[CSequenceManager:StartMetaSequence]]<br />
* [[CSequenceManager:StopMetaSequence]]<br />
* [[CSequenceManager:ActivateLog]]<br />
* [[CSequenceManager:AnimStartRecording]]<br />
* [[CSequenceManager:DeActivateLog]]<br />
* [[CSequenceManager:Exec]]<br />
* [[CSequenceManager:GetLocalPlayerId]]<br />
* [[CSequenceManager:RTDefoliant]]<br />
* [[CSequenceManager:RTGenesis]]<br />
* [[CSequenceManager:RTRegen]]<br />
* [[CSequenceManager:RTSetWindForce]]<br />
* [[CSequenceManager:RunBatch]]<br />
* [[CSequenceManager:SetMaxFrameRate]]<br />
* [[CSequenceManager:__nativedata]]<br />
<noinclude><br />
{{WD2SH:GameClassFooter}}<br />
</noinclude></div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CProximityManager_GetInstance&diff=354CProximityManager GetInstance2020-04-15T14:25:52Z<p>SpeckBomber: Created page with "{{WD2SH:GameClass_GetInstance|name=CProximityManager}}"</p>
<hr />
<div>{{WD2SH:GameClass_GetInstance|name=CProximityManager}}</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CProximityManager&diff=353CProximityManager2020-04-15T14:25:35Z<p>SpeckBomber: Created page with "<noinclude>Use CProximityManager_GetInstance to get an instance of '''CProximityManager'''. === Methods ===</noinclude> * CProximityManager:AddLuaProximityEntry * C..."</p>
<hr />
<div><noinclude>Use [[CProximityManager_GetInstance]] to get an instance of '''CProximityManager'''.<br />
<br />
=== Methods ===</noinclude><br />
* [[CProximityManager:AddLuaProximityEntry]]<br />
* [[CProximityManager:RemoveProximityEntry]]<br />
<noinclude><br />
{{WD2SH:GameClassFooter}}<br />
</noinclude></div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CMusicManager_GetInstance&diff=351CMusicManager GetInstance2020-04-15T14:23:49Z<p>SpeckBomber: Created page with "{{WD2SH:GameClass_GetInstance|name=CMusicManager}}"</p>
<hr />
<div>{{WD2SH:GameClass_GetInstance|name=CMusicManager}}</div>SpeckBomberhttps://db.nomad-group.net/index.php?title=CMusicManager&diff=350CMusicManager2020-04-15T14:23:33Z<p>SpeckBomber: Created page with "<noinclude>Use CMusicManager_GetInstance to get an instance of '''CMusicManager'''. === Methods ===</noinclude> * CPlayMusicFromLua * CStopMusicFromLua <noinclude..."</p>
<hr />
<div><noinclude>Use [[CMusicManager_GetInstance]] to get an instance of '''CMusicManager'''.<br />
<br />
=== Methods ===</noinclude><br />
* [[CPlayMusicFromLua]]<br />
* [[CStopMusicFromLua]]<br />
<noinclude><br />
{{WD2SH:GameClassFooter}}<br />
</noinclude></div>SpeckBomber