Forum rules - please read before posting.

Version 1.48 - Inventory properties, loading UIs and a ton of fixes

This one comes a little sooner than I was planning, but with Unity 5.2 causing a few problems here we are.  This is more of an all-round update, with a focus on many small improvements rather than a few large ones, and also fixes a number of obscure bugs.  Still, it's often the little changes that count, so without further ado:

Loading UIs
It's now possible to make use of Unity's "asynchronous loading" feature when changing scene.  A new "Appear type" setting in Menus allows you to display a UI specifically while a game is loading, and Timer elements can be used to show loading progress.  These changes should help out those who are brave enough to try building a console game with AC..  A tutorial can be found here.

Inventory properties
This one's more for coders, but properties can now be defined for inventory items, such as weight, cost, or anything else you may want to define.  They behave much like read-only Global Variables, only each inventory item has it's own value for each property.  Properties can also be limited by category.  While values can be displayed using a Label element, they're really intended to be used with custom scripting.  The GetProperty function in the InvItem (inventory item) class can be used to retrieve a property by it's ID number.

Custom tokens
Tokens can now be assigned through custom scripting.  A token of the form [token:ID] can be created, and then inserted into speech text or menu labels to be converted automatically.  A tutorial covering their use can be found here.

Non-adventure game compatibility
When trying to incorporate AC into a non-adventure mobile game I've been tinkering with, a few simple things got in the way that are now fixed.  You can now move between AC and non-AC scenes without any hassle (AC will "sleep" while it's not in an AC-made scene), and you can now use the "Save: Save or load" Action to load selective elements from a save file (e.g. just variables and inventory).  It's my intention to make AC in general better equipped to work with non-adventure games - but note that it'll still only be focused on adventure games by itself.


  • edited September 2015
    And the changelog:

    Upgrade notes
    • “Hide currently active Item in Menu?” checkbox is now a popup box, and will need to be updated if it was checked
    • Static functions in GlobalVariables to read and write linked variables now synchronise by default - no need to call Upload() or Download()
    • “Hide currently active Item in Menu?” checkbox in Settings Manager is now a popup box, and will need to be updated if it was checked
    • Added: Inventory properties - Define variables that all items, or items in a category, can have their own values of
    • Added: Ability to display an Inventory Item’s properties in a Label menu element
    • Added: Ability to set a “minimum drag distance” when using a drag and drop Inventory interface, below which the item is not selected
    • Added: Inventory items can now have an optional Cursor graphic that is used specifically when the item is selected
    • Added: Inventory items can now be re-ordered using the Demo game’s Inventory Unity UI canvas
    • Added: Ability to display a dedicated “selected” graphic in an InventoryBox when an Inventory Item is selected
    • Added: Script variable to RuntimeInventory.cs that records the last-clicked Inventory item, regardless of the InventoryBox type that contains it
    • Changed: “Hide currently active Item in Menu?” checkbox in Settings Manager is now a popup box, and will need to be updated if it was checked
    • Fixed: UI errors in “Inventory: Crafting” and “Inventory: Select” Actions
    • Fixed: Issues when using Containers with “drag and drop” inventory
    • Fixed: Inventory not resetting correctly if the “Engine: End game” Action is used to restart a game that features multiple Player prefabs
    • Fixed: Display issues with the Hotspot label when a selected Inventory item hovers over another item in a Container
    Scene changing
    • Added: Ability to load scenes asynchronously.  Works both with and without intermediate loading screens.
    • Added: Ability to delay loading screens when asynchronous loading is used.  Useful for fade effects in the loading screen itself
    • Added: New Menu appear type - “While Loading”.  Use to display Menus while loading a new scene.
    • Added: New Timer type - “Loading Progress”.  Use to show the progress made while loading a new scene, if loading is asynchronous
    • Added: The “Engine: Change scene” Action now accept parameters
    • Fixed: Occasional error when loading a scene that includes a RememberNavMesh2D component
    • Fixed: Incorrect scene sometimes being loaded if the “Engine: End game” Action is used to reset a scene
    • Added: Integration for Rogo Digital LipSync asset
    • Added: Generated script sheets are now formatted in HTML for clearer readability
    • Added: Ability to generate script sheets for all defined translations
    • Added: Speech token [hold] - use to display a line of speech indefinitely, until the “Dialogue: Stop speech” Action is run
    • Fixed: Speech tokens not working with non-scrolling text
    • Fixed: Script sheets displaying incorrect expected filename for the Player’s speech audio files
    • Fixed: Rare instances of speech text not being skippable in built games
    • Added: Ability to transfer an ActionList’s parameters onto another when using the “ActionList: Run” Action
    • Added: Ability to enter multiple lines of text into a String parameter box, allowing for multi-line speech to be parameterised
    • Fixed: “ActionList: Check parameter” not being able to check for an empty GameObject parameter field
    • Fixed: Certain ActionLists references by “ActionList: Run in parallel” Action not being processed by Speech Manager’s “Gather text” feature
    • Fixed: ActionLists not skipping when told to in very rare circumstances
    • Added: Error messages in the Console if PlayerMenus’ static functions are called before the Menus are initialised
    • Added: Option to avoid adding the same page twice when using the “Menu: Change state” Action to add a page to a Journal
    • Added: “Menu: Set Journal page” Action - use to change the active page in a Journal
    • Added: Ability to specific an ActionList asset that is run whenever a page is added to a Journal
    • Added: Script functions to MenuJournal.cs to get the current page number and total page numbers
    • Added: Option to Adventure Creator-based Menus with Size set to Automatic to resize themselves every frame
    • Added: Option to all Menus to keep within screen boundary (on by default)
    • Added: Elements in Unity UI-based Menus can now change the Cursor when hovered over
    • Added: Option to choose whether disabled Unity UI slots are disabled, or have their content cleared, when made invisible
    • Fixed: Unity 5.2 crashing when using Unity UI-based Menus
    • Fixed: Menus that use Unity UI being interactive during cutscenes
    • Fixed: Unity UI-based InventoryBox not allowing items to be re-ordered if drag-drop is enabled
    • Fixed: If “Dialogue: Toggle option” is used to amend a Conversation that is currently displaying, the Conversation Menu is not updated
    Non-AC game compatibility
    • Added: Improved stability when moving from an AC scene to a non-AC one
    • Added: Ability to add or remove the GameEngine prefab mid-game - AC will “sleep” until it is returned
    • Added: IStateChange script interface - place on GameEngine object to trigger custom code only when the game’s state change
    • Changed: If the MainCamera is parented to an unknown object, it is no longer de-parented, but a warning message is displayed
  • edited September 2015
    • Added: Ability to show and hide a scene’s Markers within the Scene Manager’s Visibility panel
    • Added: ActionLists and Conversations listed in the Game window when debugging can be clicked on to “ping” the relevant GameObject in the Hierarchy window
    • Fixed: Minor display issues in ActionList Editor window
    Saving and loading
    • Added: Ability to choose which elements get loaded when using the “Save: Save or load” Action to load a saved game file
    • Added: The “Variable: Set” Action now accepts Integer parameters to set the value of PopUp variables
    • Added: Ability to ignore Global Variables linked to Options Data when using the “Variable: Assign preset” Action
    • Changed: Static functions in GlobalVariables to read and write linked variables now synchronise by default - no need to call Upload() or Download()
    • Fixed: “Variable: Assign preset” Action not having an “After running” option
    • Added: Option in “Player: Switch” Action to transfer the current player’s Inventory items onto the new player
    • Fixed: 2D Players that make use of Tint Maps not using them after a scene change
    • Fixed: Various issues when skipping ActionLists that involve switching player prefab
    • Fixed: NPCs moving out of the Player’s way if they are waiting at a node along a Path
    • Fixed: Character Inspector not updating correctly when changing a Character’s animation engine from Sprites Unity Complex to Sprites Unity
    • Fixed: CanBeDirectControlled() function not being present on base Char script, only Player
    • Fixed: “Only move when sprite changes?” option on Player / NPC Inspectors causing different move speeds on different systems
    • Fixed: Player footstep sounds not set to the correct volume after switching prefab using the “Player: Switch” Action
    • Fixed: Path Cutscenes not running if a Wait time is specified for the Path
    • Fixed: Warning messages appearing if no PlayerStart is found when no Player prefab is assigned
    • Added: Ability to choose the direction that the cursor searches for NavMeshes in Point And Click games
    • Added: Message to Console if a non-First Person game begins with the cursor locked
    Movie clips
    • Added: “Engine: Play movie clip” Action can now play movies full-screen on non-mobile platforms - this is now the default playback type
    • Fixed: “Engine: Play movie clip” Action not running correctly if “Wait until finish?” is checked
    • Added: The “Input: Check” Action can now be used to detect single or double mouse clicks or touch-screen taps
    • Added: Custom tokens - tokens of the form [token:ID] in Label elements and speech text can be replaced by strings assigned in custom scripts
    • Added: If the New Game Wizard is used to create a game with a blank GUI, then a single “Use” cursor will still be created
    • Added: When a draggable object is moved using the “Moveable: Set track position” Action, the movement can be cancelled if a collision occurs
    • Added: Public function to DetectHotspots script to retrieve all Hotspots detected within it’s bounding volume
    • Added: The “Camera: Fade” Action can now be used to fade in or out while already in the middle of an existing transition
    • Added: (Slightly) improved lighting to 3D Demo in Unity 5
    • Fixed: Gameplay rarely becoming blocked if a new scene is loaded with no “On start” Cutscene
  • Clean upgrade here - game plays as it's supposed to and none of my test scripts have anything to complain about.

    Looking forward to trying out new features tomorrow.
  • Great stuff! @ChrisIceBox - does this mean it's safe for me to upgrade to Unity 5.2? I'm still using Unity 4.6 because I was scared to upgrade in case it broke AC, but I guess I was being paranoid.
  • edited September 2015
    @Big_Cow: AC's been Unity 5 compatible for a while now, and has a few 5-specific features as well.  It certainly needs to work with 5.2 - my own testing has deemed it ready, but if there are problems with it then reporting them here will be the quickest way to see them fixed.
  • Good to know - I'll make the leap. Thanks @ChrisIceBox! :)
  • Great update, everything (except blurry text on win7) seems to work fine so far!
  • Thanks Chris!! :)
  • Thank you. Cool features!
  • Upgraded. I have found

    - that my characters can no longer go along a path and stop even when I have the wait time set (*unless* there is a cut scene on that node, then he will stop as expected - the strange thing is it will work weirdly if your wait time is over 3). I had a cutscene that randomly generated a number between 1 and 10, to make it happen only 10% of the time, but when I had the wait time over 3, it seemed to always calls this script (its like it continually calls it too, because if you put in a sound you hear that over and over kind of,not sure if thats related really I think theres something else happening there).  but not quite, as he carried on his route,while doing some of the actions from the cutscene, but not all, like it was cut off early and I did not see the pauses in his cutscenes happening when looking at it in the inspector. I cant say but I think the path code/custcene/node stuff has bugs), they always move on from each node instantly. I also find that npcs will no longer stop and turn even with turn before walking ticked, they now turn as they walk which looks awkward.

    On the upside, I have found that running a cutscene on reaching a node now DOES work for me, I have been waiting for many months for this to work :D Probably the above stuff has been affected by this new addition?

    Sorry about the quality of this post my brand new keyboard has died its taken me 25 mins to type this!! grrrrrr..
  • edited September 2015
    delete this.. I thought id found a link but I was wrong :)
  • To summarise (Ive moved back to my old annoying broken keyboard but at least it almost works)

    - npcs do not stop on nodes even if wait time is set (unless they have a cutscene on them)
    - npcs will not turn before walking anymore

    observed fixes (very happy)
    - cutscenes now run on nodes (so long as wait time is set to 1 or less on the path) - I could never get this to work until now, changes everything for me :)
  • hi

    i upgraded to 5.2 today, and although both the AC demo scenes run, when i quit the scene Unity freezes and i have to terminate it. this is the second system where this happens in 5.2 for me (the other is the ActionRPGFramework), although most of my other projects work ok

    anyone else experiencing anything similar?
  • ok, i came across a thread on the Unity forum which seemed to suggest that the freezing problem was related to alphabetic sorting (which is what i generally use) of the hierarchy window, so i tried switching it to transform sort order, and that fixed the problem (and in the ActionRPGFramework too)

    so, Unity bug rather than anything specifically wrong with AC
  • @radiantboy: Thanks for the bug report, but I'm confused by your 3 second mention: do you mean characters pause if the wait time is above 3 seconds?  Also, please elaborate on your mention of characters not turning before walking, as I cannot recreate this - please post details (perspective settings, animation engine, navigation method etc) in a new thread.
  • v1.48a bugfix release:
    • Fixed: Occasional error when auto-creating an Interaction on a Hotspot
    • Fixed: Issues with playback Draggable movement sounds
    • Fixed: “Wait time” field in Paths script component occasionally being ignored
  • It looks like 1.48a fixed the issue of not stopping at nodes when a wait time is set (I have a squirrel running along a wall that was never stopping, after the upgrade he stops on each node as expected- great stuff). I still get people not turning before walking, my set up is with ufps, perspective 3D, animation engine is mecanim, navigation is just paths ive set up, they were turning before walking until 1.48 (I may have missed 1.47 to be honest). 
  • A new, 5.2.1-based package has been uploaded to sort an issue that is caused when trying to use AC with the latest version of Unity.  It'll still be known as v1.48a, so it won't appear as new in the Asset Store, however if you are experiencing issues with Unity 5.2.1, please re-download AC.

    @radiantboy: Please post a shot of a typical NPC that exhibits this behaviour, as well as an Action that causes them to move this way.
  • edited September 2015
    Just updated my project to 1.48a, and everything seems to be working mostly fine. So far I've only encountered a NullReferenceException that is not affecting gameplay in any way that I can see, however I'd like it to go away. Here's the full error:

    NullReferenceException: Object reference not set to an instance of an object
    AC.MenuButton.SetUIInteractableState (Boolean state) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/MenuButton.cs:222)
    AC.Menu.SetUIInteractableState (Boolean state) (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:463)
    AC.Menu.MakeUINonInteractive () (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:453)
    AC.PlayerMenus.MakeUINonInteractive () (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:2050)
    AC.StateHandler.Update () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:334)

    It shows up at the start of the scene, as soon as I hit Play.
    I'd be interested to know what it is and how to fix it, thanks!

    PS. as a side note, is there a way to post code snippets here, apart from changing the font manually?
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.