@bgforge/mls-server 3.17.0 → 3.18.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.
@@ -1591,6 +1591,16 @@
1591
1591
  "value": "```weidu-tp2-tooltip\nNUMERICALLY\n```\nThe sorting is in ascending numerical order. This requires that the first column of indices can be interpreted as numbers; any strings will raise a warning and the sort order will be undefined."
1592
1592
  }
1593
1593
  },
1594
+ {
1595
+ "label": "END",
1596
+ "kind": 14,
1597
+ "source": "builtin",
1598
+ "category": "block_end",
1599
+ "documentation": {
1600
+ "kind": "markdown",
1601
+ "value": "```weidu-tp2-tooltip\nBEGIN ... END\n```\nCloses a BEGIN block, a function call's parameter list (LAF name ... END), an ALWAYS block and the like."
1602
+ }
1603
+ },
1594
1604
  {
1595
1605
  "label": "CACHE",
1596
1606
  "kind": 14,
@@ -2611,6 +2621,16 @@
2611
2621
  "value": "```weidu-tp2-tooltip\nSTR_VAR\n```\nString variable"
2612
2622
  }
2613
2623
  },
2624
+ {
2625
+ "label": "ADD_IF_MISSING",
2626
+ "kind": 14,
2627
+ "source": "builtin",
2628
+ "category": "keywords",
2629
+ "documentation": {
2630
+ "kind": "markdown",
2631
+ "value": "```weidu-tp2-tooltip\nEDIT_SAV_FILE level [ ADD_IF_MISSING ] [ filename list ] BEGIN patch list END\n```\nIf the optional ADD_IF_MISSING is provided, the file will be loaded if it exists (determined with FILE_EXISTS_IN_GAME) and the patches are applied. If the file does not exist, the patches will instead be applied to the empty buffer. The resulting file is added to the SAV itself."
2632
+ }
2633
+ },
2614
2634
  {
2615
2635
  "label": "AS",
2616
2636
  "kind": 14,
@@ -2638,6 +2658,56 @@
2638
2658
  "value": "```weidu-tp2-tooltip\nPATCH_MATCH value WITH [ guardvalue ... [ WHEN conditionvalue ] BEGIN patch list END ] ... DEFAULT patch list END\n```\nThe value is case-insensitively matched against the guard values. If value matches one of the guard values, the associated patch list is executed. If there is a condition, it additionally needs to evaluate to true for the values to match. If none of the values match, the DEFAULT patch list is executed. See the MATCH and TRY tutorial for additional information."
2639
2659
  }
2640
2660
  },
