What are the parameter settings in TemplateDef.ini necessary to make a template c++ project? And what does each do?

Hi, I cannot figure out how to successfully create a Template from my c++ project. I want to create a template so that I can create multiple games from it. So I used the TP_ThirdPerson TemplateDef.ini in MyTemplate. However when my new project is created, the files get renamed. Such as MyTemplateGameData.h (which is a PrimaryDataAsset) becomes NewProjectGameData.h but my blueprint child of NewProjectGameData still references MyTemplateGameData as it’s parent.

I could just recreate the blueprint, but I have many other classes that do the same thing and recreating them all would defeat the purpose of making a template.

How do I fix this issue? I looked in Documentation and found nothing to explain what each parameter in the TemplateDef.ini does. So what does each parameter do, and what is the best configuration to get what I want done?

Thanks.

TemplateDef.ini

Categories

Where should the template show up when you want to create a new project

LocalizedDisplayNames

What name should be displayed for your template

ClassTypes
AssetTypes

Info to show for your template

FoldersToIgnore
FilesToIgnore

Only use necessary files for your project

FolderRenames
FilenameReplacements
ReplacementsInFiles

Search for your template name and rename to the created project name

config.ini

Redirects

GameName=YourTemplateName

AdditionalFilesToAdd

Add files from the template to your project

+Files=Templates/SimpleTemplate/Content/*.*
+Files=Templates/SimpleTemplate/Source/TemplateCreation/TemplateCreation.h
+Files=Templates/SimpleTemplate/Source/TemplateCreation/TemplateCreationPlayerCharacter.cpp
+Files=Templates/SimpleTemplate/Source/TemplateCreation/TemplateCreationPlayerCharacter.h
+Files=Templates/SimpleTemplate/Source/TemplateCreation/TemplateCreationGameModeBase.cpp
+Files=Templates/SimpleTemplate/Source/TemplateCreation/TemplateCreationGameModeBase.h

I usually do it like this: Create an empty project, creat and edit the files I want to have inside the template. Copy Content, Source and the *.uproject file to a folder inside …/UE5/Templates and edit the config files to match my data. Look inside the Config folder. There are some settings you have to change in different files.
SimpleTemplate.zip (21.0 KB)
Here is a example template project. Just put it in …/UE5/Templates, start UnrealEngine and go to the Games Tab for a new project.

Ok I downloaded your zip file. Added a PrimaryDataAsset named TemplateCreationGameData.h and TemplateCreationGameData.cpp respectively. Then made a blueprint child of TemplateCreationGameData and put it next to your blueprints.

Then added to the config.ini:

+Files=Templates/SimpleTemplate/Source/TemplateCreation/TemplateCreationGameData.cpp
+Files=Templates/SimpleTemplate/Source/TemplateCreation/TemplateCreationGameData.h

Then created a new project from that template. Named My Project “DoodleTime” and expected to have DoodleTimeCharacter DoodleTimeGameMode and DoodleTimeGameData but they all were TemplateCreation prefixed. The C++ Files were renamed correctly. But the blueprints were parented to TemplateCreationCharacter, TemplateCreationGameMode and TemplateCreationGameData.
What gives? Is there a Bug? Or is there something else I needed to add?
SimpleTemplateEdited.zip (24.9 KB)

I think the blueprints may not be renamed :confused: But they should be parented correctly.

image

Your files also work for me. When you create a project from it, open those blueprints. They will get reparented automatically.