Download

Building an RPG with Unreal Book - Anyone Read?

Just looking to find out of anyone has read this book and whether it’s any good?

http://www.amazon.com/Building-RPG-Unreal-Steve-Santello/dp/1782175636

Thanks!

Haven’t read the book, but from the looks of it, it is very heavily C++ oriented. I clicked the “Look Inside” link on Amazon, and was able to go through several pages. Very detailed from what I can tell. Looks to be 300+ pages on how to setup exactly what I’m wanting to do. I’m not very good with C++, but might pick it up since it’s on the subject I am interested in the most. Maybe it’s time for me to learn C++… :slight_smile:

If anyone else has read this, could they share their thoughts?

I just ordered it, so I’ll post back when I have a review.

Awesome, thanks a ton!

I bought it, tried to use it and got stumped in Chapter 3, the book uses 4.7.x and I started in 4.10.1, I even backtracked to 4.8.3 and the code base in UnReal changed to the point I couldn’t make it work. Biggest problem was no way to contact Author or a good forum stream for answers, maybe I will try and see if anyone here gone through book with current version of Engine and resolved the issues.

That’s the same problem I’m having with the documentation and videos. What ever happened to the MajorChange.MinorChange numbering format? Or am I just too old that I expect 4.11 and 4.7 to operate in exactly the same manner, but 4.11 and 5.1 could be totally different. It seems like they’re going MajorOverhaul.MajorChange.MinorChange. UGH!

You have the option to install the 4.7.x version of the engine, so you would be able to work out of the book.

Read it, and followed the whole book through. The differences between 4.7 and 4.11 were pretty easy to deal with. However, I found the practices in the book to be sub par at best.

It describes the setting of the game being constructed as a tower where you fight your way up floors to the final villain. NONE of this is done in the book. It doesn’t even devise a system for random encounters with enemies. Instead, it relies on you running a console command to initiate “battle”.

I understand it might be trying to build a framework you can run with, but I don’t even think it does a good job of that.

Several of the systems you end up creating feel hard-coded. Especially the blueprint UMG inventory and equipment systems. If we were truly creating a framework to re-use or start from, then the code should reflect that with some easy to modify, modular code.

I have to agree. I bought the book hoping to find something more complete but to be honest it’s not very good.

Too many hardcoded things, a lot of C++ which I don’t really have an issue with but not enough info on how to extend the game. A lot of the game seems incomplete. There is just a lot missing imo. We would have been better served with a tutorial series on Udemy or something like that can be updated, extended etc.

It would be nice to get a blueprint tutorial for an RPG. I’ve made due by scouring youtube for tutorials and some of them are pretty **** good. I just have to fill in the missing pieces and I can kind of translate some of the stuff this book to blueprints in most cases.

Either Id say save your money.

It’s a Packt book, so there is a very good chance it will be poorly written by a non-professional author and poorly proof-read. Poor in all aspects I suspect.

They seem to be flooding the market at the moment but I now avoid them at all cost.

If you are the same as me and there are a lot of me’s out there…
The solution to Chapter 3, invisible man…
LordRhys “I bought it, tried to use it and got stumped in Chapter 3, the book uses 4.7.x and I started in 4.10.1, I even backtracked to 4.8.3 and the code base in UnReal changed to the point I couldn’t make it work.

You must revisit
Edit>Project Settings Maps&Modes- Default GameModes
The set it to your newly made DefaultRPGGameMode Blueprint

Unfortunately, the book quickly obsolete.
Epic, you are too fast sawing engine ;)))

Did any of you get anything useful out of this book? I had hopes to use it as a foundation to learn and make my own blueprints, but after previewing the combat chapter and the bad reviews, I’m not so sure anymore. I “only” wish for a working turn based battle system so I can start doing artwork. Why haven’t someone made a FF inspired blueprint combat engine on marketplace yet? I’d be the first to buy!

OK. I got the updated 4.12 version now and the project files works.

I kind of like the end result of the book but I’m to dumb to figure out how to push out more characters from the data table?

