Map updates and mod documentation
This commit is contained in:
1 parent
240df5d343
commit
6739c1d2e5
24 files changed
+829
-147
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 136 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 137 KiB |
+92
@@ -0,0 +1,92 @@
|
||||
# RPG Demo — a small tile-map world
|
||||
|
||||
RPG Demo is a short, complete tile-map adventure: a village by the Grey Forest, the elder's house and the forest with a wolf living at the cave. You walk with the keyboard, talk to people, open chests, gather things in the forest, sell them to the merchant and fight. It is made only of data files and scenarios — no code — so it doubles as a working example of how a tile-map game is put together.
|
||||
|
||||
The demo has no game card of its own: it is the world of the **RPG Plus** game, which includes this mod and builds on it. Start it from **Play → RPG Plus → New game**: after the short crossroads prologue of RPG Plus you arrive in this village. The screenshots below come from RPG Plus, so some people and goods you see there are added by that game.
|
||||
|
||||

|
||||
|
||||
## How to play
|
||||
|
||||
- **Walk** with WASD or the arrow keys, **run** with Shift.
|
||||
- **Talk, open, read** with E or F while facing a person or an object.
|
||||
- Walking onto a doorway or the edge of a path takes you to the next map.
|
||||
|
||||
The story: the elder asks you to drive off the wolf at the cave east of the village. Go past the pond, along the forest path, deal with the slime blocking the way and face the wolf. When it is beaten, the elder thanks you — in his own way.
|
||||
|
||||
## What is in the world
|
||||
|
||||
- **Three maps.** The village (32×18 tiles), the elder's house and the Grey Forest, all drawn with the village tileset of Village Pack.
|
||||
- **People.** The elder gives and finishes the quest, villagers chat, a sign names the village; one door is locked.
|
||||
- **Chests.** A chest in the elder's house and one in the forest; once opened they stay open.
|
||||
- **Gathering in the forest.** Brushwood, stones and forest mushrooms lie along the paths; each spot can be picked once. A mushroom restores 5 health.
|
||||
- **The merchant.** Sells the Elixir (restores 20 health) for 10 coins and buys brushwood for 1 coin and stones for 2.
|
||||
- **Battles.** The slime on the path and the wolf at the cave are visible on the map and start a fight when you talk to them. In the forest, random encounters with one or two slimes happen about every 48 steps.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## For authors: how it is built
|
||||
|
||||
```filestree
|
||||
rpg_demo_game/
|
||||
├── maps/ rpg_village.json, rpg_elder_house.json, rpg_forest.json
|
||||
├── map_events/<map>/events.json people, doors, chests, pickups, monsters
|
||||
├── scenes/ one scene per map
|
||||
├── scenarios/rpg_demo/ intro, map entries and events/*.scenario
|
||||
├── characters/ the hero, the slime and the wolf
|
||||
├── items/rpg_demo/ brushwood, stones, mushroom, elixir and their icons
|
||||
├── shops/village_merchant.json
|
||||
└── locale/ names and scenario translations in seven languages
|
||||
```
|
||||
|
||||
A **map** is a grid of tile numbers in layers over a tileset, with its own name, size and zoom. The forest map also lists its random encounters:
|
||||
|
||||
```json
|
||||
"Encounters": {
|
||||
"Steps": 48,
|
||||
"Groups": ["rpg_slime", "rpg_slime,rpg_slime"]
|
||||
}
|
||||
```
|
||||
|
||||
An **event** is something placed on a tile. A door with `"Trigger": "Touch"` teleports; a monster runs a scenario and disappears once its flag is set:
|
||||
|
||||
```json
|
||||
{
|
||||
"Id": "wolf_boss",
|
||||
"X": 25,
|
||||
"Y": 8,
|
||||
"Sprite": "village/wolf",
|
||||
"Dir": "Left",
|
||||
"Scenario": "rpg_demo/events/wolf_boss",
|
||||
"Condition": "rpg_wolf_dead != 1"
|
||||
}
|
||||
```
|
||||
|
||||
The **scenario** says the lines and starts the fight; winning sets the flag:
|
||||
|
||||
```scenario
|
||||
ptext "A wolf sits by the cave. It looks you over the way it looks at the elder's goats." key=rpg_demo/wolf/line1
|
||||
text "— Grrr." key=rpg_demo/wolf/line2
|
||||
action rpg.battle enemies=rpg_wolf,rpg_slime win_flag=rpg_wolf_dead
|
||||
end
|
||||
```
|
||||
|
||||
In the mod's scenario files these lines are written in Russian; the listing shows them in English. Every line has a `key=` with its translation in `locale/scenarios_<lang>.properties`, so the game shows them in your interface language:
|
||||
|
||||
```properties
|
||||
rpg_demo/wolf/line1 = A wolf sits by the cave. It looks you over the way it looks at the elder's goats.
|
||||
```
|
||||
|
||||
Other pieces work the same way: a chest runs `action item.add`, sets a flag and is replaced by an open-chest event with the opposite `Condition`; the merchant runs `action trade.open shop=rpg_demo/village_merchant`; the first visit to the village runs the intro scenario, which puts the hero in the party with `action party.add id=rpg_hero`.
|
||||
|
||||
To change the maps and events visually, use the map editor of the RPG editor tools.
|
||||
|
||||
## If something goes wrong
|
||||
|
||||
1. **A door does nothing.** A `Touch` door works when you step on it; an `Action` one needs E or F while facing it.
|
||||
2. **A monster or chest came back.** Its `Condition` must test the same flag the scenario sets.
|
||||
3. **The shop is empty.** The trading mod must be in the game, and the shop id in the scenario must match `shops/village_merchant.json`.
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
# RPG Demo — un pequeño mundo de tiles
|
||||
|
||||
RPG Demo es una aventura corta y completa sobre un mapa de tiles: una aldea junto al Bosque Gris, la casa del anciano y el bosque, con un lobo viviendo junto a la cueva. Caminas con el teclado, hablas con la gente, abres cofres, recoges cosas en el bosque, se las vendes al mercader y luchas. Está hecho solo de archivos de datos y escenarios — ni una línea de código —, así que sirve de paso como ejemplo funcional de cómo se monta un juego de mapa de tiles.
|
||||
|
||||
La demo no tiene tarjeta de juego propia: es el mundo del juego **RPG Plus**, que incluye este mod y construye sobre él. Empiézalo desde **Jugar → RPG Plus → Nueva partida**: tras el breve prólogo del cruce de caminos de RPG Plus llegas a esta aldea. Las capturas de abajo vienen de RPG Plus, así que algunas personas y mercancías que se ven las añade ese juego.
|
||||
|
||||

