drincs-productions/nqtr

nqtr-time

Use when configuring or using the NQTR time system — timeTracker.initialize (dayStartTime, dayEndTime, timeSlots, weekLength, weekendStartDay, getDayName), currentTime/currentDate, increaseTime/increaseDate, nowIsBetween, isWeekend, currentTimeSlot, and the…

소스 보기

사용 방법

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

시작 전 확인

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

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

NQTR time system

Official docs: pixi-vn.com/nqtr/time. Index: nqtr. Use ink for story-side time changes when available: nqtr-ink.

date and time are deliberately generic numbers: time is the time of day and resets each time date increments. Time can mean hours, minutes or an era. Use timeTracker (import from @drincs/nqtr).

Initialize (TypeScript, once at startup)

ts
import { timeTracker } from "@drincs/nqtr";

timeTracker.initialize({
    defaultTimeSpent: 1,   // default for `# wait`
    dayStartTime: 0,
    dayEndTime: 24,
    timeSlots: [
        { name: "Morning", startTime: 5 },
        { name: "Afternoon", startTime: 12 },
        { name: "Evening", startTime: 18 },
        { name: "Night", startTime: 22 },
    ],
    weekLength: 7,
    weekendStartDay: 6,    // default weekLength - 1
    getDayName: (weekDayNumber) => ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"][weekDayNumber],
});

Defaults: dayStartTime 0, dayEndTime 24, defaultTimeSpent 1, timeSlots [], weekLength 7.

Get / set

ts
timeTracker.currentTime;      // number
timeTracker.currentDate;      // number
timeTracker.currentTime = 12;
timeTracker.currentDate = 5;
ink
# set time 12
# set time 18.30
# set time 18:30   // ':' is converted to '.' internally
# set date 5

Increment

increaseTime(delta?) adds time; past dayEndTime it increments the date and restarts from dayStartTime plus the overflow. increaseDate(delta?, time?) adds days and optionally sets the time.

ts
timeTracker.increaseTime(2);
timeTracker.increaseDate(1, 8); // +1 day, time 8
ink
# wait                      // + defaultTimeSpent
# wait 2                    // + 2 time units
# wait days 1               // + 1 day, time = dayStartTime
# wait days 1 hours 2       // + 1 day and + 2 time

Queries

APIMeaning
timeTracker.isWeekendcurrent day is in the weekend
timeTracker.currentWeekDayNumber0-based weekday index
timeTracker.currentDayNamevia getDayName
timeTracker.currentTimeSlotindex in timeSlots of the current slot
timeTracker.nowIsBetween(from, to)current time in [from, to); wraps over midnight when from > to

Time-dependent images

Do not branch manually everywhere: build a small class (TimeSlotsImage) holding one image per slot and returning the right one from timeTracker.currentTimeSlot in a src getter, then use it for room backgrounds/sprites.

Pitfalls

  • Activities/commitments scheduling (timeSlot: { from, to }) uses the same time scale: keep dayEndTime consistent with the slots you write. A slot with from > to (e.g. { from: 20, to: 10 }) wraps over midnight.
  • Time changes are not automatic: the story/UI must call # wait / increaseTime when the player spends time.
같은 저장소의 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일