drincs-productions/nqtr

nqtr-quest

Use when creating or driving NQTR quests — QuestBaseModel with StageBaseModel stages (onStart, deltaDateRequired, flags, questsRequired), RegisteredQuests, start/continue/advanceIfCompleted, failing a quest, state queries (started, completed, failed, curren…

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/drincs-productions/nqtr --skill nqtr-quest

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

NQTR quests

Official docs: pixi-vn.com/nqtr/quest. Index: nqtr. Ink commands and variables: nqtr-ink.

A quest is an ordered list of stages. Starting it enters stage 0; continuing moves to the next stage; after the last stage the quest is completed.

Initialize

new QuestBaseModel(id, stages, props); new StageBaseModel(id, props). Register with RegisteredQuests.add(...) (required). Stage onStart is the place to link activities/commitments that make the stage playable.

ts
import { QuestBaseModel, RegisteredQuests, StageBaseModel } from "@drincs/nqtr";
import { mcRoom, terrace } from "@/content/rooms";

export const aliceQuest = new QuestBaseModel(
    "aliceQuest",
    [
        new StageBaseModel("talk_alice1", {
            name: "Talk to Alice",
            description: "Talk to Alice on the terrace",
            onStart: () => terrace.addCommitment("alice_quest_talk"),
        }),
        new StageBaseModel("order_products", {
            name: "Order products",
            description: "Order the products with your PC",
            onStart: () => mcRoom.addActivity("order_product"),
        }),
        new StageBaseModel("take_products", {
            name: "Take products",
            description: "Take products on the Terrace",
            requestDescriptionToStart: "Wait for the products (2 days)",
            deltaDateRequired: 2,
            onStart: (_, { toast }) => {
                terrace.addActivity("take_product");
                toast("You can take the products on the Terrace");
            },
        }),
    ],
    {
        name: "Help Alice",
        description: "...",
        image: "alice_terrace0A",
        onStart: (quest, { toast }) => toast(`${quest.name} started`),
        onContinue: (stage, { toast }) => toast(`${stage.name} updated`),
    },
);

RegisteredQuests.add(aliceQuest);

QuestProps: name, description, icon, image, inDevelopment, onStart, onContinue (onNextStage is deprecated). StageProps: name, description, adviceDescription, image, flags / flagsRequired ({ flag, description } — Pixi'VN flag names), questsRequired ({ quest, stageNumber }), deltaDateRequired (days after the previous stage ended), requestDescriptionToStart, onStart, onEnd.

Start / continue

Prefer ink when configured:

ink
=== start ===
# start quest aliceQuest
-> DONE

=== alice_gave_book ===
# continue quest aliceQuest
-> DONE
ts
await aliceQuest.start(props);     // OnRunProps; pass {} if none
await aliceQuest.continue(props);  // completes current stage and goes on, unconditionally
await aliceQuest.advanceIfCompleted(props); // only if the current stage is completed (flags, etc.)

advanceUnconditionally(props) skips the completed check. continue is what # continue quest calls. advanceIfCompleted has no ink command.

Query

TypeScriptink variable
quest.startedaliceQuest_started
quest.completedaliceQuest_completed
quest.failedaliceQuest_failed
quest.currentStageIndexaliceQuest_currentStageIndex

Also quest.inProgress, quest.currentStage, quest.stages. currentStageIndex goes from 0 to stages.length - 1, and equals stages.length when completed. In ink use a conditional on the index to select the dialogue per stage:

ink
{ aliceQuest_currentStageIndex:
- 0: -> talk_alice0
- 1: -> talk_alice1
- else: alice: Thanks again.
}

Fail

aliceQuest.failed = true; in TypeScript (no ink command by default; register a custom hashtag command if you need one).

Get

RegisteredQuests.get(id) / .values().

Custom class

Extend QuestStoredClass (super(id, stages, props) with QuestStoredClassProps), implement QuestInterface, augment it in nqtr.d.ts with name, description, image?, inDevelopment.

Pitfalls

  • Stage onStart runs when the stage becomes current; with deltaDateRequired/questsRequired it may start later (currentStageMustStart, startCurrentStage are system functions).
  • # continue quest on a quest that is not started does nothing useful: start it first (# start quest).
  • Quest variables in ink are read-only and must not be declared with VAR.
같은 저장소의 Skills

더 많은 Skills

모든 Skills
drincs-productions
커뮤니티

nqtr

Index and entry point of the NQTR skill set — start here for any task on a project using @drincs/nqtr (Navigation Quest Time Routine), then follow the skill map to the right skill (navigation, time, activity, routine, quest, ink). Use when installing/configuring @drincs/nqtr, wiring vitePluginNqtr, overriding OnRunProps or the Interface types in nqtr.d.ts, writing custom Room/Location/Map/Activity/Commitment/Quest classes, or deciding whether to write NQTR logic in ink or TypeScript.

1시간 설치 수
3
GitHub Stars
2
업데이트
11월 17일
drincs-productions
커뮤니티

nqtr-activity

Use when creating NQTR activities (actions the player can take, linked to rooms/locations/maps) — ActivityBaseModel, RegisteredActivities, linking at init (activities in the room constructor) vs at runtime (room.addActivity / " add activity X in room"), unlinking, timeSlot/dateScheduling, disabled/hidden, and custom Activity classes.

1시간 설치 수
3
GitHub Stars
2
업데이트
11월 17일
drincs-productions
커뮤니티

nqtr-ink

Use when writing .ink files in a Pixi'VN project that uses @drincs/nqtr — every NQTR hashtag command ( enter room, set time, set date, wait, add/remove activity, add/remove routine, start/continue quest) and the quest state variables (questIdstarted, completed, failed, currentStageIndex), plus createNqtrHandler setup and options. Prefer this over TypeScript labels whenever ink is configured.

1시간 설치 수
3
GitHub Stars
2
업데이트
11월 17일
drincs-productions
커뮤니티

nqtr-navigation

Use when defining or navigating NQTR rooms, locations and maps — RoomBaseModel/LocationBaseModel/MapBaseModel, RegisteredRooms/RegisteredLocations/RegisteredMaps, navigator.currentRoom, " enter room" in ink, entrance rooms, and custom Room/Location/Map classes. Navigation is the base of NQTR; activities and routines attach to it.

1시간 설치 수
3
GitHub Stars
2
업데이트
11월 17일