drincs-productions/nqtr

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"), unl…

소스 보기

사용 방법

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

시작 전 확인

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

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

NQTR activities

Official docs: pixi-vn.com/nqtr/activity. Index: nqtr. Ink commands: nqtr-ink.

An activity is an action the player can take (sleep in the bed, order a product, ...) linked to a navigation element (rooms/locations/maps). How it is shown and triggered (button, icon, sprite) is up to your UI.

Initialize

new ActivityBaseModel(id, onRun, props); register with RegisteredActivities.add(...) (required). onRun(activity, props) receives the OnRunProps; typically navigate to the narration screen, then jump to the story label/knot. When the story is written in ink, jump to the ink knot with the same name.

ts
import { ActivityBaseModel, RegisteredActivities, timeTracker } from "@drincs/nqtr";
import { narration } from "@drincs/pixi-vn";

export const bed = new ActivityBaseModel(
    "bed",
    async (_, props) => {
        await props.navigate({ to: "/game/narration" });
        await narration.jump(timeTracker.nowIsBetween(5, 22) ? "nap" : "sleep", props);
    },
    { name: "bed" },
);

RegisteredActivities.add(bed);
ink
=== nap ===
mc: A short nap.
# wait 2
-> DONE

ActivityProps: name, timeSlot ({ from, to? }, active only in that time range), dateScheduling ({ from, to? }, active only in that date range), disabled / hidden (boolean or a Pixi'VN flag name), renderIcon.

Link (many-to-many)

An activity is only available when linked to a navigation element.

  1. At initialization — activities: ["bed"] in the room/location/map constructor. Not saved with the game, so you can change it between versions without migrations.
  2. During the game — saved with the game; for temporary activities.
ink
# add activity order_product in mc_room
ts
mcRoom.addActivity("order_product"); // or the activity instance

Unlink

Only activities linked at runtime can be removed:

ink
# remove activity order_product from mc_room
ts
mcRoom.removeActivity("order_product");

Init-time links cannot be removed; use disabled/hidden or timeSlot/dateScheduling to control them.

Get

RegisteredActivities.get(id) and RegisteredActivities.values(). activity.isActive(options?) tells whether it is available for the current time/date; activity.expired whether its date range has passed.

Custom class

Extend ActivityStoredClass and implement ActivityInterface; augment the interface in nqtr.d.ts with name, disabled, hidden, sprite?, icon?. Constructor: super(id, onRun, props) with ActivityStoredClassProps (timeSlot, dateScheduling). Persist disabled/hidden via getStorageProperty/setStorageProperty. Override isActive to return false when hidden, and run to refresh the UI after running (await runProps.invalidateInterfaceData()), as the templates do.

Pitfalls

  • Forgetting RegisteredActivities.add.
  • Linking by id before the activity is registered: register activities before use, or rely on the id lists/Vite plugin for validation.
  • Prefer a stable id: ink commands use it.
같은 저장소의 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-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일
drincs-productions
커뮤니티

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, currentStageIndex) and the ink commands " start quest", " continue quest" with the questIdstarted / currentStageIndex variables.

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