2661
+ {
2662
+ "label": "ELSE",
2663
+ "kind": 14,
2664
+ "source": "builtin",
2665
+ "category": "keywords",
2666
+ "documentation": {
2667
+ "kind": "markdown",
2668
+ "value": "```weidu-tp2-tooltip\nACTION_IF value [ THEN ] BEGIN action list END [ ELSE BEGIN action list END ]\n```"
2669
+ }
2670
+ },
2671
+ {
2672
+ "label": "IF_EXISTING",
2673
+ "kind": 14,
2674
+ "source": "builtin",
2675
+ "category": "keywords",
2676
+ "documentation": {
2677
+ "kind": "markdown",
2678
+ "value": "```weidu-tp2-tooltip\nADD_SPELL newSPLfile type level idsName patch list [ IF_EXISTING patch list END ] [ ON_DISABLE patch list END ]\n```\nIf Spell.ids already contains a spell named idsName, of the same type and level than the one you're adding, the patches of the IF_EXISTING section are applied to the current version instead."
2679
+ }
2680
+ },
2681
+ {
2682
+ "label": "ON_DISABLE",
2683
+ "kind": 14,
2684
+ "source": "builtin",
2685
+ "category": "keywords",
2686
+ "documentation": {
2687
+ "kind": "markdown",
2688
+ "value": "```weidu-tp2-tooltip\nADD_SPELL newSPLfile type level idsName patch list [ IF_EXISTING patch list END ] [ ON_DISABLE patch list END ]\n```\nIf Spell.ids already contains a spell named idsName, but of different type and/or level than the one you're adding, the patches of the ON_DISABLE section are applied to the older spell."
2689
+ }
2690
+ },
2691
+ {
2692
+ "label": "TEXT",
2693
+ "kind": 14,
2694
+ "source": "builtin",
2695
+ "category": "keywords",
2696
+ "documentation": {
2697
+ "kind": "markdown",
2698
+ "value": "```weidu-tp2-tooltip\nAPPEND_FILE [ TEXT ] filename\n```\nIf TEXT is specified, the contents of filename and the current file is separated by a newline character (LF) unless the first character of filename or the last character of the current file is a newline character."
2699
+ }
2700
+ },
2701
+ {
2702
+ "label": "THEN",
2703
+ "kind": 14,
2704
+ "source": "builtin",
2705
+ "category": "keywords",
2706
+ "documentation": {
2707
+ "kind": "markdown",
2708
+ "value": "```weidu-tp2-tooltip\nACTION_IF value [ THEN ] BEGIN action list END\n```"
2709
+ }
2710
+ },
2641
2711
  {
2642
2712
  "label": "USING",
2643
2713
  "kind": 14,
@@ -2785,31 +2855,6 @@
2785
2855
  "value": "```weidu-tp2-tooltip\nADD_STORE_ITEM [ + ] itemName [ position ] charge1 charge2 charge3 flags stack [ unlimited ]\n```\nAdd the item itemName to the current STO file. An optional + signifies that the new instance of the item should overwrite any existing instance of the same item. The item's number of charges are given by the respective charge argument, which must take the form of #integer or ( value ). The optional position argument must be one of AFTER String, BEFORE String, LAST, FIRST or AT value. AFTER will place the new item behind the item given by String. BEFORE will place the item before the item provided by String. LAST will place the new item after all existing items. FIRST will place the new item as the first item in the store. AT will place the new item at the position given by value, with the first item having position 0. If no position argument is given, ADD_STORE_ITEM defaults to FIRST. The argument flags must be a string consisting of one of none, identified, unstealable, stolen, identified&stolen or identified&unstealable. The argument stack sets the number of item the store carries in the stack and must take the form of #integer or ( value ). The optional argument unlimited should be one of the strings limited or unlimited and controls whether the store should carry an inexhaustible stack of the new item, or not. limited is the default behaviour. See the ADD_STORE_ITEM tutorial for more information."
2786
2856
  }
2787
2857
  },
2788
- {
2789
- "label": "ADD_STORE_PURCHASE",
2790
- "kind": 3,
2791
- "source": "builtin",
2792
- "category": "patch",
2793
- "documentation": {
2794
- "kind": "markdown",
2795
- "value": "```weidu-tp2-tooltip\npatch function ADD_STORE_PURCHASE\n```\n\n---\n\nAdds one or more item categories the store will buy to the current STO file. Existing categories will be skipped.\n\n| | | | |\n|-:|:-|:-|:-|\n|**INT**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|category||  the item category to add. A nearly complete list of supported item category codes can be found [here](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm#tableItemType).|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||  the index of the added purchase. Returns `-1` if the purchase could not be added.|\n|[int](https://ielib.bgforge.net/types#int)|offset||  the offset of the added purchase. Returns `-1` if the purchase could not be added.|"
2796
- },
2797
- "params": {
2798
- "intVar": [
2799
- {
2800
- "name": "category",
2801
- "type": "int",
2802
- "description": "the item category to add. A nearly complete list of supported item category codes can be found [here](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm#tableItemType)."
2803
- }
2804
- ],
2805
- "strVar": [],
2806
- "ret": [
2807
- "index",
2808
- "offset"
2809
- ],
2810
- "retArray": []
2811
- }
2812
- },
2813
2858
  {
2814
2859
  "label": "APPEND_FILE",
2815
2860
  "kind": 3,
@@ -3073,6 +3118,16 @@
3073
3118
  "value": "```weidu-tp2-tooltip\nEVALUATE_BUFFER_SPECIAL string\n```\nString must be one character long. Any WeiDU variables (like XmyvarX) \tinside the current file are replaced by their values, where X is to be intended \tas string. Example: <<<<<<<< .../mymod-inlined/script.baf IF See($myvar$) THEN RESPONSE #100 Kill(%myvar%) END >>>>>>>> EXTEND_TOP ~sola.bcs~ ~.../mymod-inlined/script.baf~ SPRINT myvar = ~\"Anomen\"~ EVALUATE_BUFFER_SPECIAL ~$~ \tmyvar will be substituted with Anomen, but %myvar% will be not.\tDo not use this without a real reason."
3074
3119
  }
