Worlds Colliding is the core foundation of the modpack of the same name. This mod serves as the technical engine, adding specific mechanics essential to the modpack’s narrative and progression system.
Key Features:
-
Custom Story Dimension : Added a Story Dimension where all the story takes place. This dimensions ensures that every players can enjoy the story even in a multiplayer environment.
-
Narrative Engine: Implements a custom dialogue system with fading and image rendering.
Join our discord !
Share your ideas or bug discoveries with us !
https://github.com/GCJOJO/WorldsColliding/issues
How to build:
- Install Java JDK 17
- Open command prompt or any IDE and run :
./gradlew build - Enjoy !
How to use the dialogue system:
First create a datapack using this folder structure
datapack-namespace/
lang/
en_us.json
any other language files...
dialogues.json
Inside dialogues.json define the different speakers that may speak in your dialogues.
Here is how you define a dialogue, there are multiple actions that can be defined as follows:
{
"speakers" : [
//...
],
"dialogue_1" : [
{ "action" : "message", "speaker" : 0, "text" : "this action displays a message with speaker id 0"},
{ "action": "change_set", "set": "dialogue_2" },
{ "action": "choice", "option1": "Choose option 1 !", "action1": "action1_choosen", "save1": "option1", "option2": "Choose option 2 !", "action2": "action2_choosen", "save2": "option2" },
// this actions displays a fading animation that takes 20 ticks and fades the screen from being visible to a white screen
{ "action": "fade", "from": "00000000", "to": "FFFFFFFF", "time": 20 },
{ "action": "wait", "time": 20 },
// clears any non blocking actions,
{ "action": "clear" },
//you may specify which action type to clear
{ "action": "clear", "cleared_action": "fade" },
// displays an image on the screen, the width and height are the original size of the image, the image should be properly resized once shown to the player
{ "action": "image", "id": 0, "image": "my_resourcepack:textures/gui/my_cool_texture.png", "width": 64, "height": 64},
]
}When defining text such as message or speaker names, you may use localized keys and translate them inside of en_us.json or any other language files.
You may display you dialogues using the following commands :
/dialogue set my_datapack:dialogue_1
/dialogue play
What are blocking and non-blocking actions ?
Blocking actions are considered as actions that blocks the current dialogue, when they end, they wait for user input instead of directly going to the next action.
There can be only one Blocking Action at any point.
Non-blocking actions do not wait user input before going to the next action.
Non-blocking actions can be stacked on top of each others and stack on top of one Blocking Action and need to be cleared manually using the clear action.
Here is a table of Blocking and Non-Blocking Actions
| Blocking | Non-Blocking |
|---|---|
| MessageAction | FadeAction |
| ChoiceAction | ImageAction |
| WaitAction | NextAction |
| CreditAction | |
| ClearAction |
This project is currently in active development
{ "speakers" : [ // The speaker with id 0 is named Speaker 1 and its display color is white, this speaker doesn't play any sound when talking { "id" : 0, "name": "Speaker 1", "color": "FFFFFFFF", "sounds" : [] }, // The speaker with id 1 is named Speaker 2 and its display color is red, this speaker plays the note block banjo sound when talking { "id" : 1, "name": "Speaker 2", "color": "FFFF0000", "sounds" : ["block.note_block.banjo"] }, // The speaker with id 2 is named Speaker 3 and randomly plays the sounds of the xylophone, the flute, the basedrum and the sound of falling on a mud block { "id" : 2, "name": "Speaker 3", "color": "FFFFFFFF", "sounds" : ["block.note_block.xylophone", "block.note_block.flute", "block.note_block.basedrum", "block.mud.fall"] }, //... ] }