Skip to content

Commit

Permalink
Updated docs. [skip CI]
Browse files Browse the repository at this point in the history
  • Loading branch information
pigpigyyy committed Feb 21, 2025
1 parent a7e9882 commit 367f8cb
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,30 @@ You start broadcasting messages across the city, warning citizens. The resistanc

You can continue this pattern, creating nodes for "hack," "search," "protest," and "plan," each with its consequences, choices, and outcomes. Eventually, you'll want to conclude the story, summarizing the narrative.

## 7. Conclusion
## 7. Using Markup

Markup in the Yarn language is a special syntax used to add additional information to dialogue. These can be read by the program and used to control how the dialogue is displayed, add visual effects, or trigger specific game events.

* Character Markup

```html
[Character name=Alex] I am a rebel.
```

In the dialogue, `[Character name=Alex]` is a display markup used to specify that the speaker of the dialogue is Alex. As markup, it does not appear in the dialogue text. You can also equivalently simplify this special character markup as:

```html
Alex: I am a rebel.
```

* General Markup

```html
Alex: I am a [color=red]rebel[/color].
```

In the dialogue, `[color=red]rebel[/color]` is a general markup used to specify that the text color of "rebel" is red. Similarly, as markup, it does not appear in the dialogue text. It can only be read by the program, which then performs the corresponding actions based on the markup's instructions.

## 8. Conclusion

That's the basic structure of writing branching narratives using the Yarn language! With these tools, you can create stories filled with choices, consequences, multiple endings, and even large, complex narratives. So, here's wishing you happy writing and success in your rebellion!
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,30 @@ Alex,你终于决定加入反对 Cybertech Corp 的反叛军。人类的未来

  你可以继续这种模式,为 "黑客". "搜索". "抗议" 和 "计划" 创建节点,每个节点都有其后果. 选择和结果。最终,你会希望结束故事,总结叙事。

## 7. 结论
## 7. 使用标记

  标记是 Yarn 语言中的一种特殊语法,用于在对话中添加额外的信息。它们可以在程序中读取,并用来控制对话的显示方式、添加视觉效果或触发特定的游戏事件。

* 人物标记

```html
[Character name=Alex] 我是一名反叛者。
```

  在对话中,`[Character name=Alex]` 是一个显示标记,用于指定对话的说话者是 Alex。作为标记,它不会出现在对话文本中。你也可以等效的简写这个特殊的人物标记为:

```html
Alex: 我是一名反叛者。
```

* 常规标记

```html
Alex: 我是一名[color=red]反叛者[/color]。
```

  在对话中,`[color=red]反叛者[/color]` 是一个普通标记,用于指定对话的文本颜色为红色。同样作为标记,它也不会出现在对话文本中。只有通过程序可以读取到这个标记,并根据标记的指令在程序中进行相应的操作。

## 8. 结论

  这就是使用 Yarn 语言编写分支叙事的基本结构!有了这些工具,你可以创造出充满选择. 后果. 多种结局的,甚至是巨大. 复杂的故事。那么在这里就祝你写作愉快啦,也愿你的反抗成功!

0 comments on commit 367f8cb

Please sign in to comment.