3075
3120
  },
3121
+ {
3122
+ "label": "EXTEND_MOS",
3123
+ "kind": 3,
3124
+ "source": "builtin",
3125
+ "category": "patch",
3126
+ "documentation": {
3127
+ "kind": "markdown",
3128
+ "value": "```weidu-tp2-tooltip\nEXTEND_MOS filename value\n```\nListed among WeiDU's undocumented features; the readme gives no description."
3129
+ }
3130
+ },
3076
3131
  {
3077
3132
  "label": "FOR",
3078
3133
  "kind": 3,
@@ -3693,56 +3748,6 @@
3693
3748
  "value": "```weidu-tp2-tooltip\nREMOVE_MEMORIZED_SPELLS\n```\nRemove all memorized spells from the current creature."
3694
3749
  }
3695
3750
  },
3696
- {
3697
- "label": "REMOVE_STORE_CURE",
3698
- "kind": 3,
3699
- "source": "builtin",
3700
- "category": "patch",
3701
- "documentation": {
3702
- "kind": "markdown",
3703
- "value": "```weidu-tp2-tooltip\npatch function REMOVE_STORE_CURE\n```\n\n---\n\nRemoves all cure instances matching the specified spell name from the current STO file. This is a patch function.\n\n| | | | |\n|-:|:-|:-|:-|\n|**STR**|**vars**|||\n|[string](https://ielib.bgforge.net/types#string)|spell_name||&nbsp;&nbsp;the resource name (resref) of the spell to remove. Regular expression syntax is supported.|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the first removed entry matching the spell name, returns `-1` otherwise|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the first removed entry matching the spell name, returns `-1` otherwise|"
3704
- },
3705
- "params": {
3706
- "intVar": [],
3707
- "strVar": [
3708
- {
3709
- "name": "spell_name",
3710
- "type": "string",
3711
- "description": "the resource name (resref) of the spell to remove. Regular expression syntax is supported."
3712
- }
3713
- ],
3714
- "ret": [
3715
- "index",
3716
- "offset"
3717
- ],
3718
- "retArray": []
3719
- }
3720
- },
3721
- {
3722
- "label": "REMOVE_STORE_DRINK",
3723
- "kind": 3,
3724
- "source": "builtin",
3725
- "category": "patch",
3726
- "documentation": {
3727
- "kind": "markdown",
3728
- "value": "```weidu-tp2-tooltip\npatch function REMOVE_STORE_DRINK\n```\n\n---\n\nRemoves all drink instances matching the specified drink name from the current STO file. This is a patch function.\n\n`drink_name` supports: literal strings (regexp supported), strref values (`#1234`), or translation references (`@1000`).\n\n| | | | |\n|-:|:-|:-|:-|\n|**STR**|**vars**|||\n|[string](https://ielib.bgforge.net/types#string)|drink_name||&nbsp;&nbsp;the name of the drink|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the first removed entry matching the drink name, returns `-1` otherwise|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the first removed entry matching the drink name, returns `-1` otherwise|"
3729
- },
3730
- "params": {
3731
- "intVar": [],
3732
- "strVar": [
3733
- {
3734
- "name": "drink_name",
3735
- "type": "string",
3736
- "description": "the name of the drink"
3737
- }
3738
- ],
3739
- "ret": [
3740
- "index",
3741
- "offset"
3742
- ],
3743
- "retArray": []
3744
- }
3745
- },
3746
3751
  {
3747
3752
  "label": "REMOVE_STORE_ITEM",
3748
3753
  "kind": 3,
@@ -3754,73 +3759,33 @@
3754
3759
  }