|
||||
|
||||
## Cómo se juega
|
||||
|
||||
- **Caminar** con WASD o las flechas, **correr** con Shift.
|
||||
- **Hablar, abrir, leer** con E o F estando de frente a una persona o un objeto.
|
||||
- Pisar una puerta o el borde del camino te lleva al siguiente mapa.
|
||||
|
||||
La historia: el anciano te pide echar al lobo que vive junto a la cueva al este de la aldea. Pasa el estanque, sigue el sendero del bosque, resuelve el limo que bloquea el paso y enfréntate al lobo. Cuando cae, el anciano te lo agradece — a su manera.
|
||||
|
||||
## Qué hay en el mundo
|
||||
|
||||
- **Tres mapas.** La aldea (32×18 tiles), la casa del anciano y el Bosque Gris, todos dibujados con el tileset de aldea de Village Pack.
|
||||
- **Gente.** El anciano da y cierra la misión, los aldeanos charlan, un cartel nombra la aldea; una puerta está cerrada con llave.
|
||||
- **Cofres.** Uno en la casa del anciano y otro en el bosque; una vez abiertos, siguen abiertos.
|
||||
- **Recolectar en el bosque.** Por los senderos hay leña, piedras y setas del bosque; cada punto se recoge una sola vez. Una seta restaura 5 de salud.
|
||||
- **El mercader.** Vende el Elixir (restaura 20 de salud) por 10 monedas y compra leña a 1 moneda y piedras a 2.
|
||||
- **Combates.** El limo del sendero y el lobo de la cueva se ven en el mapa y empiezan una pelea cuando les hablas. En el bosque, encuentros aleatorios con uno o dos limos ocurren más o menos cada 48 pasos.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Para autores: cómo está construido
|
||||
|
||||
```filestree
|
||||
rpg_demo_game/
|
||||
├── maps/ rpg_village.json, rpg_elder_house.json, rpg_forest.json
|
||||
├── map_events/<map>/events.json personas, puertas, cofres, objetos recogibles, monstruos
|
||||
├── scenes/ una escena por mapa
|
||||
├── scenarios/rpg_demo/ introducción, entradas de mapa y events/*.scenario
|
||||
├── characters/ el héroe, el limo y el lobo
|
||||
├── items/rpg_demo/ leña, piedras, seta, elixir y sus iconos
|
||||
├── shops/village_merchant.json
|
||||
└── locale/ nombres y traducciones de escenarios en siete idiomas
|
||||
```
|
||||
|
||||
Un **mapa** es una cuadrícula de números de tile en capas sobre un tileset, con su propio nombre, tamaño y zoom. El mapa del bosque también enumera sus encuentros aleatorios:
|
||||
|
||||
```json
|
||||
"Encounters": {
|
||||
"Steps": 48,
|
||||
"Groups": ["rpg_slime", "rpg_slime,rpg_slime"]
|
||||
}
|
||||
```
|
||||
|
||||
Un **evento** es algo colocado sobre un tile. Una puerta con `"Trigger": "Touch"` teletransporta; un monstruo ejecuta un escenario y desaparece cuando su bandera queda activada:
|
||||
|
||||
```json
|
||||
{
|
||||
"Id": "wolf_boss",
|
||||
"X": 25,
|
||||
"Y": 8,
|
||||
"Sprite": "village/wolf",
|
||||
"Dir": "Left",
|
||||
"Scenario": "rpg_demo/events/wolf_boss",
|
||||
"Condition": "rpg_wolf_dead != 1"
|
||||
}
|
||||
```
|
||||
|
||||
El **escenario** dice las líneas y empieza la pelea; ganar activa la bandera:
|
||||
|
||||
```scenario
|
||||
ptext "Un lobo está sentado junto a la cueva. Te mira igual que mira a las cabras del anciano." key=rpg_demo/wolf/line1
|
||||
text "— Grrr." key=rpg_demo/wolf/line2
|
||||
action rpg.battle enemies=rpg_wolf,rpg_slime win_flag=rpg_wolf_dead
|
||||
end
|
||||
```
|
||||
|
||||
Las líneas de los escenarios de este mod están escritas en ruso; cada línea lleva un `key=` con su traducción en `locale/scenarios_<lang>.properties`, así el juego las muestra en el idioma de tu interfaz:
|
||||
|
||||
```properties
|
||||
rpg_demo/wolf/line1 = Un lobo está sentado junto a la cueva. Te mira igual que mira a las cabras del anciano.
|
||||
```
|
||||
|
||||
Las demás piezas funcionan igual: un cofre ejecuta `action item.add`, activa una bandera y es sustituido por el evento del cofre abierto con la `Condition` contraria; el mercader ejecuta `action trade.open shop=rpg_demo/village_merchant`; la primera visita a la aldea lanza el escenario de introducción, que mete al héroe en el grupo con `action party.add id=rpg_hero`.
|
||||
|
||||
Para cambiar los mapas y eventos visualmente, usa el editor de mapas de las herramientas de edición del RPG.
|
||||
|
||||
## Si algo falla
|
||||
|
||||
1. **Una puerta no hace nada.** Una puerta `Touch` funciona al pisarla; una `Action` necesita E o F estando de frente.
|
||||
2. **Un monstruo o un cofre volvió a aparecer.** Su `Condition` debe comprobar la misma bandera que activa el escenario.
|
||||
3. **La tienda está vacía.** El mod trading debe estar en el juego, y el id de la tienda en el escenario debe coincidir con `shops/village_merchant.json`.
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
# RPG Demo — 小さなタイルマップの世界
|
||||
|
||||
RPG Demo は短くて完成しているタイルマップの冒険です。灰色の森のそばの村、村長の家、そして洞窟に狼の住む森。キーボードで歩き、人と話し、宝箱を開け、森で物を集め、商人に売り、戦います。データファイルとシナリオだけでできていて、コードは一行もない。だからこそ、タイルマップのゲームがどう組み上がるのかを示す実際に動く例にもなっています。
|
||||
|
||||
このデモには自分のゲームカードがありません。**RPG Plus** ゲームの世界であり、RPG Plus がこの MOD を含んで、その上に作り上げています。開始は **プレイ → RPG Plus → ニューゲーム** から。RPG Plus の短い岐路のプロローグを過ぎると、この村に着きます。下のスクリーンショットは RPG Plus で撮ったものなので、そこに見える人や商品の一部はあちらのゲームが追加したものです。
|
||||
|
||||

