Repository navigation
Add a Skill Costs card to Database > Skills for Skills and States Core cost types - #82
Open
Xehanort88 wants to merge 3 commits into
Open
Xehanort88 wants to merge 3 commits into
Xehanort88 wants to merge 3 commits into
Conversation
…e cost types When the project's plugin list enables VisuMZ_1_SkillsStatesCore, the Skills page lists the cost types its Skill Cost Types parameter defines and sets them with fields: amount, a value / % choice where the type reads both, Maximum and Minimum, and item costs as a list picked by name. Everything is stored as the notetag the plugin already reads, changed where it stands in the Note. MP and TP as a value are the Invocation fields themselves. A form is offered only when the cost type's own pattern reads the card's tag back, so a type written another way is listed with a count of its tags and no fields. Opening a skill writes nothing, and without the plugin there is no card. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A line under the table, shown when MP or TP is among the cost types: their value is the Invocation cost field itself, the same number in both places, and a % is a notetag the plugin adds on top of that field. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…w pane Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
VisuStella Skills and States Core lets a project define skill cost types (HP, Gold, Potion, and any it adds) in its Skill Cost Types parameter. Only MP and TP have fields in Database › Skills; every other cost is typed into the Note by hand as
<Gold Cost: 100>, skill by skill.What this adds
A Skill Costs card on Database › Skills, after Invocation, in the manner of the Passive States card: it appears only when the project's
js/reactor_plugins.jsenablesVisuMZ_1_SkillsStatesCoreand that entry defines a cost type the card can read. Without the plugin there is no card and the page is unchanged.<MP Cost: n>in the Note is flagged, because the plugin copies it over the field when the database loads.How the tags are found: each cost type's
CalcJSis scanned for regex literals that start with<, they are compiled, and every tag the card could write is tried against them. A form is offered only when the type's own pattern reads the card's tag back with the number it was given, so the card never writes a tag the plugin would not read. A type whose patterns fit none of the known shapes is listed with a count of its tags and no fields.Where
editor/src/database/SkillCostsSection.js(RRSkillCosts): a pure half (classify, read, write) andcreateSectioneditor/src/database/DatabaseSkillEditor.js: mounts the card after Invocationeditor/index.html: script tageditor/src/I18nReviewedTranslations.js: 8 new phrases in all 17 localeseditor/CHANGELOG.mdeditor/tests/skill-costs-section.test.cjs: 14 testsNo runtime change.
Verification
tests/skill-costs-section.test.cjs: 14 pass. They load the real module and draw the real card againstcard-dom: discovery, classification, in-place edits with LF and CRLF notes, unit change, MP as field and as tag, item costs, and that showing the card or setting a field to the value it already shows writes nothing.getDirtyKeys()empty; edits land in the Note; typing in the Note updates the card; with the plugin disabled the card is absent.Limits
<JS … Cost>blocks and the battler-side cost tags (on actors, classes, equipment, states) are not edited. A JS block is flagged as present.🤖 Generated with Claude Code