Tutorial Part 1: Text Based Choose Your Own Adventure Game With a GUI in Unreal Engine 4

  Рет қаралды 12,864

Pat The Demon

Pat The Demon

Күн бұрын

Пікірлер: 72
@KenzieSFT
@KenzieSFT 3 жыл бұрын
I cannot seem to get a for each loop in my function? It's not available whether I am in context sensitive or not. I'm in the widget. I'm in the fillout page function we created, with DTRow Choices available etc, the csv is working just fine. Can't use a for each loop in the function. I'm using 4.26. My solution was to create one in the level blueprint and copy/paste it over.
@PatTheDemon
@PatTheDemon 3 жыл бұрын
Bizzare! Thanks for commenting this with a solution. I appreciate it, and sure you're not the only 1 having this issue. This really helps.
@lyrienn1319
@lyrienn1319 3 жыл бұрын
I was looking all over the place for an answer, thanks!
@MilliumG
@MilliumG 3 жыл бұрын
Thanks this is just what I read looking for
@SoullessAIMusic
@SoullessAIMusic Жыл бұрын
thanks for your straight forward tutorial and decent video quality.
@vitor8933
@vitor8933 3 жыл бұрын
you deserve more subs
@Maliheim
@Maliheim 2 жыл бұрын
Super useful and comprehensive. Thanks for sharing. 😄
@Validor_D
@Validor_D 3 жыл бұрын
Thanks for sharing!
@pjzombies8320
@pjzombies8320 4 жыл бұрын
Hey you seem to know a lot about what your doing. I’m new to all this and trying to make a text based American football simulation game. All players stats will be generated randomly off of there overall. You can draft trade and sign players. Do you know how I could do this or give me a few ideas?
@PatTheDemon
@PatTheDemon 4 жыл бұрын
Structures and Arrays. Off the top of my head without thinking too deep into these: You'd need to have a structure for each player that contained their stats; then an array for each team of players that is made up of your player structures. You need functions to generate player stats and store them in a structure. When called it would use the "Random Integer with range" node to fill out the variables of the stats. I.e. Random Integer/float in range of 1000 to 2000 to save in the variable for pass yards. Once a player in generated you'd call a function that would assign them to a team if you didn't do that while generating. So when called it would pass the structure of the player off to an array that represents the team. "Player_01" of type Struct_Player gets added to "The Ravens" team array if the array isn't full etc. With all the teams generated and packed away in arrays for each team trading, signing, firing, and retiring them would be easy Array manipulation.
@GamingHisoka
@GamingHisoka 4 жыл бұрын
do you think you could expand on this tutorial a lil bit like how to add UI to each page or sound effects at certain choices ? btw loved the video it was really helpful
@PatTheDemon
@PatTheDemon 4 жыл бұрын
I could do that. I'm swamped right now, though.😭 Next video will be images/sfx. Just got to find the time.
@GamingHisoka
@GamingHisoka 4 жыл бұрын
​@@PatTheDemon thanks man i really appreciate would be a huge help and sure take your time
@TheElitistSavage
@TheElitistSavage 4 жыл бұрын
@Hysoka Did you figure it out?
@PatTheDemon
@PatTheDemon 4 жыл бұрын
@@GamingHisoka Working on the tutorial for it today. Hopefully Ill have it recorded and edited today or tomorrow. Ill cover: -Adding Music to each page using the data table. -Keep Music playing if the pages have the same music. -Transition Music with fading if the pages have different music. -Adding sounds to buttons using the data table. -Adding Images to the top/bottom using data tables.
@PatTheDemon
@PatTheDemon 4 жыл бұрын
I'm having hardware issues. If you'd like a .zip of the UE project with images/sound blueprints let me know. Otherwise it's going to be a while. :C
@IoSkyBoyoI
@IoSkyBoyoI 2 жыл бұрын
hopefully an easy question. Really enjoying it so far. at 12:03 you click struct page? But I cant find it? I wonder if the updates have changed it to another name?
@IoSkyBoyoI
@IoSkyBoyoI 2 жыл бұрын
So interestingly in my struct_page. I have what looks like an error of "cannot parse value, propertery: choice string "none"." Not sure how to fix it but working on it.
@IoSkyBoyoI
@IoSkyBoyoI 2 жыл бұрын
Ok for anyone wondering. I deleted the choice variable and redid it exactly the same but its fine with it now and I found the struct page. I guess my lingering question is now 3ish years down the line, have you found a more efficeiant way to make games like this with all the updates?
@moviemaker2011z
@moviemaker2011z 3 жыл бұрын
just a slight question, you might have explained this but at the time of writing its 12am and i have been scratching my head on several videos on a similar subject and im a bit exhausted. when it comes to making the google charts thing, how do you know what to put where and why? like why are the choices arranged and placed like they are? sorry if its a stupid question.
@PatTheDemon
@PatTheDemon 3 жыл бұрын
Not a bad question at all. The relationship looks like this: A structure defines the columns of the data table and the excel sheet; the excel sheet then populates the data table. Before we can make our Sheet or our data table we have to create a structure. The Structure will define the names of the columns in the sheet as well as what data type they will hold. The first column of the sheet is always left blank! Unreal uses that column to define the name of the rows(if you use the node get row by name for example that column will have the row's name). After the first column the rest are named in order of how you defined them in your structure. In this case we defined the structure as being Title, Description, and Choices. When we fill out the sheet we skip the first column, and in the second column start with the titles from our structure in order. Column A == (null); Column B == Title; Column C== Description; Column D== Choices. You could have a Structure names 'Car Parts' that contains Engine, Transmission, and Body. When you make the Sheet for that you'd make the columns (blank), Engine, Transmission, and Body mirroring the structure in order and spelling.
@moviemaker2011z
@moviemaker2011z 3 жыл бұрын
@@PatTheDemon oh okay I get it now, thank your for the explanation on it. 😅
@kerameponymous242
@kerameponymous242 3 жыл бұрын
I created a map page so the player could reference it any time by going to that page. How would you set it up so that we can return to the page we just came from?
@CJsBark
@CJsBark 3 жыл бұрын
I know I'm a year late but would anyone know how to add like a typewriter effect to make one letter appear at a time?
@PatTheDemon
@PatTheDemon 3 жыл бұрын
Haven't personally done the tutorial but maybe this will help: kzbin.info/www/bejne/f6ConYNpbcxqoZI
@SteveSays
@SteveSays 3 жыл бұрын
Is it really this complicated just to add a text window... lol. UE4 looks great but just not for me.
@PatTheDemon
@PatTheDemon 3 жыл бұрын
Yeah. It's just because I'm using UE's built in Unreal Motion Graphics UI editor. You make some similar without it perhaps easier, but the advantage to taking the time to use UMG is you get all it's nice built services and animations plus some future proofing. It you're looking for something simpler making a CYOA game in a command console you've hard coded would be easier.
@SteveSays
@SteveSays 3 жыл бұрын
@@PatTheDemon do you have the UE files for download for future reference. I am not used to UE yet. But always up for learning.
@dominikpreloznik1650
@dominikpreloznik1650 3 жыл бұрын
how do you make stats like health when you pick choice you loose health
@Al-ww7qn
@Al-ww7qn 2 жыл бұрын
I've followed all the steps but the system is not working, and it does not show any error… I put an image in the MainInterface Widget to test if the widget is working and it is but I don't see any text or choices... The cursor is showing too... Any idea why this could be happening?
@AshyDragon
@AshyDragon Жыл бұрын
Hey, Not sure if you still follow your comments or not. But i was curious about how you could lay paragraphs and dialogue correctly using this method? or do you have any other way you could lay this out? As, as it stands, currently the text is just in a massive chunk with no paragraphs (regardless of how i've laid it out in google sheets) I noticed that at the end your 'lorem ipsum' section was spaced correctly, so hoping you could help! Cheers
@PatTheDemon
@PatTheDemon Жыл бұрын
I believe the lorem ipsum section I copied straight into the data table, and it kept the formatting. If formatting it in the data table doesn't work, you may need to investigate using something like the Format Text node. If I can ever find time I'll try to come up with a better solution. I'd like to redo this for UE5. Sorry I can't be of more help. 😔
@PatTheDemon
@PatTheDemon Жыл бұрын
May also look into String Tables: docs.unrealengine.com/4.26/en-US/ProductionPipelines/Localization/StringTables/#:~:text=String%20Tables%20%7C%20Unreal%20Engine%20Documentation%20%3E%20String,that%20allows%20for%20easy%20re-use%20of%20localized%20text.
@AshyDragon
@AshyDragon Жыл бұрын
@@PatTheDemon Turns out you just need to Layout exactly right on the Excel Data table and it imports correctly. (there is literally no way to make new lines in the data table in UE) I've been working in UE5 and everything is the same! so this still holds up! =)
@emmygage3040
@emmygage3040 2 жыл бұрын
Took me a couple times scrapping and restarting the project but I finally got it. Thank you so much for explaining!
@palomamorais5079
@palomamorais5079 Жыл бұрын
Perfect! Took me 2 hours to setup but working great many thanks!
@pawpainter8176
@pawpainter8176 2 жыл бұрын
Idky but I can't link the Struct Page function with Out Row.
@samuel_franek
@samuel_franek 10 ай бұрын
Is this tutorial working for mor choices and scenes?
@moviemaker2011z
@moviemaker2011z 3 жыл бұрын
hey its me again, im sorry to again be asking weird questions but as i was re-watching this i think i might have figured out what it was i had a problem understanding. so when you're at the google sheets page, your setup shows the title, description, and the choices. and i guess my question was on how did you interpret how the choices were filed, like for example, | 1|Welcome!|2 paths lay before you|(2,5,9,10,100)| is how you have it set up and i was wondering why exactly the numbers were set that way, but now the not tired me looked over it and i see those choices are the page numbers, somehow when i was tired and made my first comment i couldn't understand what those numbers were and why they were picked and placed like they were, now i can at least slightly understand that its the choices on how you want to progress, and you have to include page 9 for most or all the pages because its how you leave the game and page 8 is only when you've reached the end (good or bad) and can now restart or choose page 9 to leave. i hope im right because i feel like such a moron for taking so long to figure out such a simple premise. if im wrong than i guess im still the moron then. but now i have a bit of a bigger question that i was hoping you might be able to maybe point me in the right direction of and i will try to be brief. me and a friend are wanting to do a "open world" concept with a text based RPG. we were wanting to expand on it as it goes but start it off with simple concepts like picking a role and playing an open ended game where your choices SEEM infinite. kinda like saying you picked the bounty hunter role and can now go hunt bounties or maybe even buying or selling equipment which the game will track and keep that info for you, or even switching roles to become a soldier in the imperial army. that would be the starting points roughly and we were hoping to later add a lot more stuff but start really small and expand it later. now for that kind of game what all would i need to learn and get better at? I've asked several people and most just tell me its a learn by doing thing and even devs from the unreal site say the same thing, essentially they say "just take an idea and figure out how it's done and learn from that" which doesn't help me get started if i don't know what it is i need to start with or learn to do. i have watched Unreals tutorial on Blueprint Communications with Zack Parrish like 300 times (literally) and while i understand what he's saying and can follow along with it, i can't really say im learning HOW it all works together. heck i even did double the work, i took hand written notes, and then copied them to Microsoft OneNote WHILE watching the video in segments. embarrassingly i also used the OneNote experimental feature text to speech and would lay down at night and listen to the notes as i slept trying to burn the info into my brain (kinda worked). so i figured I'd asked you because you did a fantastic job explaining the concept to me last time that i was kinda hoping for one more explanation on what it is i need to at least look into so i can get my bearings on it. any help you can offer is again greatly appreciated!
@PatTheDemon
@PatTheDemon 3 жыл бұрын
Null sweat I'm always glad to help if I can. A few things to consider: Technical Demo, Pre-production, Minimum Viable Product, Unreal Motion Graphics(UI), and Game Instance Class(for saving/loading everything; including the player and their stats.) Really get comfortable with the basics of UMG, Game Instances, communicating between actors, casting, blueprint interfaces, structures, data tables, and enumerations. First and foremost you need to lay out the scope of your tech demo on paper very clearly. Tech demos are not finished products, they are simply a rough proof of concept. Don't waste a bunch of time worrying if you are doing things efficiently, or that all possible options and catches a player will have are handled. It is more important to just get it all working. Use this as a starting point but try to write out how things will connect, the story, classes etc.: For your tech Demo you'll probably need a basic player creator, a quest, and an ending. The player creator will simply be a Widget with some buttons, and text representing options. These don’t have to have a direct impact on the game at this point; they just need to be examples of what the application can do. So have classes for the player to pick and don't actually worry about what the classes do at this point. Once the player has made all their choices you’ll need to save out the choices in a Structure(I.e. Set Sturct_Player), and hand that structure off to your Game Instance(store ‘global’ variables here, handle saving and loading your game here). Next Populate your player class(You could forego the player class and just manipulate everything in the Game Instance, but for organization and future proofing’s sakes use a player class). To populate the player just have a Function that when called gets the Game Instance; cast the Game Instance as your Game Instance(whatever you named its’ class i.e. GI_main); get the Structure that contains the player’s information; apply that structure to your player class(it can be as simple as setting the Game Instance’s player structure to a player structure within your player class); Print the the player’s information to the screen once it is complete to show it has successfully been set. Finally load up the quest. The quest will be everything I covered in my Text Based Tutorial only you may want to add in extra information like combat, or perception. Fake this stuff for now. If the player encounters a Goblin just have a button they press that kills the goblin no functions or stats needed. Once you start building your MVP this is where you’ll really need to mess around with UMG, Functions, and Data Tables. Finally have a win condition or lose condition. If you manage to get all that done you’ll have a solid skeleton for a larger game and the real work begins. Now move on to pre-production. All of this is pre-production, but this is now pre-production proper. This is where you’ll start scoping your MVP and creating the necessary systems to handle the full game. MVP will be a full playable demo. It will be self contained and handle everything without faking anything if possible. A snapshot of a larger game. Once again here is an example of where to start: Now is the time to start filling out some meaningful options for the player starting with the player creator. Pick a couple of classes, and some stats that will be used in the quests to come(this doesn’t have to be all the stats they may have just what you plan on using). In the Player Creator Widget I would include the ability to name my character; the character’s stats displayed; the ability to pick a class(if the classes affect the stats of the character reflect this in the displayed stats); if classes don’t determine starting stats then points to spend to set their own stats. Once again save this all to the Game Instance, and hand it off to the player class. Now instead of having a quest just start, you’ll probably want to build a widget that lets you navigate a small quest hub where the player can move between descriptions of areas, and “talk” to NPCs. Handle the hub and the NPCs with data tables, and their Widget. Have a key press or button that will switch to a journal where a player can pick a quest to start it(use a Widget Switcher to house the various screens: Quest HUB, Quests, Journal, Inventory, etc. use a button[s] that is outside of the Widget Switcher’s hierarchy[meaning it will always be displayed] to go between Widgets). Start the quest; have situations where the player’s stats will be used within these quests; give them agency like picking a direction, choosing different attacks, etc. don’t go overboard this is still just the MVP. Remember you can have hidden to the player options in the widget switcher; so for combat just hard code a swap that changes the widget switcher to a combat widget, populate the widget, and when the fight is resolved swap back. Finally, have a save system. Whenever the player picks a quest save the game to the Game Instance before starting the quest. Then should the player die or “lose” just load them back to before they started the quest. When the game starts up check for a save; if no save make one; if there is a save load it. Have the win condition be completing a couple of quests. You may want to create an inventory to go with the journal widget. This isn’t entirely necessary at this stage, but is something may need down the road. Once your MVP is complete let some people play it. Get some feedback. Decide what you can implement from that feedback, and finish pre-production. Update the MVP with suggestions and have them replay it(if you want). Then move on to production: writing out all the quests, NPCs, Hubs, Weapons, items, etc. into data tables. I would handle quests like in the tutorial, write each 1 as a “book” and put it in its own data table. Once you’ve got the writing out of the way, work out your classes, math(player stats, stat checks, combat, loot, economy, chance encounters, etc.). Then refine your systems, and put it all in the game. This will take time, and it will be frustrating at points, but if you are this dedicated to understanding you will be able to achieve this. “Fun is becoming infatuated with something for which infatuation seems impossible. Working deliberately and carefully with something over time so that it may reveal its secrets.” - Ian Bogost P.S. I don't have any resources to share at this time, but when I get a chance I'll try to link some , maybe.
@moviemaker2011z
@moviemaker2011z 3 жыл бұрын
@@PatTheDemon again dude thank you so SO much for the help. this comment alone is more help than i have gotten in such a long time and i cant say thank you enough really. the advice is leagues above what i have heard before and honestly i was starting to worry if maybe i just couldn't handle doing this kind of stuff. most people like said would say "take an idea and make it happen, then expand from there" but they would never tell me what i needed to learn like data tables or vectors, or instances or even casting to make those ideas happen. they would be vague and act like they helped in some way, so again thank you for laying it all out and being so nice. i know it probably doesn't mean a whole lot but you definitely earned a new subscriber today.
@PatTheDemon
@PatTheDemon 3 жыл бұрын
I appreciate your support and glad I could nudge in the right direction. Once you get in to it you'll discover there is a lot I haven't covered. Feel free to ask me anything. I won't always get back right away, but I'll try my best! good luck! Thanks for the sub.
@Revotur
@Revotur 5 ай бұрын
I tried to create this project on the new UE5 version and some functions are not there, they are called differently, or they are somewhere else. Can you make this movie again but for the latest UE5?
@mrvizier7788
@mrvizier7788 Ай бұрын
hey did you find any good tutorial like this?
@lpsftw8572
@lpsftw8572 3 жыл бұрын
Hi there!! I wanted to ask if it's possible to add 3d objects to this game. I'm doing a group college project due in on 23rd and what we're doing is this, but also involving 3d low Polly objects. Similar to the visuals for the text based adventure game "Stories untold" We have things like a computer station, a bobblehead and such into the background. As if the character in game is sat at a desk and playing the game on the computer Infront of him Is it possible to add 3d objects????
@PatTheDemon
@PatTheDemon 3 жыл бұрын
If you are just looking to get something working then yes this is pretty straightforward. Look into 3D widgets in Unreal. Basically instead of adding the widget to the viewport you'll instead place the widget in the world. Obviously, there are some challenges you'll have to figure out, but in general that should do the trick. If you want something like the computer monitor effect that looks as nice as Stories Untold: I'd look into Materials where you could place a model in front of the widget. Then use a combination of the Material and a Post Processing Volume to achieve some sort of "This is a monitor" effect. I'd have to mess around with it to find the best way to achieve the effect, but I work in Unreal all day and when I get off work I don't have enough to time to do stuff for myself. :C
@lpsftw8572
@lpsftw8572 3 жыл бұрын
@@PatTheDemon hey, don't worry about it. Gotta look after yourself first. Thanks!
@denismiln
@denismiln 3 жыл бұрын
Thanks for your very helpful video! I've made little project in 4.25. And it's work ok. But now I'm making another project in 4.26.2 and when I try to change variable type to Struct Page I can't do that. The list hasn't this type of variables! 4.25 - everything is ok. 4.26.2 - hasn't Struct Page! I've googled this trouble and found nothing. Maybe EG renamed it. Maybe it's any strange bug. Are you heard something about that?
@PatTheDemon
@PatTheDemon 3 жыл бұрын
We create the Struct_Page early on in the video. When you try to change the variable type to this, and it doesn't show up it should be because you haven't created the Structure Struct_Page. Let me know if this helps.
@denismiln
@denismiln 3 жыл бұрын
@@PatTheDemon Lol! I'm so stupid! I've absolutely forgot that variable types in cases like this may depend by blueprint's names. Ofcourse I've already created Structure but it has another name 🤦‍♂️ Thanks again!
@PatTheDemon
@PatTheDemon 3 жыл бұрын
@@denismiln don't beat yourself up. It's a long video and I'm very straightforward so there isn't a lot of entertainment value. It's easy to miss a step, and we'll everyone does it. Be proud you were invested enough in yourself and learning that you summoned the courage to ask for help. Most would have given up! Good luck out there, and I'm here to help if I can.
@denismiln
@denismiln 3 жыл бұрын
@@PatTheDemon Thank you so much! You need a lot of subscribers and we need a lot of videos by you! I hope it'll be this way someday...
@zadrex
@zadrex 4 жыл бұрын
wow
@aufgespielt3768
@aufgespielt3768 2 жыл бұрын
Hey thanks again to this awesome tutorial series. I try to change the Button Text with different Texts from the Data-table why I need a separate Headline (Title Text). But how can I do that? I use a Map Variable to Type the Row Number (Choice Row) and a Text Variable (Button Text) But i can’t split the Map Node in the final Step…
@michaelkwon1274
@michaelkwon1274 Жыл бұрын
How viable is this with Unreal 5?
@PatTheDemon
@PatTheDemon Жыл бұрын
Just as viable as any other 3D engine. It's definitely overkill, but I didn't look into any of the performance requirements for just running basic widgets. I also didn't cover any engine optimization in the video.
@danbeers3024
@danbeers3024 2 жыл бұрын
@Pat The Demon This is excellent. I was wondering if you know how complex it would be for have the ForEach loop to only display options that haven't been chosen yet. I've added a IsSelected? bool to the struct, but it seems to either remove all or remove none. I'm sure it's because I'm very new still. Basically what I'm looking for is "if IsSelected? == false, then don't be listed as a choice (even if it is in the original array)." This way, the player can do something only once.
@joeyparenti7815
@joeyparenti7815 3 жыл бұрын
why is my split array of choices not there when I split the DTRow choices its just a purple ring
@TsrifTsal1
@TsrifTsal1 2 жыл бұрын
Very nice! It even worked with Unreal Remote 2 and was nice to see that touch was supported right out of the box!
@imeatingnemo4412
@imeatingnemo4412 3 жыл бұрын
10:29
@TheElitistSavage
@TheElitistSavage 4 жыл бұрын
How you put music in for each choices?
@PatTheDemon
@PatTheDemon 4 жыл бұрын
Working on the tutorial for it today. Hopefully Ill have it recorded and edited today or tomorrow. Ill cover: -Adding Music to each page using the data table. -Keep Music playing if the pages have the same music. -Transition Music with fading if the pages have different music. -Adding sounds to buttons using the data table. -Adding Images to the top/bottom using data tables.
@PatTheDemon
@PatTheDemon 4 жыл бұрын
I'm having hardware issues. If you'd like a .zip of the UE project with images/sound blueprints let me know. Otherwise it's going to be a while. :C
@ewalachowicz1662
@ewalachowicz1662 4 жыл бұрын
@@PatTheDemon These two tutorials are super helpful. Would you be able to make the .zip available for download?
@PatTheDemon
@PatTheDemon 4 жыл бұрын
@@ewalachowicz1662 yes, I plan to make them available on GitHub/google drive. I'll comment back here when I do I'm really glad you found these tutorials useful. 😁
@PatTheDemon
@PatTheDemon 4 жыл бұрын
@@ewalachowicz1662 Full text based adventure + sound and images: drive.google.com/file/d/1_uzllEAopz0KwBdGr_EKh7Z0L9awUshB/view?usp=sharing
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 12 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 99 МЛН
The past, present, and future of Interactive fiction
20:17
Chris Chinchilla
Рет қаралды 9 М.
I Made a Game With Only FREE Assets In Unreal Engine 5
11:45
Smart Poly
Рет қаралды 500 М.
Someone Made Pay 2 Win: The Game And Its Hilarious
14:11
MitchManix
Рет қаралды 3,3 МЛН
Why Solo Developers Should Use Unreal
9:51
Thomas Brush
Рет қаралды 385 М.
Results After Releasing my First Game on Steam
15:07
Pontypants
Рет қаралды 2,1 МЛН
How I Remade MW2 with Unreal Engine 5
12:37
reubs
Рет қаралды 3,1 МЛН
Unreal Engine 4 - The Easiest NPC Dialogue Tutorial EVER
9:04
Beardgames
Рет қаралды 76 М.
The Future of Game Development
8:58
Brackeys
Рет қаралды 1,2 МЛН
How To Make A Game Alone
8:11
Thomas Brush
Рет қаралды 1,1 МЛН
OYUNCAK MİKROFON İLE TRAFİK LAMBASINI DEĞİŞTİRDİ 😱
00:17
Melih Taşçı
Рет қаралды 12 МЛН