3755
3760
  },
3756
3761
  {
3757
- "label": "REMOVE_STORE_ITEM_EX",
3758
- "kind": 3,
3759
- "source": "builtin",
3760
- "category": "patch",
3761
- "documentation": {
3762
- "kind": "markdown",
3763
- "value": "```weidu-tp2-tooltip\npatch function REMOVE_STORE_ITEM_EX\n```\n\n---\n\nRemoves all sale instances matching the specified item name from the current STO file. This is a patch function.\n\n| | | | |\n|-:|:-|:-|:-|\n|**STR**|**vars**|||\n|[string](https://ielib.bgforge.net/types#string)|item_name||&nbsp;&nbsp;the resource name (resref) of the item to remove. Regular expression syntax is supported.|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the first removed entry matching the item name, returns `-1` otherwise|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the first removed entry matching the item name, returns `-1` otherwise|"
3764
- },
3765
- "params": {
3766
- "intVar": [],
3767
- "strVar": [
3768
- {
3769
- "name": "item_name",
3770
- "type": "string",
3771
- "description": "the resource name (resref) of the item to remove. Regular expression syntax is supported."
3772
- }
3773
- ],
3774
- "ret": [
3775
- "index",
3776
- "offset"
3777
- ],
3778
- "retArray": []
3779
- }
3780
- },
3781
- {
3782
- "label": "REMOVE_STORE_PURCHASE",
3762
+ "label": "REPLACE",
3783
3763
  "kind": 3,
3784
3764
  "source": "builtin",
3785
3765
  "category": "patch",
3786
3766
  "documentation": {
3787
3767
  "kind": "markdown",
3788
- "value": "```weidu-tp2-tooltip\npatch function REMOVE_STORE_PURCHASE\n```\n\n---\n\nRemoves the specified item category from the current STO file. This is a patch function.\n\n| | | | |\n|-:|:-|:-|:-|\n|**INT**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|category||&nbsp;&nbsp;the item category to remove. A nearly complete list of supported item category codes can be found [here](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm#tableItemType).|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the first removed entry matching the category, returns `-1` otherwise|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the first removed entry matching the category, returns `-1` otherwise|"
3789
- },
3790
- "params": {
3791
- "intVar": [
3792
- {
3793
- "name": "category",
3794
- "type": "int",
3795
- "description": "the item category to remove. A nearly complete list of supported item category codes can be found [here](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm#tableItemType)."
3796
- }
3797
- ],
3798
- "strVar": [],
3799
- "ret": [
3800
- "index",
3801
- "offset"
3802
- ],
3803
- "retArray": []
3768
+ "value": "```weidu-tp2-tooltip\nREPLACE optcase optexact regexp text\n```\nAll occurrences of regexp in the file are replaced with the ASCII printing of the string reference for text. So if regexp is \"FRED\" and the text ends up being strref #1234, \"FRED\" will be replaced with \"1234\". This is usually used to replace string references in BCS files (where they are stored textually). Put a command like DisplayString(Myself,99999) in your BCS file and use something like REPLACE 99999 \"Hello, World\"."
3804
3769
  }
3805
3770
  },
