Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Kit Components Update #46

Merged
merged 9 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ site/
.selid-hooks/
.check-identity
.obsidian
venv/
venv/
/.vs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
120 changes: 82 additions & 38 deletions docs/cck/components/CombatSystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,58 +2,102 @@
Adding this component enables PvP and PVE style gamemodes in your world. Best used alongside the [Damage](Damage.md) Component and the [GameInstanceController](GameInstanceController.md) Component

### Properties
![](../../assets/images/compdoc/Combat System Properties.png)

##### Reference ID
This property is read only, changing this value only break the component.

##### Health
+ **Health Base Amount:** This is the default Health each player starts with at the beginning of a Game or Round.
+ **Health Max Amount:** This is the Maximum amount of Health a player can have at any given time.
### Health
##### Health Base Amount
This is the default Health each player starts with at the beginning of a Game or Round.
##### Health Max Amount
This is the Maximum amount of Health a player can have at any given time.

##### Health Regeneration
+ **Health Regeneration Delay:** The time in seconds before the player starts regenerating Health.
+ **Health Regeneration Rate:** The amount of Health the player recovers per second.
+ **Health Regeneration Cap:** The amount of Health that regeneration will stop.
### Health Regeneration
##### Health Regeneration Delay
The time in seconds before the player starts regenerating Health.
##### Health Regeneration Rate
The amount of Health the player recovers per second.
##### Health Regeneration Cap
The amount of Health that regeneration will stop.

##### Armor
+ **Armor Base Amount:** This is the default Armor each player starts with at the beginning of a Game or Round.
+ **Armor Max Amount:** This is the Maximum amount of Armor a player can have at any given time.
### Armor
##### Armor Base Amount
This is the default Armor each player starts with at the beginning of a Game or Round.
##### Armor Max Amount
This is the Maximum amount of Armor a player can have at any given time.

##### Armor Regeneration
+ **Armor Regeneration Delay:** The time in seconds before the player starts regenerating Armor.
+ **Armor Regeneration Rate:** The amount of Armor the player recovers per second.
+ **Armor Regeneration Cap:** The amount of Armor that regeneration will stop.
### Armor Regeneration
##### Armor Regeneration Delay
The time in seconds before the player starts regenerating Armor.
##### Armor Regeneration Rate
The amount of Armor the player recovers per second.
##### Armor Regeneration Cap
The amount of Armor that regeneration will stop.

##### Shield
+ **Shield Base Amount:** This is the default Armor each player starts with at the beginning of a Game or Round.
+ **Shield Max Amount:** This is the Maximum amount of Armor a player can have at any given time.
### Shield
##### Shield Base Amount
This is the default Armor each player starts with at the beginning of a Game or Round.
##### Shield Max Amount
This is the Maximum amount of Armor a player can have at any given time.

##### Shield Regeneration
+ **Shield Regeneration Delay:** The time in seconds before the player starts regenerating Shield.
+ **Shield Regeneration Rate:** The amount of Shield the player recovers per second.
+ **Shield Regeneration Cap:** The amount of Shield that regeneration will stop.
### Shield Regeneration
##### Shield Regeneration Delay
The time in seconds before the player starts regenerating Shield.
##### Shield Regeneration Rate
The amount of Shield the player recovers per second.
##### Shield Regeneration Cap
The amount of Shield that regeneration will stop.

##### General Settings
+ **Friendly Fire:** Enable or Disable the ability for players to attack their own teammates.
### General Settings
##### Friendly Fire
Enable or Disable the ability for players to attack their own teammates.

### Respawn Behavior

##### Respawn Behavior
Choose how the player will respawn upon being downed.
+ **Respawn Behavior**
- **Respawn On World:** Uses the CVRWorld Spawn Point.
- **Respawn On Point:** Uses the transform of the Respawn Point Property.
- **Respawn In Place:** Will respawn the player at the point they were downed.
+ **Respawn Point:** The GameObject Transform property the player will respawn at when using the **Respawn On Point** Respawn Behavior.
+ **Respawn Time:** The time after being down the player will respawn.

