Open ash-r1 opened 3 years ago
Ah, I totally forgot about the label feature...
occurence_counter
would be reset if entered into the next label area in a script.HASH(["haruhi-1", label, "I'm Haruhi Suzumiya, from East Junior High.", occurence_counter]).
NOTE: 【プラグイン】文単位既読システム http://tempura9357.blog.fc2.com/blog-entry-57.html#more
It counts the number of being read sentences after the label.
It would be nice because it does not exhaust storage than my idea. But it doesn't work if the developer inserted sentences into the script.
VN.js will detect if the sentence already read, as other Visual Novel engines are already doing it.
Basically, it might be controlled with the
scenario's filename
and thesentence
.For example, if we have a short script below:
In this case, the already-read-sentence-detection system may save a hash like
HASH(["haruhi-1", "I'm Haruhi Suzumiya, from East Junior High."])
-ish.It may work with almost all cases, including if the developer upgraded the game, modified/appended/deleted sentences.
But, let me think of an edge case, what if we have exact same sentence in the same file. The system misunderstand it's already read.
To solve this problem, the releasing system should manage the occurrences counter of each sentence in the file, use this counter in the hash.
So, let's append this counter into our hash, it may work fine:
HASH(["haruhi-1", "I'm Haruhi Suzumiya, from East Junior High.", occurence_counter])
.If I realize other edge cases, this spec can be improved. Please give me your advice.