3806
3771
  {
3807
- "label": "REPLACE",
3772
+ "label": "REPLACE_BCS_BLOCK",
3808
3773
  "kind": 3,
3809
3774
  "source": "builtin",
3810
3775
  "category": "patch",
3811
3776
  "documentation": {
3812
3777
  "kind": "markdown",
3813
- "value": "```weidu-tp2-tooltip\nREPLACE optcase optexact regexp text\n```\nAll occurrences of regexp in the file are replaced with the ASCII printing of the string reference for text. So if regexp is \"FRED\" and the text ends up being strref #1234, \"FRED\" will be replaced with \"1234\". This is usually used to replace string references in BCS files (where they are stored textually). Put a command like DisplayString(Myself,99999) in your BCS file and use something like REPLACE 99999 \"Hello, World\"."
3778
+ "value": "```weidu-tp2-tooltip\nREPLACE_BCS_BLOCK [ EVALUATE_BUFFER ] optcase oldFile newFile [ ON_MISMATCH patch list END ]\n```\nIf the current file is a BCS file, the segment of it corresponding to oldFile is replaced with the contents of newFile. oldFile and newFile may be BCS or BAF files. If they are BAF files they will not get the benefit of AUTO_TRA. If EVALUATE_BUFFER is given, variables inside oldFile and newFile are evaluated, but only they are BAF files. If the segment corresponding to oldFile is not found and the ON_MISMATCH section is present, those patches are run; if oldFile is not found and ON_MISMATCH is not present, a warning message is printed. You may use R_B_B as a synonym for REPLACE_BCS_BLOCK."
3814
3779
  }
3815
3780
  },
3816
3781
  {
3817
- "label": "REPLACE_BCS_BLOCK",
3782
+ "label": "REPLACE_BCS_BLOCK_REGEXP",
3818
3783
  "kind": 3,
3819
3784
  "source": "builtin",
3820
3785
  "category": "patch",
3821
3786
  "documentation": {
3822
3787
  "kind": "markdown",
3823
- "value": "```weidu-tp2-tooltip\nREPLACE_BCS_BLOCK [ EVALUATE_BUFFER ] optcase oldFile newFile [ ON_MISMATCH patch list END ]\n```\nIf the current file is a BCS file, the segment of it corresponding to oldFile is replaced with the contents of newFile. oldFile and newFile may be BCS or BAF files. If they are BAF files they will not get the benefit of AUTO_TRA. If EVALUATE_BUFFER is given, variables inside oldFile and newFile are evaluated, but only they are BAF files. If the segment corresponding to oldFile is not found and the ON_MISMATCH section is present, those patches are run; if oldFile is not found and ON_MISMATCH is not present, a warning message is printed. You may use R_B_B as a synonym for REPLACE_BCS_BLOCK."
3788
+ "value": "```weidu-tp2-tooltip\nREPLACE_BCS_BLOCK_REGEXP oldFile newFile [ ON_MISMATCH patch list END ]\n```\nListed among WeiDU's undocumented features; the readme gives no description. Takes no EVALUATE_BUFFER or case option, unlike REPLACE_BCS_BLOCK."
3824
3789
  }
3825
3790
  },
3826
3791
  {
@@ -3933,6 +3898,16 @@
3933
3898
  "value": "```weidu-tp2-tooltip\nSET_BG2_PROFICIENCY String value\n```\nRemoves all effects from the current CRE file that alter the proficiency specified by \tString (relative to Stats.ids). After that, if value is different from zero, add an effect \tto set said proficiency to value."
3934
3899
  }
3935
3900
  },
3901
+ {
3902
+ "label": "SET_IDS_SYMBOL_OF_INT",
3903
+ "kind": 3,
3904
+ "source": "builtin",
3905
+ "category": "patch",
3906
+ "documentation": {
3907
+ "kind": "markdown",
3908
+ "value": "```weidu-tp2-tooltip\nSET_IDS_SYMBOL_OF_INT variable idsFile value\n```\nThe symbolic constant associated with value in idsFile (which may contain user variables) is stored in variable. If that doesn't work, value is stored in variable. You may use LOOKUP_IDS_SYMBOL_OF_INT as a synonym."
3909
+ }
3910
+ },
3936
3911
  {
3937
3912
  "label": "SNPRINT",
3938
3913
  "kind": 3,
@@ -5240,6 +5215,31 @@
5240
5215
  "retArray": []
5241
5216
  }
5242
5217
  },
