An open library of RPG Maker MZ plugins, powered by the community.

PGMZ - The Community-Driven Plugin Library for RPG Maker MZ

MZ plugins

Quests that read one world state, with branches that stay committed - ChronicleCore.js

Plugin desc : Quests as predicates over one world-state store: flags, counters, faction reputation and past choices in a single condition language, with branch commitments that cannot be silently undone.

License :
・Copyright: Retained
・Commercial Use: Allowed
・Modification: Allowed
・Redistribution: Prohibited (This does not apply to works made using the material.)
・Details: See Download Page / In-plugin documentation

Author : CSAF — Core Systems Asset Factory

Website : https://csaf.itch.io

Desc page : https://csaf.itch.io/chronicle-core

Download Page : https://csaf.itch.io/chronicle-core

File name : ChronicleCore.js

Help of plugin :

ChronicleCore.js
============================================================================

Every quest plugin for MZ is a JOURNAL — a place to read back what an NPC
already told you. This is the layer underneath that: the part that decides
what your choices actually DO.

Keep your quest log. This plugin does not replace it.

----------------------------------------------------------------------------
The one idea
----------------------------------------------------------------------------

A quest does not own its progress. It READS the world.

There is one world-state store per save. Objectives, branch gates, quest
availability and failure are all predicates over that one store. So a choice
made in Act 1 changes a quest written in Act 3 without either quest knowing
the other exists — you write a flag, and everything that reads it moves.

That is why this cannot be retrofitted onto a journal, and it is the whole
product in one sentence.

----------------------------------------------------------------------------
The condition language
----------------------------------------------------------------------------

NOTE ON THIS PAGE: the condition language uses the usual numeric comparison
operators. This site strips angle-bracket characters from submitted text, so
those operators cannot be printed here. Every example below is shown in its
exact form in the plugin's own help, inside the download. Nothing else has
been changed.

One language, used everywhere a condition is accepted:

  flag blacksmith_dead
  not flag blacksmith_dead
  flag gate_open is false
  count wolves_killed        (compared against a number)
  rep thieves                (compared against a number)
  quest guild_war is complete
  chose guild_war side_thieves

Combine with and / or / not and parentheses:

  flag reached_city and (chose guild_war side_thieves or flag thieves_allied)

Quest states are: unavailable, available, active, complete, failed.

A blank condition means "no requirement". A MISSPELLED condition is a loud
error at load time, not a gate that silently opens — a typo that quietly
evaluates true is the bug you find months later with nothing to point at.

----------------------------------------------------------------------------
Branches are committed, not suggested
----------------------------------------------------------------------------

Branching is easy to offer and hard to guarantee. If siding with the thieves
merely sets a variable, nothing stops a later event from setting the
merchants' variable too, and the game enters a state you never designed.

Here, committing a branch permanently forecloses every other branch of that
quest, and taking a foreclosed branch is an error rather than a silent
double-commit. The engine's job is to make the impossible state impossible.

----------------------------------------------------------------------------
Using it from events
----------------------------------------------------------------------------

Plugin commands cover the common cases. For a Conditional Branch, use the
Script field:

  $chronicle.check('flag thieves_allied and flag reached_city')

Other script calls:

  $chronicle.flag('gate_open')             // returns true or false
  $chronicle.setFlag('gate_open', true)
  $chronicle.count('wolves_killed')        // returns a number
  $chronicle.add('wolves_killed', 1)
  $chronicle.rep('thieves')                // returns a number
  $chronicle.tier('thieves')               // returns e.g. 'friendly'
  $chronicle.addRep('thieves', 10)
  $chronicle.state('guild_war')            // returns e.g. 'active'
  $chronicle.chose('guild_war')            // returns the branch id, or null
  $chronicle.commit('guild_war', 'side_thieves')

----------------------------------------------------------------------------
Compatibility
----------------------------------------------------------------------------

Nothing in this plugin overwrites a core method. Every hook saves the
original and calls it, so any quest log, menu plugin or save plugin keeps
working. World state travels in its own save slot and an older save loads as
an empty world rather than crashing.

----------------------------------------------------------------------------
Terms
----------------------------------------------------------------------------

See LICENSE.txt. Commercial use permitted in games; redistribution of the
plugin source itself is not.

Every quest plugin for RPG Maker MZ is a journal — somewhere to read back what an NPC already told you. Chronicle Core is the layer underneath: the part that decides what your choices actually do. Keep your quest log; this does not replace it.

The one idea: a quest does not own its progress, it reads the world. There is one world-state store per save, and objectives, branch gates, quest availability and failure are all predicates over that one store. So a choice made in Act 1 changes a quest written in Act 3 without either quest knowing the other exists.

What it does

  • One condition language everywhere — flags, counters, faction reputation, quest states and past choices, combined with and / or / not and parentheses.
  • A misspelled condition is a loud error at load time, not a gate that silently opens. A typo that quietly evaluates true is the bug you find months later with nothing to point at.
  • Branches are committed, not suggested. Committing a branch permanently forecloses every other branch of that quest, and taking a foreclosed branch is an error rather than a silent double-commit.
  • Faction reputation with tiers, usable anywhere a condition is accepted.
  • A dedicated journal scene with its own custom UI — it does not use the stock MZ window look.

Requires: RPG Maker MZ.

Compatibility: nothing overwrites a core method. Every hook saves the original and calls it, so quest logs, menu plugins and save plugins keep working. World state travels in its own save slot, and an older save loads as an empty world rather than crashing.

Licence: commercial use is fine, no royalties, and you may modify the source for your own games. Redistributing or reselling the plugin file itself is not permitted — so this entry is an introduction and a link only, and no file is attached. Full terms ship as LICENSE.txt inside the download.

Price: a paid plugin; the itch.io page above shows the current price.

AI disclosure: the code and the store images for this plugin were generated with AI assistance, and this is disclosed on the itch.io listing as well. The source ships as readable, unobfuscated JavaScript.

スポンサードリンク

-MZ plugins

Copyright© PGMZ - The Community-Driven Plugin Library for RPG Maker MZ , 2026 All Rights Reserved.