##### Respawn Behavior
+ **Respawn On World**
Uses the CVRWorld Spawn Point.
+ **Respawn On Point**
Uses the transform of the Respawn Point Property.
+ **Respawn In Place**
Will respawn the player at the point they were downed.
##### Respawn Point
The GameObject Transform property the player will respawn at when using the **Respawn On Point** Respawn Behavior.
##### Respawn Time
The time after being down the player will respawn.

### Events
These are hooks that can be triggered by the Combat System.
+ **Player Down Event:** This is triggered when player health reaches 0.
+ **Player Hit Event:** This is triggered when the player has been hit by the Damage component.
+ **Player Respawn Event:** This is triggered when the player respawns after being downed.
+ **Player Revitalize Event:** This is triggered if the player is given Health outside of Health Regeneration.
![](../../assets/images/compdoc/Combat System Events.png)
##### Player Down Event
This is triggered when player health reaches 0.
##### Player Hit Event
This is triggered when the player has been hit by the Damage component.
##### Player Respawn Event
This is triggered when the player respawns after being downed.
##### Player Revitalize Event
This is triggered if the player is given Health outside of Health Regeneration.

### PVP Events
These are hooks that can be triggered by the Combat System from other players.
+ **Player Downed Event:** This is triggered when a remote player brings the local player's health to 0.
+ **Downed Another Player Event:** This is triggered when the local player brings a remote player's health to 0.
+ **Player Got Hit Event:** This is triggered when the local player is hit by a remote player's Damage component.
+ **Hit Another Player Event:** This is triggered when the local player hits a remote player with a damage component.
##### Player Downed Event
This is triggered when a remote player brings the local player's health to 0.
##### Downed Another Player Event
This is triggered when the local player brings a remote player's health to 0.
##### Player Got Hit Event
This is triggered when the local player is hit by a remote player's Damage component.
##### Hit Another Player Event
This is triggered when the local player hits a remote player with a damage component.

### Shader Globals
These are globals from ChilloutVR exposed to shaders that are synced to the CombatSystem.

##### _CVRCombatSystemHealth
An interger value of your current Health.
##### _CVRCombatSystemArmor
An interger value of your current Armor.
##### _CVRCombatSystemSheild
An interger value of your current Sheild.
50 changes: 32 additions & 18 deletions docs/cck/components/Damage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,41 @@ Adding this component will allow the GameObject's collider or Particle system to
### Properties

##### Damage Type
+ **Stack:** Inflicts damage to Shield, Armor, and Health of the player.
+ **Shield:** Only inflicts damage to the Shield of the player.
+ **Armor:** Only inflicts damage to the Armor of the player.
+ **Health:** Only inflicts damage to the Health of the player.
+ Stack
Inflicts damage to Shield, Armor, and Health of the player.
+ Shield
Only inflicts damage to the Shield of the player.
+ Armor
Only inflicts damage to the Armor of the player.
+ Health
Only inflicts damage to the Health of the player.

##### Damage Amount
This is the amount of damage that is applied to the Damage Type.

##### Damage Over Time
+ **Damage Over Time Amount:** The amount of damage per second that is applied to the Damage Type.
+ **Damage Over Time Duration:** How many seconds that Damage Over Time is applied to the Damage Type.
+ **Damage Over Time Contact:** Applies the Damage Over Time to the Damage Type if the player is in or not in contact with the GameObject.
##### Damage Over Time Amount
The amount of damage per second that is applied to the Damage Type.
##### Damage Over Time Duration
How many seconds that Damage Over Time is applied to the Damage Type.
##### Damage Over Time Contact
Applies the Damage Over Time to the Damage Type if the player is in or not in contact with the GameObject.