5218
+ {
5219
+ "label": "ADD_STORE_PURCHASE",
5220
+ "kind": 3,
5221
+ "source": "builtin",
5222
+ "category": "patch_functions",
5223
+ "documentation": {
5224
+ "kind": "markdown",
5225
+ "value": "```weidu-tp2-tooltip\npatch function ADD_STORE_PURCHASE\n```\n\n---\n\nAdds one or more item categories the store will buy to the current STO file. Existing categories will be skipped.\n\n| | | | |\n|-:|:-|:-|:-|\n|**INT**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|category||&nbsp;&nbsp;the item category to add. A nearly complete list of supported item category codes can be found [here](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm#tableItemType).|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the added purchase. Returns `-1` if the purchase could not be added.|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the added purchase. Returns `-1` if the purchase could not be added.|"
5226
+ },
5227
+ "params": {
5228
+ "intVar": [
5229
+ {
5230
+ "name": "category",
5231
+ "type": "int",
5232
+ "description": "the item category to add. A nearly complete list of supported item category codes can be found [here](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm#tableItemType)."
5233
+ }
5234
+ ],
5235
+ "strVar": [],
5236
+ "ret": [
5237
+ "index",
5238
+ "offset"
5239
+ ],
5240
+ "retArray": []
5241
+ }
5242
+ },
5243
5243
  {
5244
5244
  "label": "ADD_WORLDMAP_LINKS",
5245
5245
  "kind": 3,
@@ -7870,6 +7870,106 @@
7870
7870
  "retArray": []
7871
7871
  }
7872
7872
  },
