Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

FPS Game Starter Kit

Version 2.7

Documentation Page

CHARACTER
BP_CharacterBase is one of the core Blueprints and is located in
Content/FPS_Game/Blueprints/

The blueprint is commented and categorized, to make it easier to pick up and


work with.

When you start working on your game or follow any tutorials you find online,
whenever it says “Cast To Character”, this is the blueprint you Cast To, you can
add new variables to it and access them  from where you need them. I
recommend to beginners to create a child class from this blueprint and use the
child class instead, unless you want to add new features or modify the existing
setup, a child class will do the job just fine, plus it’s easier to upgrade when I
release a new version, because if you change the base classes, and I release a
new version, we don’t have the same source file anymore, so you will need to
add your changes to the new version as well. Advanced users usually branch it
off and make it their own build, then only add the new features that they actually
need.

The point is, this is the base class for the character blueprint, everything related
to it is located here, there are only 4 other blueprints that are relevant to it, those
are:

BP_WeaponBase

BP_ProjectileBase

BP_Save

W_PlayerHUD

Everything else can either be replaced or deleted, few other widgets do get
created from the character BP, but they are only there as place holders (pause
screen, etc.)

The Inventory system is similar to how it works in the ShooterGame example.


Except instead of C++, it’s made using Blueprints and you can pick up new
weapons, display them from the inventory widget, equip, drop or save them.
The inventory itself does not have a limit on how many weapons you can add. All
weapons get saved automatically, regardless of how many child classes you
make. Weapons are child classes from 1 base class, for more info about the
weapon system, click here.

The camera switching from FPP and TPP perspectives uses 2 cameras and 2
meshes (arms for FPP and body for TPP), You can check out the tutorial I made
on how to change the character mesh in the Tutorials section or by clicking here.
The skeleton used is the default one from Epic Games, all retargetting tutorials
out there still apply.

All input keys are set in Project Settings, the character then uses them to perform
an action (jump, run, shoot, etc.)
 

To add a new feature that you need in your game, for example an action skill or
something, simply add a new input key, then on the character create the
necessary variables and logic to do what you need it to do.

The save system is set on the character, to make it easier to save the inventory
and other variables, such as money for example. For more info about the save
system, click here.

Because there is no custom GameInstance, any settings menu you have can be
added, simply connect it to the character at begin play.
ANIMATIONS
FPS Game Starter Kit uses the default UE4 skeleton, the only change is a
GripPoint socket for where the character is holding the weapon. Any retargetting
tutorials out there still apply. To see how to change the mesh click here.
 

The animations are set up so that they support IK for the left hand in order to
fine-tune its position based on what kind of weapon the character is holding. The
AnimBP reads the value from the weapon and adjusts the position, this makes it
possible to reuse the same animations for multiple weapons.
 

If a weapon is drastically different than the others or if you have pre-made


animations for all of your weapons, you can add them into the AnimCategory
Enum and connect a different locomotion for each weapon.
 

FPS and TPS meshes use different AnimBP’s, both are based on the default
UE4 skeleton, FPS template and TPS template respectively.
 

On a side note, the new optimization feature from 4.19 can be disabled if it’s
causing issues on your PC.
WEAPONS
All weapons in the template are child classes from 1 base class. The provided
examples are there to showcase how you would make a pistol, a shotgun, a
sniper. etc.

In general there is no need to make any changes to the base class, unless you
want to implement new features that each child class should have.

Child classes have all the functionality from the base class, plus something else
that it’s supposed to do, see the provided example weapons on how to tweak a
child class to behave a certain way.

The weapon system is fairly advanced, its features include:


-bullet spread
-bullet spread while aiming
-damage
-critical hit damage
-recoil values
-ammo calculations
-both projetile and linetrace (hitscan) variations
-animations
-IK
and more..

 
 

To make new weapons, please check out the tutorial from HERE.

To see a few examples that extend beyond that of the base class, see the add-
ons HERE.

HOW TO SAVE & LOAD VARIABLES


The save system is set up so that it works from BP_CharacterBase, this makes it
easier to save the inventory and other character related stats. All data gets sent
to BP_Save, then when the character is spawned, it reads the data from there
and sets the variables.

See how money is being saved as reference for saving and loading “normal”
variables.

