rakugoteam/Rakugo-Dialogue-System

Add support for paths to jump

Jeremi360 opened this issue · 3 comments

Several users asked us for support for jumping to other scripts and dialogues.
I believe that we can implement it in expanding the functionality of jump with path support.

menu jump_test:
   "jump_to_label" > other_label
   "jump_to_dialog_node" > $"path/to/other/RakuScriptDialogue"
   "jump_to_label_in_other_dialog_node" > $"path/to/other/RakuScriptDialogue" > label_to_start_from
   "change_scene" > "res://path/to/scene.tscn"
 
 other_dialog_jump:
   jump  $"path/to/other/RakuScriptDialogue"
   
other_dialog_label_jump:
  jump  $"path/to/other/RakuScriptDialogue" > label_to_start_from

other_scene_jump:
  jump "res://path/to/scene.tscn"

What you think @theludovyc ?

Hello :)

Several users asked us for support for jumping to other scripts and dialogues.

I am happy to know we have users who have asked us for something :)

"change_scene" > "res://path/to/scene.tscn"

Sounds as a good idea. But only work with littles scenes. Start from medium one you need load screen, because the game freeze. So it is better to let user handle scene change (with custom regex). But we can help him by create a plugin like a rakugo scene loader helper (so the user can only use this plugin), make a link with rakugo (the user can download rakugo + a plugin with custom regex already added), and we can add it in our kits too.

jump $"path/to/other/RakuScriptDialogue"

We need to answer a question
Does the script already parsed ? If not do we autorize to parse it on fly and then jump on it or throw an error ? (because it can take time)

$"path/to/other/RakuScriptDialogue" > label_to_start_from

Maybe just > "path/to/other/RakuScriptDialogue":label_to_start_from

Sounds as a good idea. But only work with littles scenes. Start from medium one you need load screen, because the game freeze. So it is better to let user handle scene change (with custom regex). But we can help him by create a plugin like a rakugo scene loader helper (so the user can only use this plugin), make a link with rakugo (the user can download rakugo + a plugin with custom regex already added), and we can add it in our kits too.

Yes, I know that only for little scenes godot's build-in change_scene() method is good enough.
So your idea for plugin is good.

Does the script already parsed ? If not do we autorize to parse it on fly and then jump on it or throw an error ? (because it can take time)

And okay, you mean the script we're going to jump to. Here I have one idea we can try to * "compile" * in the editor,
save the parsing result to Resource and then use this resource when executing the script.

Maybe just > "path/to/other/RakuScriptDialogue":label_to_start_from

I added $ only to make it more clear/readable for users that this is path to node.

I think we need to do it (scene change requested from an RkScript) in the examples, and then see what we can do to improve the user experience 😊