Add mod documentation in seven languages

This commit is contained in:
cthangover committed 2026-10-29 09:25:46 +01:00
1 parent e25421f925
commit e7c3d4d462
18 files changed
+456 -8

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

+64
View File
@@ -0,0 +1,64 @@
# Battle Formulas — battle skills written as data
Battle Formulas lets a battle action be written entirely in data: how much it hurts or heals is a **formula** of the stats of the one acting and of the target, it may cost mana, ignore the shield or stun. No code is needed, and the same skill works in both battle systems, FF Battle and Card Battle. Classic RPG Rules' Power strike, Fireball, Heal and Guard break are such skills.
It also gives enemies their battle numbers from their stats, and shows pools such as mana as bars on the battle cards.
The formulas use the formula language of Stats Engine; the battle screens are those of the battle systems. This mod is the link between them.
## A skill, step by step
Power strike from Classic RPG Rules:
```json
{ "Id": "classic/power_strike", "Type": "ToEnemy",
"Values": [ "RequiredPoint=1", "Formula=a.atk * 1.5 + rand(0, a.str / 2)" ] }
```
In the FF battle menu the card shows the formula, and the hint is the skill's description:
![The Hero's actions menu with Power strike selected; its card shows Target enemy, 1 AP and Formula a.atk * 1.5 + rand(0, a.str / 2), with the description "A full swing: one and a half times the attack and a bit more from strength."](assets/formula-menu.jpg)
The RPG Plus warrior has attack 12 and strength 9, so the strike does 12 × 1.5 = 18 plus a random 0 to 4.5. In the battle captured here it did 22:
![The battle log: Hero: Power strike → Wolf; Wolf's shield absorbed 2 · left 0; Power strike: Hero → Wolf · -20 HP; then the wolf's Defence, +4 DEF (total 4).](assets/formula-log.jpg)
The wolf's shield of 2 took the first part — Power strike does not ignore shields — and the wolf lost 20 health, from 31 to 11.
The same card in Card Battle:
![The Power strike action card in Card Battle: Target enemy, 1 AP, Formula a.atk * 1.5 + rand(0, a.str / 2), RequiredPoint 1.](assets/formula-card.jpg)
## Enemies get numbers from their stats
The wolf's 31 health, attack 7 and shield 2 are not written anywhere as numbers. RPG Plus gives the wolf stats with a patch:
```json
{ "Id": "rpg_wolf", "Stats": { "str": 5, "vit": 5, "agi": 7 } }
```
When the battle starts, this mod computes the wolf's sheet with Classic RPG Rules at its level 2: health `12 + vit * 3 + level * 2` = 31, attack `str + level` = 7, defence `floor(vit / 2)` = 2. An enemy without stats data keeps the numbers from its character file.
## Values of a formula action
An action entity (kind `action`, see Characters Engine) with a `Formula=` value:
- `Formula=` — the amount; never below 0. `a.` is the one acting, `b.` the target: any of their stats, and also `hp`, `hp_max`, `attack`, `defence`, `point`. Functions such as `rand(lo, hi)`, `floor`, `min`, `max` come from Stats Engine.
- `Effect=damage` (the default) or `Effect=heal`.
- `Cost=mp:4` — spends 4 of a pool stat; when a party member has too little, the action is refused and nothing is spent. Enemies pay nothing.
- `RequiredPoint=1` — action points, as in every battle system.
- `Pierce=1` — ignores the target's shield.
- `State=effect/physics/stun` with `StateTurns=1` and `StateChance=35` — a 35% chance to put a status effect on the target for that many turns.
- `Type` — `ToEnemy`, `ToSelf` or `ToAlias` (an ally), as for any action.
Classic RPG Rules' Fireball, for example:
```json
"Values": [ "RequiredPoint=1", "Cost=mp:4", "Pierce=1", "Formula=a.mag * 2 + rand(1, 6)" ]
```
## If something goes wrong
1. **A skill does 0.** A name in the formula is not a stat of the game (unknown names count as 0), or the result was negative.
2. **A skill is refused.** The character lacks the action points or the pool stat named in `Cost=`.
3. **An enemy has the numbers of its file, not of its stats.** It has no `Stats`, `Archetype` or `Traits`.
+64
View File
@@ -0,0 +1,64 @@
# Battle Formulas — habilidades de combate escritas como datos
Battle Formulas permite escribir una acción de combate por completo en datos: cuánto daña o cura lo decide una **fórmula** con las estadísticas de quien actúa y del objetivo; la acción puede costar maná, ignorar el escudo o aturdir. No hace falta código, y la misma habilidad funciona en los dos sistemas de combate, FF Battle y Card Battle. Así son el Power strike, el Fireball, el Heal y el Guard break de Classic RPG Rules.
Además, calcula los números de combate de los enemigos a partir de sus estadísticas y muestra las reservas como el maná en barras sobre las cartas de combate.
Las fórmulas usan el lenguaje de fórmulas de Stats Engine; las pantallas de combate son las de los sistemas de combate. Este mod es el enlace entre ambos.
## Una habilidad, paso a paso
El Power strike de Classic RPG Rules:
```json
{ "Id": "classic/power_strike", "Type": "ToEnemy",
"Values": [ "RequiredPoint=1", "Formula=a.atk * 1.5 + rand(0, a.str / 2)" ] }
```
En el menú de combate de FF la carta muestra la fórmula, y la pista es la descripción de la habilidad:
![El menú de acciones del héroe con Power strike seleccionado; su carta muestra Target enemy, 1 AP y Formula a.atk * 1.5 + rand(0, a.str / 2), junto con la descripción «Un golpe completo: ataque y medio, y un poco más por fuerza».](assets/formula-menu.jpg)
El guerrero de RPG Plus tiene ataque 12 y fuerza 9, así que el golpe hace 12 × 1.5 = 18 más un aleatorio de 0 a 4.5. En el combate capturado aquí hizo 22:
![El registro de combate: Hero: Power strike → Wolf; Wolf's shield absorbed 2 · left 0; Power strike: Hero → Wolf · -20 HP; después la Defence del lobo, +4 DEF (total 4).](assets/formula-log.jpg)
El escudo del lobo (2) absorbió la primera parte — Power strike no ignora escudos —, y el lobo perdió 20 de salud: de 31 a 11.
La misma carta en Card Battle:
![La carta de acción Power strike en Card Battle: Target enemy, 1 AP, Formula a.atk * 1.5 + rand(0, a.str / 2), RequiredPoint 1.](assets/formula-card.jpg)
## Los enemigos toman sus números de sus estadísticas
La salud 31 del lobo, su ataque 7 y su escudo 2 no están escritos como números en ningún sitio. RPG Plus le da al lobo estadísticas con un parche:
```json
{ "Id": "rpg_wolf", "Stats": { "str": 5, "vit": 5, "agi": 7 } }
```
Cuando empieza el combate, este mod calcula la hoja del lobo con Classic RPG Rules a su nivel 2: salud `12 + vit * 3 + level * 2` = 31, ataque `str + level` = 7, defensa `floor(vit / 2)` = 2. Un enemigo sin datos de estadísticas conserva los números de su archivo de personaje.
## Los valores de una acción con fórmula
Una entidad de acción (tipo `action`, véase Characters Engine) con un valor `Formula=`:
- `Formula=` — la cantidad; nunca por debajo de 0. `a.` es quien actúa, `b.` el objetivo: cualquiera de sus estadísticas, y además `hp`, `hp_max`, `attack`, `defence`, `point`. Funciones como `rand(lo, hi)`, `floor`, `min`, `max` vienen de Stats Engine.
- `Effect=damage` (lo predeterminado) o `Effect=heal`.
- `Cost=mp:4` — gasta 4 de una estadística de reserva; si a un miembro del grupo no le llega, la acción se rechaza y no se gasta nada. Los enemigos no pagan nada.
- `RequiredPoint=1` — puntos de acción, como en todo sistema de combate.
- `Pierce=1` — ignora el escudo del objetivo.
- `State=effect/physics/stun` con `StateTurns=1` y `StateChance=35` — un 35% de probabilidad de aplicar un efecto de estado al objetivo durante esos turnos.
- `Type` — `ToEnemy`, `ToSelf` o `ToAlias` (un aliado), como en cualquier acción.
El Fireball de Classic RPG Rules, por ejemplo:
```json
"Values": [ "RequiredPoint=1", "Cost=mp:4", "Pierce=1", "Formula=a.mag * 2 + rand(1, 6)" ]
```
## Si algo sale mal
1. **Una habilidad hace 0.** Algún nombre de la fórmula no es una estadística del juego (los nombres desconocidos cuentan como 0), o el resultado salió negativo.
2. **Una habilidad se rechaza.** Al personaje le faltan puntos de acción o la estadística de reserva nombrada en `Cost=`.
3. **Un enemigo tiene los números de su archivo, no de sus estadísticas.** No tiene `Stats`, `Archetype` ni `Traits`.
+64
View File
@@ -0,0 +1,64 @@
# Battle Formulas —— データとして書くバトルスキル
Battle Formulas を使うと、バトルアクションを完全にデータとして書けます。どれだけ傷つけ、どれだけ回復するかは、行動者と対象のステータスから成る**式**で決まり、マナの消費、シールドの無視、スタンも設定できます。コードは不要で、同じスキルが FF Battle と Card Battle の両方のシステムで機能します。Classic RPG Rules の Power strike・Fireball・Heal・Guard break は、まさにそのようなスキルです。
さらに、敵の戦闘値をステータスから計算し、マナのようなリソース(プール)を戦闘カードのバーとして表示します。
式は Stats Engine の式言語で書かれ、戦闘画面はバトルシステムのものです。このModはその二つをつなぐ役割です。
## スキルを一つずつ
Classic RPG Rules の Power strike:
```json
{ "Id": "classic/power_strike", "Type": "ToEnemy",
"Values": [ "RequiredPoint=1", "Formula=a.atk * 1.5 + rand(0, a.str / 2)" ] }
```
FF のバトルメニューではカードに式が表示され、ヒントにはスキルの説明が出ます:
![Power strike を選んだ英雄のアクションメニュー。カードには Target enemy、1 AP、式 a.atk * 1.5 + rand(0, a.str / 2)、そして説明「渾身の一撃:攻撃の1.5倍に力の値を少し上乗せ」。](assets/formula-menu.jpg)
RPG Plus の戦士は攻撃 12・力 9 なので、この一撃は 12 × 1.5 = 18 に 0〜4.5 の乱数を加えた値になります。ここで記録した戦闘では 22 を出しました:
![戦闘ログ:Hero: Power strike → Wolf/Wolf's shield absorbed 2 · left 0/Power strike: Hero → Wolf · -20 HP/続いて狼の Defence、+4 DEF(合計 4)。](assets/formula-log.jpg)
狼のシールド(2)が最初の部分を受け止めました——Power strike はシールドを無視しません——体力は 20 減り、31 から 11 へ。
同じカードを Card Battle で見ると:
![Card Battle での Power strike アクションカード:Target enemy、1 AP、式 a.atk * 1.5 + rand(0, a.str / 2)、RequiredPoint 1。](assets/formula-card.jpg)
## 敵の数値はステータスから
狼の体力 31、攻撃 7、シールド 2 は、どこにも数値として書かれていません。RPG Plus はパッチで狼にステータスを与えます:
```json
{ "Id": "rpg_wolf", "Stats": { "str": 5, "vit": 5, "agi": 7 } }
```
戦闘が始まると、このModは Classic RPG Rules に従ってレベル 2 の狼のシートを計算します。体力 `12 + vit * 3 + level * 2` = 31、攻撃 `str + level` = 7、防御 `floor(vit / 2)` = 2。ステータスデータのない敵は、キャラクターファイルの数値を使い続けます。
## 式アクションの値
`Formula=` 値を持つアクションエンティティ(種類 `action`。Characters Engine を参照):
- `Formula=`——量。決して 0 未満にはなりません。`a.` は行動者、`b.` は対象:両者の任意のステータスに加え、`hp`、`hp_max`、`attack`、`defence`、`point` が使えます。`rand(lo, hi)`、`floor`、`min`、`max` などの関数は Stats Engine 由来です。
- `Effect=damage`(既定)または `Effect=heal`。
- `Cost=mp:4`——プール型ステータスから 4 消費します。パーティメンバーが足りなければ行動は拒否され、何も消費されません。敵は支払い不要です。
- `RequiredPoint=1`——行動ポイント。どのバトルシステムでも同じです。
- `Pierce=1`——対象のシールドを無視します。
- `State=effect/physics/stun` に `StateTurns=1` と `StateChance=35` を合わせると——35% の確率で対象に状態異常をそのターン数の間与えます。
- `Type`——`ToEnemy`、`ToSelf`、`ToAlias`(味方)。どのアクションでも同じです。
たとえば Classic RPG Rules の Fireball:
```json
"Values": [ "RequiredPoint=1", "Cost=mp:4", "Pierce=1", "Formula=a.mag * 2 + rand(1, 6)" ]
```
## うまくいかないときは
1. **スキルが 0 になる。** 式の中の名前がゲームのステータスではない(未知の名前は 0 として数えられます)か、結果が負になりました。
2. **スキルが拒否される。** キャラクターに行動ポイント、または `Cost=` で指定したプール型ステータスが足りません。
3. **敵の数値がファイル由来で、ステータス由来でない。** `Stats`・`Archetype`・`Traits` を持っていません。
+64
View File
@@ -0,0 +1,64 @@
# Battle Formulas — 데이터로 쓰는 전투 스킬
Battle Formulas는 전투 행동을 전부 데이터로 쓸 수 있게 해 줍니다. 얼마나 아프게 하고 얼마나 회복하는지는 행동자와 대상의 능력치로 이뤄진 **공식**이 결정하며, 마나 소모, 방어막 무시, 기절도 지정할 수 있습니다. 코드가 필요 없고, 같은 스킬이 FF Battle과 Card Battle 어느 쪽 시스템에서도 작동합니다. Classic RPG Rules의 Power strike, Fireball, Heal, Guard break이 바로 그런 스킬입니다.
또한 적의 전투 수치를 능력치에서 계산하고, 마나 같은 자원을 전투 카드 위의 막대로 표시합니다.
공식은 Stats Engine의 공식 언어로 쓰이고, 전투 화면은 전투 시스템의 것입니다. 이 모드는 그 둘을 잇는 다리입니다.
## 스킬 하나, 단계별로
Classic RPG Rules의 Power strike:
```json
{ "Id": "classic/power_strike", "Type": "ToEnemy",
"Values": [ "RequiredPoint=1", "Formula=a.atk * 1.5 + rand(0, a.str / 2)" ] }
```
FF 전투 메뉴에서는 카드에 공식이 보이고, 힌트 자리에는 스킬 설명이 나옵니다:
![Power strike를 선택한 영웅의 행동 메뉴. 카드에는 Target enemy, 1 AP, 공식 a.atk * 1.5 + rand(0, a.str / 2)와 설명 "전력으로 휘두르는 일격: 공격의 1.5배에 힘에서 조금 더"가 보입니다.](assets/formula-menu.jpg)
RPG Plus의 전사는 공격 12, 힘 9이므로 이 일격은 12 × 1.5 = 18에 0에서 4.5 사이의 무작위 값을 더합니다. 여기에 담긴 전투에서는 22가 나왔습니다:
![전투 로그: Hero: Power strike → Wolf; Wolf's shield absorbed 2 · left 0; Power strike: Hero → Wolf · -20 HP; 이어서 늑대의 Defence, +4 DEF(총 4).](assets/formula-log.jpg)
늑대의 방어막(2)이 첫 부분을 흡수했습니다 — Power strike는 방어막을 무시하지 않죠 — 그래서 늑대는 체력을 20 잃고 31에서 11이 됐습니다.
같은 카드를 Card Battle에서 보면:
![Card Battle의 Power strike 행동 카드: Target enemy, 1 AP, 공식 a.atk * 1.5 + rand(0, a.str / 2), RequiredPoint 1.](assets/formula-card.jpg)
## 적의 수치는 능력치에서 나옵니다
늑대의 체력 31, 공격 7, 방어막 2는 어디에도 숫자로 적혀 있지 않습니다. RPG Plus는 패치로 늑대에게 능력치를 부여합니다:
```json
{ "Id": "rpg_wolf", "Stats": { "str": 5, "vit": 5, "agi": 7 } }
```
전투가 시작되면 이 모드는 Classic RPG Rules에 따라 2레벨 늑대의 시트를 계산합니다. 체력 `12 + vit * 3 + level * 2` = 31, 공격 `str + level` = 7, 방어 `floor(vit / 2)` = 2. 능력치 데이터가 없는 적은 캐릭터 파일의 수치를 그대로 씁니다.
## 공식 행동의 값
`Formula=` 값을 가진 행동 엔티티(종류 `action`, Characters Engine 참조):
- `Formula=` — 그 양입니다. 절대 0 아래로 내려가지 않습니다. `a.`는 행동자, `b.`는 대상: 두 쪽의 어떤 능력치든 쓸 수 있고, `hp`, `hp_max`, `attack`, `defence`, `point`도 있습니다. `rand(lo, hi)`, `floor`, `min`, `max` 같은 함수는 Stats Engine에서 옵니다.
- `Effect=damage`(기본값) 또는 `Effect=heal`.
- `Cost=mp:4` — 풀 스탯에서 4를 소모합니다. 파티원의 잔량이 부족하면 행동이 거부되고 아무것도 소모되지 않습니다. 적은 지불하지 않습니다.
- `RequiredPoint=1` — 행동 포인트. 모든 전투 시스템에서 마찬가지입니다.
- `Pierce=1` — 대상의 방어막을 무시합니다.
- `State=effect/physics/stun`에 `StateTurns=1`과 `StateChance=35`를 함께 — 35% 확률로 대상에게 상태 효과를 그 턴 수만큼 겁니다.
- `Type` — `ToEnemy`, `ToSelf` 또는 `ToAlias`(아군). 어떤 행동이든 마찬가지입니다.
예컨대 Classic RPG Rules의 Fireball:
```json
"Values": [ "RequiredPoint=1", "Cost=mp:4", "Pierce=1", "Formula=a.mag * 2 + rand(1, 6)" ]
```
## 문제가 생겼을 때
1. **스킬이 0을 냄.** 공식 속 이름이 게임의 능력치가 아닌(모르는 이름은 0으로 셉니다) 경우이거나, 결과가 음수로 나왔습니다.
2. **스킬이 거부됨.** 캐릭터에게 행동 포인트나 `Cost=`에 적힌 풀 스탯이 부족합니다.
3. **적이 파일의 수치를 씀, 능력치의 수치가 아님.** `Stats`, `Archetype`, `Traits`가 없는 것입니다.
+64
View File
@@ -0,0 +1,64 @@
# Battle Formulas — боевые навыки в виде данных
Battle Formulas позволяет записать боевое действие целиком в данных: сколько оно ранит или лечит — это **формула** от характеристик действующего и цели; действие может тратить ману, игнорировать щит или оглушать. Код не нужен, и один и тот же навык работает в обеих боевых системах — FF Battle и Card Battle. Таковы Power strike, Fireball, Heal и Guard break из Classic RPG Rules.
Кроме того, мод вычисляет боевые числа врагов из их характеристик и рисует запасы вроде маны полосками на боевых картах.
Формулы написаны на языке формул Stats Engine; боевые экраны принадлежат боевым системам. Этот мод — связующее звено между ними.
## Навык шаг за шагом
Power strike из Classic RPG Rules:
```json
{ "Id": "classic/power_strike", "Type": "ToEnemy",
"Values": [ "RequiredPoint=1", "Formula=a.atk * 1.5 + rand(0, a.str / 2)" ] }
```
В меню боя FF на карте видно формулу, а подсказкой служит описание навыка:
![Меню действий героя с выбранным Power strike; на карте — Target enemy, 1 AP и Formula a.atk * 1.5 + rand(0, a.str / 2), а также описание «Полный замах: полторы атаки и ещё немного от силы».](assets/formula-menu.jpg)
У воина из RPG Plus атака 12 и сила 9, поэтому удар наносит 12 × 1.5 = 18 плюс случайное от 0 до 4.5. В записанном здесь бою выпало 22:
![Журнал боя: Hero: Power strike → Wolf; Wolf's shield absorbed 2 · left 0; Power strike: Hero → Wolf · -20 HP; затем Defence волка, +4 DEF (всего 4).](assets/formula-log.jpg)
Щит волка (2) принял на себя первую часть — Power strike не игнорирует щиты, — и волк потерял 20 здоровья: с 31 до 11.
Та же карта в Card Battle:
![Карта действия Power strike в Card Battle: Target enemy, 1 AP, Formula a.atk * 1.5 + rand(0, a.str / 2), RequiredPoint 1.](assets/formula-card.jpg)
## Враги берут числа из своих характеристик
Здоровье волка 31, атака 7 и щит 2 нигде не записаны числами. RPG Plus даёт волку характеристики патчем:
```json
{ "Id": "rpg_wolf", "Stats": { "str": 5, "vit": 5, "agi": 7 } }
```
Когда начинается бой, мод считает лист волка по правилам Classic RPG Rules для его 2-го уровня: здоровье `12 + vit * 3 + level * 2` = 31, атака `str + level` = 7, защита `floor(vit / 2)` = 2. Враг без данных о характеристиках оставляет числа из своего файла персонажа.
## Значения действия-формулы
Сущность действия (вид `action`, см. Characters Engine) со значением `Formula=`:
- `Formula=` — величина; никогда не меньше 0. `a.` — действующий, `b.` — цель: любые их характеристики, а также `hp`, `hp_max`, `attack`, `defence`, `point`. Функции вроде `rand(lo, hi)`, `floor`, `min`, `max` приходят из Stats Engine.
- `Effect=damage` (по умолчанию) или `Effect=heal`.
- `Cost=mp:4` — тратит 4 из характеристики-запаса; если члену отряда её не хватает, действие отклоняется и ничего не тратится. Враги не платят ничего.
- `RequiredPoint=1` — очки действий, как в любой боевой системе.
- `Pierce=1` — игнорирует щит цели.
- `State=effect/physics/stun` вместе с `StateTurns=1` и `StateChance=35` — с шансом 35% вешает на цель статусный эффект на столько ходов.
- `Type` — `ToEnemy`, `ToSelf` или `ToAlias` (союзник), как у любого действия.
Например, Fireball из Classic RPG Rules:
```json
"Values": [ "RequiredPoint=1", "Cost=mp:4", "Pierce=1", "Formula=a.mag * 2 + rand(1, 6)" ]
```
## Если что-то пошло не так
1. **Навык делает 0.** Какое-то имя в формуле — не характеристика игры (неизвестные имена считаются за 0), либо результат вышел отрицательным.
2. **Навык отклонён.** Персонажу не хватило очков действий либо характеристики-запаса, указанной в `Cost=`.
3. **У врага числа из файла, а не из характеристик.** У него нет `Stats`, `Archetype` или `Traits`.
+64
View File
@@ -0,0 +1,64 @@
# Battle Formulas — kỹ năng chiến đấu viết bằng dữ liệu
Battle Formulas cho phép viết một hành động chiến đấu hoàn toàn bằng dữ liệu: hành động gây hay hồi bao nhiêu là một **công thức** dựa trên chỉ số của người hành động và mục tiêu; nó có thể tốn mana, bỏ qua lớp khiên hoặc gây choáng. Không cần viết mã, và cùng một kỹ năng chạy được trên cả hai hệ thống chiến đấu, FF Battle lẫn Card Battle. Power strike, Fireball, Heal và Guard break của Classic RPG Rules đều là những kỹ năng như thế.
Mod còn suy ra các con số chiến đấu của kẻ địch từ chỉ số của chúng, và vẽ các nguồn tài nguyên như mana thành thanh trên thẻ chiến đấu.
Công thức dùng ngôn ngữ công thức của Stats Engine; còn màn hình chiến đấu thuộc về các hệ thống chiến đấu. Mod này chính là cầu nối giữa hai phần đó.
## Một kỹ năng, từng bước
Power strike của Classic RPG Rules:
```json
{ "Id": "classic/power_strike", "Type": "ToEnemy",
"Values": [ "RequiredPoint=1", "Formula=a.atk * 1.5 + rand(0, a.str / 2)" ] }
```
Trong menu chiến đấu của FF, thẻ hiển thị công thức, còn dòng gợi ý chính là mô tả của kỹ năng:
![Menu hành động của anh hùng với Power strike đang chọn; thẻ hiển thị Target enemy, 1 AP và công thức a.atk * 1.5 + rand(0, a.str / 2), kèm mô tả "Vung trọn đòn: một lần rưỡi sát thương và thêm một chút từ sức mạnh".](assets/formula-menu.jpg)
Chiến binh RPG Plus có sát thương 12 và sức mạnh 9, nên đòn này gây 12 × 1.5 = 18 cộng một giá trị ngẫu nhiên từ 0 đến 4.5. Trong trận được chụp lại ở đây nó gây 22:
![Nhật ký chiến đấu: Hero: Power strike → Wolf; Wolf's shield absorbed 2 · left 0; Power strike: Hero → Wolf · -20 HP; rồi đến Defence của sói, +4 DEF (tổng 4).](assets/formula-log.jpg)
Lớp khiên 2 điểm của sói đỡ phần đầu — Power strike không bỏ qua khiên — nên con sói mất 20 máu, từ 31 xuống 11.
Cùng thẻ đó trong Card Battle:
![Thẻ hành động Power strike trong Card Battle: Target enemy, 1 AP, công thức a.atk * 1.5 + rand(0, a.str / 2), RequiredPoint 1.](assets/formula-card.jpg)
## Kẻ địch lấy số từ chỉ số của chúng
Máu 31, sát thương 7 và lớp khiên 2 của con sói không hề được ghi dưới dạng con số ở bất kỳ đâu. RPG Plus trao chỉ số cho con sói bằng một bản vá:
```json
{ "Id": "rpg_wolf", "Stats": { "str": 5, "vit": 5, "agi": 7 } }
```
Khi trận chiến bắt đầu, mod này tính bảng chỉ số của con sói theo Classic RPG Rules ở cấp 2: máu `12 + vit * 3 + level * 2` = 31, sát thương `str + level` = 7, phòng thủ `floor(vit / 2)` = 2. Kẻ địch không có dữ liệu chỉ số sẽ giữ nguyên các con số từ tệp nhân vật của nó.
## Các giá trị của hành động công thức
Một thực thể hành động (loại `action`, xem Characters Engine) mang giá trị `Formula=`:
- `Formula=` — lượng tác động; không bao giờ nhỏ hơn 0. `a.` là người hành động, `b.` là mục tiêu: có thể dùng bất kỳ chỉ số nào của họ, cùng `hp`, `hp_max`, `attack`, `defence`, `point`. Các hàm như `rand(lo, hi)`, `floor`, `min`, `max` đến từ Stats Engine.
- `Effect=damage` (mặc định) hoặc `Effect=heal`.
- `Cost=mp:4` — trừ 4 điểm từ một chỉ số dạng nguồn; nếu thành viên đội không đủ, hành động bị từ chối và không tốn gì. Kẻ địch không phải trả giá.
- `RequiredPoint=1` — điểm hành động, như ở mọi hệ thống chiến đấu.
- `Pierce=1` — bỏ qua lớp khiên của mục tiêu.
- `State=effect/physics/stun` cùng `StateTurns=1` và `StateChance=35` — 35% cơ hội tròng lên mục tiêu một hiệu ứng trạng thái đúng số lượt đó.
- `Type` — `ToEnemy`, `ToSelf` hoặc `ToAlias` (đồng đội), như mọi hành động khác.
Lấy Fireball của Classic RPG Rules làm ví dụ:
```json
"Values": [ "RequiredPoint=1", "Cost=mp:4", "Pierce=1", "Formula=a.mag * 2 + rand(1, 6)" ]
```
## Khi có sự cố
1. **Kỹ năng gây đúng 0.** Có tên trong công thức không phải chỉ số của game (tên lạ được tính là 0), hoặc kết quả ra số âm.
2. **Kỹ năng bị từ chối.** Nhân vật thiếu điểm hành động hoặc thiếu chỉ số nguồn được nêu trong `Cost=`.
3. **Kẻ địch mang số từ tệp, chứ không từ chỉ số.** Nó không có `Stats`, `Archetype` hay `Traits`.
+64
View File
@@ -0,0 +1,64 @@
# Battle Formulas —— 以数据书写的战斗技能
Battle Formulas 让战斗动作可以完全用数据来写:动作造成多少伤害或治疗,是一个以行动者和目标属性为变量的**公式**;动作还可以消耗魔力、无视护盾或造成眩晕。无需任何代码,同一个技能就能在 FF Battle 和 Card Battle 两套战斗系统中通用。Classic RPG Rules 的 Power strike、Fireball、Heal 和 Guard break 就是这样写的技能。
它还会根据属性推算敌人的战斗数值,并把魔力之类的资源以进度条形式画在战斗卡牌上。
公式使用 Stats Engine 的公式语言;战斗画面则属于各战斗系统。这个模组就是两者之间的桥梁。
## 逐行拆解一个技能
Classic RPG Rules 的 Power strike:
```json
{ "Id": "classic/power_strike", "Type": "ToEnemy",
"Values": [ "RequiredPoint=1", "Formula=a.atk * 1.5 + rand(0, a.str / 2)" ] }
```
在 FF 战斗菜单里,卡牌上会显示公式,提示行则是技能的描述:
![英雄的动作菜单,已选中 Power strike;卡牌显示 Target enemy、1 AP 和公式 a.atk * 1.5 + rand(0, a.str / 2),并附描述「全力一击:1.5 倍攻击,再加一点力量加成」。](assets/formula-menu.jpg)
RPG Plus 的战士攻击为 12、力量为 9,因此这一击造成 12 × 1.5 = 18,再加 0 到 4.5 的随机值。在截图的这场战斗中它打出了 22:
![战斗日志:Hero: Power strike → Wolf;Wolf's shield absorbed 2 · left 0;Power strike: Hero → Wolf · -20 HP;随后是狼的 Defence,+4 DEF(共 4)。](assets/formula-log.jpg)
狼的护盾(2)先吸收了一部分——Power strike 并不无视护盾——狼因此损失 20 点生命,从 31 降到 11。
同一张卡在 Card Battle 中:
![Card Battle 中的 Power strike 动作卡:Target enemy、1 AP、公式 a.atk * 1.5 + rand(0, a.str / 2)、RequiredPoint 1。](assets/formula-card.jpg)
## 敌人的数值来自属性
狼的 31 点生命、攻击 7 和护盾 2 并不是写死的数字。RPG Plus 通过补丁赋予狼属性:
```json
{ "Id": "rpg_wolf", "Stats": { "str": 5, "vit": 5, "agi": 7 } }
```
战斗开始时,本模组按 Classic RPG Rules 为 2 级的狼计算面板:生命 `12 + vit * 3 + level * 2` = 31,攻击 `str + level` = 7,防御 `floor(vit / 2)` = 2。没有属性数据的敌人则继续使用其角色文件中的数值。
## 公式动作的取值
一个带有 `Formula=` 值的动作实体(`action` 类型,参见 Characters Engine):
- `Formula=`——数值大小;永不低于 0。`a.` 是行动者,`b.` 是目标:可用它们任意属性,也有 `hp`、`hp_max`、`attack`、`defence`、`point`。`rand(lo, hi)`、`floor`、`min`、`max` 等函数来自 Stats Engine。
- `Effect=damage`(默认)或 `Effect=heal`。
- `Cost=mp:4`——从某项资源属性中扣除 4;队友的存量不足时动作会被拒绝,什么也不消耗。敌人无需支付。
- `RequiredPoint=1`——行动点,与所有战斗系统一致。
- `Pierce=1`——无视目标的护盾。
- `State=effect/physics/stun` 配合 `StateTurns=1` 和 `StateChance=35`——以 35% 几率给目标施加状态效果,持续相应回合数。
- `Type`——`ToEnemy`、`ToSelf` 或 `ToAlias`(队友),与所有动作一致。
例如 Classic RPG Rules 的 Fireball:
```json
"Values": [ "RequiredPoint=1", "Cost=mp:4", "Pierce=1", "Formula=a.mag * 2 + rand(1, 6)" ]
```
## 出问题怎么办
1. **技能打出 0。** 公式中的某个名字并不是游戏里的属性(未知名字按 0 计),或者结果为负。
2. **技能被拒绝。** 角色的行动点不足,或 `Cost=` 指定的资源属性存量不够。
3. **敌人用的是文件里的数值,而不是属性推算值。** 它没有 `Stats`、`Archetype` 或 `Traits`。
+1 -1
View File
@@ -1,5 +1,5 @@
mod_battle_formulas_name = Battle Formulas
mod_battle_formulas_desc = Battle actions as data for every battle core: an action with “Formula=a.mag * 3 - b.mdf + rand(0, 4)” needs no code — damage or healing, a mana price (Cost=mp:5), shield piercing, a status with a chance. a.* is the one acting, b.* the target: their stats and live health, attack, defence and points. The same skill works in the FF-style battle and in the card battle. Enemies with stats take their battle numbers from their sheets.
mod_battle_formulas_desc = Battle skills written as data: damage and heal formulas over the participants' stats, resource costs, pierce and stun — no code, and the same skill works in every battle core.
battle_formulas/schema/field/values = Values
battle_formulas/schema/field/values_desc = The action's parameters; keys the schema does not know are kept as they are
battle_formulas/schema/field/required_point = Action points
+1 -1
View File
@@ -1,5 +1,5 @@
mod_battle_formulas_name = Fórmulas de combate
mod_battle_formulas_desc = Acciones de combate como datos para cualquier núcleo: una acción con «Formula=a.mag * 3 - b.mdf + rand(0, 4)» no necesita código — daño o curación, precio en maná (Cost=mp:5), perforar escudos, un estado con probabilidad. a.* es quien actúa, b.* el objetivo: sus estadísticas y su salud, ataque, defensa y puntos actuales. La misma habilidad funciona en el combate estilo FF y en el de cartas. Los enemigos con estadísticas toman sus números de combate de su hoja.
mod_battle_formulas_desc = Habilidades de combate escritas como datos: fórmulas de daño y curación sobre las estadísticas de los participantes, costes de recursos, perforar escudos y aturdimiento — sin código, y la misma habilidad funciona en cualquier núcleo de combate.
battle_formulas/schema/field/values = Valores
battle_formulas/schema/field/values_desc = Los parámetros de la acción; las claves que el esquema no conoce se conservan
battle_formulas/schema/field/required_point = Puntos de acción
+1 -1
View File
@@ -1,5 +1,5 @@
mod_battle_formulas_name = バトルの式
mod_battle_formulas_desc = どのバトルコアにも使えるデータとしてのバトル行動:「Formula=a.mag * 3 - b.mdf + rand(0, 4)」を持つ行動はコード不要——ダメージか回復、MP 消費(Cost=mp:5)、シールド貫通、確率付きの状態付与。a.* は行動する者、b.* は対象:そのステータスと現在の HP、攻撃、防御、ポイント。同じスキルが FF 風バトルでもカードバトルでも動く。ステータスを持つ敵はシートから戦闘値を得る。
mod_battle_formulas_desc = データとして書かれたバトルスキル:行動者と対象のステータスによるダメージ・回復の式、リソースのコスト、シールド貫通、スタン——コード不要で、同じスキルがどのバトルコアでも機能します。
battle_formulas/schema/field/values = 値
battle_formulas/schema/field/values_desc = 行動のパラメーター。スキーマが知らないキーはそのまま残る
battle_formulas/schema/field/required_point = 行動ポイント
+1 -1
View File
@@ -1,5 +1,5 @@
mod_battle_formulas_name = 전투 공식
mod_battle_formulas_desc = 모든 전투 코어에 쓰는 데이터 전투 행동: “Formula=a.mag * 3 - b.mdf + rand(0, 4)”를 가진 행동은 코드가 필요 없습니다 — 피해나 회복, 마나 비용(Cost=mp:5), 보호막 관통, 확률로 거는 상태. a.*는 행동하는 쪽, b.*는 대상: 그들의 능력치와 현재 체력, 공격, 방어, 포인트. 같은 스킬이 FF 스타일 전투와 카드 전투 모두에서 작동합니다. 능력치가 있는 적은 시트에서 전투 수치를 받습니다.
mod_battle_formulas_desc = 데이터로 쓴 전투 스킬입니다. 행동자와 대상의 능력치를 재료로 한 피해·회복 공식, 자원 비용, 방어막 관통, 기절 — 코드 없이도 같은 스킬이 모든 전투 코어에서 작동합니다.
battle_formulas/schema/field/values = 값
battle_formulas/schema/field/values_desc = 행동의 매개변수. 스키마가 모르는 키는 그대로 유지
battle_formulas/schema/field/required_point = 행동 포인트
+1 -1
View File
@@ -1,5 +1,5 @@
mod_battle_formulas_name = Боевые формулы
mod_battle_formulas_desc = Боевые действия как данные для любого боевого ядра: действие с «Formula=a.mag * 3 - b.mdf + rand(0, 4)» не требует кода — урон или лечение, цена в мане (Cost=mp:5), пробивание щита, наложение состояния с шансом. a.* — кто действует, b.* — цель: их статы и живые здоровье, атака, защита, очки. Один и тот же навык работает и в бою в стиле FF, и в карточном. Враги со статами получают боевые числа из своего листа.
mod_battle_formulas_desc = Боевые навыки как данные: формулы урона и лечения по характеристикам участников, расход ресурсов, пробивание щита и оглушение — без кода, и один и тот же навык работает в любом боевом ядре.
battle_formulas/schema/field/values = Значения
battle_formulas/schema/field/values_desc = Параметры действия; ключи, которых схема не знает, сохраняются как есть
battle_formulas/schema/field/required_point = Очки действия
+1 -1
View File
@@ -1,5 +1,5 @@
mod_battle_formulas_name = Công thức chiến đấu
mod_battle_formulas_desc = Hành động chiến đấu là dữ liệu cho mọi lõi chiến đấu: một hành động có «Formula=a.mag * 3 - b.mdf + rand(0, 4)» không cần mã — sát thương hoặc hồi máu, giá mana (Cost=mp:5), xuyên khiên, gây trạng thái theo xác suất. a.* là người hành động, b.* là mục tiêu: chỉ số của họ cùng máu, tấn công, phòng thủ và điểm hiện tại. Cùng một kỹ năng chạy được cả trong trận kiểu FF lẫn trận bài. Kẻ địch có chỉ số lấy con số chiến đấu từ bảng của mình.
mod_battle_formulas_desc = Kỹ năng chiến đấu viết bằng dữ liệu: công thức sát thương và hồi máu dựa trên chỉ số của hai bên, chi phí tài nguyên, xuyên khiên và choáng — không cần mã, cùng một kỹ năng chạy được trên mọi lõi chiến đấu.
battle_formulas/schema/field/values = Giá trị
battle_formulas/schema/field/values_desc = Tham số của hành động; khóa mà lược đồ không biết được giữ nguyên
battle_formulas/schema/field/required_point = Điểm hành động
+1 -1
View File
@@ -1,5 +1,5 @@
mod_battle_formulas_name = 战斗公式
mod_battle_formulas_desc = 适用于任何战斗核心的数据化战斗动作:带有“Formula=a.mag * 3 - b.mdf + rand(0, 4)”的动作无需代码——伤害或治疗、法力消耗(Cost=mp:5)、穿透护盾、按几率施加状态。a.* 是行动者,b.* 是目标:他们的属性以及实时的生命、攻击、防御和行动点。同一个技能在 FF 风格战斗和卡牌战斗中都能用。带属性的敌人从自己的面板获得战斗数值。
mod_battle_formulas_desc = 以数据书写的战斗技能:基于双方属性的伤害与治疗公式、资源消耗、穿透护盾和眩晕——无需代码,同一技能可在任何战斗核心中使用。
battle_formulas/schema/field/values = 数值
battle_formulas/schema/field/values_desc = 动作的参数;模式不认识的键原样保留
battle_formulas/schema/field/required_point = 行动点
+1 -1
View File
@@ -3,7 +3,7 @@
"name": "Battle Formulas",
"version": "1.0.0",
"author": "ct",
"description": "Battle actions as data for every battle core: an action entity with Formula= (a.mag * 3 - b.mdf + rand(0, 4)) needs no C# — Effect=damage|heal, Cost=mp:5 spends a stat pool, Pierce=1 ignores shields, State=basic/stun with StateTurns and StateChance puts a status on the target. a.* is the one acting, b.* the target: their stat sheets plus live hp, hp_max, attack, defence, point. Registered as global executors, so the same skill works in the FF core and in the card core. Enemies with stats data get their battle attributes from their sheets when the battle starts.",
"description": "Battle skills written as data: damage and heal formulas over the participants' stats, resource costs, pierce and stun — no code, and the same skill works in every battle core.",
"category": "gameplay",
"sources": [
"src/**/*.cs"