##### Damage Multiplier
Multiplies the Damage Amount to the Damage Type.
+ **Health**
+ **Armor**
+ **Shield**

##### Damage Falloff
+ **Enable Falloff:** Enables or disables Damage Falloff
+ **Falloff Distance:** The maximum distance damage can be applied to the Damage Type
+ **Falloff Curve:** A curve that determines how much damage is applied along the Falloff Distance.
+ **Falloff Effect Damage Over Time:** Applies or does not apply the Damage Falloff to the Damage Over Time property.
Multiplies the Damage Amount to the Damage Type.

+ Health Multiplier
Amount multiplied to Health Damage.
+ Armor Multiplier
Amount multiplied to Armor Damage.
+ Shield Multiplier
Amount Multiplied to Shield Damage.


##### Enable Damage Falloff
Enables or disables Damage Falloff
##### Damage Falloff Distance
The maximum distance damage can be applied to the Damage Type
##### Damage Falloff Curve
A curve that determines how much damage is applied along the Falloff Distance.
##### Damage Falloff Effect Damage Over Time
Applies or does not apply the Damage Falloff to the Damage Over Time property.
146 changes: 96 additions & 50 deletions docs/cck/components/GameInstanceController.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,108 @@
# Game Instance Controller <div class="whitelisted" data-list="W"></div>
Adding this component enables team based gamemodes in your world.

### Teams
Teams can have their own properties and events per Team.

+ **Team Properties**
- **Index:** The order the Team is in the list of other Teams.
- **Name:** The Name of the Team.
- **Color:** The Color associated with the Team.
- **Player Limit** The maximum amount of players that can be present in the Team.
- **Starting Score:** This is the score the Team will have at the start of a game.
+ **Team Events**
- Team Events are Hooks that are controlled by the Team.
* **Team Joined Event:** This is triggered when the player joins the Team.
* **Team Leave Event:** This is triggered when the player leaves the Team.
* **Team Win Round Event:** This is triggered when the Team wins the current round of a game.
* **Team Win Game Event:** This is triggered when the Team wins the game.
* **Team Member Ready Event:** This is triggered when the player marks themselves as ready.
* **Team Member Un Ready Event:** This is triggered when the player marks themselves as not ready, after marking themselves as ready.
### Team Properties
Teams have their own set of properties and events that can be different between teams.

##### Index
The order the Team is in the list of other Teams.
##### Name
The Name of the Team.
##### Color
The Color associated with the Team.
##### Player Limit
The maximum amount of players that can be present in the Team.
##### Starting Score
This is the score the Team will have at the start of a game.

### Team Events
Team Events are Hooks that are controlled by the Team.

##### Team Joined Event
This is triggered when the player joins the Team.
##### Team Leave Event
This is triggered when the player leaves the Team.
##### Team Win Round Event
This is triggered when the Team wins the current round of a game.
##### Team Win Game Event
This is triggered when the Team wins the game.
##### Team Member Ready Event
This is triggered when the player marks themselves as ready.
##### Team Member Un Ready Event
This is triggered when the player marks themselves as not ready, after marking themselves as ready.

### Properties
### Global Properties
These are properties that control all teams and game conditions.

