Adding NPCs (Godot Retro Text Adventure Tutorial #14)

  Рет қаралды 2,989

jmbiv

jmbiv

Күн бұрын

Пікірлер: 20
@xx___xx2787
@xx___xx2787 9 ай бұрын
for anyone doing this in Godot 4 and gets confused (like i did a bit) at 5:06 where obvz PackedStringArrays work a bit differently; the line i have is: return " ".join(full_description_string) I guess its fairly obvious looking back, but sometimes when you are learning to do something in an outdated version of the language ur doing, it can be a bit difficult to translate it to make it work. Especially if its your first time using the engine. anyway, props to anyone who made it this far
@nosdregamon
@nosdregamon 2 жыл бұрын
Nice to see the adventure continue!
@XenoFect
@XenoFect 2 жыл бұрын
Yay! Another episode! Thanks for the tutorials you put out. They are super helpful.
@jmbiv_dev
@jmbiv_dev 2 жыл бұрын
No problem! Really glad to hear that you're finding them helpful, it's encouraging!
@McHumaty
@McHumaty 2 жыл бұрын
Uhul!
@jmbiv_dev
@jmbiv_dev 2 жыл бұрын
Thanks! And unfortunately no 😔 I've really enjoyed making this series but it unfortunately doesn't get enough views to justify the effort needed to keep it going, so I've got two more videos coming that will end the series (quests, and better text formatting/polish). If you do want to add a save system, GameEndeavor has a great video on making one in Godot that shouldn't be too hard to implement in this project - search for his video, give it a try, and let us know in Discord if you need any help!
@McHumaty
@McHumaty 2 жыл бұрын
@@jmbiv_dev I understand your point of view... I loved the show and I'm looking forward to the last two episodes! Yes, I will search about the video you recommended, thank you very much.
@mgc8888
@mgc8888 Жыл бұрын
Here's a tip: use "similarity" to compare NPC names, items, exits, etc. -- to accept articles such as "a" or "the" and typos such as "inkeepr" (tried to add link to the documentation, but the damn YT comments keep eating it, sheesh)... You can Google for "Godot string similarity" to find it. For example, in the "talk" function: if npc.npc_name.to_lower().similarity(second_word) > 0.5 Change the "0.5" value up or down, towards "1" for more exactness, towards "0" for more fuzziness.
@jmbiv_dev
@jmbiv_dev Жыл бұрын
A great tip! And very important for helping the game feel better even despite small spelling errors. The only extra advice I’d give is that sometimes a high fuzziness value can cause matches that you didn’t want, so sometimes it’s better to just do an == comparison first, and then if that doesn’t match (and only then) do a “similarity” search. But it’s a super helpful function to know about!
@mgc8888
@mgc8888 Жыл бұрын
@jmbiv Indeed, that's a good point. You can also turn it into a nice ranking function, which iterates through all the items/npcs/etc. in the room and sorts them by similarity, then you pick the top-scoring one and only compare that with your fuzziness number. That would allow having similarly named items in the same place and still refer to them fuzzily (such as "red key"/"blue key"/etc.). Adding hidden synonyms for objects where it makes sense ("guard"/"soldier"/"person"/etc.) may also be a nice improvement to allow players a more natural interaction with the world (same as for the commands themselves). I think some of us still remember the pain and suffering of early Sierra adventure games, that would force you to type in *exactly* the right word or phrase in every interaction... can be part of a difficulty setting, perhaps :)
@ianmclean9382
@ianmclean9382 2 жыл бұрын
I love seeing your tutorials, Text based games are so fundamental to coding that I feel like learning a project like this does more for your skills than following most other tutorials
@jmbiv_dev
@jmbiv_dev 2 жыл бұрын
Thanks for the kind words! I agree - it make you think through some lower-level challenges like parsing and grammar rules that you don't have to think through in something more graphics-heavy.
@ericspeak6110
@ericspeak6110 2 жыл бұрын
I'm not sure if maybe I missed something but I am going to have the npc's that I have loaded into the game as a list so if some uses the talk function and rights gibberish it will say something like who is that. And have talk only work if you right the name of a loaded npc. Then maybe you called a where_are_they or a last_location_seen function. Maybe have an npc that wanders around the rooms. Not sure completely how but I'm gonna figure it out.
@jmbiv_dev
@jmbiv_dev 2 жыл бұрын
That sounds like a great plan! Since we already use an Array for NPCs in a room, it shouldn't be too much extra work to get working correctly. If you need any help, feel free to ask here or in the discord server!
@josephmarsh5031
@josephmarsh5031 2 жыл бұрын
I kept getting Nonexistent function "append' in base 'String'. I forgot to remove the .join(" ") at the end of 'var full_description...' I guess I didn't realize that this function call transforms the array to a string. Its obvious in hindsight but I figured I'd share my experience incase anyone else sees this error.
@jmbiv_dev
@jmbiv_dev 2 жыл бұрын
Thanks for sharing! I'm sure others will find it helpful.
@sph2120
@sph2120 2 жыл бұрын
Hello, and thanks a lot for your wonderfull work. For the first time in this series, i met a problem. The item.gd custom script file doesn't appear in the Create New Resource menu. Any idea why ? (five minute later,... ok i think i managed it, i create a new resource and affect the reference script item.gd using the inspector)
@jmbiv_dev
@jmbiv_dev 2 жыл бұрын
Glad you've found the series helpful! And thanks for asking your question. That's probably because you didn't add the line "class_name Item" in your Item.gd script file. Godot needs you to define a custom class name for the editor to include it as a creatable scene/resource/etc. Try double-checking that you have that line, and see if it works then!
@sph2120
@sph2120 2 жыл бұрын
@@jmbiv_dev ok , i did it, but i notice now i didn't use the same class name as you :) . Now it's fine. Thank you. I hope your serie will have several episode more , we learn so much !
@jmbiv_dev
@jmbiv_dev 2 жыл бұрын
Awesome, glad you figured it out! And thanks for the kind words. There will be 18 episodes in total 🙂
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 14 МЛН
РОДИТЕЛИ НА ШКОЛЬНОМ ПРАЗДНИКЕ
01:00
SIDELNIKOVVV
Рет қаралды 3,8 МЛН
Зу-зу Күлпаш 2. Интернет мошенник
40:13
ASTANATV Movie
Рет қаралды 582 М.
If Your Tech Job is Comfortable, You're in Danger
20:57
Thriving Technologist
Рет қаралды 14 М.