PeliQ - Item query tool framework
Add utility tools related to item query for mod developers
Screenshots 1 screenshots
About this mod Machine translation
Add utility tools related to item query for mod developers
PeliQ
🌟 **Developer Framework** - Provides Stardew Valley mod developers with a powerful tool set related to item querying
🎯 Core Functions
🔗 Nested item query
- Run an item query and then pass the results to another query for further processing
- Internal item queries are placed in the `ModData` field
- Currently, it can only be nested once, and the inner query cannot accept list types.
**Sample code:**
```json
{
"Id": "{{ModId}}_AllBait_Outer",
"ItemId": "ALL_ITEMS (O)",
"PerItemCondition": "ITEM_CONTEXT_TAG Target category_fish",
"ModData": {
"Id": "{{ModId}}_AllBait_Inner",
"ItemId": "FLAVORED_ITEM Bait mushymato.PeliQ_NestedId"
}
}
```
💾 Storage item query
- Added new assets for storing reusable item queries
- Custom assets using `mushymato.PeliQ/ItemQueries`
-Support conditional query and multiple usage scenarios
**Application scenario:**
- Used in item query: `mushymato.PeliQ_STORED_QUERY`
- Trigger action: `mushymato.PeliQ_AddItemByQuery [ItemQuerySearchMode]`
- Map action: `mushymato.PeliQ_AddItemByQuery [ItemQuerySearchMode] [isDebris]`
- Mail system: `%peliQ [ItemQuerySearchMode] %%`
🔍 Search mode options
- **All** - Get all results
- **AllOfTypeItem** - Get all types of items (default)
- **FirstOfTypeItem** - Get the first type item
- **RandomOfTypeItem** - Randomly obtain type items
🛒 Virtual Shop Items
- `mushymato.PeliQ_ACTION_SALABLE `
- Create virtual store entries without actually purchasing items
- Mainly used to activate `ActionsOnPurchase` without giving actual items
**Custom fields:**
- `mushymato.PeliQ/ExitOnPurchase` - Exit the menu immediately after purchasing
- `mushymato.PeliQ/PurchaseSound` - the sound effect played when purchasing
🎮 New game status query
**Regular expression matching:**
- `mushymato.PeliQ_ITEM_ID_REGEX Target|Input +`
- Use regular expressions to match item IDs (case insensitive)
**Logical operators:**
- `mushymato.PeliQ_ANY_N` - Check multiple GSQ results
- `mushymato.PeliQ_AND` - logical AND operation
- `mushymato.PeliQ_OR` - Logical OR operation
- `mushymato.PeliQ_XOR` - Logical XOR operation
---
💡 **Usage Suggestions**: This framework is particularly suitable for module developers who need complex item query logic, and can greatly simplify the code implementation of item filtering and conditional judgment.
🔗 **Official Resources**:
- source code
- Sample modules
🎯 **Applicable objects**: Stardew Valley mod developers, especially those who need to handle complex item logic and query functions.
Install & use Install: SMAPI mod (Stardew Valley standard)
- Install SMAPI first (Stardew Valley's mod loader): download it from smapi.io, run 'install on Windows.bat' and pick your game folder.
- Unzip the archive from playbuff and find the folder that contains manifest.json — that folder is the mod.
- Copy that whole folder into Stardew Valley/Mods/.
- Launch the game through SMAPI (run StardewModdingAPI.exe or set it as the launch option). The console before the title screen lists each mod's load result.
Cheat-style tools may not need SMAPI — unzip and run them as the readme describes. Back up your save before editing it; SMAPI lists failed mods in its console.