The book only creates one char and not exactly holding the readers hand how to pop out more. Maybe something actually is broken?
I’ve gone through an course of LearnC++ app (!) but that’s about how much skills I have. I’ve added a couple of more chars/classes in the BP struct. But that of course didn’t do anything.

Could anyone help me where to start? Been fiddling with this whole day and about to give up.

Should I focus here?

In the header file, we’re going to add a TArray of the UGameCharacter pointers,
a flag to know whether the game has been initialized, and an Init function.
Your RPGGameInstance.h file should look like this:

#pragma once
#include “Engine/GameInstance.h”
#include “GameCharacter.h”
#include “RPGGameInstance.generated.h”
UCLASS()
class RPG_API URPGGameInstance : public UGameInstance
{
GENERATED_BODY()
URPGGameInstance( const class FObjectInitializer&
ObjectInitializer );
public:
TArray<UGameCharacter*> PartyMembers;
protected:
bool isInitialized;
public:
void Init();
};

In the Init function for the game instance, we’ll add a single default party member
and then set the isInitialized flag to true. Your RPGGameInstance.cpp should
look like this:

#include “RPG.h”
#include “RPGGameInstance.h”
URPGGameInstance::URPGGameInstance(const class FObjectInitializer&
ObjectInitializer)
: Super(ObjectInitializer)
{
isInitialized = false;
}
void URPGGameInstance::Init()
{
if( this->isInitialized ) return;
Chapter 3
55 ]
this->isInitialized = true;
// locate characters asset
UDataTable* characters = Cast<UDataTable>( StaticLoadObject(
UDataTable::StaticClass(), NULL,
TEXT( “DataTable’/Game/Data/Characters.Characters’” ) ) );
if( characters == NULL )
{
UE_LOG( LogTemp, Error, TEXT( “Characters data table not found!” ) );
return;
}
// locate character
FCharacterInfo* row = characters->FindRow<FCharacterInfo>( TEXT(
“S1” ), TEXT( “LookupCharacterClass” ) );
if( row == NULL )
{
UE_LOG( LogTemp, Error, TEXT( “Character ID ‘S1’ not found!” ) );
return;
}
// add character to party
this->PartyMembers.Add( UGameCharacter::CreateGameCharacter(
row, this ) );
}

I just started reading it. One of the first things I like to do is go to the end to see the final result of what all this hard work will be, and there isn’t one! There’s not a single screenshot of what this game will look like. I imagine I’m going to waste a lot of time and not have much to show for it. I also anticipate tons of coding problems, with things not matching up and running correctly. Has anyone ever finished this?

If you’re quick to the topic you can snatch the book for $1 off the latest book Humble bundle right now.

Welp, I’m stuck in Chapter 3 like others have said. Keep getting tons of errors with the code. I think they made some typos in the UnrealRPG header, but I’m not sure. I also keep getting a message I already have a class by the name RPGPlayerController but I do not.

I apologize for just seeing this forum now. There are actually 2 editions of the book, the first one is Building an RPG with Unreal, and the second one is *Building an RPG w**ith Unreal 4.x. *
The first edition is in fact optimized under version 4.7.6 which is an old version of Unreal by now, and there are a lot of errors in it due to one of our co-authors and editors wrecking the code especially in Chapter 3. If you bought the book off PacktPub’s site, they updated your version of the book via pdf for free, if you bought the book elsewhere those companies don’t supply a free update.
The second edition of the book was done in 4.12.5 (new at the time). Much of the content likely still works in later versions of UE4 since most of it is basic, but haven’t had the chance to test most of the chapters in later versions of UE4. Upon testing the second edition of the book multiple times before and after its release, the book’s contents with the code work, but again if you have the first edition of the book you will run into a lot of problems unfortunately. The challenge as a member of this forum stated, and as I stated to the publisher is Epic updates Unreal frequently and the book could quickly become obsolete, though we were forced by the publisher’s hand to stick with this format.

Either way, if you get stuck I recommend to compare your code to the code files by downloading the code files which are supplied online for free whether you bought a copy of the book or not
https://www.packtpub.com/code_download/23385 (again, done in 4.12 and comparable to the second edition of the book).

