CHAPTER 14 – Data: State Types & Game Parameters

Created By: Game Audio Resource Ltd     Date: 25/08/2019      Version: 2.00

So far, we have set up a large amount of hierarchy to basic events.
For a lot of the content to be consistently called and set correctly we need to add a few states and game parameter controls to certain events to minimise errors and bugs.
This guide will highlight new processes you will not have seen in previous Chapters of this guide series.

  • TIP: This guides updates may help you evolve new systems to trigger new audio content that is not listed in this guide series.

Guide Steps:

  • STEP 01: Adding New Music State Types
  • STEP 02: Enemy Aware
  • STEP 03: Set Player Character States
  • STEP 04: Set Up Quad
  • STEP 05: Test & Integrity Report

Task Time Needed: A few hours


Video Guide


Written Guide

Chapter 14 A – Step 01
Adding New Music States Types

In this step we will implement a basic update to the Music_State Wwise State. So that we can have a point to trigger Result defeat and victory Adviser audio content.
(in the upcoming chapter 15 guide)
These updates will also help to implement music content too.

EVENTS

  1. Navigate to the Project Explorer > Events tab, locate and multi-select the following events:
    > Boss_Start
    > DCP_Music
    > Map_Completed
    > Monsters_Aware
    > Monsters_Unaware
    > Music
    > Story_End
    > Story_Start
  2. Cut and Paste all events into the Music Wwise Work Unit.
  • TIP: This groups together some of the unique music related events

GAME SYNCS

  1. Navigate to the Project Explorer > Game Syncs tab > States > Music Work Unit
    Open the Music_State state Group
    Right click the State Group, then select New Child > State
    Name it: Results_Defeat
  2. Also change the state called Victory in the same hierarchy location to Results_Victory
  • TIP: This consistently unifies the 2 different types of results you can receive when a map ends.
  1. Also add a new State named Gameplay_Intro.
  2. Rename Gameplay to Gameplay_Combat
  3. Rename Story to Gameplay_Explore
  4. Rename Boss to Gameplay_Boss
  • TIP: The above naming convention updates will make the hierarchy easier to navigate

EVENTS

  1. Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Death_Player
    In the Events Editor > List, right click select New Action > States > Set States.
  2. Select the new Event Action line, right click the empty box, then select: Set Target > Music > Music_States > Results_Defeat
  • TIP: What this new state does is tell the game that when the player character dies / the game engine calls the Death_Player Event, to change the Music_State to Defeat.
    This enables us a point to which we can now add new content for Results screen defeat.
    For those investigating music implementations this is the best process with the Cube tool set we have to work out when you would like to change music intensity types.
  1. Navigate back to the Project Explorer > Events tab. Locate and select the Event called: Map_Completed.
    Then in the Event Editor > List, right click then select New Action > States > Set States
  2. Right click the new empty box in the target column, then select: Set Target > Music > Music_State > Results_Victory.
  • TIP: As we have a hard-coded event for Map victory / all enemies destroyed, this state tells the game that when the Map_Completed event is called to change the Music_State Switch to Victory.
  1. Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Map_Loaded.
    In the Event Editor > List right click, then select New Action > States > Set States
  2. In the Events Empty Target column box, right click then select: Set Target > Music > Music_States > Gameplay_Intro
  • TIP: This defines that when the event is called by the game, that the Music_State is set to Intro.
  • TIP: Also note, when you implement the music hierarchy you could set a new Play event assigned to the music hierarchy to play from this event. (As mentioned we will not cover the music hierarchy with this base guide series)
  1. THESE STEPS 7/8 MAY BE INCORRECT / NOT NEEDED
    Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Map_Completed
    In the Event Editor > List right click, then select New Action > States > Set States
  2. In the Events Empty Target column box, right click then select Set Target > Music > Music_States > Gameplay_Intro
  3. Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Boss_Start
    In the Event Editor > List right click, then select New Action > States > Set States
  4. In the Events Empty Target column box, right click then select Set Target > Music > Music_States > Gameplay_Boss
  5. Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Story_End
    In the Event Editor > List right click, then select New Action > States > Set States
  6. In the Events Empty Target column box, right click then select Set Target > Music > Music_States > Gameplay_Explore
  7. Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Story_Start
    In the Event Editor > List right click, then select New Action > States > Set States
  8. In the Events Empty Target column box, right click then select Set Target > Music > Music_States > Gameplay_Combat
  • TIP: Regarding BOSS_START, STORY_END, STORY_START events
    As there is no defined way in Wwise to state where the 3 music types to start,
    The current way to use these music state types is to script them into each map at a certain point.
    Due to this available process, it is virtually impossible to control the states in random single player maps without a new game parameter based on a hard-coded value of the number of enemies left in a map.
    Also the naming convention of these events would be better suited to the names we have used for the State Group > states. However, all listed events have been either hard-coded or scripted and would require a lot of time to rework. So, we will leave as is for this guide series.
  1. Save your Wwise Project Updates and Generate the Sound Banks.

Chapter 14 A – Step 02
Enemy Aware

In the default original hierarchy, the Enemy Aware Switch did not work outside of the Unique scripted map Wwise_Music.
This state is to give music a chance to change Intensity based on Player character being in and out of combat, (it also appears to include parameters based on new enemies spawning and Enemy line of sight, these appear to be hard-coded)

  • TIP: The switch can be a little bit buggy, a bit of effort to will be needed when implementing and exploring music processes to get the correct set up values.
    We will overview a few points to re-implement where to set states and Game-play switches to allow this Switch type to function.
    NOTE: This is not guide to how to set up music, just a small data part that assists the main music implementation process that is not covered in this guide.

