Forum rules - please read before posting.

Version 1.71 - Player-switching overhaul, API changes, and lots more

edited May 2020 in Official news

A large update that makes several much-needed overhauls to various systems, v1.70 has lots of new features - but also many changes. Please be sure to read the "Upgrade notes" section of the Changlog - and the "API" section if you make use of any custom scripts. Be sure to back up those projects beforehand!

Takeaway features:

Player-switching

Switching between different Player characters is now much easier, thanks to the ability for inactive Players to now behave like NPCs. Gone is the clunky "Associated NPC" system, and instead AC will not keep track automatically of all Players defined in your Settings Manager. The new workflow is detailed in this video.

Special thanks to @kloot and @chaosmonger for their help with testing this.

Character tracking

A side-effect of the Player-switching overhaul above is that it's now possible to track characters across a game. Essentially: if you enable Player-switching, any Player you define will have their data (position, scene, etc) saved and loaded automatically - even if they aren't technically controlled by the player at any time. This makes it possible to have such characters still only be used as NPCs - only you can let AC handle their spawning and positioning, instead of having to place them in scene files and/or worry about Remember NPC components.

Persistent Remember components

If a GameObject is marked as DontDestroyOnLoad (and isn't on the Player), then any Remember component attached to it will be accounted for in save game files. This allows for things like "global" Conversations - see the video above for an example, as well as this wiki page.

Sub-scenes

ActionLists can now reference objects placed in other scenes, if those scenes are present using the Scene: Add or remove Action. Player-switching is now also compatible with sub-scenes.

Text overwriting

It's now possible - via CSV importing - to overwrite your game's original text (i.e. that entered in directly to e.g. Dialogue: Play speech Actions).

First-person improvements

First-person movement is now smoother by default, and custom animations options have been extended to allow for sideways and backwards camera motion. A new downloadable package to get quickly up-and-running can be found on the Downloads page.

Addressable speech files

Available via this wiki script, it's now possible to make use of Unity's Addressable system for speech audio files.

Interaction lists

The Interaction menu element type now supports the displaying of multiple icons in a single element, allow for scrolling through them in the way you can with InventoryBox elements.

Modifiable Inventory properties

Through script, Inventory properties can now be modified at runtime, and such changes will be recorded in save game files.

Fade options

The Camera: Fade Action now lets you choose the behaviour of a fade effect if the game is paused during the transition.

Gabriel Knight template

A new template on the Downloads page is available that allows for "Gabriel Knight 1"-style Conversations, where two character portraits are displayed at a time while showing dialogue options in between.

«13

Comments

  • And the full changelog..

    Upgrade notes

    • Numerous functions and variables have been replaced, changed or removed - see the API section below for details
    • When player-switching is enabled, Player characters no longer have "Associated NPCs", but can now act like NPCs when not the active Player
    • The "Player: Teleport inactive" Action now requires a PlayerStart to set the Player's position and optional camera
    • A scene's OnLoad Cutscene is now called whenever the active Player is switched - not just for non-first time
    • For the "Inventory: Property to Variable" Action's "Multiply by item count?" option to take effect, "Get lives values?" must also be checked
    • The Touch Screen input option "Release touch to interact with pause Menus?" has been renamed "Release touch to interact with AC Menus?", and now works at all times
    • The SceneChanger's functions to manage scenes now rely on scene indices - not instances of the SceneInfo class
    • Removed the ISave interface, formerly used to hook custom code into the save system - use instead the OnBeforeSave and OnAfterSave custom events
    • The "DefaultInteraction" input can now be invoked while an inventory item is selected
    • The OnCompleteScenePreload and OnAwaitSceneActivation events now require an integer variable for the scene index - not a SceneInfo class
    • The OnEnterGameState and OnExitGameState events are now called from LateUpdate, not Update
    • The Speed float parameter in the First Person Camera component when using custom animation is now mapped to the Player's forward speed
    • Direct and First Person movement now reads Horizontal and Vertical input from InputGetAxisRaw - not InputGetAxis
    • The ITranslatable interface now has an additional UpdateTranslatableString function.
    • The PlayerInput's Force Gameplay Cursor property is now independent of First Person free-aiming, and will be enforced at all times during gameplay

    Player-switching

    • Added: Overhaul of the player-switching system - Player characters no longer have "Associated NPCs", but can now act like NPCs when not the active Player
    • Added: Ability to rely on AC to automatically track a character's position across scenes
    • Added: Non-default Player characters can now be assigned a starting scene and position in the Settings Manager
    • Added: Options to the "Player: Switch" Action to stop the old and new Players from moving during the switch
    • Added: Ability to use the "Player: Teleport inactive" Action to teleport inactive Players to scenes other than the one currently open
    • Added: Ability to select, if using player-switching, which Player to affect in Actions that have a "Is Player?" checkbox
    • Added: Ability to give an Inventory item to multiple Players when the game begins, if using player-switching
    • Added: Option for a Player prefab's attached Hotspots to be auto-disabled when the character becomes the active Player
    • Added: When player-switching is enabled, the "Scene: Check" Action can be used to check a specific Player's current or previous scene
    • Added: When player-switching is enabled, the "Scene: Switch previous" Action can switch to either the game's previous scene, or the active Player's
    • Added: Ability to limit a PlayerStart's previous-scene activation by Player, if player-switching is enabled
    • Added: Ability for the Action List Starter component to trigger when loading a scene due to switching Player character
    • Added: Ability to overlay the current screen when changing scene due to a Player switch
    • Changed: When updating an inactive Player's position with the "Player: Teleport inactive" Action, their physical presence is also updated
    • Changed: The "Player: Teleport inactive" Action now requires a PlayerStart to set the Player's position and optional camera
    • Changed: The scene's OnLoad Cutscene is now called whenever the active Player is switched - not just for non-first time
    • Changed: KickStarter's ResetPlayer function has been removed - set the value of KickStarter.player instead to manually change Player
    • Changed: The SceneChanger's functions to manage scenes now rely on scene indices - not instances of the SceneInfo class
    • Fixed: Issues related to player-switching and multiple scenes being open at the same time
    • Fixed: Inconsistencies with the recording of Player scene indices 
    • Fixed issues with Player-switching in First-Person

    API

    • Added: OnInitialiseScene event - called when an AC scene is initialised, but before save data has been applied
    • Added: OnAddSubScene event - called once a scene has been opened as a sub-scene
    • Added: OnManuallyTurnOnAC and OnManuallyTurnOffAC events - called when AC is manually turned on and off respectively
    • Added: Functions to the SceneChanger class - NameToIndex and IndexToName - to get a scene's filename from its build index, and vice-versa
    • Added: Function to the SceneChanger class - ResetCurrentScene to reset the current scene
    • Added: Static function to the KickStarter class - RestartGame - to restart the game
    • Added: Functions to the Hotspot and InvItem classes to turn on a specific Interaction menu for it, regardless of its Appear type
    • Changed: The ITranslatable interface now has an additional UpdateTranslatableString function.
    • Changed: Replaced the StateHandler script's BeginCutscene, EndCutscene and IsInScriptedCutscene functions with a single EnforceCutsceneMode property
    • Changed: Replaced the SceneSettings script's PauseGame and UnPauseGame functions with the StateHandler's EnforcePauseMode property
    • Changed: Removed the ISave interface, formerly used to hook custom code into the save system - use instead the OnBeforeSave and OnAfterSave custom events
    • Changed: The PlayerInput script's "lock" variables to restrict Player movement have been replaced by the Player script's "movementLocked" variables
    • Changed: The ConstantID script's LoadData function no longer has a 'restoringSaveFile' parameter
    • Changed: The NavigationEngine class's SetVisibility function has been removed
    • Changed: The Serializer.returnComponent is now deprecated - use ConstantID.GetComponent instead to retrieve components by Constant ID reference
    • Changed: The StateHandler now uses HashSets, not Lists, for internal recording of scene objects
    • Changed: The OnCompleteScenePreload and OnAwaitSceneActivation events now require an integer variable for the scene index - not a SceneInfo class
    • Changed: The OnEnterGameState and OnExitGameState events are now called from LateUpdate, not Update
    • Changed: Direct and First Person movement now reads Horizontal and Vertical input from InputGetAxisRaw - not InputGetAxis
  • Characters

    • Added: Ability to search for Action references to Players assigned in the Settings Manager
    • Added: Ability for the "Character: Hold object" Action to position the hands of Mecanim-based characters using IK
    • Added: Ability to reconfigure a sprite-based character’s available directions with the "Character: Change rendering" Action
    • Added: Sorting Maps can now affect a character's size and speed independently
    • Fixed: Characters that rely on retro-mode pathfinding not being able to resume moving along Paths
    • Fixed: Character positioning issues when skipping the "Character: Move along path" Action
    • Fixed: Sprites Unity-based characters not playing their talking animation when speaking while being controlled by a Character Animation 2D track
    • Fixed: Issues with enforcing a 2D character's sprite direction when using frame-flipping

    Speech

    • Added: Ability to overwrite the game's original text by importing a CSV file
    • Added: Ability to define a global delay time after a "Dialogue: Play speech" Action ends before continuing the ActionList
    • Added: Ability to set custom filenames for speech files that are referenced by naming convention or asset bundles
    • Added: Ability to export speech filenames when exporting text as a CSV file
    • Added: OnSkipSpeech event - triggered when speech is skipped due to input
    • Changed: The Conversation Editor window has been removed
    • Changed: If asset bundles are used for speech audio and lip-syncing, and speech audio is translated, then languages that have no asset bundle will clear bundled data when active
    • Changed: The Speech Manager's "Auto-name speech audio files?" and "Get speech files from AssetBundles?" fields have been replaced by a single "Reference speech files" popup
    • Changed: The Speech Manager's "Scene filter" is now based on the scenes that have been gathered, and not on the scenes in the current Build Settings
    • Fixed: Speech Manager not locating speech lines separated by carriage returns
    • Fixed: Playback issues with subtitle-scrolling audio
    • Fixed: Incorrect speech asset bundles sometimes being loaded into memory
    • Fixed: Speech audio not resuming after un-pausing the game mid-line

    Menus

    • Added: Ablility to scroll through dialogue options with the mousewheel when using the default Conversation menu in Unity UI
    • Added: The Auto Correct UI Dimensions component can now be used for UI Canvases that are not linked to AC Menus, provided a "Transform to control" is manually assigned
    • Added: If a Cycle menu element is linked to a UI Dropdown with fewer options than the Cycle, the Dropdown is given more options automatically
    • Added: Option to display an InventoryBox element's Highlight texture if a slot is empty
    • Added: Ability for Interaction menu elements to display a list of icons, as opposed to just a single one, to allow for scrolling through lists
    • Added: If an AC Menu's Label element uses Automatic scaling, the maximum proportion of screen width it takes up can now be controlled
    • Changed: The Touch Screen input option "Release touch to interact with pause Menus?" has been change to "Release touch to interact with AC Menus?"
    • Changed: The Menu class's canvas variable is now private - use the PrefabCanvas and RuntimeCanvas properties to access its prefab and runtime canvases
    • Changed: A Menu Element’s "Hover sound" is no longer played for the first-selected Element of a directly-navigated Menu
    • Changed: The "Menu: Change state" Action's "Fade?" option label has been renamed to "Transition?"
    • Fixed: Positioning issues with Unity UI-based menus set to render in Screen Space Overlay mode
    • Fixed: AC Menu Buttons reacting to both "tap down" and "tap up" events, as opposed to just one or the other
    • Fixed: Empty inventory item slots not being recorded in save games when "Items can be reordered in Menus?" is checked
    • Fixed: SavesList element's "Empty slot texture" property not being visible in the Menu Manager when used in a Unity UI-based Menu
    • Fixed: AC Menu InventoryBox elements not previewing correctly if set to display Text Only
    • Fixed: AC Menus enabled on start not appearing immediately when the game begins
    • Fixed: Display issue with AC-based Menus in WebGL builds
    • Fixed: Rare display issue with rich text displayed in AC menus
    • Fixed: Hotspot label issues when selected an Inventory item in "Give" mode

    ActionLists

    • Added: If a Set Trigger Parameters component is attached to multiple Trigger components, they are all affected by it if they share the same number of Parameters
    • Added: Ability to define multiple custom Action directories in the Actions Manager
    • Added: [paramval:X] token - Use to get the value of a Variable referenced by an ActionList Parameter, rather than the Variable ID itself
    • Added: Option to the "ActionList: Kill" Action to kill all instances of an asset that can be run multiple times simultaneously
    • Added: Ability to override the "ActionList: Check running" Action's "ActionList asset" field with a Unity Object parameter
    • Added: OnSkipCutscene custom event - triggered just before a series of skippable ActionLists are run in a single frame
    • Added: Ability for the "ActionList: Run" Action to bulk-set an ActionList's parameters without running the list
    • Added: The Speech Manager's "Gather text" process now reports all "null" Actions found in the game
    • Added: The Variable: Set Action's Formula method now supports parameter tokens
    • Fixed: Sometimes not being able to create new "Object: Call event" Actions
    • Fixed: "ActionList: Run" Action not always ending if it cannot find the intended ActionList to run
    • Fixed: Conversions between scene-based ActionLists and ActionList asset files not also transferring default parameter values
    • Fixed: Colon and pipe characters not being displayed correctly when inserted into ActionList string parameter values
    • Fixed: Issues with scene-surviving ActionList assets
  • ActionList Editor

    • Added: Ability to auto-arrange only the selected Actions in the ActionList Editor window
    • Added: "Stop" button to the to ActionList Editor toolbar when the ActionList it is for is running
    • Changed: Desaturated Action node colour tinting
    • Fixed: ActionList Editor window's toolbars sometimes disappearing when displaying an ActionList at runtime
    • Fixed: Clicks to the ActionList Editor window's "Run now" button being overridden by the scrollbar
    • Fixed: ActionList Editor breaking if viewing an ActionList that contains an Action whose type has been deleted

    Cameras

    • Added: Ability to choose how pausing the game affects the behaviour of the "Camera: Fade" Action, including the option to continue fading
    • Added: The full-screen black overlay used to mask scene initialisation is now optional
    • Changed: The MainCamera no longer instantly completes an active transition when the game is saved
    • Changed: Tagging the AC MainCamera as MainCamera is no longer enforced, but this may result in not being treated as such by external scripts
    • Fixed: "Camera: Fade" Action continuing to wait even if the camera's fading has been cancelled

    Inventory

    • Added: Inventory item property values can be modified in script, and changes to non-string properties will be stored in save games
    • Added: Option for the "Inventory: Property to Variable" Action to rely on live property values, as opposed to item defaults
    • Added: Ability to spawn and remove an Inventory item's "Linked prefab" using the "Object: Add or remove" Action by referencing an Inventory Item parameter
    • Added: OnInventoryHighlight event - called when an inventory item is highlighted using the "Object: Highlight" Action
    • Changed: For the "Inventory: Property to Variable" Action's "Multiply by item count?" option to take effect, "Get lives values?" must also be checked
    • Changed: Removed the InvItem script's GetProperty "multiplyByItemCount" parameter - use InvVar's GetDisplayValue to multiply by item count
    • Fixed: Inventory cursor display issue with "Choose Hotspot Then Interaction" mode
    • Fixed: Issues with drag-and-drop inventory

    Variables

    • Added: Ability to create new Variables in bulk via the cog button to the right of the "Create new Variable" button
    • Changed: The GVar class's SetValue, SetVector3Value and SetFloatValue functions has been removed - set the IntegerValue, FloatValue and Vector3Value properties instead
    • Fixed: OnVariableChange event not firing when changing variables due to assigning a preset, or manipulating a linked Menu Element
    • Fixed: Issue when using the "Variable: Copy" Action to copy to a Component Variable

    Interactions

    • Added: Choose Interaction Then Hotspot interaction mode now supports backwards-cycling of cursors via the "CycleCursorsBack" input
    • Added: OnHotspotReach event - called once a Player has moved to a Hotspot, but prior to running its Interaction
    • Changed: The "DefaultInteraction" input can now be invoked while an inventory item is selected
    • Fixed: "Insert after" menu items in Hotspot Interaction Inspectors having no effect
    • Fixed: Issues related to the cycling of interaction cursors

    Movement

    • Added: Option for Players moving via Direct input to stop turning the moment input is released
    • Fixed: Players moving via Direct input sometimes changing direction when both input direction keys are let go
    • Fixed: Movement locks made with the "Player: Constrain" Action not surviving scene changes

    First person

    • Added: Ability to define a float parameter in the First Person Camera component for the Player's sidestepping speed when using custom animation
    • Added: Movement-smoothing option to first-person movement
    • Changed: The Speed float parameter in the First Person Camera component when using custom animation is now mapped to the Player's forward speed
    • Changed: The PlayerInput's Force Gameplay Cursor property is now independent of First Person free-aiming, and will be enforced at all times during gameplay

    Save system

    • Added: Remember components on persistent GameObjects are now saved and loaded automatically
    • Added: Option to the Remember Timeline component to evaluate the Timeline at its current frame upon loading if it wasn't playing when saved
    • Fixed: Save and load issues with the Remember ParticleSystem component

    Misc

    • Added: Ability for objects in sub-scenes to be referenced by Actions in ActionList assets, or scene-based ActionLists present in other scenes
    • Added: OnDebugLog custom event - called whenever a Debug statement is fired, and can be used to modify its content
    • Added: Ability to compile without Timeline present by adding ACIgnoreTimeline as a Scripting Define Symbol
    • Added: Performance improvements to AC's initialisation process
    • Changed: The default pathfinding method for 3D scenes is now Unity Navigation
    • Changed: Improved the Scene Manager's Visibility panel UI
    • Fixed: Inconsistencies with the Scene Manager's Visibility panel
    • Fixed: Sensitivity issue with first-person camera control in v1.70.0
  • HOLY HUGE UPDATES, BATMAN. Seriously cool stuff here, Chris!

  • Amazing!! I really love AC <3
  • This is Awesome! I'm pretty excited to try all the new things...

  • Spectacular update! As always, I don’t know how you manage it, Chris 😄 Big thank you to all of the help on-and-off with getting a perfect 1:1 scumm-style template working, has the download template been updated with the new features?
  • edited May 2020

    Thanks for the update! Great features added.

    Should I report bugs here or do it at other place? I found that:

    1. When trying to check which is the previous scene, either by GetPreviousSceneIndex or Action > Scene > Check > Previous, it will return NullReferenceException if the scene is the first scene.

    2. When the player walk to a Trigger, the player will move 1 small step after the Trigger actionlist finish playing. This didn't happen in the previous version.

  • Fantastic stuff here Chris! Excited to check it all out!

  • Oh my! I gasped at Gabriel Knight template! Thanks a lot, this is a real gift. I could have used this in the adventure jam last week. I'm going to for my next project for sure!

  • edited May 2020

    Just confirming Rekzie's bug reports. My playerstart2Ds are not able to determine what the previous scene was if the previous scene is 1 in the built settings. I fixed it by putting a dummy scene in the first place.
    And when player gets to scene edge trigger2d, he will walk a little now before the scene switches.

  • edited May 2020

    Thanks for the reports, @Rekize and @ZcheK, though I'll need more information. Please share details of your movement methods, steps to recreate, and error messages in full in new threads in Technical Q&A.

    For the scene-check previous issue, open SceneChanger.cs and replace the IndexToName function with:

    public string IndexToName (int sceneIndex)
    {
        SceneInfo sceneInfo = GetSceneInfo (sceneIndex);
        if (sceneInfo != null) return sceneInfo.Filename;
        return string.Empty;
    }
    

    For the Trigger issue, what is the effect finding the PlayerInput component of the scene's GameEngine object, and setting the Direct Movement Responsiveness value to zero?

  • Thanks. The testing results are:

    1. The above script works and solved my GetPreviousSceneIndex issue.

    2. The Trigger issue can indeed solved by setting the Direct Movement Responsiveness value to 0, but would there be side effects? I have made a thread here:
      https://www.adventurecreator.org/forum/discussion/10136/ac1-71-0-when-the-player-walk-to-a-trigger-the-player-will-move-1-small-step-after-the-trigger/p1?new=1

  • Version 1.71.1:

    • Fixed: Issue when saving RememberTransform components in v1.70.0
    • Fixed: Direct-controlled Players occasionally moving for a frame once gameplay resumes in v1.70.0
  • Awesome thank you Chris, you're the man.

  • Version v1.71.2

    • Fixed: ActionLists assets not pausing in v1.70.0
    • Fixed: System keyboard not showing when editing Input elements on Android or iOS
    • Fixed: Issues with the simulated cursor's position and speed in v1.70.0
  • edited May 2020

    Hey! Very helpful update. Thank you!

  • Great news! Thanks a lot!

  • Looks like another fantastic update Chris. Thanks a lot.

  • There are many nice stuff in the update. I have a little suggestion for the future, I'll post it in Tech

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.