Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Here you'll learn what each character inventory components does.
Stores items in containers. It also handles removal by name/id, count items etc.
Initial Containers: The initial item containers. You can also add more containers at runtime using the AddContainer() method.
For more information on item containers see:
Handles item pickup dropping.
Drop Obstacle Mask: The layer mask that will be used in checking for obstacles when items are dropped.
Drop Transform: Dropped items are spawned relative to this transform.
Drop Force Mode: The force mode that will be added to the rigidbody of the dropped item.
Item Drop Settings: Position, rotation offsets etc.
Sack Prefab: The prefab used when an item that's dropped doesn't have a pickup (e.g. clothes) or when dropping multiple items at once.
Adds items to the inventory at startup using a predefined list.
Inventory Startup Info: A predefined list of items that will be added to the inventory. To create one, right click in the project view and select:
"Create / Survival Template Pro / Inventory / Startup Items"
Handles any type of inventory inspection (e.g. Backpack, external containers etc.)
Toggle Threshold: How often can the inventory inspection be toggled (e.g. open/close backpack).
Acts as a wrapper for adding inventory based materials (e.g. sticks, rope etc.) to the structure (building preview) that's in view.
For information about items look into:
Detalis on the modules and behaviours present in STP.
Good to know! A Character Module is a component that adds functionality to a character and can be accessed from any character component.
Good to know! A Character Behaviour is a component that interacts with a module or multiple modules but not vice versa.
At their core item containers are just a list of items.
Name: The name of the item container. If you need to get access to this container you can use the Inventory.GetContainerWithName() method and pass in the name of this container.
Max Weight: The max weight that this container can hold, no item can be added if it exceeds the limit.
Flag: Acts as a container type.
Size: Number of item slots that this container has (e.g. Holster 8, Backpack 25 etc.).
Valid Categories: Only items from the specified categories can be added.
Required Properties: Only items with the specified properties can be added.
Required Tag: Only items that are tagged with the specified tag can be added.
Here you'll learn what each character movement component does.
Delegates movement input (using the new Unity Input System) to the ICharacterMover module.
Handles character movement. (Will be refactored into a more modular system)
Acceleration: How fast can this character achieve max state velocity.
Damping: How fast will the character stop when there's no input (a high value will make the movement more snappy).
Airborne Control: How well can this character move while airborne.
Step Length: How much distance does this character need to cover to be considered a step.
Forward Speed: The forward speed of this character.
Back Speed: The backward speed of this character.
Side Speed: The sideway speed of this character.
Slope Speed Mod: Lowers/Increases the moving speed of the character when moving on sloped surfaces (e.g. lower speed when walking up a hill).
Anti Bump Factor: A small force applied to the character to make it stick to the ground when moving on a descending terrain/collider.
Enable Running: Is this character allowed to run?
Run Speed: The max running speed.
Run Step Length: Step length specific to running.
Enable Jumping: Is this character allowed to jump?
Jump Height: The max height of a jump.
Jump Timer: How often can this character jump (in seconds).
Enable Crouching: Is this character allowed to crouch?
Crouch Speed Mod: The velocity mod for crouching (multiplied with the base speed: forward, back speed etc.)
Crouch Step Length: Step length specific to crouch walking.
Crouch Height: The controllers height when crouching.
Crouch Duration: How long does it take to crouch.
Enable Sliding: Should this character slide when standing on slopes?
Slide Threshold: The angle at which the character will start to slide.
Slide Speed: The max sliding speed.
Gravity: The strength of the gravity.
Obstacle Check Mask: Layers that are considered obstacles.
Low Vitals Velocity Mod: How much will the max velocity be affected by low vitals (e.g. hunger, thirst etc.)
Wieldable Weight Velocity Mod: How much will the max velocity be affected by the equipped wieldable weight.
Carriables Count Velocity Mod: How much will the max velocity be affected by the amount of carried "carriables".
Disable Run On Stamina Value: At which stamina value (0-1) will the ability to run be disabled.
Enable Run On Stamina Value: At which stamina value (0-1) will the ability to run be re-enabled (if disabled)
Disable Jump On Stamina Value: At which stamina value (0-1) will the ability to jump be disabled.
Enable Jump On Stamina Value: At which stamina value (0-1) will the ability to jump be re-enabled (if disabled)
Here you'll learn what each character health component does.
Manages the parent character's health and death
Starting Health: The starting health of this character (can't be higher than the max).
Starting Max Health: The starting highest health of this character (can be modified at runtime).
Regeneration Rate: How fast will the stamina regenerate.
Regeneration Pause: How much time the stamina regeneration will be paused after it gets lowered.
Run Decrease Rate: By how much will the stamina decrease per second when running.
Jump Take: By how much will the stamina decrease after jumping.
Simple stat, can be increased/lowered and increases/decreases the health after the specified value.
Simple stat, can be increased/lowered and increases/decreases the health after the specified value.
Simple stat, can be increased/lowered and increases/decreases the health after the specified value.
Not Implemented
Handles a player's death and respawn behaviour.
Item Drop Type:
All: Drop all items upon death.
Equipped: Drop only the equipped wieldable item.
None: Don't drop any items.
Moves the character's view (in stp's case camera) to a rigidbody and vice-versa when disabled.
Handles dealing fall damage to the character based on the impact velocity.
Enable Damage: Is this behaviour enabled?
Min Fall Speed: At which landing speed, the character will start taking damage.
Fatal Fall Speed: At which landing speed, the character will die, if it has no defense.
Here you'll learn what each character camera component does.
Delegates camera/look input (using the new Unity Input System) to the ILookHandler module.
Handles look updating the look direction of a character.
X Transform: Transform to rotate Up & Down.
Y Transform: Transform to rotate Left & Right.
Invert: If enabled, the up-down direction will be inverted.
Look Limits: Vertical look limits (in angles).
Sensitivity: Rotation Speed.
Raw: If enabled, the rotation will not be smoothed.
Smooth Steps: Smooth steps amount (a bigger sample will make means the rotations will be more smoothed).
Smooth Weight: Smoothness affect modifier, a value of 0 means that the rotation will be raw while 1 as smooth as possible.
FOV Camera: Used in lowering/increasing the current sensitivity based on the FOV.
Will be refactored in the future.
Camera: The camera that will be rotated using a spring.
Camera Root: The camera root that will be rotated through bobbing.
Motion Lerp Speed: How smooth should the motion spring movement be.
Bob Transition Speed: How fast should the camera bob be.
Input: Input settings.
Sway: Sway forces (applied when moving the camera).
Fall Impact: Fall impact forces.
Idle State: Idle camera motion state.
Walk State: Walk camera motion state.
Run State: Run camera motion state.
Crouch State: Crouch camera motion state.
Shake Lerp Speed: How smooth should the shake spring movement be.
Explosion Shake: The explosion shake settings.
Shake Spring Settings: The default shake spring force settings (Stiffness and Damping).
Force Lerp Speed: How smooth should the force spring movement be.
Default Force Spring Settings: The default spring force settings (Stiffness and Damping), when external forces are being applied.
Background Blur: Background blur component.
Foreground Blur: Foreground blur component.
Background Color Tweaks: Background color tweaks component.
Foreground Color Tweaks: Foreground color tweaks component.
Y Lerp Speed: How fast should the camera adjust to the current Y position (up - down).
Crouch Offset: An offset that will be applied to the camera position after crouching.
Crouch Easing: Crouch movement easing type.
Here you'll learn what each character wieldable component does.
Delegates wieldable inputs (using the new Unity Input System) to the wieldable modules.
Controller responsible for equipping and holstering wieldables.
Audio Player: The audio player that every wieldable will use.
Takes care of selecting wieldables based on inventory items.
Holster Container: The corresponding inventory container (e.g. holster, backpack etc.) that this behaviour will use for selecting items.
Select On Start: Should this behaviour select the "starting slot item" on start.
Starting Slot: The fist slot that will be selected.
Inventory Based Wieldables: All of the Item Id - Wieldable pairs.
Handles enabling/disabling the survival book wieldable.
Survival Book Prefab: Corresponding survival book wieldable prefab.
Left Pages Object Name: The left pages object name of the book (used to parent the UI).
Right Pages Object Name: The right pages object name of the book (used to parent the UI).
Toggle Cooldown: How often can the survival book be enabled/disabled (in seconds).
Handles object carry wieldable carriable display count.
Generates direction rays, used by the wieldables.
Anchor: Transform used in determining the base ray position and orientation.
Walk Spread Mod: How much will walking affect (randomly spread) the final ray.
Run Spread Mod: How much will running affect (randomly spread) the final ray.
Crouch Spread Mod: How much will crouching affect (randomly spread) the final ray.
Airborne Spread Mod: How much will being airborne affect (randomly spread) the final ray.
Makes this object follow the player's look without parenting.
Removes the need for long transform hierarchies.
Here you'll learn what each character object carry component does.
Delegates object carry input (using the new Unity Input System) to the IObjectCarryController.
Handles everything regarded object carrying except the visuals.
Drop Obstacle Mask: The layer mask that will be used in checking for obstacles when carriables are dropped.
Drop Transform: Dropped carriables are spawned relative to this transform.
Drop Force Mode: The force mode that will be added to the rigidbody of the dropped carriable.
Here you'll learn what each character building component does.
Delegates building input (using the new Unity Input System) to the IBuildController and IStructureDetector modules.
Follow Character Rotation: Should the "placeables" follow the rotation of the character?
View Angle Threshold: Max angle for detecting nearby sockets.
Rotation Speed: How fast can the "placeables" be rotated.
Build Range: "Max building range.
Buildable Mask: Tells the controller on what layers the "buildables" are.
Free Placement Mask: Tells the controller on what layers can "placeables" be placed.
Overlap Check Mask: Tells the controller what layers to to check when checking for collisions.
Place Sound: Sound to play when placing an object.
Invalid Place Sound: Sound to play when the controller tries to place an object but detects a collision.
Plays effects based on the IBuildController events.
Detects nearby building previews (structures)
Max Detection Distance: The max detection building preview distance.
Max Detection Angle: The max angle detection building preview.
Here you'll learn what each character interaction component does.
Delegates interaction inputs (using the new Unity Input System) to the IInteractionHandler module.
View: The transform used in raycasting.
Raycast Distance: The raycast max distance, anything further away will be ignored.
Raycast Radius: The raycast radius, if you're not looking directly at an object you can still interact with that said object if it's in the given radius.
Layer Mask: Interaction layer mask, everything this handler can "see".
Here you'll learn what each character sleep component does.
Go To Sleep Duration: How much time it takes to transition to sleeping (e.g. moving to bed).
Sleep Delay: How much time it takes to fall asleep.
Sleep Duration: Sleep duration in seconds.
Wake Up Delay: How much time to wait after the sleep is done, before getting up.
Wake Up Duration: How much time it takes to transition from sleeping to standing up.
Hours To Sleep: Max hours that can pass while sleeping.
Max Get Up Hour: Max hour this character can wake up at, we don't want to be lazy :)
Only Sleep At Night: If enabled, this character will not be allowed to sleep during the day.
Check For Enemies: Check for enemies before sleeping, if any of the are found, this character will be unable to sleep.
Check For Enemies Radius: The enemy check radius.
Enemies Layer Mask: The enemy layer, any object with this layer will be considered an enemy.
Cant Sleep Sound: Sound that will be played when attempting to sleep unsuccessfully.
Plays effects based on the ISleepHandler events.
Module responsible for moving the Player's view (camera) to an ISleepingPlace position and rotation.
Here you'll learn what each character audio component does.
The main audio player of this character, can play sounds with delays, loop sounds etc.
Responsible for listening to events raised by other modules (e.g. health, movement etc.) and playing "humanoid" sounds accordingly.
Responsible for playing footsteps sound based on the current IMover's module step length. See: