Forum rules - please read before posting.

Version 1.68 - Variables component and logic upgrades

This update has a fair few more "Upgrade notes" than usual, so please take care to read through them carefully before upgrading - particularly if you rely on custom scripting. The usual precaution of backing up your projects should also be taken.

The main aim of this update is to ease the workflow when creating puzzles as prefabs - i.e. prefabs that contain "self contained" game logic and can be dropped into a scene without having to merge it into your variables, cutscenes etc. Much of this comes in the form of the following new components:

Variables component

A new, third way to define variables (aside from Global / Local) is to attach them directly to a GameObject via the new Variables component. While these can exist on prefabs, they must still be present within the scene to function correctly - but they can be accessed in ActionList assets, unlike Local variables. Attaching the new Remember Variables component will also save their values. For convenience, a new "Variables" logic type is available in the Scnee Manager.

ActionList Starter

This component allows you to have an ActionList run when a scene starts or loads, without having to reference it in the Scene Manager. This is useful if you need to run some Actions to initialise some settings when the scene begins. If the ActionList makes use of parameters, all parameter values can also be set here.

Set Interaction Parameters

A simple solution to a commonly-raised problem: how to set all parameter values for a Hotspot's Interaction ActionList. Within the Hotspot component, only the Hotspot itself can be auto-assigned to an Interaction's GameObject parameter. With this component, you can set all parameters based on the exact interaction that was run - even if the ActionList itself is shared amongst multiple interactions.

Other new features include:

2.5D video backgrounds

VideoClip assets can now be used to display animated backgrounds in 2.5D games. A separate "placeholder" graphic, that represents the first frame of the clip, should also be assigned - as this will be used to mask any loading times while the video is prepared.

"Player: Teleport inactive" Action

