Forum rules - please read before posting.

[Feature Request] Give matching lines the same ID

edited July 2018 in Engine development
Hey, we currently have "Give matching speech lines the same ID?", but it would be great to also have a similar option for any type of matching translatable lines, not just speech (hotspot names come to mind).

Edit: Also a bug on the same topic: When gathering text former duplicate lines that had the same ID from a previous gather, get flagged as warnings for being duplicate and they get replaced with a new ID. Then that new ID gets replaced back to the old one. This results in some unnecessary scene loads when gathering text (to restore id's to the ones that were good to begin with), a bunch of warnings in the editor and a constantly incrementing upcoming lineID value (upcoming actual new item may end up having a very high lineID, since every gather in this scenario bums it up).

Comments

  • I'll consider the matching lines option working for non-speech lines, thanks for the suggestion.

    As for the bug report: the additional scene loads are certainly necessary, because the operation can only run succesfully once all lines have been gathered completely.  It's true, however, that any new IDs are added onto the "last set" ID value, but this can be made optional so that new IDs are given the first-available ID value, as opposed to one larger than the highest set.  Would that be agreeable?
  • Oh, I reread my post and I phrased the bug report poorly. All the things you mentioned are absolutely fine and within reason as they are. The bug part goes like this:
    1) I have two speech lines in different places:
    #1: "Hey there!"
    #2: "Hey there!"

    2) I click gather text. #1 Gets assigned let's say id 44, #2 Gets assigned id 45

    3) The script part that merges duplicates runs, #1 and #2 both now have id 44 (all is fine up to this point)

    4) I click Gather text, again. With no changes to the project.

    5) #1 has id 44, all is well.

    6) #2 has also id 44. Gatherer throws a console warning that the same id's are present, assigns 46 to #2

    7) The script part that merges duplicates runs, #1 and #2 both now have id 44

    While in general the end result is good, all the issues stem from the false flags at step 6. If not for the slight glitching at step 6, the incrementation of id distribution, the reloading of scenes etc. would be completely irrelevant. But because of the step 6, id distribution number gets bumepd up by a lot during every gather, and every scene that ever had a duplicate line (regardless of whether that line was handled before, gets it reassigned).


  • So the issue is that it "consumes" #46 during the process, so that any new line assigning starts from #47?

    I was clear on that.  Again, a workaround could be to provide an option to allow the recycling of unused ID numbers (which was previously the case in older releases).  Would that work for you?

    Regarding the merging of non-speech lines: that's actually a lot more tricky than I'd thought of at first glance (actually this is the reason such a behaviour is not already implemented).  With speech lines, AC knows exactly where to find duplicates (though it still has to search), but with others it becomes less apparent and prone to errors.  I feel I'd rather have things be safer and stay the way they are - admitted annoyance of duplicate Hotspot names aside.
  • Actually, I think the workaround may be simpler than that.  In SpeechManager's GetEmptyID method, try removing the line:

    if (lastEntry > maxID)

    So that maxID is always set as the highest-assigned ID number, regardless of what's come before it.  Does that have things work as you intend?

  • edited July 2018
    Yeah, that worked well. Console still gets flooded with warnings, but on the technical side, everything seems alright.

    Will you be incorporating the suggested edit into the official releases?
  • I can't say yet - that was more of a test to learn the issue better.  I'll certainly be looking into it, whatever the "true" solution is.
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.