Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{# Modified from prompt originally from jykej: #}
{# https://discord.com/channels/1287232260617015336/1372339819459514368/1442640958671032350 #}
{% if render_mode == "full" or render_mode == "thoughts" or render_mode == "transform" %}
{% if is_follower(actorUUID) or actorUUID == player.UUID %}
{% set tracked_quests = get_selected_quests() %}
{% set journal = get_quest_journal() %}
{% set show_misc_tasks = show_misc_tasks | default(true) %}
{% set show_inactive_quests = show_inactive_quests | default(false) %}
{% if length(tracked_quests) > 0 %}
{% if is_follower(actorUUID) %}## {{ player.name }}'s Party's Active Quests{% else %}## Active Quests{% endif %}
(Quests remain available indefinitely unless explicitly stated otherwise. Do NOT create urgency, invent deadlines, or repeatedly remind about objectives.)
{% for quest in tracked_quests %}
{% for jq in journal %}{% if jq.editorID == quest.editorID %}
{% if jq.journalText and not jq.isMisc %}
**{{ jq.questName }}**
{{ jq.journalText }}
{% for obj in jq.objectives %}{% if obj.displayed %}{% if obj.completed %}
- {{ obj.text }} [DONE]{% elif not obj.failed %}
- {{ obj.text }}{% endif %}{% endif %}{% endfor %}

{% endif %}
{% endif %}{% endfor %}
{% endfor %}
{% if show_inactive_quests %}
{% for jq in journal %}{% if jq.inQuestLog %}{% if jq.journalText %}
**{{ jq.questName }}** (inactive)
{{ jq.journalText }}
{% endif %}{% endif %}{% endfor %}
{% endif %}
{% if show_misc_tasks %}
### Misc. Tasks
{% for quest in tracked_quests %}
{% for jq in journal %}{% if jq.editorID == quest.editorID %}{% if jq.isMisc %}{% for obj in jq.objectives %}{% if obj.displayed and not obj.completed and not obj.failed %}
- {{ obj.text }}{% endif %}{% endfor %}{% endif %}{% endif %}{% endfor %}
{% endfor %}
{% endif %}
{% else %}
## {{ player.name }}'s Party's Active Quests
No active quests currently tracked.
{% endif %}
{% endif %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{# TEST SUBMODULE - Item Decorators #}
{# Tests: get_item_count, has_item #}
{# CATEGORY: Equipment #}

{% set actor = decnpc(actorUUID) %}
{% set actorName = actor.name %}

## 📦 ITEM DECORATOR TESTS

### Test 1: get_item_count() - Count Specific Items

{% set goldCount = get_item_count(actorUUID, "Gold001") %}
{% set lockpickCount = get_item_count(actorUUID, "Lockpick") %}

**{{ actorName }}'s Inventory Counts:**
- **Gold Coins:** {{ goldCount }}
- **Lockpicks:** {{ lockpickCount }}

---

### Test 2: get_item_count() - Item Not Found

{% set unicornCount = get_item_count(actorUUID, 999999999) %}

**Non-existent Item Count:**
- **Unicorn (999999999):** {{ unicornCount }} (should be 0)

---

### Test 3: has_item() - Check Item Presence

{% set hasGold = has_item(actorUUID, "Gold001") %}
{% set hasLockpick = has_item(actorUUID, "Lockpick") %}

**{{ actorName }}'s Item Presence:**
- **Has Gold Coins:** {% if hasGold %}✓ YES{% else %}✗ NO{% endif %}
- **Has Lockpicks:** {% if hasLockpick %}✓ YES{% else %}✗ NO{% endif %}

---

### Test 4: has_item() - Player Comparison

{% set playerHasGold = has_item(player.UUID, "Gold001") %}
{% set playerHasLockpick = has_item(player.UUID, "Lockpick") %}

**Player's Item Presence:**
- **Has Gold:** {% if playerHasGold %}✓ YES{% else %}✗ NO{% endif %}
- **Has Lockpick:** {% if playerHasLockpick %}✓ YES{% else %}✗ NO{% endif %}

---

### Test 5: Conditional Usage

{% if has_item(actorUUID, "Gold001") %}
**{{ actorName }}** has at least one gold coin.
{% set coinPurse = get_item_count(actorUUID, "Gold001") %}
{% if coinPurse > 100 %}
They have a substantial purse of {{ coinPurse }} gold!
{% elif coinPurse > 10 %}
They have some coin — {{ coinPurse }} gold pieces.
{% else %}
They're nearly broke with only {{ coinPurse }} gold.
{% endif %}
{% else %}
**{{ actorName }}** has no gold at all.
{% endif %}
Loading