This'll only be useful for specific cases, but if your game makes use of Player-switching, this Action can be used to "move" an inactive Player to the current scene. While this'll only have an immediate visible effect if they have an Associated NPC (which'll get spawned in their place), this Player will then appear in the scene when switching back to them.

Default Animator parameters

The Remember Animator component can now be used to set default values for its Animator parameters. This is useful if a scene has multiple Animators that share the same Animator Controller, since each Controller's parameter values can be individually set.

Custom events

A number of new events are provided, including one to set the replacement text of a speech event token - which by default is simply removed from speech text. This paves the way for dynamically-generated speech, since part - or all of - the speech text can now be set at the moment it is spoken.

Comments

  • And the full changelog...

    Version 1.68.0:

    Upgrade notes

    -When restoring a Player’s position with the “Player: Switch” Action, the new Player will be positioned at their Associated NPC’s position if both are in the current scene
    -If the active Player's associated NPC is present after a scene is loaded, they will automatically be hidden from view
    -If the "Object: Transform" Action is used to move an object to it's current transform, it now ends instantly regardless of the transition time
    -The Menu script's GetTargetInvItem and GetTargetHotspot methods have been replaced with the TargetInvItem and TargetHotspot properties respectively
    -To access a Menu's runtime linked Canvas at runtime, read its 'RuntimeCanvas' property - not its 'canvas' variable, which is reserved for the prefab
    -Removed PlayerInteraction's GetLabel method - use PlayerMenus.GetHotspotLabel or Hotspot.GetFullLabel instead
    -The default OptionsData constructor now takes an additional argument for the voice language index
    -The Speech constructors no longer includes a language argument
    -The Serializer script's LoadFile method is now Editor-only

    Variables

    • Added: Variables component - use to define a collection of Variables on a GameObject in the scene
    • Added: RememberVariables component - use to save the state of Variables components
    • Added: Ability to edit live variable values at runtime in the Variables Manager, provided "Show runtime values?" is checked
    • Added: Editor UI improvements when working with PopUp variables
    • Changed: Exporting variables is limited to Global, Local, or Component only - depending on where the "Export variables" button was clicked
    • Fixed: "Variable: Check random number", "Object: Add or remove", "Object: Transform" and "Object: Record transform" Actions not accounting for local variables in sub-scenes

    ActionLists

    • Added: ActionListStarter component - use to run ActionLists when a scene starts or loads, independently from the Scene Manager's OnStart/OnLoad properties
    • Added: When generating an ActionList asset file from a scene-based ActionList, the original list can now optionally use the new asset as it’s Actions source
    • Fixed: Play Mode crash if an ActionList is run while its GameObject is disabled
    • Fixed: "Variable: Copy" and "Inventory: Property to Variable" Actions showing incorrect labels
    • Fixed: Issue when skipping ActionList assets that are run from within a larger chain

    ActionList parameters

    • Added: SetInteractionParameters component - use to set all of a Hotspot Interaction's parameters when a Hotspot is interacted with
    • Added: Ability for the "ActionList: Check parameter" Action to check parameters other than its own
    • Added: If parameters to override the manipulated Variable in the "Variable: Check" or "Variable: Set" Actions, then the last-set Variable's type will be used as placeholder
    • Added: If parameters are used in the "ActionList: Run" Action to override the ActionList asset being run, then the last-set asset will be used as a placeholder
    • Added: Ability for the "Object: Record transform" to use parameters for the recorded variable
    • Fixed: Hotspot interactions not updating asset file with the Hotspot as a parameter if the Interaction relies on an ActionList asset for its Actions source

    2.5D

    • Added: Ability to play VideoClip assets as 2.5D background images
    • Fixed: 2.5D Background images not displaying unless all BackgroundImage components have textures

    Player switching

    • Added: "Player: Teleport inactive" Action - use to transfer an inactive Player's saved position, and their associated NPC, to the current scene
    • Added: Ability to avoid snapping the camera when switching Players, if both rely on the same camera
    • Changed: When restoring a Player’s position with the “Player: Switch” Action, the new Player will be positioned at their Associated NPC’s position if both are in the current scene
    • Changed: If the active Player's associated NPC is present after a scene is loaded, they will automatically be hidden from view

    API

    • Added: Ability, through script, to replace a Speech line's display text while active
    • Changed: The SceneChanger script's ChangeScene function no longer takes a "_removeNPCID" integer parameter
    • Changed: The "isEditing" variables in the InvItem, ActiveInput, Recipe, ButtonDialog, Menu, Document, MenuElement and GVar classes have been removed
    • Changed: The Menu script's GetTargetInvItem and GetTargetHotspot methods have been replaced with the TargetInvItem and TargetHotspot properties respectively
    • Changed: Removed PlayerInteraction's GetLabel method - use PlayerMenus.GetHotspotLabel or Hotspot.GetFullLabel instead
    • Changed: The default OptionsData constructor now takes an additional argument for the voice language index
    • Changed: The Speech constructors no longer includes a language argument
    • Changed: The Serializer script's LoadFile method is now Editor-only

    Editor

    • Added: Ability to move the whole AdventureCreator directory into a Plugins subfolder for faster compilation times
    • Added: Ability to align selected Actions horizontally or vertically in the ActionList Editor window
    • Added: Ability to assign colours to individual Actions in the ActionList Editor window
    • Added: Dialogue Option text listed in the Speech Manager can now have Descriptions, set by default to the Conversation they are from
    • Fixed: Rare build issues when compiling in MonoDevelop
    • Fixed: "Scene: Switch" Action node connections breaking when viewed in the ActionList Editor at runtime
    • Fixed: "Save: Set option" Action producing an ignorable warning message when building
    • Fixed: ActionList assets being ignored by the "Gather text" feature in rare circumstances
    • Fixed: Speech lines having incorrect Speech Order values when game text is exported
    • Fixed: Speech Manager's "Lipsync data directory" field sometimes showing when it has no effect
    • Fixed: Minor issue with the Highlight component's Inspector

    Menus

    • Added: Ability to assign per-option background textures for Cycle menu elements
    • Changed: Removed the Menu Manager's "Disable mouse when directly-controlling Unity UI Menus?" option, as keyboard-controlled cursors now support Unity UI
    • Changed: To access a Menu's runtime linked Canvas at runtime, read its 'RuntimeCanvas' property - not its 'canvas' variable, which is reserved for the prefab
    • Fixed: Unity UI-based menus not responding to the simulated cursor when the "Input method" is set to "Keyboard Or Controller"
    • Fixed: Hotspot label not showing the name of a Document when hovering over a list of Documents
    • Fixed: Canvas prefabs linked to Subtitle menus that duplicate becoming disabled at runtime
    • Fixed: Subtitle labels not updating in size when previewed in Timeline
    • Fixed: Cursor label translations not appearing in Interaction menu elements

    Events

    • Added: OnRestartGame custom event - called whenever the game is restarted using the "Engine: End game" Action
    • Added: OnCharacterReachNode custom event - triggered as a character reaches each node along a path
    • Added: OnRequestSpeechTokenReplacement event - use to dynamically insert text in place of a speech event token
    • Added: Alternative OnSpeechToken custom event that takes a Speech parameter
    • Fixed: The OnStopMusic and OnStopAmbience events not firing when a soundtrack ends naturally
    • Fixed: OnSetHeadTurnTarget event not firing more than once for the same target
  • Interactions

    • Fixed: Interaction menus turning off when hovering over other items despite "Close interactions with" being set to "Click Off Menu"
    • Fixed: Interaction menus not working correctly with Inventory menus that pause the game
    • Fixed: Minor cursor-related issues with the "Cycling Cursor And Clicking Hotspot" method of selecting interactions
    • Fixed: Incorrect Hotspot label sometimes showing in "Choose Interaction Then Hotspot" mode
    • Fixed: Cursor resetting when leaving a single-use Hotspot in "Choose Interaction Then Hotspot" mode

    Camera

    • Added: Ability to prevent the MainCamera from drawing its fade effect, in favour of a a custom script that reads the component's GetFadeAlpha and GetFadeTexture functions
    • Added: Ability to overlay one camera over another with the "Camera: Split-screen" Action
    • Fixed: "Camera: Crossfade" Action not working correctly if "Return to last gameplay?" is checked

    Audio

    • Added: Ability for speech audio and display text to be different languages
    • Fixed: Ambience and pausing music not loading correctly in Unity 2018 or newer
    • Fixed: Playback issues with Sound objects set to survive scene changes and returning to their original scene
    • Fixed: Audio volumes not set linearly when controlled by Audio Mixer Groups

    Characters

    • Added: Ability to prevent a character from waiting at a Path's node if that node runs a Cutscene when reached
    • Fixed: Path node cutscenes sometimes setting the "Character parameter" field to the wrong parameter
    • Fixed: Character head-turning sometimes not being considered complete when facing a moving object
    • Fixed: Display issue with lip-synced dialogue portraits
    • Fixed: Character turning producing a Quaternion error in rare circumstances

    Misc

    • Added: The Remember Animator component now supports saving a change in Runtime Animator Controller
    • Added: Ability to set an Animator's default parameter values with the "Remember Animator" component
    • Changed: If the "Object: Transform" Action is used to move an object to it's current transform, it now ends instantly regardless of the transition time
    • Fixed: Speech text sometimes not ending if rich text tags are used and "Skipping speech first displays currently-scrolling text?" is checked
    • Fixed: Json save format not saving RememberTimeline or RememberMoveable components
    • Fixed: AC Triggers not reacting to Draggable objects placed on Tracks
    • Fixed: Error when attempting to take all items from a Container
  • Fantastic!

    With 1.68 all the bugs are fixed, system is very reliable and the new approach to variables opens interesting new possibilities. At this stage AC is really mature. All the problems I had with previous versions are gone.

    Three cheers to the author!

    It's slightly off topic, but I am really happy with Adventure Creator v 1.68. It makes realistically possible for just one dude to create quite an advanced adventure game. It takes time, obviously, but Unity + AC guarantee that the project will be manageable no matter how big it grows.

    Only one thing makes me sad: that I payed so little for Adventure Creator. It's worth more than it costs, no doubt about it.

  • edited June 2019

    Congrats on the release!

    I especially appreciate that skipping action lists that are run from within a larger chain now seems to have been fixed. Will also be looking at the Plugins folder support!

    And yes, @Martin has a point - with the level of support you're bringing, the asset is does seem underpriced.

  • Feedback noted, thanks for the input.

  • Ooooh, this is awesome! Although I am still on a very old version because of the project, I regularly follow updates! Thanks Chris for your hard work and support for everything :)

  • Thanks Chris for your good work and support!

    Will you update the manual also?

  • This is effin' amazing! You're amazing Chris!

  • @haha: The Manual is always updated - is there something missing?

  • At the time I posted the comment the version of the manual was 1.67.2.

  • Which Manual are you referring to? The one in the Downloads section, or the one included in the asset package itself.

  • edited June 2019

    Version 1.68.1

    • Changed: Minor visual adjustments to the Sorting Map component's Inspector
    • Fixed: "etc" phoneme being ignored with Papagayo-based lipsyncing when explicitly defined in the phoneme frames
    • Fixed: Follow Sorting Map component not affecting child renderers if there is no renderer on the root GameObject
    • Fixed: Compatibility issue with preview package for Unity's new input system
  • this one manual.

  • Attaching variables directly to components is a game changer in terms of maintainability - awesome work!

  • edited June 2019

    Version 1.68.2:

    Upgrade note

    • The Char script's isJumping variable is now protected - in custom scripts, refer to the read-only IsJumping property instead

    Changelog

    • Added: The "Limit visibility to camera" component can now be attached to a VideoPlayer to control its Alpha value based on the active camera
    • Changed: The Char script's isJumping variable is now protected - in custom scripts, refer to the read-only IsJumping property instead
    • Changed: The Paths component is no longer an Edit-mode dependency of the Player / NPC components, and will be added automatically at runtime if not present
    • Fixed: Character settings visibility issues when "Motion control" is Manual
    • Fixed: Issue with Hotspots if the Interaction source is set to Asset File, but no ActionList asset is provided
    • Fixed: New sockets in the "Variable: Pop Up switch" Action not defaulting to "Stop"
    • Fixed: Rare issue with "Engine: Control Timeline" Action if the number of bindings is modified
    • Fixed: Audio Mixer Groups preventing audio muting in v1.68.0
    • Fixed: Characters with custom animation engines facing repeated calls to ResetAnimEngine
    • Fixed: OnChangeCursor custom event not being called for the default cursor when a scene begins
    • Fixed: Minor optimisation issues with the Mecanim animation engine
    • Fixed: Volumes linked to Audio Mixer Groups not updating when using the "Save: Set Option" Action
    • Fixed: Runtime ActionList Inspector's "Asset source" field listed as empty
  • Gameobjects with variables attached to them is an amazing thing that I could finally use to make important non-classic adventure game mechanics without bloating the global variables and without resorting a lot to playmaker integration, amazing news.

    I hope I don't bump on any problems with this update!

  • Version 1.68.3:

    Upgrade notes

    • The OnInventoryInteract custom event is now called before an Inventory's interaction ActionList is run
    • If the "Object: Check visibility" Action is used on an object with a Sprite Fader component, the Sprite Fader's alpha value will be accounted for
    • The MainCamera's fadeTexture variable has been made private - use SetFadeTexture and GetFadeTexture to set/get the fade texture respectively

    Changelog

    • Added: Warning message if the New Game Wizard detects that the process failed to generate a complete Manager Package asset file
    • Added: SetInventoryInteractionParameters component - use to set all of an Inventory Interaction's parameters when an item is used or examined
    • Changed: The OnInventoryInteract custom event is now called before an Inventory's interaction ActionList is run
    • Changed: If the "Object: Check visibility" Action is used on an object with a Sprite Fader component, the Sprite Fader's alpha value will be accounted for
    • Changed: The MainCamera's fadeTexture variable has been made private - use SetFadeTexture and GetFadeTexture to set/get the fade texture respectively
    • Fixed: Subtitle menu "Character(s) to limit to" / "Character(s) to exclude" fields accounting for character name translations
    • Fixed: The Manual's section numbers not matching the Contents page
    • Fixed: Issues with the "Character: Fade direction" Action when used in 2.5D and 3D games
    • Fixed: First-person games not being recognised as such in rare circumstances
    • Fixed: Music playback issues introduced in v1.68.0
  • Version 1.68.4:

    • Added: Option to the "Character: Face direction" Action to choose between turning relative to the camera, or the character
    • Added: Ability for characters to face a Marker's direction after moving to it with the "Character: Move to point" Action
    • Added: If the New Game Wizard is used to create a game with keyboard or controller input, pause menus are set to auto-select the first-visible element by default
    • Added: Ability to frame any Action in an ActionList by selecting it from the bottom of the ActionList Editor window
    • Added: "Is Player?" option to the "Object: Record Transform" Action
    • Added: OnRegisterHotspot and OnUnregisterHotspot custom events - called when a Hotspot is registered and unregistered by the StateHandler respectively
    • Added: Warning message on Awake if a character has a NavMesh Agent but no NavMesh Agent Integration component
    • Changed: When moving an Action to the front in the ActionList Editor window, it is now connected to the previous front Action if it had no previous connection
    • Changed: Increased the maximum "Slot spacing" field for AC menu elements from 20 to 30
    • Changed: The "ActionList: Run in parallel" Action now defaults to having two output sockets
    • Changed: Private functions in the included FileFormatHandler and SaveFileHandler classes are now protected so that they can be extended
    • Changed: Increased the maximum transition time for Menus from 2s to 5s
    • Fixed: Issues with the "Scene: Switch" Action being used to preload a scene if "Position Player relative to Marker?" is checked
    • Fixed: Character portraits displayed in Unity UI not updating correctly after loading a saved game
    • Fixed: Issues when using the "Player: Switch" Action to replace the Player with an NPC that uses a Character Controller
    • Fixed: Links to adventurecreator.org directing to "http" and not "https"
    • Fixed: Field issues with the "Character: Change rendering" and "Scene: Change setting" Actions
    • Fixed: ActionList asset property changes not always saving correctly if Actions are hidden in the Inspector
    • Fixed: Issues with playing custom animations with the Sprites Unity engine in Unity 2019
    • Fixed: Direct-navigation issues with the default OptionsUI canvas prefab
    • Fixed: Cursor input being affected by a game's Time.timeScale value
    • Fixed: Rare error when switching player and scene simultaneously
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.