Custom blueprint node for a text adventure?

Good day!

I’m trying to move a text adventure (without keyboard imput!) I’ve made in Twine to UE4. I know UE4 is a bit too much for the task, it’s for the sake of learning the engine and a little of C++ maybe.

So I’m trying to find out how to make a “room” entity. It needs to have a name, a text for a player, choices for the player with links to another “rooms”, collectable items and attached image and music.

Preferably it could be a node that I can place within Blueprint editor and fill it with text and assets. Than I could make a cobweb of these connected nodes and make it look something like in Twine.

But I’m not quite sure how to do it correctly, could you please help me out?

Hello, I just started with UE4 a couple days ago but I have a lot of experience in other game engines. You will want to learn UMG to create a user interface for your text adventure. It will let you show the text as well as buttons to click and make your choices. Just look for tutorials on UMG menu system. you might need additional tutorial to learn blueprints or other things like game modes, world settings, etc.

As far as blueprinting is concerned, you can create custom nodes with variables very easily. Lets say your node has 4 room choices: NSEW, a player clicks the go north button in your UMG menu, and blueprint can take that as input and go to the node for north. when the north node executes it can begin playing the new room music and display a new room picture in your UMG menu. Those assets will be referenced as variables in the bp node, same goes for the item pickups.

If you want to have the player able to type commands like “search the room” i’m not sure how you’d go about doing that. I’m sure it’s possible though.

I am not sure, if it helps, but there is a free template for Visual Novels available at the Marketplace:

If this does not work for you, then maybe you can still learn one or two things from it, since your text adventure seems to be pretty similar to a visual novel. At least closer than to other game types ^.^

Out of curiosity, are there any tutorials, that use the style you describe here? This sounds better for some kinds of 2D games, than most tuts, that use Paper2D (not everyone wants a Jump&Run ^.^ Card games seem to favor your method)

1 Like

I just looked on youtube and found a video of a guy that made a simple card game using it. It’s kind of a tutorial, he shows how he did everything, he doesn’t explain much of what he’s doing though:
card game tutorial

1 Like

Thanks for directing me to UMG tuts! This is not exactly what I asked about, but it’s really helpful.

Very, very interesting. And free. I’ll look into it, thanks a lot!

Thanks for that :slight_smile:

If you want to just build a game, getting something like that visual novel framework and using it will probably be quicker and easier than doing everything yourself from scratch. but if this is more of a learning experience, maybe you do want to build it all from scratch as a challenge.

to make a blueprint node what i would do for starters is make a custom event called EnteredRoom. you will want to do this inside your game controller or inside a level blueprint. this node is what you will call each time you go into a new room.

Your room data can be held by a STRUCT, and you will be able to access that data from your EnteredRoom event.

You can also use a DataTable instead of a struct if you want to hold data that way.

To play music you can call a “play sound 2d” node, in this node you should rightclick the “sound” pin and choose to promote it to a variable, name it BackgroundMusic.

if you want to show pictures of items in the room, you’d need to create icons in UMG for them. you could keep all the items as just data inside a struct or database, or you could create each item as an actor or something more object-oriented? there’s probably numerous ways to create a game like this and you’ll just have to start experimenting with it.