Use Character Textures in your Dialog Player in Godot | Game Dev Tutorial 12.5

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.พ. 2025

ความคิดเห็น • 21

  • @VaNix875
    @VaNix875 ปีที่แล้ว

    Just a regular comment to push the algorithm cause my boy needs more attention

  • @SolInanem
    @SolInanem 3 ปีที่แล้ว +1

    I recently came across the fact that a node called RichTextLabel that allow more functionality on the actual letters if you activate the bbcode mode. Could be a nice addition imho.

  • @fanreymysterio619
    @fanreymysterio619 4 ปีที่แล้ว +1

    I'm really looking forward to the RPG videos!

  • @dillon268
    @dillon268 4 ปีที่แล้ว

    Great job as always

  • @wintervein6086
    @wintervein6086 4 ปีที่แล้ว +4

    Hey dave! Can you please make at least one more dialog tutorial on how to assign these dialog boxes to different NPCs or triggers in a scene? Thanks!

    • @DavetheDev
      @DavetheDev  4 ปีที่แล้ว +3

      Since the "play_dialog" function is meant to be public, all you'd have to do it call it on a trigger event and pass the dialog record name. Anything can be a trigger, but I use the Area node's "_on_area_entered" signal a lot... Or, if your player's Area shape overlaps an NPC's Area shape and you press an "Activation Button" then you can get a reference to the overlapping Area Node, ask the Area Node what dialog it's associated with, then pass that name to the dialog player. Does that help? Let me know. ^_^

    • @wintervein6086
      @wintervein6086 4 ปีที่แล้ว +1

      @@DavetheDev Awesome! Thank you so much mate, I'll hopefully implement it soon once I finish your other tutorials and then let you know. Thanks!

    • @wintervein6086
      @wintervein6086 4 ปีที่แล้ว +1

      @@DavetheDev Alright so I tried this and it's giving me the issue "Invalid call. nonexistent function 'get_did_via_record_name' in base 'Nil'. This happens at the line _did = _Story_Reader.get_did_via_record_name(record_name).
      When I called the play_dialog() function within the original dialog_player.gd file this wasn't a problem.
      Do you know how I can fix this?
      Also it wouldn't let me call the play_dialog() function originally so I had to preload my dialog player script.

    • @DavetheDev
      @DavetheDev  4 ปีที่แล้ว

      In English, that error means you're trying to call a function on an empty/uninitialized variable. Which means something is wrong with the way you're loading the storyfile reader. Remember the class needs to be loaded, then you need to create an instance of the class. Also make sure you're not calling the play_dialog() function before the _ready() function has had a chance to initialize the storyfile reader. If that doesn't work, email me the project and I'll take a look.

    • @wintervein6086
      @wintervein6086 4 ปีที่แล้ว +1

      @@DavetheDev Thank you so much man! unfortunately because of some work I gotta get out of the way I got to wait till next week to do it but I'll try and get in touch again soon after trying this. You're the best!

  • @Jeansou21
    @Jeansou21 2 ปีที่แล้ว

    Thanks for the tutorial! I'd like to adjust the size of the "speaker's name" rectangle acording to the lenght of the name of speaker. Any tips on that?

  • @davidmurphy563
    @davidmurphy563 4 ปีที่แล้ว

    Nice, I'm really enjoying your tutorials.
    If you're open to ideas about video... I'm looking for a video on making 3d meshes in gdscript and it's failed me to find such a tutorial. As a beginner (I know python though), I'd like to make 3d primitives and manipulate them in code - this would be a nice way for me to understand the basic classes, methods and vector maths behind meshes. It's in the documentation but I'd rather a walk-through by an experienced dev. Code a cube, code a sphere, move them globally and locally, stretch them, deform them, add noise to the shape - that kind of thing.
    I'm really surprised nobody seems to have covered this - for me this is the foundation from which to build a true understanding of the fundamentals in 3d. Unless anyone can point me to a video that does.

    • @DavetheDev
      @DavetheDev  4 ปีที่แล้ว

      Hello David. I think the reason you don't find a lot of GDScript tutorials about Mesh Data Manipulation is because it's not really a beginner's topic. You're right, it is a fundamental topic, but for most people it's a bit too fundamental. Nowadays, if you want to make cubes, spheres and deform them, etc, I'd recommend just hopping into Blender and doing the work there. Unless of course there is a specific reason why you need to make these shapes dynamically? If there is, I'd recommend studying the "ImmediateGeometry" node and the "Mesh Resource" in the Godot Docs. If you just want to learn more about how 3D works, I think that's super cool and I'd recommend it. In that case there are thousands of videos on TH-cam explaining the fundamentals of 3D rendering. I'd recommend "ThinMatrix" , " The Cherno" or " thebennybox" channels, specifically their videos about OpenGL. They do a great job on the fundamentals.

    • @davidmurphy563
      @davidmurphy563 4 ปีที่แล้ว

      ​@@DavetheDev Thank you so much for the reply. This community is absolutely amazing, even more welcoming than the Blender community and that's saying something. Another YTer actually took time out of his day yesterday evening to screen share and solved the final problem with my code at his own behest which is just beyond kind.
      I can't argue with with you say, most people would lose the will to live with what would have me re-watching twenty times taking notes. :D I'm into my second week of Godot now and I'm full steam ahead. I've made procedural planets (just OpenSimplexNoise applied to a SphereMesh so far but it's a start) which I've stuck the class inside a custom KinematicBody and I've coded a simple newtonian gravity method so that I can make as many planets as I like and they orbit like in KSP. I gave up on ArrayMesh for now, hasn't clicked yet, but discovered SurfaceTool which is much more straightforward (well, it was after watching the Linear Algebra series on Khan Academy!) I'm already an advanced Blenderer which is why I'm focusing on getting to grips with the fundamentals of Godot rather than making a scene with imported meshes which wouldn't teach me as much.
      I'll definitely check out those channel you recommend as well as the ImmediateGeometry and MeshResource classes. Thanks again! A really excellent channel you have here and I appreciate your thoughtful reply.

  • @ravimorya878
    @ravimorya878 4 ปีที่แล้ว

    Hey bro love your tutorials
    Can you make a tutorial of implementing admob in Godot 3.2.2 in detail please

  • @mesolagic
    @mesolagic 4 ปีที่แล้ว

    Wow! This tool is so useful, I'm having a blast experimenting with it and it's really making my dialog system feel alive with the character portraits now. Thanks a ton!
    I have a question however. How would you end a dialog with a function call? For example, if you were to choose option 2 of a dialog prompt, I would want to end the dialog and call a function based on that decision. To be more specific, I'm trying to prompt some dialog for a shop keeper, and if you select the "Open Shop" option I'd like to call one of my functions that opens the shop UI. How exactly would you go about calling functions and closing dialog at the same time with this tool? I'm a bit stuck lol

    • @DavetheDev
      @DavetheDev  4 ปีที่แล้ว +1

      My projects have something called the "EXP_CommandServer" that can do exactly what you're asking. If you want to see how that works you can see here: th-cam.com/video/76hrohTTMM0/w-d-xo.html
      However, you don't need my solution to do what you're looking for. Simply making a new tag with some custom JSON will do the trick. For example: {"object": "shopkeeper", "func": "open_shop"} Your Dialog Player needs to be able to translate the "shopkeeper" string into a reference to the shopkeeper's object, then it's just a matter of calling the function on that object, like this:
      var json_function_text = get_tagged_text("callfunc", node_text)
      var function_dictionary = parse_json(json_function_text)
      var object_string = function_dictionary["object"]
      var object = get_object_reference_from_string(object_string)
      var function_name = function_dictionary["func"]
      if object.has_method(function_name):
      object.call(function_name)

    • @mesolagic
      @mesolagic 4 ปีที่แล้ว

      @@DavetheDev WOW.. this was amazing! Thank you so much for the detailed explanation! I'm definitely going to try this out and will also check out the linked video. I had a slight idea about using a custom tag for this but couldn't figure the rest out so this was a huge help :)

  • @NOPerative
    @NOPerative 4 ปีที่แล้ว

    Nice.

  • @_danny_idk
    @_danny_idk 4 ปีที่แล้ว

    an RPG prototype, that sounds cool, maybe it can be an jRPG

    • @DavetheDev
      @DavetheDev  4 ปีที่แล้ว +1

      It's in the JRPG style. Take a look on Twitter, I've been posting more there.