EVENTS:

  1. Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Monsters_Aware
    Then in the Event Editor > List, right click select New Action > Game Parameter > Set Game Parameter.
  2. In the Event empty Target box, right click then set the following path: Set Target > Music > EnemyAware
  3. In the Actions List right click then select New Action > States > Set States
  4. In the Event empty Target box, right click then select > New Target > Music > Music_States > Gameplay_Combat
  • TIP: What this does is tell the game, What the EnemyAware Game Parameter is set to
  1. In the Project Explorer > Events tab, Locate and select the Event called: Monsters_Unaware
    Then in the Event Editor > List, right click select New Action > Game Parameter > Set Game Parameter.
  2. In the Event empty Target box, right click then set the following path: Set Target > Music > EnemyAware
  3. In the Actions List right click then select New Action > States > Set States
  4. In the Event empty Target box, right click then select > New Target > Music > Music_States > Gamplay_Explore
  • TIP: What this does is tell the game, What the EnemyAware Game Parameter is set to
  1. Locate and select the Event called: Map_Completed
    In the Property Editor > List, right click then select New Action > Set Switch.
  2. Then in the Event Target column empty box, right click then assign the following path: Set Target > Music > Gameplay_Switch > Explore
  • TIP: You have now defined where that the Explore EnemyAware Game parameter is now set when a map is completed with a victory.
  1. Locate and select the Event called: Player_Death
    In the Property Editor > List, right click then select New Action > Set Switch.
  2. Then in the Event Target column empty box, right click then assign the following path: Set Target > Music > Gameplay_Switch > Explore
  • TIP: You have now defined where that the Explore EnemyAware Game parameter is now set when a map fails to be completed (e.g. the player character dies) the EnemyAware Game Parameter is set back to Explore.
  1. Navigate to the Event tab > Music Wwise Work Unit.
  2. Locate and select the Event: Music
    In the Event Editor > List, delete the Play action assigned to Placholder_Silence_One_Shot
  3. Right click then select New Action > Post Event.
  4. Then in the empty Target column box assign the following path: Set Target > Browse, then locate the Monsters_Unaware Parameter
  5. Save your Wwise Project Updates and Generate the Sound Banks

 

Chapter 14 A – Step 03
Set Player character States

There are few states that need to be set for the player character in game actions. This step will overview where to place the data

Spawn_Player

  1. Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Spawn_Player
  2. In the Event Editor, right click the list, then select: New Child > States > Set States
  3. In the Events empty target Column Box, right click then select: Default Work Unit > PlayerLife > Alive.
  • TIP: This defines that when the Player character spawns in a map, the player characters life status is set to alive.
  1. Right click then list, then select: New Child > States > Set States
  2. In the Events empty target Column Box, right click then select: Default Work Unit > PlayerInWater > No.
  • TIP: This defines that when the Player character spawns in a map, the player characters is set to be above water, not underwater.
  1. Right click then list, then select: New Child > States > Set States
  2. In the Events empty target Column Box, right click then select: Default Work Unit > PlayerHasQuad > No.
  • TIP: This defines that when the Player character spawns in a map, the player characters is not under the influence of the Quad stat boost effect.

Map_Completed

Stopping player character idle dialogue triggering on results screen

  1. Navigate to the Project Explorer > Events tab.
    Locate and select the Event called: Map_Completed
  2. In the Events List, right click, then select New Action > Stop > Stop.
  3. Navigate back to the Audio Tab > Actor-Mixer Hierarchy > Vocal > Vocal_Player Actor Mixer
    Then drag the Vocal_Player_Idle onto the blank event Stop line
  4. Save the Wwise Project updates & Generate the Sound Banks.

Chapter 14 A – Step 04
Set up Quad

In this step we set up data to allow the quad stat boost to function Correctly

EVENTS

  1. Navigate to the Project Explorer > Events tab. Locate and Select the Event called: ItemPup
    Then in the Event Editor > List, right click then select: New Action > States > Set States
  2. Then in the Events empty Target column box, right click then select: Set Target > Default Work Unit > PlayerHasQuad > Yes
  • TIP: This event is called when the player character picks up the Quad stats boost item.
    The extra state parameter that we set tells Wwise we can now play anything assigned to the Quad active parameter.
  1. Locate and Select the Event called: PupOut
    Then in the Event Editor > List, right click then select: New Action > States > Set States
  2. Then in the Events empty Target column box, right click then select: Set Target > Default Work Unit > PlayerHasQuad > No
  • TIP: This event is called when the Quad stats boost item timer finishes, returning the Player Character to normal stats
    The extra state parameter that we set tells Wwise that we are no longer under the influence of Quad.
  1. Save Your Wwise Project updates and Generate the Sound Banks

Chapter 14 A – Step 05
Test & Integrity Report

As there is not really anything we can test at this point, hopefully we have caught most of the major issues that we have not yet setup for.
There may still be a few outstanding bugs, so we will finish by running a Wwise Integrity Report to see if any errors have been introduced.
It is also advisable due to the large amount of states and game parameters we have set-up in this guide, to play the game for 30 minutes, keeping an eye on the profiler log for errors as the game is played.
Address and fix any errors that are present in the game.

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close