@kcds/types 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/client-api.d.ts +4 -2
- package/client.d.ts +1 -1
- package/package.json +2 -2
- package/server-api.d.ts +92 -28
- package/server.d.ts +1 -1
- package/shared.d.ts +1 -1
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
TypeScript declarations of the KCDS SDK, for the server and client scripts of KCDS resources. KCDS is a
|
|
4
4
|
multiplayer mod for Kingdom Come: Deliverance II.
|
|
5
5
|
|
|
6
|
-
This version declares the SDK of KCDS 1.0.
|
|
6
|
+
This version declares the SDK of KCDS 1.0.7. Install the version your server runs:
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
|
-
npm install --save-dev @kcds/types@1.0.
|
|
9
|
+
npm install --save-dev @kcds/types@1.0.7
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
A KCDS hotfix x.y.z.w is the package version x.y.z-hotfix.w.
|
package/client-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// KCDS SDK 1.0.
|
|
1
|
+
// KCDS SDK 1.0.7: generated from the SDK's own API, as https://kcdsynced.com/docs shows it.
|
|
2
2
|
// Do not edit: regenerate it from the release instead.
|
|
3
3
|
|
|
4
4
|
/// <reference path="./shared.d.ts" />
|
|
@@ -2602,7 +2602,9 @@ declare namespace KcdsTypes {
|
|
|
2602
2602
|
* though others still do. Yaw is in degrees from +Y, rising to the left, and pitch is in degrees,
|
|
2603
2603
|
* positive up. The server decides who can fly with Player.noclipAllowed, and for others, enable()
|
|
2604
2604
|
* returns 'notAllowed'. Events are noclipChanged(active, reason), with the reason 'script',
|
|
2605
|
-
* 'sessionOver', 'viewLost' or '
|
|
2605
|
+
* 'sessionOver', 'viewLost', 'notAllowed' or 'mounted', and noclipAllowedChanged(allowed). A
|
|
2606
|
+
* 'body' flight does not start, and one that runs ends with 'mounted', while the player rides a
|
|
2607
|
+
* horse: the body stays in the saddle. A 'camera' flight works on horseback.
|
|
2606
2608
|
*/
|
|
2607
2609
|
class NoClip {
|
|
2608
2610
|
constructor(...args: any[]);
|
package/client.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kcds/types",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "TypeScript declarations of the KCDS 1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"description": "TypeScript declarations of the KCDS 1.0.7 SDK, for the server and client scripts of KCDS resources.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kcds",
|
|
7
7
|
"kingdom-come-deliverance-2",
|
package/server-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// KCDS SDK 1.0.
|
|
1
|
+
// KCDS SDK 1.0.7: generated from the SDK's own API, as https://kcdsynced.com/docs shows it.
|
|
2
2
|
// Do not edit: regenerate it from the release instead.
|
|
3
3
|
|
|
4
4
|
/// <reference path="./shared.d.ts" />
|
|
@@ -362,8 +362,13 @@ declare namespace KcdsTypes {
|
|
|
362
362
|
* level, and they stand at `position`, or where the level puts a new player. From then on nobody
|
|
363
363
|
* on the map they left sees them. playerMapChanged fires once they stand there. On their current
|
|
364
364
|
* map it only places them at `position`. Throws a TypeError for a map the server does not run or a
|
|
365
|
-
* position that is not finite. Returns true when the trip was ordered
|
|
366
|
-
*
|
|
365
|
+
* position that is not finite. Returns true when the trip was ordered, and false for the Kingdom
|
|
366
|
+
* Come: Deliverance map ('kcd1_rataje') when the KCDS Master did not check that the player owns
|
|
367
|
+
* that game (their game loads that map from their own copy of it), and for 'klaster' (the Sedlec
|
|
368
|
+
* monastery) when the player's licence does not list its DLC, Mysteria Ecclesiae (entitlements):
|
|
369
|
+
* no script can send anyone else there. A server whose first map is one of them admits only
|
|
370
|
+
* players who own it. @param map The map's name, such as 'kutnohorsko'. @param position Where they
|
|
371
|
+
* stand on that map, { x, y, z }; optional.
|
|
367
372
|
*/
|
|
368
373
|
setMap(map: any, position: any): boolean;
|
|
369
374
|
/**
|
|
@@ -570,6 +575,17 @@ declare namespace KcdsTypes {
|
|
|
570
575
|
* Whether they see the combat marker now: their own setting, or else the server's.
|
|
571
576
|
*/
|
|
572
577
|
readonly combatMarker: any;
|
|
578
|
+
/**
|
|
579
|
+
* Moves the KCDS watermark to a corner of this player's screen alone. Overrides
|
|
580
|
+
* Watermark.setCorner for them until null gives them the server's corner again. The watermark
|
|
581
|
+
* cannot be turned off. Throws a TypeError for any other value. @param corner 'bottomLeft',
|
|
582
|
+
* 'bottomRight', 'topRight', 'topLeft', or null for the server's corner.
|
|
583
|
+
*/
|
|
584
|
+
setWatermarkCorner(corner: any): void;
|
|
585
|
+
/**
|
|
586
|
+
* The corner their watermark stands in now: their own corner, or else the server's.
|
|
587
|
+
*/
|
|
588
|
+
readonly watermarkCorner: string;
|
|
573
589
|
/**
|
|
574
590
|
* Whistles for their horse like the game's companion key, so it comes and nearby players hear it,
|
|
575
591
|
* firing playerWhistle. Returns true when the order goes out, and false if they are not yet in the
|
|
@@ -811,17 +827,18 @@ declare namespace KcdsTypes {
|
|
|
811
827
|
* its own. It takes the same as Horse.equip. What they wear in the same place on the body comes
|
|
812
828
|
* off and stays in the inventory. A weapon becomes the weapon of their selected weapon set, a bow
|
|
813
829
|
* or crossbow with the arrows or bolts they have on, and arrows or bolts go into the set of their
|
|
814
|
-
* bow, as the game's own Equip does; the weapon that was there stays in the inventory.
|
|
815
|
-
*
|
|
816
|
-
*
|
|
817
|
-
*
|
|
818
|
-
*
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
*
|
|
822
|
-
*
|
|
823
|
-
*
|
|
824
|
-
* description, data } and
|
|
830
|
+
* bow, as the game's own Equip does; the weapon that was there stays in the inventory. A torch
|
|
831
|
+
* ('torch_weapon') goes into its own slot, ready for the torch key. One playerInventoryChanged
|
|
832
|
+
* follows, with the reason 'equip'. Throws a TypeError for an item a person does not wear or hold,
|
|
833
|
+
* or metadata Inventory.add refuses. Returns { ok, code, revision, items } as Inventory.add does.
|
|
834
|
+
* The code is alreadyWorn if they wear the same piece already, itemLimit or inventoryCapacity if
|
|
835
|
+
* there is no room, and inventoryUnavailable if they have no inventory. It is invalidEquipment if
|
|
836
|
+
* the piece cannot go on with what stays on; then `conflicts` says why. For example, { rule:
|
|
837
|
+
* 'needsFilled', slot: 'head_helmet', needs: 'head_coif_padded' } means a helmet needs a mail coif
|
|
838
|
+
* under it, and plate needs a padded piece. 'needsEmpty' names a slot that must be empty first.
|
|
839
|
+
* @param item The item class's name or GUID, or { item, metadata } with metadata as Inventory.add
|
|
840
|
+
* takes it: quality, health or condition, onEquipBuffs, custom { name, description, data } and
|
|
841
|
+
* transient.
|
|
825
842
|
*/
|
|
826
843
|
equip(item: any): { ok: any; code: any; revision: any; items: any; conflicts?: any };
|
|
827
844
|
/**
|
|
@@ -1351,6 +1368,7 @@ declare namespace KcdsTypes {
|
|
|
1351
1368
|
* accounts on one connection. Several players behind a shared NAT have the same address.
|
|
1352
1369
|
*/
|
|
1353
1370
|
readonly ip: any;
|
|
1371
|
+
readonly apps: any;
|
|
1354
1372
|
/**
|
|
1355
1373
|
* Server only. Their round-trip time in milliseconds, smoothed by the transport and refreshed
|
|
1356
1374
|
* every 2 seconds, or 0 before the first measurement.
|
|
@@ -1382,6 +1400,22 @@ declare namespace KcdsTypes {
|
|
|
1382
1400
|
* 'steam', 'epic', 'xbox', 'gog', 'discord', 'hardware' or 'ip'.
|
|
1383
1401
|
*/
|
|
1384
1402
|
getIdentifier(kind: any): string;
|
|
1403
|
+
/**
|
|
1404
|
+
* Server only. What the player owns beyond the game, read-only, from the KCDS Master's licence
|
|
1405
|
+
* pass: { kcd2Dlc }, the Kingdom Come: Deliverance II DLCs their store account owns:
|
|
1406
|
+
* 'quest_for_valor', 'huntsman', 'season_pass_shields', 'bandit_camps', 'forge_tycoon' and
|
|
1407
|
+
* 'mysteria_ecclesiae' (the Sedlec monastery map, klaster). Today only a Steam licence lists DLCs;
|
|
1408
|
+
* other stores give an empty list. No script can grant one. A resource decides what a player
|
|
1409
|
+
* without a DLC gets; the server itself only keeps klaster for owners of Mysteria Ecclesiae
|
|
1410
|
+
* (setMap).
|
|
1411
|
+
*/
|
|
1412
|
+
readonly entitlements: { kcd2Dlc: string[] };
|
|
1413
|
+
/**
|
|
1414
|
+
* Server only. Whether the player owns `name`, from the KCDS Master's licence pass (see
|
|
1415
|
+
* entitlements). Throws a TypeError when `name` is not a string. @param name 'kcd2_dlc:<dlc>',
|
|
1416
|
+
* such as 'kcd2_dlc:mysteria_ecclesiae'.
|
|
1417
|
+
*/
|
|
1418
|
+
hasEntitlement(name: any): boolean;
|
|
1385
1419
|
/**
|
|
1386
1420
|
* Their body's look, as their game last published it.
|
|
1387
1421
|
*/
|
|
@@ -4665,7 +4699,9 @@ declare namespace KcdsTypes {
|
|
|
4665
4699
|
* level's designers named it, which tells apart chests that share a model), and lockLevel is the
|
|
4666
4700
|
* level's, 0 to 1, or null where the game makes one up on reset. They belong to the game, with
|
|
4667
4701
|
* each player's game filling them as the level says, until Stash.adopt hands one to the server.
|
|
4668
|
-
*
|
|
4702
|
+
* The KCD1 map's (kcd1_rataje) are listed once the owner writes them from their own KCD1 into the
|
|
4703
|
+
* resources folder with Dev/tools/stash/build_kcd1_chests.py (level-chests.json). @param position
|
|
4704
|
+
* Optional: where to look from. @param radius Optional: metres, default 20.
|
|
4669
4705
|
*/
|
|
4670
4706
|
static levelChests(position?: any, radius?: any): { placedGuid: any; sourceName: any; position: any; model: any; lockedAtBoot: any; canBePicked: any; lockLevel: any }[];
|
|
4671
4707
|
/**
|
|
@@ -4949,11 +4985,12 @@ declare namespace KcdsTypes {
|
|
|
4949
4985
|
/**
|
|
4950
4986
|
* Applies an edit and returns it. @param definition `kind`, 'brush' by default, 'entity' or
|
|
4951
4987
|
* 'layer'; `name`, a brush's mesh path, objects/...cgf, or a layer's full name as World
|
|
4952
|
-
* Architect's story_layers lists it
|
|
4953
|
-
*
|
|
4954
|
-
*
|
|
4955
|
-
*
|
|
4956
|
-
*
|
|
4988
|
+
* Architect's story_layers lists it (on the Kingdom Come: Deliverance map, kcd1_rataje, as that
|
|
4989
|
+
* game's level names it, its GUID in braces); `guid`, an entity's 16 hex digits, dashes allowed;
|
|
4990
|
+
* `at`, where the level placed it; `hidden`; `model`, a props catalogue mesh to stand in its
|
|
4991
|
+
* place, as for LevelEdit.model; and to move it, `position`, `rotation` (a Quaternion, [x, y, z,
|
|
4992
|
+
* w] or Euler degrees { x, y, z }) and `scale` (a number or Vector3, 0.01 to 100). @param
|
|
4993
|
+
* dimension Optional: limits it to this dimension. By default it applies in all.
|
|
4957
4994
|
*/
|
|
4958
4995
|
static apply(definition?: LevelEditDefinition, dimension?: any): LevelEdit;
|
|
4959
4996
|
/**
|
|
@@ -4982,7 +5019,11 @@ declare namespace KcdsTypes {
|
|
|
4982
5019
|
* 'brush', 'entity' or 'layer'. A layer edit switches one of the level's story layers, the state a
|
|
4983
5020
|
* place is in (a yard before or after a siege, a forge broken or rebuilt): `hidden` turns it off,
|
|
4984
5021
|
* otherwise it is on. It needs no `at`, moves nothing and takes no `model`; restoring it gives the
|
|
4985
|
-
* layer back as the level has it.
|
|
5022
|
+
* layer back as the level has it. On the Kingdom Come: Deliverance map the layers start as a new
|
|
5023
|
+
* game of that game has them (farms not burnt, Talmberk's fort as it was, the Vranik camp in its
|
|
5024
|
+
* first state, Pribyslavitz in ruins); a farm burnt is its layer state1 on and state0 off. There a
|
|
5025
|
+
* layer edit switches all of the layer: its buildings and plants (with their collision) and its
|
|
5026
|
+
* doors, chests, beds, lights and fires.
|
|
4986
5027
|
*/
|
|
4987
5028
|
readonly kind: string;
|
|
4988
5029
|
/**
|
|
@@ -6446,12 +6487,12 @@ declare namespace KcdsTypes {
|
|
|
6446
6487
|
class Dice {
|
|
6447
6488
|
constructor(...args: any[]);
|
|
6448
6489
|
/**
|
|
6449
|
-
* The tables
|
|
6450
|
-
* where `placed` is false for the level's own. `chairs` gives
|
|
6451
|
-
* sitFrom }. `player` is the holder's id or null. `sitFrom`, {
|
|
6452
|
-
* where the game's sit-down begins, so a script can walk an NPC
|
|
6453
|
-
* jump. A table placed by a script has an empty list. Tables
|
|
6454
|
-
* dimensions are not listed.
|
|
6490
|
+
* The tables on the server's maps (World.maps; `level` says which), each { id, behavior, level,
|
|
6491
|
+
* position, seats, chairs, placed }, where `placed` is false for the level's own. `chairs` gives
|
|
6492
|
+
* each chair's { position, player, sitFrom }. `player` is the holder's id or null. `sitFrom`, {
|
|
6493
|
+
* position, yaw in degrees }, is where the game's sit-down begins, so a script can walk an NPC
|
|
6494
|
+
* there and have it sit without a jump. A table placed by a script has an empty list. Tables
|
|
6495
|
+
* SmartObject.remove took from all dimensions are not listed.
|
|
6455
6496
|
*/
|
|
6456
6497
|
static tables(): any[];
|
|
6457
6498
|
/**
|
|
@@ -7209,6 +7250,26 @@ declare namespace KcdsTypes {
|
|
|
7209
7250
|
static setEnabled(enabled: any): void;
|
|
7210
7251
|
}
|
|
7211
7252
|
|
|
7253
|
+
/**
|
|
7254
|
+
* Moves the KCDS watermark, the mark and server line every player sees in a corner of the screen
|
|
7255
|
+
* while in the world, to another corner. The watermark itself cannot be turned off or hidden. The
|
|
7256
|
+
* voice chat indicator always stands beside it, toward the middle of the screen.
|
|
7257
|
+
*/
|
|
7258
|
+
class Watermark {
|
|
7259
|
+
constructor(...args: any[]);
|
|
7260
|
+
/**
|
|
7261
|
+
* The corner every player's watermark stands in: 'bottomLeft' (the default), 'bottomRight',
|
|
7262
|
+
* 'topRight' or 'topLeft'.
|
|
7263
|
+
*/
|
|
7264
|
+
static readonly corner: string;
|
|
7265
|
+
/**
|
|
7266
|
+
* Moves the watermark to a corner for all players. A player with their own corner
|
|
7267
|
+
* (player.setWatermarkCorner) keeps it. Throws a TypeError for any other value. @param corner
|
|
7268
|
+
* 'bottomLeft', 'bottomRight', 'topRight' or 'topLeft'.
|
|
7269
|
+
*/
|
|
7270
|
+
static setCorner(corner: any): void;
|
|
7271
|
+
}
|
|
7272
|
+
|
|
7212
7273
|
/**
|
|
7213
7274
|
* Scripted camera shots. The server puts one player's camera at a point, aimed by a rotation or at
|
|
7214
7275
|
* a point, with a field of view, moving there over some seconds. Ending a shot returns the
|
|
@@ -7498,7 +7559,8 @@ declare namespace KcdsTypes {
|
|
|
7498
7559
|
*/
|
|
7499
7560
|
diceMatchStarting: (first: any, second: any, table: any, options?: any) => any;
|
|
7500
7561
|
/**
|
|
7501
|
-
* A player held dice and continued or passed.
|
|
7562
|
+
* A player held dice and continued or passed. A pass may hold no dice of the last throw (heldMask
|
|
7563
|
+
* 0, points 0): the turn ends with its points so far, none on its first throw.
|
|
7502
7564
|
*/
|
|
7503
7565
|
diceMove: (event: any) => any;
|
|
7504
7566
|
/**
|
|
@@ -8515,6 +8577,7 @@ declare const kcds: {
|
|
|
8515
8577
|
readonly TabletopPiece: typeof KcdsTypes.TabletopPiece;
|
|
8516
8578
|
readonly Trees: typeof KcdsTypes.Trees;
|
|
8517
8579
|
readonly Vfx: typeof KcdsTypes.Vfx;
|
|
8580
|
+
readonly Watermark: typeof KcdsTypes.Watermark;
|
|
8518
8581
|
readonly World: typeof KcdsTypes.World;
|
|
8519
8582
|
readonly WorldResource: typeof KcdsTypes.WorldResource;
|
|
8520
8583
|
};
|
|
@@ -8607,6 +8670,7 @@ declare namespace kcds {
|
|
|
8607
8670
|
type TabletopPiece = KcdsTypes.TabletopPiece;
|
|
8608
8671
|
type Trees = KcdsTypes.Trees;
|
|
8609
8672
|
type Vfx = KcdsTypes.Vfx;
|
|
8673
|
+
type Watermark = KcdsTypes.Watermark;
|
|
8610
8674
|
type World = KcdsTypes.World;
|
|
8611
8675
|
type WorldResource = KcdsTypes.WorldResource;
|
|
8612
8676
|
}
|
package/server.d.ts
CHANGED
package/shared.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// KCDS SDK 1.0.
|
|
1
|
+
// KCDS SDK 1.0.7: generated from the SDK's own API, as https://kcdsynced.com/docs shows it.
|
|
2
2
|
// Do not edit: regenerate it from the release instead.
|
|
3
3
|
|
|
4
4
|
/** The resource's log (the server's console, the client's log), one line per call. */
|