dev

Converse is a Lua module designed to create interactive conversation interfaces between people with branching-choice support.

Installation

Lua installation

CSS installation

Usage

To create a conversation, use the Converse template with stepped parameters (for example., step1, step2, step10).

It is recommended that steps are numbered with big increments, such as 10, to allow for easy insertion of new lines later.

General Parameters

Step Parameters

Each step requires a type and text. Replace N with the step number.

Character Parameters

Used when type is set to npc.

Option Parameters

Used when type is set to option to define the immediate result of the choice.

Example(s)

The Airlock Dilemma
[SCENE START] The airlock door malfunctions. Oxygen levels are critical, and there is an android with you.
Example
Android UnitBeep boop, there is a problem! Your probability of survival is 12%. I calculate that ejecting the cargo will increase survival to 84%.
"Eject the cargo immediately!"
"How about no? Find another way."
"Eject the cargo immediately!"
[BAD ENDING] The cargo was ejected. Unfortunately, the life-support systems were in that cargo. You suffocated, lmao.
"How about no? Find another way."
Example
Android UnitUnderstood. Attempting to bypass the safety protocols... Beep beep, error! Manual assistance required.
Example
Android UnitYou must sever the red wire or the blue wire to override the lock.
"I'll cut the red wire."
I feel blue today.
"I'll cut the red wire."
[BAD ENDING] Sparks fly. The door seals permanently, you are trapped...
I feel blue today.
Okay, let me cut the blue wire.
The airlock hisses and opens successfully.
Example
Android UnitSuccess! Oxygen levels are stabilizing. We have survived without losing the cargo.
"Good job, robot."
"That was too close. I'm scrapping you."
"Good job, robot."
Example
Android UnitThank you, Captain.
"That was too close. I'm scrapping you."
The Android Unit stares at you in silence as you begin smirking.
The end.
{{Converse
| header = The Airlock Dilemma
| footer = Situation End

| step10-type = action
| step10-text = [SCENE START] The airlock door malfunctions. Oxygen levels are critical, and there is an android with you.

| step20-type = npc
| step20-name = Android Unit
| step20-img  = Example.jpg
| step20-text = Beep boop, there is a problem! Your probability of survival is 12%. I calculate that ejecting the cargo will increase survival to 84%.

| step30-type = option
| step30-text = "Eject the cargo immediately!"
| step30-result-type = action
| step30-result-text = [BAD ENDING] The cargo was ejected. Unfortunately, the life-support systems were in that cargo. You suffocated, lmao.
| step30-continue = no

| step40-type = option
| step40-text = "How about no? Find another way."
| step40-result-type = npc
| step40-result-name = Android Unit
| step40-result-img  = Example.jpg
| step40-result-text = Understood. Attempting to bypass the safety protocols... Beep beep, error! Manual assistance required.

| step50-type = npc
| step50-name = Android Unit
| step50-img  = Example.jpg
| step50-text = You must sever the red wire or the blue wire to override the lock.

| step60-type = option
| step60-text = "I'll cut the red wire."
| step60-result-type = action
| step60-result-text = [BAD ENDING] Sparks fly. The door seals permanently, you are trapped...
| step60-continue = no

| step70-type = option
| step70-text = I feel blue today.
| step70-result-type = player
| step70-result-text = Okay, let me cut the blue wire.

| step80-type = action
| step80-text = The airlock hisses and opens successfully.

| step90-type = npc
| step90-name = Android Unit
| step90-img  = Example.jpg
| step90-text = Success! Oxygen levels are stabilizing. We have survived without losing the cargo.

| step100-type = option
| step100-text = "Good job, robot."
| step100-result-type = npc
| step100-result-name = Android Unit
| step100-result-img = Example.jpg
| step100-result-text = Thank you, Captain.

| step110-type = option
| step110-text = "That was too close. I'm scrapping you."
| step110-result-type = action
| step110-result-text = The Android Unit stares at you in silence as you begin smirking.

| step120-type = action
| step120-text = The end.
}}
Text above can be found here (edit)