|
||||
|
||||
## 遊び方
|
||||
|
||||
- **歩く** は WASD か矢印キー、**走る** は Shift。
|
||||
- **話す・開ける・読む** は、人や物に正面から向かって E か F。
|
||||
- 扉や小道の端に足を踏み入れると、次のマップへ移ります。
|
||||
|
||||
物語:村長は、村の東にある洞窟のそばに住みついた狼を追い払ってほしいと頼んできます。池を過ぎ、森の小道を進み、道をふさぐスライムを片付けて、狼と対面します。狼を倒すと、村長がお礼を言います — その流儀で。
|
||||
|
||||
## 世界の中身
|
||||
|
||||
- **マップは三つ。** 村(32×18 タイル)、村長の家、灰色の森。すべて Village Pack の村のタイルセットで描かれています。
|
||||
- **人々。** 村長はクエストを出して終わらせ、村人は雑談し、看板が村の名を告げます。扉が一つ、鍵がかかっています。
|
||||
- **宝箱。** 村長の家に一つ、森に一つ。開けた宝箱は開いたまま残ります。
|
||||
- **森で集める。** 小道に沿って柴、石、森のキノコが落ちています。それぞれの場所は一度だけ採取できます。キノコは体力を 5 回復します。
|
||||
- **商人。** エリクサー(体力を 20 回復)を硬貨 10 枚で売り、柴を 1 枚、石を 2 枚で買います。
|
||||
- **戦闘。** 小道のスライムと洞窟の狼はマップ上に見えていて、話しかけると戦闘が始まります。森では、スライム一〜二匹とのランダムエンカウンターがおよそ 48 步ごとに起きます。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 作者向け:組み立て方
|
||||
|
||||
```filestree
|
||||
rpg_demo_game/
|
||||
├── maps/ rpg_village.json、rpg_elder_house.json、rpg_forest.json
|
||||
├── map_events/<map>/events.json 人、扉、宝箱、拾い物、モンスター
|
||||
├── scenes/ マップごとに 1 つのシーン
|
||||
├── scenarios/rpg_demo/ イントロ、マップ入り口、events/*.scenario
|
||||
├── characters/ 勇者、スライム、狼
|
||||
├── items/rpg_demo/ 柴、石、キノコ、エリクサーとそのアイコン
|
||||
├── shops/village_merchant.json
|
||||
└── locale/ 7 言語の名前とシナリオ翻訳
|
||||
```
|
||||
|
||||
**マップ**はタイルセットの上に層として重なるタイル番号の格子で、名前・サイズ・ズームを持ちます。森のマップはランダムエンカウンターも列挙します:
|
||||
|
||||
```json
|
||||
"Encounters": {
|
||||
"Steps": 48,
|
||||
"Groups": ["rpg_slime", "rpg_slime,rpg_slime"]
|
||||
}
|
||||
```
|
||||
|
||||
**イベント**はタイルの上に置かれた何かです。`"Trigger": "Touch"` の扉はテレポートし、モンスターはシナリオを実行し、自分のフラグが立つと消えます:
|
||||
|
||||
```json
|
||||
{
|
||||
"Id": "wolf_boss",
|
||||
"X": 25,
|
||||
"Y": 8,
|
||||
"Sprite": "village/wolf",
|
||||
"Dir": "Left",
|
||||
"Scenario": "rpg_demo/events/wolf_boss",
|
||||
"Condition": "rpg_wolf_dead != 1"
|
||||
}
|
||||
```
|
||||
|
||||
**シナリオ**が台詞を言い、戦闘を始めます。勝つとフラグが立ちます:
|
||||
|
||||
```scenario
|
||||
ptext "洞窟のそばに狼が座っている。村長のヤギを見るような目つきで、こちらを値踏みしている。" key=rpg_demo/wolf/line1
|
||||
text "グルルル。" key=rpg_demo/wolf/line2
|
||||
action rpg.battle enemies=rpg_wolf,rpg_slime win_flag=rpg_wolf_dead
|
||||
end
|
||||
```
|
||||
|
||||
この MOD のシナリオの台詞はロシア語で書かれています。各行には `key=` が付き、翻訳は `locale/scenarios_<lang>.properties` から取られるため、ゲームはインターフェースの言語で表示します:
|
||||
|
||||
```properties
|
||||
rpg_demo/wolf/line1 = 洞窟のそばに狼が座っている。村長のヤギを見るような目つきで、こちらを値踏みしている。
|
||||
```
|
||||
|
||||
他の部品も同じ仕組みです。宝箱は `action item.add` を実行してフラグを立て、逆の `Condition` を持つ「開いた宝箱」イベントに置き換わる。商人は `action trade.open shop=rpg_demo/village_merchant` を実行する。村へ初めて入るとイントロのシナリオが走り、`action party.add id=rpg_hero` で勇者をパーティに入れます。
|
||||
|
||||
マップやイベントを目で見て変えるには、RPG エディター道具のマップエディターを使います。
|
||||
|
||||
## うまくいかないとき
|
||||
|
||||
1. **扉が何もしない。** `Touch` の扉は踏んだ瞬間に働きます。`Action` の扉は正面から E か F が必要です。
|
||||
2. **モンスターや宝箱が戻ってきた。** その `Condition` は、シナリオが立てるのと同じフラグを見なければなりません。
|
||||
3. **店が空いている。** trading MOD がゲームに必要です。また、シナリオの店 id は `shops/village_merchant.json` と一致しなければなりません。
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
# RPG Demo — 작은 타일맵 세계
|
||||
|
||||
RPG Demo는 짧고 완결된 타일맵 모험입니다. 잿빛 숲 옆의 마을, 촌장의 집, 그리고 동굴에 늑대가 사는 숲. 키보드로 걷고, 사람들과 말하고, 상자를 열고, 숲에서 물건을 모아 상인에게 팔고, 싸웁니다. 데이터 파일과 시나리오만으로 이루어져 있고 코드가 한 줄도 없어서, 타일맵 게임이 어떻게 조립되는지 보여 주는 살아 있는 예이기도 합니다.
|
||||
|
||||
이 데모에는 자기 게임 카드가 없습니다. **RPG Plus** 게임의 세계이며, RPG Plus가 이 모드를 포함하고 그 위에 지어 올립니다. **플레이 → RPG Plus → 새 게임**에서 시작하세요. RPG Plus의 짧은 갈림길 프롤로그를 지나면 이 마을에 도착합니다. 아래 스크린샷은 RPG Plus에서 찍었으므로, 그 안의 일부 사람과 물품은 그 게임이 추가한 것입니다.
|
||||
|
||||

