Forum rules - please read before posting.

Wishlist/edits

Hello, we've been developing an adventure game using your extension and it's been very helpful. During the process we edited or added certain features to it or saw that certain features would be helpful. Here we'd like to share/discuss them and perhaps make them part of official releases so that the adventure creator would get better and it would be easier to update to newer versions. I will list the features down below and will outline in brackets whether we have them implemented. If we do, we'd be glad to share the edited code with AC author, we're just not sure how.

1. If character has navmesh agent, when using teleporting actionlist action use Agent.Warp instead of transform.position. (Have Code) P. S. It might have been added to 1.50 based on the patch notes I saw, we're currently working on 1.49a, so I couldn't check)

2. When having "Dialogue above character" option add an anchor variable to character (an empty transform), to which the text will snap. This allows for more detail in the position where the dialogue is placed when the character has non-standard colliders/no colliders or is 3d and not a sprite (Have Code)

3. When having duplicate for multiple lines checked in subtitle menu element, the duplicates stay and don't get deleted, which clutters the scene with disabled object. They should be deleted or pooled for reuse when they stop being used. (Have code which deletes them after use).

4. Gather translation doesn't gather translations if the objects are disabled in scene. It would be nice if it would gather everything, and you shouldn't have to enable everything before clicking gather translation. (Have Code).

