s2cfgtojson 3.13.1 → 3.15.0

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.
Files changed (3) hide show
  1. package/enums.mts +5 -0
  2. package/package.json +1 -1
  3. package/types.mts +105 -150
package/enums.mts CHANGED
@@ -1,3 +1,5 @@
1
+ // noinspection JSUnusedGlobalSymbols
2
+
1
3
  export type EAIConstraintType = `EAIConstraintType::${"PrepareForEmission"}`;
2
4
 
3
5
  export type EAIMovementPose = `EAIMovementPose::${"Stand"}`;
@@ -1684,6 +1686,9 @@ export type ERequiredSquadMembers = `ERequiredSquadMembers::${
1684
1686
 
1685
1687
  export type ESaveType = `ESaveType::${"Auto" | "Manual" | "Quest" | "Quick"}`;
1686
1688
 
1689
+ export type ESaveSubType =
1690
+ `ESaveSubType::${"Auto" | "Manual" | "Quest" | "Quick"}`;
1691
+
1687
1692
  export type EScenarioBranch = `EScenarioBranch::${
1688
1693
  | "Noon"
1689
1694
  | "Skif"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "s2cfgtojson",
3
- "version": "3.13.1",
3
+ "version": "3.15.0",
4
4
  "description": "Converts Stalker 2 Cfg file into POJOs",
5
5
  "keywords": [
6
6
  "stalker",
package/types.mts CHANGED
@@ -28,7 +28,6 @@ import {
28
28
  EAgentType,
29
29
  EAgentArchetype,
30
30
  EEmotionalFaceMasks,
31
- EAimAssistPresetType,
32
31
  EEffectType,
33
32
  EDuplicateResolveType,
34
33
  EBeneficial,
@@ -108,6 +107,9 @@ import {
108
107
  ESaveType,
109
108
  EModifyAbilitySequenceQuestNodeMode,
110
109
  EHealingType,
110
+ ELairType,
111
+ EAimAssistPresetType,
112
+ ESaveSubType,
111
113
  } from "./enums.mts";
112
114
 
113
115
  import { Struct } from "./Struct.mjs";
@@ -396,9 +398,7 @@ export type ALifeDirectorScenarioPrototype = GetStructType<{
396
398
  ScenarioGroups: {
397
399
  [key: string]: {
398
400
  SID: string;
399
- ScenarioSIDs: {
400
- [key: string]: { ScenarioWeight: number };
401
- };
401
+ ScenarioSIDs: { [key: string]: { ScenarioWeight: number } };
402
402
  SpawnDelayMin: number;
403
403
  SpawnDelayMax: number;
404
404
  PostSpawnDirectorTimeoutMin: number;
@@ -478,10 +478,7 @@ interface IDialogPrototype {
478
478
  TargetLocation: string;
479
479
  SelfLocation: string;
480
480
  RotationTime: number;
481
- Actions: {
482
- DialogAction: EDialogAction;
483
- DialogActionParam: Param;
484
- }[];
481
+ Actions: { DialogAction: EDialogAction; DialogActionParam: Param }[];
485
482
  }
486
483
 
487
484
  export type DialogPrototype = GetStructType<IDialogPrototype>;
@@ -534,6 +531,33 @@ export type DifficultyPrototype = GetStructType<{
534
531
  AccumulatedDamageReductionIncludesHealedHealth: boolean;
535
532
  CorpseSmartLoot: { GeneralNPC: string };
536
533
  DefaultAimAssistPresetType: EAimAssistPresetType;
534
+ TotalSaveLimits: { SubType: ESaveSubType; Limit: number }[];
535
+ NightVisionGoggles_Cost: number;
536
+ AllowedSaveTypes: ESaveType[];
537
+ AutosaveAfterQuests: string[];
538
+ bShouldDisableCrosshair: boolean;
539
+ bShouldDisableCompass: boolean;
540
+ bShouldDisableStashMarkers: boolean;
541
+ bShouldDisableDeadBodyMarkers: boolean;
542
+ AdditionalMechanicsEffects: string[];
543
+ PlayerWeapon_HeadshotMultiplier: number;
544
+ ShowWarningPopup: boolean;
545
+ BlockSettings: boolean;
546
+ AgentCooldownMultipliers: {
547
+ AgentPrototypeSID: string;
548
+ CooldownMultipliers: {
549
+ CooldownTag: string;
550
+ CooldownMultiplier: number;
551
+ }[];
552
+ }[];
553
+ Weapon_JammingMultiplier: number;
554
+ PsyPhantomNPCOverrides: {
555
+ OverrideEffectPrototypeSID: string;
556
+ PSYDelayBeforeNewSpawnCycleModifier: number;
557
+ PsyPhantomNPCCountMultiplier: number;
558
+ bPsyNPCApplyBleeding: boolean;
559
+ PsyNPCDurabilityDamageMultiplier: number;
560
+ }[];
537
561
  }>;
538
562
 
539
563
  export type EffectPrototype = GetStructType<{
@@ -661,6 +685,7 @@ export type Gamepass_ItemGenerator = GetStructType<{
661
685
  SID: string;
662
686
  ItemGenerator: ItemGenerator[];
663
687
  }>;
688
+
664
689
  export type _QuestReward = GetStructType<{
665
690
  SID: string;
666
691
  MoneyGenerator: { MinCount: number; MaxCount: number };
@@ -1379,10 +1404,7 @@ export type QuestNodePrototype = GetStructType<{
1379
1404
  BrokenGameDataFilter: EBrokenGameDataFilter;
1380
1405
  Launchers: {
1381
1406
  Excluding: boolean;
1382
- Connections: {
1383
- SID: string;
1384
- Name: string;
1385
- }[];
1407
+ Connections: { SID: string; Name: string }[];
1386
1408
  }[];
1387
1409
  ExcludeAllNodesInContainer: boolean;
1388
1410
  TargetQuestGuid: string;
@@ -1859,7 +1881,7 @@ interface IArtifactPrototype extends IItemPrototype {
1859
1881
  MaxCharge: number;
1860
1882
  ChargeThreshold: number;
1861
1883
  ChargingSpeed: number;
1862
- bUseCharge: boolean; // defines whether damage deflection should be constant or proportional to current artifact charge level;
1884
+ bUseCharge: boolean;
1863
1885
  AnomalyDamageDeflections: {
1864
1886
  AnomalyType: EAnomalyType;
1865
1887
  ChargeQuantity: number;
@@ -1884,12 +1906,8 @@ interface IArmorPrototype extends IItemPrototype {
1884
1906
  Protection: Protection;
1885
1907
  ProtectionNPC: Protection;
1886
1908
  UpgradePrototypeSIDs: string[];
1887
- MeshGenerator: {
1888
- MeshGeneratorPrototypeSID: string;
1889
- }[];
1890
- NpcMeshGenerator: {
1891
- MeshGeneratorPrototypeSID: string;
1892
- }[];
1909
+ MeshGenerator: { MeshGeneratorPrototypeSID: string }[];
1910
+ NpcMeshGenerator: { MeshGeneratorPrototypeSID: string }[];
1893
1911
  VoiceModulatorSID: string;
1894
1912
  PreinstalledUpgrades: string[];
1895
1913
  SectionSettings: {
@@ -1924,32 +1942,20 @@ interface IAttachPrototype extends IItemPrototype {
1924
1942
  MaxAmmo: number;
1925
1943
  BindBulletsToAttach: boolean;
1926
1944
  HasMultipleMeshes: boolean;
1927
- MeshArray: {
1928
- MagazineMeshType: EMagazineMeshType;
1929
- }[];
1945
+ MeshArray: { MagazineMeshType: EMagazineMeshType }[];
1930
1946
  };
1931
1947
  Scope: {
1932
1948
  ZoomCoefficients: number[];
1933
1949
  BaseZoomCoefficientIndex: number;
1934
1950
  ChangeZoomScopeSound: string;
1935
1951
  bOverrideAimingEffects: boolean;
1936
- AimingEffects: {
1937
- PlayerOnlyEffects: string[];
1938
- };
1952
+ AimingEffects: { PlayerOnlyEffects: string[] };
1939
1953
  AimingCutoutRadius: number;
1940
1954
  AimingCutoutThreshold: number;
1941
1955
  };
1942
- WeaponFlashlight: {
1943
- FlashlightPrototypeID: number;
1944
- };
1945
- IronSight: {
1946
- MeshArray: {
1947
- Socket: string;
1948
- }[];
1949
- };
1950
- ShootingAttach: {
1951
- WeaponPrototypeSID: string;
1952
- };
1956
+ WeaponFlashlight: { FlashlightPrototypeID: number };
1957
+ IronSight: { MeshArray: { Socket: string }[] };
1958
+ ShootingAttach: { WeaponPrototypeSID: string };
1953
1959
  Slot: EAttachSlot;
1954
1960
  InventoryActionTime: number;
1955
1961
  bPermanent: boolean;
@@ -1997,9 +2003,7 @@ interface IConsumablePrototype extends IItemPrototype {
1997
2003
  MeshPath: string;
1998
2004
  AnimBlueprint: string;
1999
2005
  AlternativeEffectPrototypeSIDs: string[];
2000
- NegativeEffectPrototypeSIDs: {
2001
- Effect: string;
2002
- }[];
2006
+ NegativeEffectPrototypeSIDs: { Effect: string }[];
2003
2007
  NegativeEffectsChance: number;
2004
2008
  IsQuestItemPrototype: boolean;
2005
2009
  ItemTags: string[];
@@ -2012,12 +2016,12 @@ export type ConsumablePrototype = GetStructType<IConsumablePrototype>;
2012
2016
 
2013
2017
  interface IDetectorPrototype extends IItemPrototype {
2014
2018
  DetectorType: EDetectorType;
2015
- ShowArtifactRadius: number; // artifats become visible in this radius";
2019
+ ShowArtifactRadius: number;
2016
2020
  AnimBlueprint: string;
2017
2021
  DisplayUpdateInterval: number;
2018
2022
  DangerLevelSoundParameter: string;
2019
2023
  MinDetectRadius: number;
2020
- DetectorWorkRadius: number; // detection sound is playing is this radius";
2024
+ DetectorWorkRadius: number;
2021
2025
  DetectorWorkSFX: string;
2022
2026
  DetectorWorkCurve: string;
2023
2027
  ArtifactSignalCurve: string;
@@ -2187,9 +2191,7 @@ export type SpawnActorPrototype = GetStructType<{
2187
2191
  StashPrototypeSID: string;
2188
2192
  ItemGeneratorSettings: {
2189
2193
  PlayerRank: ERank;
2190
- ItemGenerators: {
2191
- PrototypeSID: string;
2192
- }[];
2194
+ ItemGenerators: { PrototypeSID: string }[];
2193
2195
  }[];
2194
2196
  TileOffsetIndex: number;
2195
2197
  ItemSID: string;
@@ -2204,17 +2206,8 @@ export type SpawnActorPrototype = GetStructType<{
2204
2206
  NodeCreationVersion: number;
2205
2207
  DataLayers: string[];
2206
2208
  Rank: ERank;
2207
- SignalReceivers: {
2208
- DestroyReceiver: {
2209
- Guid: string;
2210
- };
2211
- };
2212
- SignalSenders: {
2213
- DestroySender: {
2214
- Guid: string;
2215
- Signals: string[];
2216
- };
2217
- };
2209
+ SignalReceivers: { DestroyReceiver: { Guid: string } };
2210
+ SignalSenders: { DestroySender: { Guid: string; Signals: string[] } };
2218
2211
  DisablePhysics: boolean;
2219
2212
  DisableCollision: boolean;
2220
2213
  DisableDespawn: boolean;
@@ -2239,7 +2232,8 @@ export type SpawnActorPrototype = GetStructType<{
2239
2232
  RespawnMembers: boolean;
2240
2233
  }>;
2241
2234
 
2242
- type Faction = string; // for performance
2235
+ type Faction = string;
2236
+
2243
2237
  export type RelationPrototype = GetStructType<{
2244
2238
  SID: string;
2245
2239
  FactionsInvolvedDistance: number;
@@ -2248,20 +2242,14 @@ export type RelationPrototype = GetStructType<{
2248
2242
  RelationVersion: number;
2249
2243
  RelationLevelRanges: { start: number; end: number }[];
2250
2244
  MinRelationLevelToTrade: ERelationLevel;
2251
- CharacterReactions: ({
2252
- Type: ERelationChangingEvent;
2253
- } & {
2245
+ CharacterReactions: ({ Type: ERelationChangingEvent } & {
2254
2246
  [key in `${Reactions}->${Reactions}`]: number;
2255
2247
  })[];
2256
- FactionReactions: ({
2257
- Type: ERelationChangingEvent;
2258
- } & {
2248
+ FactionReactions: ({ Type: ERelationChangingEvent } & {
2259
2249
  [key in `${Reactions}->${Reactions}`]: number;
2260
2250
  })[];
2261
2251
  Factions: Record<Faction, Faction>;
2262
- Relations: {
2263
- [key in `${Faction}<->${Faction}`]: number;
2264
- };
2252
+ Relations: { [key in `${Faction}<->${Faction}`]: number };
2265
2253
  PositiveReactionsExcludedFactions: `${Faction}<->${Faction}`[];
2266
2254
  NegativeReactionsExcludedFactions: `${Faction}<->${Faction}`[];
2267
2255
  FactionRollbackCooldowns: Record<Faction, number>;
@@ -2441,14 +2429,10 @@ export type DialogPoolPrototype = GetStructType<{
2441
2429
  ShouldLockPersonalRelationship: boolean;
2442
2430
  DataLayerCombination: string;
2443
2431
  DLC: string;
2444
-
2445
2432
  OutputPinNames: string[];
2446
2433
  Launchers: {
2447
2434
  Excluding: boolean;
2448
- Connections: {
2449
- SID: string;
2450
- Name: string;
2451
- }[];
2435
+ Connections: { SID: string; Name: string }[];
2452
2436
  }[];
2453
2437
  LastPhrases: {
2454
2438
  FinishNode: boolean;
@@ -2458,28 +2442,18 @@ export type DialogPoolPrototype = GetStructType<{
2458
2442
  DialogMembers: string[];
2459
2443
  TalkThroughRadio: boolean[];
2460
2444
  DialogObjectLocation: Location[];
2461
-
2462
2445
  Conditions: GetStructType<Condition[][]> & {
2463
2446
  ConditionCheckType: EConditionCheckType;
2464
2447
  };
2465
-
2466
2448
  DialogEventType: EDialogEventType;
2467
2449
  RequiresGroup: boolean;
2468
2450
  RequiredMembersCount: number;
2469
2451
  OptionalMembersCount: number;
2470
2452
  DialogMemberRestrictions: {
2471
- FactionRestrictions: {
2472
- Faction: Faction;
2473
- };
2474
- ExcludedFactions: {
2475
- Faction: Faction;
2476
- };
2477
- ObjPrototypeRestrictions: {
2478
- NPCPrototypeSID: string;
2479
- };
2480
- ExcludedObjPrototypes: {
2481
- NPCPrototypeSID: string;
2482
- };
2453
+ FactionRestrictions: { Faction: Faction };
2454
+ ExcludedFactions: { Faction: Faction };
2455
+ ObjPrototypeRestrictions: { NPCPrototypeSID: string };
2456
+ ExcludedObjPrototypes: { NPCPrototypeSID: string };
2483
2457
  };
2484
2458
  AvailableDialogs: string[];
2485
2459
  }>;
@@ -2521,24 +2495,15 @@ export type Condition = GetStructType<{
2521
2495
  JournalQuestStageSID: string;
2522
2496
  TargetNode: string;
2523
2497
  NodeState: EQuestNodeState;
2524
-
2525
2498
  IncludePartialOverload: boolean;
2526
2499
  ThreatAwareness: EThreatAwareness;
2527
2500
  EmissionPrototypeSID: string;
2528
2501
  }>;
2529
2502
 
2530
- export type Location = GetStructType<{
2531
- X: number;
2532
- Y: number;
2533
- Z: number;
2534
- }>;
2503
+ export type Location = GetStructType<{ X: number; Y: number; Z: number }>;
2535
2504
 
2536
2505
  export type LocationAndRotation = GetStructType<
2537
- Location & {
2538
- Pitch: number;
2539
- Yaw: number;
2540
- Roll: number;
2541
- }
2506
+ Location & { Pitch: number; Yaw: number; Roll: number }
2542
2507
  >;
2543
2508
 
2544
2509
  export type Param = GetStructType<{
@@ -2650,70 +2615,60 @@ export type DialogChainPrototype = GetStructType<{
2650
2615
  CanBeInterrupted: boolean;
2651
2616
  ContinueAfterInterrupt: boolean;
2652
2617
  IsInteractive: boolean;
2653
- DialogMembers: {
2654
- DialogMemberName: string;
2655
- OptionalMember: boolean;
2656
- }[];
2618
+ DialogMembers: { DialogMemberName: string; OptionalMember: boolean }[];
2657
2619
  IsPCDialogMember: boolean;
2658
2620
  }>;
2659
2621
 
2660
- type CommonMeshSlots =
2661
- | "BodyArmor"
2662
- | "Face"
2663
- | "Hea"
2664
- | "Lhi_a"
2665
- | "Rhi_a"
2666
- | "Rhi_b"
2667
- | "Han"
2668
- | "Clo"
2669
- | "Fbe_b"
2670
- | "Fbe_f"
2671
- | "Gla"
2672
- | "Rch"
2673
- | "Lhi_a_c"
2674
- | "Lhi_b"
2675
- | "Rhi_c"
2676
- | "Leg"
2677
- | "Fbe"
2678
- | "Cap"
2679
- | "Rhi"
2680
- | "Lhi"
2681
- | "Hands"
2682
- | "Hea_a_e_f"
2683
- | "Lhi_f"
2684
- | "Rhi_f"
2685
- | "Rhi_g"
2686
- | "Fbe_g"
2687
- | "Fbe_a"
2688
- | "Fbe_d"
2689
- | "Lhi_d"
2690
- | "Rhi_e"
2691
- | "Fbe_c_d_e_f"
2692
- | "Mas";
2693
-
2694
2622
  export type MeshGeneratorPrototype = GetStructType<{
2695
2623
  SID: string;
2696
2624
  ParentMeshGeneratorSID: string;
2697
2625
  Attachments: Record<
2698
- CommonMeshSlots | `${number}`,
2626
+ string | `${number}`,
2699
2627
  { SlotName: string; Attaches: { BodyMeshSID: string; Weight: number }[] }
2700
2628
  >;
2701
- Materials: {
2702
- MaterialGroup: string;
2703
- Variations: Variation[];
2704
- }[];
2705
- CustomData: {
2706
- MaterialGroup: string;
2707
- Variations: Variation[];
2708
- }[];
2709
- Groom: {
2710
- CategoryName: string;
2711
- Variations: Variation[];
2712
- }[];
2629
+ Materials: { MaterialGroup: string; Variations: Variation[] }[];
2630
+ CustomData: { MaterialGroup: string; Variations: Variation[] }[];
2631
+ Groom: { CategoryName: string; Variations: Variation[] }[];
2713
2632
  MergedMesh: string;
2714
2633
  }>;
2715
2634
 
2716
- export type Variation = {
2717
- VariationIndex: number;
2718
- Weight: number;
2719
- };
2635
+ export type Variation = { VariationIndex: number; Weight: number };
2636
+
2637
+ export type LairPrototype = GetStructType<{
2638
+ SID: string;
2639
+ Preset: {
2640
+ InitialInhabitantFaction: string;
2641
+ IsALifePoint: boolean;
2642
+ PossibleInhabitantFactions: Record<
2643
+ Faction,
2644
+ {
2645
+ Faction: Faction;
2646
+ SpawnSettingsPerPlayerRanks: Record<
2647
+ "Newbie" | "Experienced" | "Veteran" | "Master",
2648
+ {
2649
+ MaxSpawnQuantity: number;
2650
+ InitialSpawnQuantityPercent: number;
2651
+ InitialSpawnQuantityRespawnTimeSeconds: number;
2652
+ MaxSpawnQuantityRespawnTimeSeconds: number;
2653
+ WipeRespawnTimeoutSeconds: number;
2654
+ SpawnSettingsPerArchetypes: Record<
2655
+ string,
2656
+ { MinQuantityPerArchetype: number; SpawnWeight: number }
2657
+ >;
2658
+ }
2659
+ >;
2660
+ }
2661
+ >;
2662
+ LairType: ELairType;
2663
+ RestingLairInstantSpawnScenarioChance: number;
2664
+ RestingLairShortDelayedSpawnScenarioChance: number;
2665
+ RestingLairMinNPCCount: number;
2666
+ RestingLairMaxNPCCount: number;
2667
+ RestingLairShortDelaySpawnMin: number;
2668
+ RestingLairShortDelaySpawnMax: number;
2669
+ RestingLairLongDelaySpawnMin: number;
2670
+ RestingLairLongDelaySpawnMax: number;
2671
+ ALifeLairsSearchRadius: number;
2672
+ GameTimeOfflineToRerollLairData: number;
2673
+ };
2674
+ }>;