|
||||
|
||||
## 하는 법
|
||||
|
||||
- **걷기**는 WASD 또는 방향키, **달리기**는 Shift.
|
||||
- 사람이나 물건을 마주 본 채 E 또는 F로 **말하기, 열기, 읽기**.
|
||||
- 문이나 길 끝에 발을 디디면 다음 맵으로 이동합니다.
|
||||
|
||||
이야기: 촌장이 마을 동쪽 동굴 옆에 자리 잡은 늑대를 쫓아 달라고 부탁합니다. 연못을 지나 숲길을 따라가고, 길을 막은 슬라임을 처리하고, 늑대와 마주 섭니다. 늑대가 쓰러지면 촌장이 감사를 전합니다 — 제 방식대로.
|
||||
|
||||
## 세계에 있는 것
|
||||
|
||||
- **맵 세 개.** 마을(32×18 타일), 촌장의 집, 잿빛 숲. 모두 Village Pack의 마을 타일셋으로 그려져 있습니다.
|
||||
- **사람들.** 촌장은 퀘스트를 주고 끝내고, 마을 사람들은 수다를 떨고, 표지판이 마을 이름을 알립니다. 문 하나는 잠겨 있습니다.
|
||||
- **상자.** 촌장의 집에 하나, 숲에 하나. 열린 상자는 열린 채로 남습니다.
|
||||
- **숲에서 채집.** 오솔길을 따라 땔감, 돌, 숲 버섯이 놓여 있습니다. 각 자리는 한 번만 챙길 수 있습니다. 버섯은 체력을 5 회복합니다.
|
||||
- **상인.** 엘릭서(체력 20 회복)를 동전 10 닢에 팔고, 땔감을 1 닢에, 돌을 2 닢에 삽니다.
|
||||
- **전투.** 오솔길의 슬라임과 동굴의 늑대는 맵에 보이며, 말을 걸면 싸움이 시작됩니다. 숲에서는 슬라임 한두 마리와의 랜덤 인카운터가 대략 48 걸음마다 일어납니다.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 모드 작성자를 위해: 어떻게 지어졌나
|
||||
|
||||
```filestree
|
||||
rpg_demo_game/
|
||||
├── maps/ rpg_village.json, rpg_elder_house.json, rpg_forest.json
|
||||
├── map_events/<map>/events.json 사람, 문, 상자, 줍는 아이템, 몬스터
|
||||
├── scenes/ 맵마다 장면 하나
|
||||
├── scenarios/rpg_demo/ 인트로, 맵 입구, events/*.scenario
|
||||
├── characters/ 영웅, 슬라임, 늑대
|
||||
├── items/rpg_demo/ 땔감, 돌, 버섯, 엘릭서와 그 아이콘
|
||||
├── shops/village_merchant.json
|
||||
└── locale/ 7개 언어의 이름과 시나리오 번역
|
||||
```
|
||||
|
||||
**맵**은 타일셋 위에 층으로 놓인 타일 번호 격자이며, 자체 이름, 크기, 확대 배율을 가집니다. 숲 맵은 랜덤 인카운터도 나열합니다:
|
||||
|
||||
```json
|
||||
"Encounters": {
|
||||
"Steps": 48,
|
||||
"Groups": ["rpg_slime", "rpg_slime,rpg_slime"]
|
||||
}
|
||||
```
|
||||
|
||||
**이벤트**는 타일 위에 놓인 무언가입니다. `"Trigger": "Touch"` 문은 순간이동을 하고, 몬스터는 시나리오를 실행하다가 자기 플래그가 세워지면 사라집니다:
|
||||
|
||||
```json
|
||||
{
|
||||
"Id": "wolf_boss",
|
||||
"X": 25,
|
||||
"Y": 8,
|
||||
"Sprite": "village/wolf",
|
||||
"Dir": "Left",
|
||||
"Scenario": "rpg_demo/events/wolf_boss",
|
||||
"Condition": "rpg_wolf_dead != 1"
|
||||
}
|
||||
```
|
||||
|
||||
**시나리오**는 대사를 말하고 싸움을 시작합니다. 이기면 플래그가 세워집니다:
|
||||
|
||||
```scenario
|
||||
ptext "동굴 옆에 늑대가 앉아 있다. 촌장네 염소를 보는 눈빛으로 당신을 훑어본다." key=rpg_demo/wolf/line1
|
||||
text "크르르." key=rpg_demo/wolf/line2
|
||||
action rpg.battle enemies=rpg_wolf,rpg_slime win_flag=rpg_wolf_dead
|
||||
end
|
||||
```
|
||||
|
||||
이 모드 시나리오의 대사는 러시아어로 쓰여 있습니다. 각 줄에는 `key=`가 붙고 번역은 `locale/scenarios_<lang>.properties`에서 오기 때문에, 게임은 인터페이스 언어로 보여 줍니다:
|
||||
|
||||
```properties
|
||||
rpg_demo/wolf/line1 = 동굴 옆에 늑대가 앉아 있다. 촌장네 염소를 보는 눈빛으로 당신을 훑어본다.
|
||||
```
|
||||
|
||||
나머지 조각들도 같은 방식입니다. 상자는 `action item.add`를 실행하고 플래그를 세운 뒤, 반대 `Condition`을 가진 열린 상자 이벤트로 바뀝니다. 상인은 `action trade.open shop=rpg_demo/village_merchant`를 실행합니다. 마을 첫 방문에서는 인트로 시나리오가 돌며 `action party.add id=rpg_hero`로 영웅을 파티에 넣습니다.
|
||||
|
||||
맵과 이벤트를 눈으로 보며 바꾸려면 RPG 편집 도구의 맵 편집기를 사용하세요.
|
||||
|
||||
## 문제가 생겼을 때
|
||||
|
||||
1. **문이 아무 반응이 없습니다.** `Touch` 문은 밟는 순간 작동합니다. `Action` 문은 마주 본 채 E 또는 F가 필요합니다.
|
||||
2. **몬스터나 상자가 돌아왔습니다.** 그 `Condition`은 시나리오가 세우는 것과 같은 플래그를 검사해야 합니다.
|
||||
3. **가게가 비어 있습니다.** trading 모드가 게임에 있어야 하고, 시나리오의 가게 id는 `shops/village_merchant.json`과 일치해야 합니다.
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
# RPG Demo — маленький мир на тайлах
|
||||
|
||||
RPG Demo — короткое законченное приключение на тайлах: деревня у Серого леса, дом старосты и лес, у пещеры которого живёт волк. Вы ходите с клавиатуры, разговариваете с людьми, открываете сундуки, собираете в лесу припасы, продаёте их торговцу и сражаетесь. Мод состоит только из файлов данных и сценариев — ни строчки кода, так что заодно это работающий пример того, как собирается игра на тайловой карте.
|
||||
|
||||
У демки нет собственной карточки игры: это мир игры **RPG Plus**, которая включает этот мод и достраивает его поверх. Запуск — **Играть → RPG Plus → Новая игра**: после короткого пролога на перекрёстке вы оказываетесь в этой деревне. Скриншоты ниже сделаны в RPG Plus, поэтому часть людей и товаров в них добавила та игра.
|
||||
|
||||