5. Add differentiation between speech and text language. One changes the game text, the other the VA audio files that are being played. (Don't have Code)

6. When actionlist has use parameters checked. Add the ability to set parameters when attaching that actionlist to different menu items. (Don't have Code)

Please tell me if any of these points are unclear/hard to understand and whether any of them would be useful to you. And again if AC author feels like making any of them part of official release and wants code, we can send it, just not sure how. I may have forgotten something and may add it to the list later.
«1

Comments

  • Thank you - some good suggestions here.  I'll add my comments:

    1) v1.50 brings a new NavMeshAgentIntegration script, which allows a character to move with a NavMeshAgent instead.  I will look into this Warp function.

    2) Yes, I'll agree with that.

    3) They should already be removed: I'll look into it.

    4) How are you detecting deactivated gameobjects?  If that were to be added, I would make that optional.

    5) AC can already have the game display multiple languages yet only play the original audio, but I don't think total differentiation would be to widely used.  You can change which language is used for audio, however, in Speech.cs starting line 144.

    6) I don't quite understand that, but you can change an ActionList's parameter values manually through script.
  • edited January 2016
    1) The sole reason I used Agent.Warp is because if you have a navmesh agent active and use transform.position that moves character over a large gap in a navmesh (two walkable areas completely disconnected from one another), it just gets stuck at the edge of the area it was on. To work around that you either have to:
    disable navmesh agent
    transform.position
    enable navmesh agent.

    or use Agent.Warp
    If there is no such glitch/limitation in 1.50 I can't think of any other practical reason to use agent.warp.

    4) Instead of FindObjectsOfType I use a custom function (sorry if code tags exist, couldn't find them):

    public static T[] FindObjectsOfTypeInScene<T>() where T : Object {
            T[] allObjects = Resources.FindObjectsOfTypeAll<T>();
            List<T> filteredList = new List<T>();

            for (int i = 0; i < allObjects.Length; i++) {
                if ( IsInScene(PrefabUtility.GetPrefabType(allObjects[i])) ) {
                    filteredList.Add(allObjects[i]);
                }
            }

            return filteredList.ToArray();
        }

        private static bool IsInScene(PrefabType type) {
            return (type != PrefabType.ModelPrefab && type != PrefabType.Prefab);
        }

    6) Yeah I read through it again and it's impossible to understand. I'll try to explain with an image, but forgive me for an ugly image, I used paint and am a programmer. imgur Please let me know if it's still unclear as to what I mean.
  • 6) Thanks for clearing that up - when used in a Menu like that, you can only pass an Integer parameter.  It'd be a good idea for me to add an info box there.
  • Thanks for the update. It added lots of great features and significantly improved the stability of the extension! There is a slight glitch under very specific circumstances. I didn't notice it before, so sorry for not adding it to my initial list, I missed it:

    When you use Duplicate for multiple lines in subtitle/speech Menu together with Source option being Unity Ui Prefab, it throws an error while switching scenes:

    AC.SaveSystem:OnLevelWasLoaded() (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:710)AC.SaveSystem:ResetSceneObjects() (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:2080)AC.PlayerMenus:_OnLevelWasLoaded() (at Assets/AdventureCreator/Scripts/Controls/PlayerMenus.cs:201)AC.Menu:SetParent() (at Assets/AdventureCreator/Scripts/Menu/Menu classes/Menu.cs:366)UnityEngine.Transform:SetParent(Transform)Setting the parent of a transform which resides in a prefab is disabled to prevent data corruption.

    As far as I understand, when switching scenes AC tries to juggle parents of every menu and under normal circumstances every menu is already in scene, with the exception of when you use duplicate for multiple lines on a menu that has a prefab as a source, this type of menu gets cloned into scene only on demand.
  • Thanks for the report.  Are you using the very latest version?  v1.50c fixed an issue whereby duplicated speech UIs weren't being properly deleted after use - perhaps that fixes your issue as well.
  • I'm currently using 1.50e. I've tried to reproduce the same problem with a clean/empty project and it the error did pop up.

    I'm not sure, but the duplicate deletion might be the reason for the error. Before there used to be some speech canvases in scene and when switching scenes they got targeted for parent juggling (move them out of _UI, change scene, move them back into _UI). But after the fix there are no instanced speech canvases if you use duplicate option, so the system ends up trying to change the parent of assets prefab?
  • Hm, OK.  I'll look further into it, thanks.
  • edited January 2016
    Another slight Bug report:
    Happens when using navmesh agent integration with point and click movement.

    When you start the game and without moving at all and use a hotspot action that has no walk-to requirement, player attempts to teleport to (0, 0, 0).

    This one is non-critical, since you can fix it by adding a _char.IsMovingAlongPath() check at line 149 of Nav Mesh Agent Integration script. So as recommended in the script itself, you can duplicate, modify it and use the modification and further AC versions wont overwrite the fix.
    Sorry, fix doesn't work. If I find a fix that solves the problem without editing the core AC scripts, I'll update.
  • Thank you - again, I'll look into it.
  • Some more updates - this seems to happen when you switch characters in the onstart cutscene.
  • I cannot recreate your teleport issue - a fix for NavMeshAgent-based characters was fixed in v1.50c, but I see you're on 'e'.  Are there any other steps involved?
  • So, I've managed to reproduce it consistently. This one's really weird. But the bright side is that you can work around it without editing AC itself.

    To reproduce:

    Igonre any of my previous 'insights' :D

    Use Point And Click for Movement method.
    Mouse And Keyboard for Input method
    Choose Hotspot Then Interaction for Interaction Method.
    Select Interactions by: Clicking Menu
    See interactions with Click On Hotspot.

    Create a scene that uses unity navigation mesh.
    Setup 'player start' anywhere that is not (0,0,0). Preferably further away, so if the player teleports, it's clearly visible.
    Create a hotspot with a Use interaction (that has Do Nothing for Player action) and check the "Single 'Use' Interaction?" checkbox.
    Create a player that has: Nav Mesh Agent Integration.
    Then set Acceleration and Deceleration to very high values on the Player->Movement settings. (_Not on the navmesh agent_).

    Given these circumstances, when you play the scene if you click on the hotspot before making any kind of other interaction, the player will instantly move towards (0, 0, 0) based on acceleration/deceleration value.

    If you set both the acceleration and deceleration values to 0, the problem is fixed. That messes up the changes in "Move speed float" parameter for mecanim animations, but extending a copy of Nav Mesh Agent Integration to account for that shouldn't be too hard and a copy won't get overridden with newer versions of AC, so not a big deal. It's just nice to be aware of that glitch. If you need I can send you a clean project with the bug reproduction.
  • Thank you - the steps you've shown should be enough, but I'll let you know if not.
  • Actually, still can't reproduce this.  Try with the latest version if you haven't already, and if it's still occuring please PM it to me privately - a .unitypackage file of the scene + managers will be enough.
  • edited January 2016
    @Ressie, I think this was already introduced in 1.50c :)

    • Added: Transform field to Character inspectors that will override the placement of Menus set to display Above Speaking Character and Above Player
  • Yep, #1, #2 and #3 are in! #4 is easy to retain after AC updates, since the changes are contained to one script. #5 we too dropped the idea, no actual need. #6 a thing of convenience, not necessity.

    7) Also another nice feature would be a control scheme feature like in the latest day of the tentacle release or Curse of monkey island (3rd). It's somewhat similar to the walking dead style, with the difference being: on the new one, once you click _down_ on hotspot, the actions menu appears with the possible actions and once you _release_ the mouse button, it checks whether the mouse was over any of the actions and either simply closes the action menu or executes the appropriate action. Monkey Island example:

    Or if this feature isn't that necessary for others, could you point me in the right direction as to where I can implement this control method myself?
  • 7) This is actually how things work if you change your Input method to Touch Screen.  Most of it is done within PlayerInput's UpdateInput function, where mouseState is set differently according to your chosen InputMethod.  There's also an additional check in PlayerMenus on line 928.

    The easiest way to do this would probably be to change your Input method to Touch Screen, and change PlayerInput 208-212 so that line 209 is run in builds, not just the Editor.
  • A certain bug popped up. When player executes an interaction where "Player action:" is set to "Walk to Marker" and while the player character is moving towards the marker you execute a "Character -> Move along path -> Stop Moving", then player character stops, but the interaction gets executed.

    I'm using Unity Navigation Mesh movement together with Unity Navmesh agent integration.


    Might be a regression from this thread? A very similar behavior to the one reported by "outomaisteri":
  • Bug recreated, thanks for the report.
  • Hi there, I'm still having trouble with the 1°/, 1.51a.
    My character can't be teleported here I want it to be. There is a problem with two walkable areas completely disconnected from one another), it just gets stuck at the edge of the area it was on.

    I'll use the workaround described but I think it would be great to have the Agent.warp integrated.

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.