Weapons are saved automatically, you don’t need to make any changes to any
Blueprint in order to save the weapons you made, just create a weapon, pick it
up, save, done.

Enemies and other world objects do not get saved, as they aren’t part of the
Character or its inventory.
In this tutorial we will save the players location and restore it when the player
spawns, to begin, create a new variable (vector) inside BP_Save

Then open BP_CharacterBase and open the SaveGame function and set the
actors location to be the saved location vector we made in BP_Save

Last, still in the character, on begin play, set the location to be the saved location
and check the teleport checkbox
…and that’s it, the save system now has the player location too. You can repeat
the entire process for rotation as well if you want.
Basically the idea is to send the data from BP_CharacterBase to BP_Save, then
bring it back during loading.

TIP: when working with save data, it’s good to delete the save file after each
change and start a new game, to avoid unexpected behavior.

TUTORIALS
Weapons
How to make new weapons

How to add Aim-Assist

How to make a holster socket system for TPS only projects

How to add a starting weapon and why it’s related to the save system

How to  make an Armory (weapon selection screen) and use it from the Main
Menu

How to add weapon inspect (and TPS to FPS anim retarget)

How to make grenade mods

How to make more melee weapons

How to bypass the inventory (drop current weapon when equipping a new one)
Character
How to change the Character Mesh

How to add fall damage

How to add an RPG level-up system

How to add Slow Motion (action skill)

How to add a Shield (and a recharge station)


How to add headbob

How to implement dynamic offset for TPS camera (switching position from left to
right)

How to add sliding ability

How to implement a sheath weapon mechanic

How to add TPS character accessories


Gameplay
How to Save & Load new variables

How to make a new Interactive Actor

How to move the Mouse Cursor with a Gamepad

How to add new Surface Types (Physics Material)

How to add new Vehicles

How to change the music during gameplay

How to implement a world hub with sub-levels (kinda like in Fallout)

How to use the Arcade Game Mode (room based progression)

How to use the AI

How to add new key bindings

How to use the Objective System

How to create new pickups

How to implement a “Game Over” screen

How to create a Destructible Mesh


How to use the Minimap

How to implement Item Stacking to the Inventory

Duplicating the inventory widget and creating a new skin

How to implement magic powers (kinda like in Bioshock)

How to add cutscenes


Multiplayer
How to make new multiplayer weapons

How to add a shield

How to add more multiplayer maps

How to add Free-For-All game mode

How to integrate Steam

How to implement health regeneration

How to mod the multiplayer mode into TPS

How to set up co-op

How to set up TDM

How to implement Last Man Standing / Battle Royale mode

How to change the GripPoint socket on weapons

How to implement Leaning

How to use interaction events in multiplayer


Editor
How to replace the default map
How to change the Project Image in the Launcher

How to create a read/write system for text files (C++ tutorial)

How to check for DLC on Steam (C++ Tutorial)

How to import Substance Painter textures into UE4 and set up the material

How to expand the UE4 editor with Utility Widgets

How to enable the black outline shader (Borderlands style)

How to use the Volumetric Clouds (4.26)

How to extract the free bonus blueprints

How to “extract” arms from third person mesh (Blender tutorial)


Mobile
How to make it Mobile-Ready

How to implement a Score System


VR
How to implement VR support
MARKETPLACE TUTORIALS

How to integrate AI Behavior Toolkit

How to integrate Ballistics FX

How to integrate Ironbelly weapons and animations

How to integrate Sci-Fi Arsenal Vol.01

How to integrate the free FPS Weapon Bundle

How to integrate Advance Weapon Pack


How to integrate Animated Electric Revolver

How to integrate rdLODtools

How to integrate the Ninja Character Plugin

How to integrate Footsteps Sounds with Blueprints Setup

How to integrate VFX Grenade Pack

How to integrate the Open World AI Spawn System

How to integrate the Amplify LUT Pack

How to integrate Drivable Cars Basic Pack (3d asset + blueprints)

How to integrate Smart Linetrace Projectile

How to integrate Dynamic Input Switching

How to setup Power IK

How to integrate ALSv4

Megascans – Quixel Bridge – Getting Started

ShooterGame Getting Started

How to add an old asset to a newer engine version

Fixing the “Add to Project” problem

Official Epic Games Tutorials that I highly recommend

You might also like