|
||||
|
||||
## Как играть
|
||||
|
||||
- **Ходить** — WASD или стрелки, **бежать** — Shift.
|
||||
- **Говорить, открывать, читать** — E или F, стоя лицом к человеку или предмету.
|
||||
- Шаг на дверной проём или край тропинки переносит на следующую карту.
|
||||
|
||||
Сюжет: староста просит прогнать волка, поселившегося у пещеры к востоку от деревни. Мимо пруда, по лесной тропе, разделаться со слизнем, перегородившим путь, и лицом к лицу с волком. Когда волк побеждён, староста благодарит вас — по-своему.
|
||||
|
||||
## Что есть в мире
|
||||
|
||||
- **Три карты.** Деревня (32×18 тайлов), дом старосты и Серый лес, все нарисованы деревенским тайлсетом из Village Pack.
|
||||
- **Люди.** Староста выдаёт и закрывает задание, деревенские болтают, табличка называет деревню; одна дверь заперта.
|
||||
- **Сундуки.** Один в доме старосты, один в лесу; открытые остаются открытыми.
|
||||
- **Сбор в лесу.** Вдоль троп лежат хворост, камни и лесные грибы; каждое место можно обобрать один раз. Гриб восстанавливает 5 здоровья.
|
||||
- **Торговец.** Продаёт Эликсир (восстанавливает 20 здоровья) за 10 монет и покупает хворост по 1 монете и камни по 2.
|
||||
- **Бои.** Слизень на тропе и волк у пещеры видны на карте и вступают в бой, когда вы с ними заговорите. В лесу примерно каждые 48 шагов случаются случайные бои с одним или двумя слизнями.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Авторам: как это устроено
|
||||
|
||||
```filestree
|
||||
rpg_demo_game/
|
||||
├── maps/ rpg_village.json, rpg_elder_house.json, rpg_forest.json
|
||||
├── map_events/<map>/events.json люди, двери, сундуки, подбираемые предметы, монстры
|
||||
├── scenes/ по одной сцене на карту
|
||||
├── scenarios/rpg_demo/ вступление, входы на карты и events/*.scenario
|
||||
├── characters/ герой, слизень и волк
|
||||
├── items/rpg_demo/ хворост, камни, гриб, эликсир и их значки
|
||||
├── shops/village_merchant.json
|
||||
└── locale/ имена и переводы сценариев на семи языках
|
||||
```
|
||||
|
||||
**Карта** — это сетка номеров тайлов по слоям поверх тайлсета, со своим именем, размером и зумом. Карта леса также перечисляет случайные встречи:
|
||||
|
||||
```json
|
||||
"Encounters": {
|
||||
"Steps": 48,
|
||||
"Groups": ["rpg_slime", "rpg_slime,rpg_slime"]
|
||||
}
|
||||
```
|
||||
|
||||
**Событие** — нечто, размещённое на тайле. Дверь с `"Trigger": "Touch"` телепортирует; монстр запускает сценарий и исчезает, когда выставлен его флаг:
|
||||
|
||||
```json
|
||||
{
|
||||
"Id": "wolf_boss",
|
||||
"X": 25,
|
||||
"Y": 8,
|
||||
"Sprite": "village/wolf",
|
||||
"Dir": "Left",
|
||||
"Scenario": "rpg_demo/events/wolf_boss",
|
||||
"Condition": "rpg_wolf_dead != 1"
|
||||
}
|
||||
```
|
||||
|
||||
**Сценарий** произносит строки и начинает бой; победа выставляет флаг:
|
||||
|
||||
```scenario
|
||||
ptext "У пещеры сидит волк. Он оглядывает тебя, как старостину козу." key=rpg_demo/wolf/line1
|
||||
text "— Р-р-р." key=rpg_demo/wolf/line2
|
||||
action rpg.battle enemies=rpg_wolf,rpg_slime win_flag=rpg_wolf_dead
|
||||
end
|
||||
```
|
||||
|
||||
Строки в сценариях этого мода написаны по-русски; у каждой строки есть `key=`, по которому перевод берётся из `locale/scenarios_<lang>.properties`, поэтому игра показывает их на языке интерфейса:
|
||||
|
||||
```properties
|
||||
rpg_demo/wolf/line1 = У пещеры сидит волк. Он оглядывает тебя, как старостину козу.
|
||||
```
|
||||
|
||||
Остальные куски работают так же: сундук выполняет `action item.add`, ставит флаг и заменяется событием открытого сундука с обратным `Condition`; торговец выполняет `action trade.open shop=rpg_demo/village_merchant`; первое посещение деревни запускает вступительный сценарий, который ставит героя в отряд действием `action party.add id=rpg_hero`.
|
||||
|
||||
Чтобы менять карты и события наглядно, используйте редактор карт из инструментов RPG-редактора.
|
||||
|
||||
## Если что-то пошло не так
|
||||
|
||||
1. **Дверь не реагирует.** Дверь `Touch` срабатывает, когда вы на неё наступаете; двери `Action` нужны E или F, стоя к ней лицом.
|
||||
2. **Монстр или сундук вернулся.** Его `Condition` должен проверять тот же флаг, который выставляет сценарий.
|
||||
3. **Лавка пуста.** В игре должен быть мод trading, а идентификатор лавки в сценарии должен совпадать с `shops/village_merchant.json`.
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
# RPG Demo — một thế giới tile-map nhỏ
|
||||
|
||||
RPG Demo là một cuộc phiêu lưu tile-map ngắn gọn và trọn vẹn: một ngôi làng bên Rừng Xám, nhà của trưởng làng, và khu rừng có con sói trú ở bên hang. Bạn đi lại bằng bàn phím, nói chuyện với mọi người, mở rương, hái lượm trong rừng, bán cho thương nhân rồi chiến đấu. Nó chỉ gồm các tệp dữ liệu và kịch bản — không một dòng mã — nên đồng thời cũng là một ví dụ sống động về cách một trò chơi tile-map được ghép lại.
|
||||
|
||||
Bản demo không có thẻ trò chơi riêng: nó là thế giới của trò **RPG Plus**, trò chơi này chứa mod và xây tiếp trên nền nó. Bắt đầu từ **Chơi → RPG Plus → Trò chơi mới**: đi qua phần mở đầu ngắn ở ngã tư của RPG Plus là bạn đến ngôi làng này. Các ảnh chụp bên dưới lấy từ RPG Plus, nên một số người và món hàng nhìn thấy là do trò đó thêm vào.
|
||||
|
||||