There was a question raised about what the final product is of the book. The book itself really covers supplying a framework for a turn-based RPG. With a book this small, it was only possible to cover basics (the publisher limited us in the amount of pages we could use so we had to cut out a lot of content), so there is general framework of a turn-based combat system, player/enemy stats, inventory/equipment system, and a shop. But the hope is that this basic framework will allow readers to expand upon it and add their own content to make a game out of it.

Thanks @Rrule

Apologies to thestevex, but I was ulitmately pretty disappointed with the book, which appears to be the later version.

I got the book on the Humble Bundle sale. I was pleased at first, because Data Tables were new to me. I’ve now spent 3 or 4 days reading and coding, and have this to say: What code that hasn’t been directly lifted from the Third Person C++ template looks like it was created for a text based rpg and mashed into UE4 without regard to how the engine actually works.

I may be wrong about some of this because the way the book is organized, things that seem to be missing may be supplied later (this makes the book pretty hard to read, too.) Stuff that discourages me from spending more time reading the book:

  • There are no screenshots of the level, the UI or the avatar in the field. Nearly all of the images are of blueprint code. All you would see in combat is a stream of log messages (unless you’re playing standalone - then you see nothing, as far as I can tell). No combat animations, no enemy creatures, no party members, no audio, and no onscreen text.

  • The character stats are not added to the “RPGCharacter” class (from the third person character template), but a new class, confusingly named GameCharacter, but inheriting from UObject. This decision makes it seem like it was written by someone unfamiliar with both the engine, and any notion of object oriented programming.

  • There was a lot of “write an incomplete or bad version, then fix it later” that requires repeating several pages of the same code with a few lines inserted in the middle.

  • Example 1: They spent 10-12 pages describing how to a a “gold” value to the the enemy, then give it to the player at the end of combat, something that could have been included in the original versions in maybe 10 lines of code, tops.

  • Example 2: I searched for any place they used the stats of enemies or party members in combat, or even where anyone was actually damaged, and eventually found a hardcoded -10 to HP in TestCombatAction. Later, I found a paragraph 92% into the book that changed that one line to this one:
    target-> HP -= (character-> ATK - target-> DEF) > = 0 ? (character-> ATK - target-> DEF): 0;
    They go on to include the full text of this method for the 4th or possibly 5th time. I would have hoped for the simple version we end up with to be introduced in its complete form at 35% of the way through, and at 92% we’d be getting a single, in depth version that has multiple combat actions using abilities, spells (that cost mana), different weapons, and variations based on strength, armor class, etc.

  • They ignore the UE4 AI classes (AIControllers, Behavior Trees) in favor of hard coding targets (the enemy chooses the first live party member on the list). They bypass navigation and navmeshes because enemies don’t actually traverse the level or even have bodies.

  • While it was nice to know how to create your own console command, I haven’t actually tested that it works yet. When I do, I’m prepared to google for recent tutorials if their version fails. But really, why not have a better way to trigger combat?

  • They describe Data Tables, which was interesting, and slightly useful. OTOH, I found I needed the Orfeas C++ tutorial to get them working properly in 4.17. The book’s code omits necessary includes, and later abandons the idea of creating the tables in a spreadsheet. A quick google tells me that the problems they mention were fixed in UE4 version 4.15, though.

  • They start using blueprint heavily in the latter part of the book - I was attracted to the initial c++ focus, so I was disappointed to see so much blueprint, especially since viewing the tiny images on Kindle is a real chore.

  • There are so many aspects to an RPG that are omitted or glossed over - character creation by the user, images in the UI (of items or the player), maps and minimaps, quests, what is seen in the shopkeeper or player inventory, how these things are acquired (chests in the landscape? how do we select and interact with them?) a toolbar of spells or skills, a graphical hud with visual bars for health and mana, etc.

That said, I probably did learn a lot by studying the current Third Person Template code, getting the initial code to compile and run, and exploring Data Tables. Worth the dollar I paid, …maybe.