+ **Balance Team Join** With this enabled, players joining will be assigned to the team of the least amount of players.
+ **Auto Balance Teams** With this enabled, players my get reassigned to a different team when new players join; regardless of their initial selection.
+ **Ready Percentage** The percentage of players that need to be marked as ready before the ready timer is activated.
+ **Ready Timer** After the ready percentage has been met, this is the time in seconds before the game starts.
+ **Game Controller Type**
- **Default** Score based gamemode
- **[Combat System](CombatSystem.md)** Elimination based gamemode
+ **Game Type**
- **Single** Each game is one round, as of game version 2024r176, Round Start and Round End Events will trigger alongside Game Start and Game End Events.
- **Rounds** Each game will consist of the amount of rounds specified in the Rounds To Win property.
+ **Rounds To Win** The amount of rounds a Team needs to win to end the game.
+ **End Condition**
- **Score** When a Team accumulates a score defined by the End Score property, the game or round will end.
- **Time** When the time in seconds defined in the End Time property is reached, the game or round will end.
- **Time or Score** When the Time or Score end condition is met, the game or round will end.
- **Elimination** A [Combat System](CombatSystem.md) only Game Type end condition. When only 1 team is remaining, the game or round will end.
- **Time or Elimination** A [Combat System](CombatSystem.md) only Game Type end condition. When the Time or Elimination end condition is met, the game or round will end.
+ **End Score** The score required to win a round or game.
+ **End Time** The amount of time in seconds before a round or game ends.

### Events
##### Balance Team Join
With this enabled, players joining will be assigned to the team of the least amount of players.
##### Auto Balance Teams
With this enabled, players my get reassigned to a different team when new players join; regardless of their initial selection.
##### Ready Percentage
The percentage of players that need to be marked as ready before the ready timer is activated.
##### Ready Timer
After the ready percentage has been met, this is the time in seconds before the game starts.
##### Game Controller Type
- Default
Score based gamemode.
- [Combat System](CombatSystem.md)
Elimination based gamemode.

##### Game Type

> As of game version r177 **Single** type games fire both **Round Started**, **Game Started** and **Round Ended**, **Game Ended** events.

- Single
Each game is one round.
- Rounds
Each game will consist of the amount of rounds specified in the **Rounds To Win** property.

##### Rounds To Win
The amount of rounds a Team needs to win to end the game.

##### End Condition
- Score
When a Team accumulates a score defined by the End Score property, the game or round will end.
- Time
When the time in seconds defined in the End Time property is reached, the game or round will end.
- Time or Score
When the Time or Score end condition is met, the game or round will end.
- Elimination
A [Combat System](CombatSystem.md) only Game Type end condition. When only 1 team is remaining, the game or round will end.
- Time or Elimination
A [Combat System](CombatSystem.md) only Game Type end condition. When the Time or Elimination end condition is met, the game or round will end.

##### End Score
The score required to win a round or game.
##### End Time
The amount of time in seconds before a round or game ends.

### Global Events
These are hooks that are controlled by the Game Instance Controller.

+ **Game Started Event** This will trigger when the game starts.
+ **Round Started Event** This will trigger when the round starts.
+ **Game Ended Event** This will trigger when the game ends.
+ **Round Ended Event** This will trigger when the round ends.
##### Game Started Event
This will trigger when the game starts.
##### Round Started Event
This will trigger when the round starts.
##### Game Ended Event
This will trigger when the game ends.
##### Round Ended Event
This will trigger when the round ends.

### Methods
These are methods that can be accessed using Custom Triggers in the Interactable component. These methods are important in order to use the Game Instance Controller.

+ **EnemyScore** Set the enemy score in relation to the local player.
+ **JoinTeamAutoBalance** Joins the Team with the lowest amount of players.
+ **LeaveTeam** Leaves the current team the player is in.
+ **OwnScore** Sets the score of the local player's Team.
+ **StartGame** Will start the game regardless of the Ready Percentage or Ready Time properties.
+ **ToggleReady** Will mark the local player as ready or not ready.
+ **TryJoinTeam** Will try to join the team that is defined by the Index Team Property.
##### EnemyScore
Set the enemy score in relation to the local player.
##### JoinTeamAutoBalance
Joins the Team with the lowest amount of players.
##### LeaveTeam
Leaves the current team the player is in.
##### OwnScore
Sets the score of the local player's Team.
##### StartGame
Will start the game regardless of the Ready Percentage or Ready Time properties.
##### ToggleReady
Will mark the local player as ready or not ready.
##### TryJoinTeam
Will try to join the team that is defined by the Index Team Property.
Loading
Loading