|
||||
|
||||
## Cách chơi
|
||||
|
||||
- **Đi lại** bằng WASD hoặc phím mũi tên, **chạy** bằng Shift.
|
||||
- **Nói chuyện, mở, đọc** bằng E hoặc F khi đang quay mặt về phía người hoặc vật.
|
||||
- Bước lên một cánh cửa hoặc mép đường sẽ đưa bạn sang bản đồ kế tiếp.
|
||||
|
||||
Cốt truyện: trưởng làng nhờ bạn đuổi con sói trú ở hang phía đông làng. Đi qua cái ao, men theo đường mòn trong rừng, giải quyết con slime chặn đường rồi đối mặt với con sói. Khi nó gục ngã, trưởng làng cảm ơn bạn — theo kiểu của ông ta.
|
||||
|
||||
## Trong thế giới có gì
|
||||
|
||||
- **Ba bản đồ.** Ngôi làng (32×18 ô), nhà trưởng làng và Rừng Xám, tất cả vẽ bằng tileset ngôi làng của Village Pack.
|
||||
- **Con người.** Trưởng làng giao và kết thúc nhiệm vụ, dân làng tám chuyện, tấm biển gọi tên ngôi làng; một cánh cửa bị khóa.
|
||||
- **Rương.** Một cái trong nhà trưởng làng, một cái trong rừng; mở rồi thì vẫn mở.
|
||||
- **Hái lượm trong rừng.** Dọc các đường mòn có củi khô, đá và nấm rừng; mỗi chỗ chỉ nhặt được một lần. Một cây nấm hồi 5 máu.
|
||||
- **Thương nhân.** Bán Thuốc tiên (hồi 20 máu) giá 10 đồng, mua củi khô 1 đồng và đá 2 đồng.
|
||||
- **Chiến đấu.** Con slime trên đường mòn và con sói bên hang hiện rõ trên bản đồ và bắt đầu trận đánh khi bạn nói chuyện với chúng. Trong rừng, những trận ngẫu nhiên với một hai con slime xảy ra khoảng sau mỗi 48 bước chân.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Dành cho tác giả: nó được dựng thế nào
|
||||
|
||||
```filestree
|
||||
rpg_demo_game/
|
||||
├── maps/ rpg_village.json, rpg_elder_house.json, rpg_forest.json
|
||||
├── map_events/<map>/events.json con người, cửa, rương, vật nhặt được, quái vật
|
||||
├── scenes/ mỗi bản đồ một cảnh
|
||||
├── scenarios/rpg_demo/ phần mở đầu, lối vào bản đồ và events/*.scenario
|
||||
├── characters/ anh hùng, slime và sói
|
||||
├── items/rpg_demo/ củi khô, đá, nấm, thuốc tiên và biểu tượng của chúng
|
||||
├── shops/village_merchant.json
|
||||
└── locale/ tên và bản dịch kịch bản bằng bảy ngôn ngữ
|
||||
```
|
||||
|
||||
Một **bản đồ** là lưới số ô xếp thành các lớp trên một tileset, kèm tên, kích thước và mức thu phóng riêng. Bản đồ rừng còn liệt kê các trận ngẫu nhiên:
|
||||
|
||||
```json
|
||||
"Encounters": {
|
||||
"Steps": 48,
|
||||
"Groups": ["rpg_slime", "rpg_slime,rpg_slime"]
|
||||
}
|
||||
```
|
||||
|
||||
**Sự kiện** là một thứ được đặt lên một ô. Cửa có `"Trigger": "Touch"` thì dịch chuyển; quái vật chạy một kịch bản và biến mất khi cờ của nó được bật:
|
||||
|
||||
```json
|
||||
{
|
||||
"Id": "wolf_boss",
|
||||
"X": 25,
|
||||
"Y": 8,
|
||||
"Sprite": "village/wolf",
|
||||
"Dir": "Left",
|
||||
"Scenario": "rpg_demo/events/wolf_boss",
|
||||
"Condition": "rpg_wolf_dead != 1"
|
||||
}
|
||||
```
|
||||
|
||||
**Kịch bản** nói các câu và bắt đầu trận đánh; thắng thì bật cờ:
|
||||
|
||||
```scenario
|
||||
ptext "Một con sói ngồi bên hang. Nó nhìn bạn từ đầu đến chân như nhìn đàn dê của trưởng làng." key=rpg_demo/wolf/line1
|
||||
text "Grừ." key=rpg_demo/wolf/line2
|
||||
action rpg.battle enemies=rpg_wolf,rpg_slime win_flag=rpg_wolf_dead
|
||||
end
|
||||
```
|
||||
|
||||
Các câu trong kịch bản của mod này viết bằng tiếng Nga; mỗi câu có một `key=`, bản dịch nằm trong `locale/scenarios_<lang>.properties`, nên trò chơi hiện chúng theo ngôn ngữ giao diện của bạn:
|
||||
|
||||
```properties
|
||||
rpg_demo/wolf/line1 = Một con sói ngồi bên hang. Nó nhìn bạn từ đầu đến chân như nhìn đàn dê của trưởng làng.
|
||||
```
|
||||
|
||||
Các mảnh khác cũng hoạt động y như vậy: cái rương chạy `action item.add`, bật cờ rồi bị thay bằng sự kiện rương mở với `Condition` ngược lại; thương nhân chạy `action trade.open shop=rpg_demo/village_merchant`; lần đầu ghé làng sẽ chạy kịch bản mở đầu, đưa anh hùng vào đội bằng `action party.add id=rpg_hero`.
|
||||
|
||||
Muốn sửa bản đồ và sự kiện bằng hình ảnh trực quan, hãy dùng trình soạn bản đồ trong bộ công cụ soạn thảo RPG.
|
||||
|
||||
## Nếu có trục trặc
|
||||
|
||||
1. **Cửa không phản ứng.** Cửa kiểu `Touch` phát hiệu khi bạn giẫm lên; cửa kiểu `Action` cần E hoặc F khi đang đối mặt.
|
||||
2. **Quái hay rương quay lại.** `Condition` của nó phải kiểm tra đúng lá cờ mà kịch bản bật.
|
||||
3. **Cửa hàng trống rỗng.** Mod trading phải có trong trò chơi, và id cửa hàng trong kịch bản phải khớp `shops/village_merchant.json`.
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
# RPG Demo — 一个小小的图块世界
|
||||
|
||||
RPG Demo 是一段短小而完整的图块地图冒险:灰森林旁的一座村庄、村长的家,以及洞穴里住着一只狼的森林。你用键盘行走、与人们交谈、开宝箱、在森林里采集,再把东西卖给商人,然后战斗。它只由数据文件和剧本构成——没有一行代码——因此同时也是“一款图块地图游戏是如何组装起来的”的现成示例。
|
||||
|
||||
这个演示没有自己的游戏卡片:它是 **RPG Plus** 游戏的世界,RPG Plus 包含本模组并在其之上扩建。从“开始游戏 → RPG Plus → 新游戏”进入:走完 RPG Plus 简短的岔路口序章后,你就会抵达这座村庄。下面的截图来自 RPG Plus,所以其中一些人和商品是那个游戏加上的。
|
||||
|
||||

