← 回首页← Home ·路径 3 · 换成自己的课文Path 3 · Put your own text in it
路径 3 | Path 3

✍️ 换成自己的课文

Put your own text in it

游戏机制、计分、记分、拼音、山景全部留着,只把题目换成你的课文。

Keep the mechanics, scoring, gradebook reporting, pinyin and scenery; replace only the questions.

1

先看清楚现在有什么

First, see what's already there

下载这一份:10 个版面的指示、卡片、答案、干扰项、答后讲解,加上 70 条拼音,全在一页里。

Download this: every instruction, card, answer, distractor and explanation across the 10 panels, plus all 70 pinyin entries.

这份文件是自动生成的,不是另抄一份 —— 它直接从 game.html 读题库,所以永远等于学生看到的东西。你改完题目,跑 python3 tools/dump-script.py 就会重新生成一份新的。

It is generated from game.html rather than maintained by hand, so it always equals what students actually see. After editing, run python3 tools/dump-script.py to regenerate it.

2

题目长什么样

What a question looks like

全部在 game.html 的 LEVELS 数组里(注释写着「二、题库」)。四种版面:

All in the LEVELS array in game.html, under the comment 「二、题库」. Four kinds:

// 拖进格子 | drag into slots
{ k:'slots', cols:3, hd:'版面标题',
  tip:{zh:'指示(华文)', en:'instruction in English'},
  slots:[{t:'格子名', sub:'小字,可省'}],
  cap:1,                                // 每格最多放几张 | cards per slot
  flow:'row',                           // 格子里横排,可省 | optional
  cards:[{t:'卡片文字', s:0}],          // s = 正确格子编号;-1 = 干扰项
  e:'答后讲解' }

// 多选,全对才得 1 分 | multi-select, all-or-nothing
{ k:'multi', hd:'…', tip:{zh:'…',en:'…'},
  q:'题目', opts:[{t:'选项', ok:true}], e:'…' }

// 三选一 | single choice
{ k:'choice', hd:'…', tip:{zh:'…',en:'…'},
  q:'题目', opts:['甲','乙','丙'], a:0, e:'…' }

满分是算出来的,不必手改。每张可放的卡片 1 分,选择题 1 分;MAX 由题库自动算出,删一个版面画面上的分数就跟着变。你唯一要手动做的,是把 SLS 的 Maximum Marks 改成开场画面显示的那个数 —— 两边不一致,后台分数就是错的。

The maximum computes itself. Each placeable card is 1 mark, as is each choice question, and MAX is derived from the bank — remove a panel and every displayed total follows. The one manual step is setting the SLS Maximum Marks to the number on the opening screen; if they disagree, the gradebook is wrong.

3

交给 AI 改

Let the AI do it

把 game.html 和你的课文一起上传给 Claude 或 ChatGPT,贴上这段提示语。

Upload game.html together with your text to Claude or ChatGPT and paste this prompt.

这是一个华文课的拖曳游戏,题库在 game.html 的 LEVELS 数组里。
请把题目换成我附上的课文,其余一律不要动。

必须遵守:
1. 只改 LEVELS 数组和 RUBY 拼音字典,其他程式码一行都不要动。
2. 每张可放的卡片值 1 分。满分由 MAX 自动算出,不必改程式;
   但请告诉我新的总分是多少,我要去改 SLS 的 Maximum Marks。
3. 卡片文字要短 —— 这是 450px 高的框,一张卡最多两行。
4. 干扰项请从「另一个例子」里取,不要凭空编造:
   要测的是学生有没有把两个例子分清楚。
5. 拼音一律人工写进 RUBY 字典,不要用任何转换函式库。
   特别注意多音字(好学 hào、乐在其中 lè、逆水行舟 xíng)。
   只标课本已注音的词语就好。
6. 指示(tip)的英文只写「怎么操作」,绝对不要翻译题目内容
   —— 附英译等于直接给出答案。
7. 中文引号用「」;字串里的单引号写成 \';每题 {...} 之间别漏逗号。

改完请把完整的 game.html 给我下载。

拿到新档案后,跑这三行,然后自己从头玩一遍:

With the new file in place, run these three and then play it through yourself:

python3 tools/build-sls.py      # 重建 SLS 版
python3 tools/dump-script.py    # 重建校对稿
python3 tools/build-pinyin.py   # 网页那份拼音字典

改完自己走一遍

Check it yourself before class

画面卡住不动,多半是 LEVELS 里少了逗号或引号没关好。按 F12 → Console 看红字。

A frozen screen is almost always a missing comma or unclosed quote in LEVELS. Press F12 → Console.

← 回三条路径← Back to the three paths