7873
+ {
7874
+ "label": "REMOVE_STORE_CURE",
7875
+ "kind": 3,
7876
+ "source": "builtin",
7877
+ "category": "patch_functions",
7878
+ "documentation": {
7879
+ "kind": "markdown",
7880
+ "value": "```weidu-tp2-tooltip\npatch function REMOVE_STORE_CURE\n```\n\n---\n\nRemoves all cure instances matching the specified spell name from the current STO file. This is a patch function.\n\n| | | | |\n|-:|:-|:-|:-|\n|**STR**|**vars**|||\n|[string](https://ielib.bgforge.net/types#string)|spell_name||&nbsp;&nbsp;the resource name (resref) of the spell to remove. Regular expression syntax is supported.|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the first removed entry matching the spell name, returns `-1` otherwise|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the first removed entry matching the spell name, returns `-1` otherwise|"
7881
+ },
7882
+ "params": {
7883
+ "intVar": [],
7884
+ "strVar": [
7885
+ {
7886
+ "name": "spell_name",
7887
+ "type": "string",
7888
+ "description": "the resource name (resref) of the spell to remove. Regular expression syntax is supported."
7889
+ }
7890
+ ],
7891
+ "ret": [
7892
+ "index",
7893
+ "offset"
7894
+ ],
7895
+ "retArray": []
7896
+ }
7897
+ },
7898
+ {
7899
+ "label": "REMOVE_STORE_DRINK",
7900
+ "kind": 3,
7901
+ "source": "builtin",
7902
+ "category": "patch_functions",
7903
+ "documentation": {
7904
+ "kind": "markdown",
7905
+ "value": "```weidu-tp2-tooltip\npatch function REMOVE_STORE_DRINK\n```\n\n---\n\nRemoves all drink instances matching the specified drink name from the current STO file. This is a patch function.\n\n`drink_name` supports: literal strings (regexp supported), strref values (`#1234`), or translation references (`@1000`).\n\n| | | | |\n|-:|:-|:-|:-|\n|**STR**|**vars**|||\n|[string](https://ielib.bgforge.net/types#string)|drink_name||&nbsp;&nbsp;the name of the drink|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the first removed entry matching the drink name, returns `-1` otherwise|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the first removed entry matching the drink name, returns `-1` otherwise|"
7906
+ },
7907
+ "params": {
7908
+ "intVar": [],
7909
+ "strVar": [
7910
+ {
7911
+ "name": "drink_name",
7912
+ "type": "string",
7913
+ "description": "the name of the drink"
7914
+ }
7915
+ ],
7916
+ "ret": [
7917
+ "index",
7918
+ "offset"
7919
+ ],
7920
+ "retArray": []
7921
+ }
7922
+ },
7923
+ {
7924
+ "label": "REMOVE_STORE_ITEM_EX",
7925
+ "kind": 3,
7926
+ "source": "builtin",
7927
+ "category": "patch_functions",
7928
+ "documentation": {
7929
+ "kind": "markdown",
7930
+ "value": "```weidu-tp2-tooltip\npatch function REMOVE_STORE_ITEM_EX\n```\n\n---\n\nRemoves all sale instances matching the specified item name from the current STO file. This is a patch function.\n\n| | | | |\n|-:|:-|:-|:-|\n|**STR**|**vars**|||\n|[string](https://ielib.bgforge.net/types#string)|item_name||&nbsp;&nbsp;the resource name (resref) of the item to remove. Regular expression syntax is supported.|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the first removed entry matching the item name, returns `-1` otherwise|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the first removed entry matching the item name, returns `-1` otherwise|"
7931
+ },
7932
+ "params": {
7933
+ "intVar": [],
7934
+ "strVar": [
7935
+ {
7936
+ "name": "item_name",
7937
+ "type": "string",
7938
+ "description": "the resource name (resref) of the item to remove. Regular expression syntax is supported."
7939
+ }
7940
+ ],
7941
+ "ret": [
7942
+ "index",
7943
+ "offset"
7944
+ ],
7945
+ "retArray": []
7946
+ }
7947
+ },
7948
+ {
7949
+ "label": "REMOVE_STORE_PURCHASE",
7950
+ "kind": 3,
7951
+ "source": "builtin",
7952
+ "category": "patch_functions",
7953
+ "documentation": {
7954
+ "kind": "markdown",
7955
+ "value": "```weidu-tp2-tooltip\npatch function REMOVE_STORE_PURCHASE\n```\n\n---\n\nRemoves the specified item category from the current STO file. This is a patch function.\n\n| | | | |\n|-:|:-|:-|:-|\n|**INT**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|category||&nbsp;&nbsp;the item category to remove. A nearly complete list of supported item category codes can be found [here](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm#tableItemType).|\n|**RET**|**vars**|||\n|[int](https://ielib.bgforge.net/types#int)|index||&nbsp;&nbsp;the index of the first removed entry matching the category, returns `-1` otherwise|\n|[int](https://ielib.bgforge.net/types#int)|offset||&nbsp;&nbsp;the offset of the first removed entry matching the category, returns `-1` otherwise|"
7956
+ },
7957
+ "params": {
7958
+ "intVar": [
7959
+ {
7960
+ "name": "category",
7961
+ "type": "int",
7962
+ "description": "the item category to remove. A nearly complete list of supported item category codes can be found [here](https://gibberlings3.github.io/iesdp/file_formats/ie_formats/sto_v1.htm#tableItemType)."
7963
+ }
7964
+ ],
7965
+ "strVar": [],
7966
+ "ret": [
7967
+ "index",
7968
+ "offset"
7969
+ ],
7970
+ "retArray": []
7971
+ }
7972
+ },
7873
7973
  {
7874
7974
  "label": "REPLACE_AREA_ITEM",
7875
7975
  "kind": 3,
@@ -10718,6 +10818,16 @@
10718
10818
  "value": "```weidu-tp2-tooltip\nIF regexp\n```\nTrue if the input file contains regexp."
10719
10819
  }
10720
10820
  },
10821
+ {
10822
+ "label": "IF_EVAL",
10823
+ "kind": 14,
10824
+ "source": "builtin",
10825
+ "category": "when",
10826
+ "documentation": {
10827
+ "kind": "markdown",
10828
+ "value": "```weidu-tp2-tooltip\nIF_EVAL value\n```\nListed among WeiDU's undocumented features; the readme gives no description."
10829
+ }
10830
+ },
10721
10831
  {
10722
10832
  "label": "IF_EXISTS",
10723
10833
  "kind": 14,