|
||||
|
||||
## 玩法
|
||||
|
||||
- 用 WASD 或方向键**行走**,按 Shift **奔跑**。
|
||||
- 面对人物或物件时按 E 或 F **交谈、打开、阅读**。
|
||||
- 走到门口或路的边缘,就会被传送到下一张地图。
|
||||
|
||||
剧情:村长请你赶走盘踞在村庄东边洞穴旁的狼。经过池塘,沿着林间小路,解决挡路的史莱姆,然后与狼正面对决。狼被击败后,村长会谢谢你——用他自己的方式。
|
||||
|
||||
## 世界里有什么
|
||||
|
||||
- **三张地图。** 村庄(32×18 图块)、村长的家和灰森林,全部用 Village Pack 的村庄图块集绘制。
|
||||
- **人物。** 村长发放并完结任务,村民闲聊,一块路牌写着村庄的名字;有一扇门锁着。
|
||||
- **宝箱。** 村长家里一个、森林里一个;打开后保持敞开。
|
||||
- **森林采集。** 小路沿线散落着柴火、石头和森林蘑菇;每个采集点只能采一次。一朵蘑菇恢复 5 点生命。
|
||||
- **商人。** 以 10 枚硬币出售药剂(恢复 20 点生命),并以 1 枚收购柴火、2 枚收购石头。
|
||||
- **战斗。** 挡路的史莱姆和洞穴旁的狼都显示在地图上,与之交谈就会开战。在森林里,大约每走 48 步会遇到一次随机战斗,对手是一到两只史莱姆。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 给模组作者:它是怎么搭起来的
|
||||
|
||||
```filestree
|
||||
rpg_demo_game/
|
||||
├── maps/ rpg_village.json、rpg_elder_house.json、rpg_forest.json
|
||||
├── map_events/<map>/events.json 人物、门、宝箱、可拾取物、怪物
|
||||
├── scenes/ 每张地图一个场景
|
||||
├── scenarios/rpg_demo/ 开场、地图入口和 events/*.scenario
|
||||
├── characters/ 英雄、史莱姆和狼
|
||||
├── items/rpg_demo/ 柴火、石头、蘑菇、药剂及其图标
|
||||
├── shops/village_merchant.json
|
||||
└── locale/ 七种语言的名称和剧本翻译
|
||||
```
|
||||
|
||||
**地图**是叠在图块集上的多层图块编号网格,带有自己的名称、尺寸和缩放。森林地图还列出了它的随机遭遇:
|
||||
|
||||
```json
|
||||
"Encounters": {
|
||||
"Steps": 48,
|
||||
"Groups": ["rpg_slime", "rpg_slime,rpg_slime"]
|
||||
}
|
||||
```
|
||||
|
||||
**事件**是放在图块上的东西。带 `"Trigger": "Touch"` 的门负责传送;怪物会运行一段剧本,并在自己的标志位被设置后消失:
|
||||
|
||||
```json
|
||||
{
|
||||
"Id": "wolf_boss",
|
||||
"X": 25,
|
||||
"Y": 8,
|
||||
"Sprite": "village/wolf",
|
||||
"Dir": "Left",
|
||||
"Scenario": "rpg_demo/events/wolf_boss",
|
||||
"Condition": "rpg_wolf_dead != 1"
|
||||
}
|
||||
```
|
||||
|
||||
**剧本**说出台词并开始战斗;获胜后设置标志位:
|
||||
|
||||
```scenario
|
||||
ptext "一只狼坐在洞穴旁。它打量你的眼神,就像打量村长的山羊。" key=rpg_demo/wolf/line1
|
||||
text "嗷呜——" key=rpg_demo/wolf/line2
|
||||
action rpg.battle enemies=rpg_wolf,rpg_slime win_flag=rpg_wolf_dead
|
||||
end
|
||||
```
|
||||
|
||||
本模组剧本中的台词以俄语写成;每行都有一个 `key=`,对应的翻译放在 `locale/scenarios_<lang>.properties` 中,所以游戏会按界面语言显示它们:
|
||||
|
||||
```properties
|
||||
rpg_demo/wolf/line1 = 一只狼坐在洞穴旁。它打量你的眼神,就像打量村长的山羊。
|
||||
```
|
||||
|
||||
其余部分都是同一个套路:宝箱执行 `action item.add`、设置标志位,然后被一个带相反 `Condition` 的“已开宝箱”事件替换;商人执行 `action trade.open shop=rpg_demo/village_merchant`;首次进入村庄会运行开场剧本,用 `action party.add id=rpg_hero` 把英雄放进队伍。
|
||||
|
||||
想以可视化方式修改地图和事件,请使用 RPG 编辑器工具中的地图编辑器。
|
||||
|
||||
## 出问题了怎么办
|
||||
|
||||
1. **门没有反应。** `Touch` 门在你踩上去时触发;`Action` 门需要面向它按 E 或 F。
|
||||
2. **怪物或宝箱复活了。** 它的 `Condition` 必须检查剧本所设置的同一个标志位。
|
||||
3. **商店是空的。** 游戏中必须包含 trading 模组,且剧本里的商店 id 必须与 `shops/village_merchant.json` 一致。
|
||||
Reference in new issue
Block a user