DialogueChecker (Latest version: V3.07, 18 December 2016) (1 Viewer)

Pim_gd

Content Creator
Joined
Jan 25, 2013
Whats the error that dialogueactions gives

as for colons in the text, that ought to get removed as a check, I think it's a baseless check, nothing can really go wrong with them I think

Replacing with %3A should work fine without side effects though..., so there's that too if you find it annoying
 
Last edited:

jase

Vivacious Visitor
Joined
Jun 4, 2014
Whats the error that dialogueactions gives
I don't recall or have time to get exact words, but it's the same error it gives when using LOAD_CHARCODE without setting da.charcode.load anywhere in the line. And if I use multiple APPENDs in the same line, the error message will be repeated for each, even though LOAD_CHARCODE is only used once.
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
I don't recall or have time to get exact words, but it's the same error it gives when using LOAD_CHARCODE without setting da.charcode.load anywhere in the line. And if I use multiple APPENDs in the same line, the error message will be repeated for each, even though LOAD_CHARCODE is only used once.

hmmh well APPEND does internally trigger a get + a set, so it does write to da.charcode.load per each call, which triggers the associated action...

Hang on...

You can't just "APPEND" to a write-only variable. If you can't read it, but try to read it anyway, weird things happen.

Do not do this. Build your own variable string.

[SETVARBYNAME_customCharCode_baseCode][APPENDVAR_customCharCode_charName%3A][APPENDVARBYNAME_customCharCode_firstName][SETVARBYNAME_da.charcode.load_customCharCode][LOAD_CHARCODE2]

And if DialogueChecker complains about it then it's because it's bad style to append to a variable that is a function that takes variables (the sole reason I have it like that is because the variable system allows writing stuff outside of triggers)...
or w/e it's late all I know is using the above set of triggers ought to fix any issues
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
May 7, 2016
Introducing v3.03!
- added support for AnimToolsv15
- added support for [LOAD_CHARCODE2]
- added a reminder for the use of #DialogueChecker-NoDoubleSpace# in double space issues to improve UX
- added two checks for angled quotes (one check for a line which looks like a line but has angled quotes instead of normal ones, and one check that hints that your angled quotes may be an issue if you have an uneven number of double quotes if the line contains angled quotes)
- added extra info for triggers that refer to undefined lines where if it finds a line that looks like it should have been the line you're pointing at, it will tell you to look at that line to see if there's something wrong with it. This is useful if the parser keels over and fails to see something as a line, like with angled quotes.
- made the static text like "Made by Pimgd" and the instructions at the top non-selectable. Version number still selectable because people might want to copy that...?
Download link in OP, and on the downloads page of the BitBucket repository.

So last time around, when I added "support" for animtools v14, I think I missed all the dominant variables. Or maybe they got added in v15. Anyway, they're in now, so that's fixed.

This version mostly has minor polishing features again. Short of allowing object variables or multi-file dialogue checking, there really isn't much more to add to the DialogueChecker. And those features would be pretty dang hard. I also had an idea for allowing check templates, where you do something like "checkFor(string, template, severity, type)" to make the code easier to read for simple checks. Templates would be something like "Hey dunce you spelled 'wrong' wrong on line %linenumber%, near %snippet%.%linebreak%You could prevent this by using a spellchecker next time.%linebreak%", and the function call would be something like checkFor("worng", "Hey dunce you spelled 'wrong' wrong on line %linenumber%, col %col%, near %snippet%.%linebreak%You could prevent this by using a spellchecker next time.%linebreak%", Severity.MINOR, "Grammar"). Of course DialogueChecker is not supposed to be a spellchecker, but replace "worng" with "]]" and you got a neat syntax check.

Right now such a check looks like this:

Code:
if (line.indexOf("]]") != -1) {
	issueSnippet = StringFunctions.getSnippet(line, "]]");
	issueMessage += "Double trigger closer on line " + l.getLineNumber() + ", col " + (line.indexOf("]]")) + " near \"" + issueSnippet + "\"" + linebreak;
	issueMessage += "Line " + l.getLineNumber() + ": " + l.getRaw() + linebreak + linebreak;
	issue = new Issue(Severity.MAJOR, l, issueSnippet, issueMessage, "Syntax");
	addIssue(issue);
	issueMessage = "";
}

And this is pretty okay, but rather repetitive. Plus it looks scary when there's 15 of those checks one after another.
SyntaxChecker actually has 15 of those simple checks - okay, there's 1 or 2 in there that are a bit more complex, but this extra complexity is lost in the rest of the checks. You can't see the important parts of the code, so to say.

And then there's the part where every modern piece of software these days seems to be localizable by putting all its strings in a separate file. There's not a big enough user base that you'd WANT to localize a mod or tool (heck, I think only SDT on its own sees enough use to be localizable), and jumping on the bandwagon is a bad thing to just do like that, but that's another feature I don't have.

Right now it seems pretty clear to me however that DialogueChecker (and DialogueActions, for that matter) are both in long-term maintenance now - just fixing issues here and there, with months (if not a full year) between updates. I don't mind, it'd be tough if this is something I'd have to work on every weekend, but I would say that this is about as far as it'll go. Adding a new big feature seems like something that's not worth it - who's gonna use it? - when compared to the time I'd have to put in.

---

Then again, when I look at the dialogues that get posted here in the Dialogue sub-forum, there's some stuff in there that pretty much only exists because there is a DialogueChecker - for without it, tracking down all the bugs would be such a pain that it'd be hard and time-consuming. So I guess there are people who depend on the tool. Especially seeing that the v3.02 swf on FastSWF had 1828 views felt good. Or the download counter on bitbucket - 289 downloads. I don't know how many repeat customers that is, but it's not just 4-5 guys in a basement somewhere.
 

DrZombi

Content Creator
Joined
Jul 10, 2016
Hi Pim_gd Pim_gd ,

Since I've worked on a mod (not published yet) which add triggers to DA, I am now in a situation where DialogueChecker is firing a lot of alarms about them (I can confirm that I, like a lot of people heavily relies on your work to save a loooooot of time when writing dialogues, so thank you for this!).

And I was wondering how I could get rid of them. I'm not sure that just asking you to add the triggers to your whitelist would be a good idea because someone who would not use my mod would still be able to add the Triggers to his dialogue, and the checker would not bother at all when it should indicate something. Or maybe with a checkbox unchecked by default ? I think that the users of Colin's mod have the same problem.

It would probably be possible to add some sort of API or settings file to let people add their own custom triggers at startup, what do you think ? That would be some work now but you would not have to maintain any list yourself later.

If you do not want to bother about this at all, just tell me, I think that with your open source code I should be able to just create my own version of DAChecker to ship with my mod for those interested (like me :p)
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
DrZombi DrZombi

I am already working on something which should fix the issues with having to constantly update the checker for when a mod updates the exposed dialogue functionality. Should be done either today or tomorrow, I hope.
 
Last edited:

DrZombi

Content Creator
Joined
Jul 10, 2016
Leo.jpg


;)
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
August 24, 2016
Introducing v3.04!
- Added the ability for modders to define their own triggers and variables which the DialogueChecker will treat as "belongs to a mod" (more details below, after the changelog)
- Fixed a bug with angled double quote validation which caused any double quotes mismatch to also tell you about angled double quotes.
- Added a check for a double quote mismatch which DOES have a matching single quote to help people spot mistakes
- Made crashes hopefully display more than just "null" when not ran using a debugger.
- Fixed "dependancy"-> "dependency"... it was everywhere
- Internal work on enums, made it more compact, see Enumerations via reflection in AS3 if you're interested in that sort of technical stuff
- Fix a crash that occurred with the check attribute not having an object but a string value (in situations like {"check":"haha"})
- And added checks to warn people of that as well
Download link in OP, and on the downloads page of the BitBucket repository.

So... this version brings an interesting feature - the ability for people to define their OWN triggers and variables! Mostly it's because I'm a lazy bastard - I can't be arsed to keep the programming up to date with the latest list, and other people can't be arsed to tell me what they added or removed. It looked weird in code too (Pim_gd / SDTDialogueChecker / source / src / TriggerType.as — Bitbucket do you see those long ass lists of triggers?)... it really should be moved to external files!

For now, you'll have the ability to do the following:
- You can specify a list of strings which, when matched directly for a trigger, ignore that trigger as "there are no lines corresponding to this trigger". This is what you'd call simple trigger support ([BLINK]).
- You can specify a list of strings which, when matched directly for a variable, ignore that variable as "you haven't defined this variable in initial_settings". This is support for variables.
- You can specify a list of strings which, when a trigger starts with such a string, ignore that trigger as "there are no lines corresponding to this trigger". This is what you'd call complex trigger support ([PLAY_BGM_<file>]).

For modders:
You'll have to make a JSON file containing a couple strings. In the documentation, there's an example, so you can just copy that to a new text file and replace a few bits of text. This should be 5 minutes work to do the first time, and less than 2 minutes work to update a list (less than 1 minute if you know where you kept the previous version). You can follow the dialogue write procedure to test your work.

For Dialogue Writers:
You'll have to pester (or write yourself!) modders to create a text file which contains settings that the checker can use. To use those settings, you'll have to download the zip archive, extract it in a folder, and then do the following:
- Take the settings file that you got from the modder
- Put it in the same folder as the DialogueChecker
- Edit includes.txt to include the new file you're adding (just like you would do when adding a mod to Mods.txt in $INIT$)
- Restart the DialogueChecker, then hit the "credits" button (near the bottom, in the middle), and scroll down to see if the file is listed and if it imported properly.

There's documentation included in the archive download which covers how to write an include file, but the format looks like this:

Code:
{
	"author":"Pimgd",
	"version":1,
	"mod":"DialogueChecker example import file",
	"variables": [
		"banana"
	],
	"simpleTriggers": [
		"APPLE"
	],
	"complexTriggers": [
		"BANANA"
	]
}

It should not be hard to write.

If you have questions, let me know ( DrZombi DrZombi ?) and I'll try to respond in time.
 

DrZombi

Content Creator
Joined
Jul 10, 2016
If you have questions, let me know ( DrZombi DrZombi ?) and I'll try to respond in time.

Yep ! That's what I call a perfect timing ! Thanks for this, it will ease the work of everyone !
I'll try it as soon as possible and let you know by editing this post when it's done :)

EDIT: I have no questions so far, it works perfectly :)

In the meantime, if you could just add the [LOAD_CHARCODE3] to DialogueActions. (pleaaaaaaaase). I'm not sure that I can do it in my own mod since this function is really linked to the core of DA because of the LineListeners, etc... (or that's how I understood it). So I think it really belongs to the original Mod.
I could of course continue to pick your sources at each release of DA and re-add the code like I did today with your 4.03 but that would be a pain in the ass to re-do it for each release and I really think that I am not the only one who's in need of an absolute "just paste my untouched charcode in the GUI and GO".

In case you don't know what the fuck I am talking about, this is what I asked you in my last post here:
Pim_gd's Mods - DialogueActions v4.03 (22 Aug 2016)
 
Last edited:

Pim_gd

Content Creator
Joined
Jan 25, 2013
September 4, 2016
Introducing v3.05!
- Support for DAv4.05, including adding the missing DELETELOCALS trigger and adding LOAD_CHARCODE_FULL from v4.04
- Added checks for lines that contain "finish" in the name because SDT eats them as "finish lines"
Download link in OP, and on the downloads page of the BitBucket repository.

Finish is SUCH a pain to run into. You can be banging your head on a wall going "this doesn't make sense!" and your line will just refuse to load. These checks should make it easier to catch such situations.
 

DrZombi

Content Creator
Joined
Jul 10, 2016
Hi Pim_gd Pim_gd !

Just wanted to know if you had any plans to include custom line types as well in the JSON declaration.
Because I just happened to add a new type of line through my Mod and of course DC tells me that it will never be played since there is no explicit call in the dialogue itself. Not a major problem but still, if I could tell DC that this line type is fine, that would be great :smile:

(Also, my mod is based on the DAv4.06dev that you provided to me, and I won't be able to release it if you do not make this build official. Not urgent at all since I still have a lot of work on some dialogues and triggers before my next release, but I just wanted you to not forget to publish the modifications that I needed, now that I have tested and confirmed that it is ok).
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
October 2, 2016
Introducing v3.06!
- Add support for SETVAR with simple inputs e.g. [SETVAR_x_10], [SETVAR_x_+=10], [SETVAR_x_-10], [SETVAR_x_-=10], [SETVAR_x_bob] so that these are parsed as regular sets (Fixes false positives when using SETVAR instead of set lineattribute)
- Added support for custom lines via include files via lines attribute
- Some internal cleanup via utility functions, so there might be some new bugs
Download link in OP, and on the downloads page of the BitBucket repository.

Looking at the changelog, that's a tiny list of new features for all the work I put in. I guess the refactoring took most of the work - I think I managed to get rid of about 5% of the code for parsing a dialogue, which helps loads because that code is already complex enough.
 

aztlan

Casual Client
Joined
Sep 14, 2013
Thanks for all your work on this.

What's this:
  • Added support for custom lines via include files via lines attribute

What is a custom line? What mod calls them? Any examples or dialogs with examples?
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
Think of DialogueActions with the start line.

A mod could add linetypes like that, and then the dialoguechecker would complain about them as, well, you're not actually calling them via triggers or the next line-attribute (like this)

Code:
intro:"[start]"
or
intro:"blah blah blah" {"next":"start"}

So the checker thinks the line is unused. Where as the start line is called not by the dialogue, but by the mod - DialogueActions in this case.
Now, support for DialogueActions and Animtools are already built in, so you don't need a include file for the checker to handle dialogues that make use of those mods. But when you're gonna use DrZombi DrZombi 's MoreTriggers mods and others of his, you'll need such an include file to stop the DialogueChecker from complaining about all the triggers that the checker doesn't know about because they were added by MoreTriggers. DrZombi DrZombi had let me know that he wants to add a few lines of his own as well, so I added the ability in the DialogueChecker to support this.
 

DrZombi

Content Creator
Joined
Jul 10, 2016
What mod calls them? Any examples or dialogs with examples?

Hi A aztlan ,

This will go along with the new version of MoreTriggers where I added a trigger which lets you roll credits (at the end or the start or whenever you want in your dialogue) and another trigger to put a splashscreen on the foreground for a defined time. I added two new types of lines which are called just after the splashscreen disappears or when the credits are finished so that you can hook back well with your dialogue lines and not have to rely on intro or general lines with variables checking to get back on your feet.

Of course, the DialogueChecker include json file will be shipped with MoreTriggers as usual :smile:

As for dialogue examples, I'll upload the new version of MoreTriggers when I have finished the dialogue that I am currently writing which will be a good example of what you can do with credits rolling (One "standard" credits rolling at the end of the Ghostbuster dialogue and one more advanced use to show how you can recreate the star wars crawling text at the start of a dialogue for example :wink: (Yep, I initially made this feature just for that :tongue:).
 

Pim_gd

Content Creator
Joined
Jan 25, 2013
December 18, 2016
Introducing v3.07!
- Support for DAv4.07
- Fix a bug where the checker falsely reports about lines with line-attributes containing finish even although the lines don't have line-attributes
- Add suggestions for when triggers haven't been capitalized properly e.g. [Clean_all] ("Perhaps you meant [CLEAN_ALL]?")
- Add check for misplaced line attributes (new line between line content and line attributes)
- Some cleanup of the code to make it easier to put an issue as "first" for a line
- Fix typo "punctation" -> "punctuation" in issue messages
Download link in OP, and on the downloads page of the BitBucket repository.

Mostly a release to get back to "basic" support of DialogueActions. I don't know how I'm going to support multiple dialogue files yet (and I don't know if I ever should). It might be up to the user to just, if they're going to import dialogues, handle this in the checker themselves by pasting two dialogues into the input box.

I've added a few checks based on dialogues I had seen - goal of these checks is mostly to get rid of as many "DOH!" moments as possible.
 

Rudgar

Content Creator
Joined
Nov 18, 2016
Beside some other problems I'm working on this test dialogue, the dialog checker says "x" unused, which is wrong (see line 17)
Code:
#DialogueChecker-IgnoreObjects#
all:"CLEAR"

initial_settings:{"x":"*", "constant.slavename.f.max":30, "constant.slavename.f.1.taken":0, "constant.slavename.f.1.text":"Abda", "constant.slavename.f.2.taken":0, "constant.slavename.f.2.text":"Alexina", "constant.slavename.f.3.taken":0, "constant.slavename.f.3.text":"Alica", "constant.slavename.f.4.taken":0, "constant.slavename.f.4.text":"Amanda", "constant.slavename.f.5.taken":0, "constant.slavename.f.5.text":"Ashanti", "constant.slavename.f.6.taken":0, "constant.slavename.f.6.text":"Atta", "constant.slavename.f.7.taken":0, "constant.slavename.f.7.text":"Becca", "constant.slavename.f.8.taken":0, "constant.slavename.f.8.text":"Ceceilia", "constant.slavename.f.9.taken":0, "constant.slavename.f.9.text":"Chantal", "constant.slavename.f.10.taken":0, "constant.slavename.f.10.text":"Charlotte", "constant.slavename.f.11.taken":0, "constant.slavename.f.11.text":"Chloe", "constant.slavename.f.12.taken":0, "constant.slavename.f.12.text":"Denise", "constant.slavename.f.13.taken":0, "constant.slavename.f.13.text":"Forwyn", "constant.slavename.f.14.taken":0, "constant.slavename.f.14.text":"Ganyma", "constant.slavename.f.15.taken":0, "constant.slavename.f.15.text":"Hany", "constant.slavename.f.16.taken":0, "constant.slavename.f.16.text":"Ivie", "constant.slavename.f.17.taken":0, "constant.slavename.f.17.text":"Jacqueline", "constant.slavename.f.18.taken":0, "constant.slavename.f.18.text":"Jala", "constant.slavename.f.19.taken":0, "constant.slavename.f.19.text":"Keily", "constant.slavename.f.20.taken":0, "constant.slavename.f.20.text":"Lucy", "constant.slavename.f.21.taken":0, "constant.slavename.f.21.text":"Malaika", "constant.slavename.f.22.taken":0, "constant.slavename.f.22.text":"Neyla", "constant.slavename.f.23.taken":0, "constant.slavename.f.23.text":"Nubia", "constant.slavename.f.24.taken":0, "constant.slavename.f.24.text":"Mary", "constant.slavename.f.25.taken":0, "constant.slavename.f.25.text":"Patty", "constant.slavename.f.26.taken":0, "constant.slavename.f.26.text":"Phibe", "constant.slavename.f.27.taken":0, "constant.slavename.f.27.text":"Rebecca", "constant.slavename.f.28.taken":0, "constant.slavename.f.28.text":"Ruth", "constant.slavename.f.29.taken":0, "constant.slavename.f.29.text":"Saba", "constant.slavename.f.30.taken":0, "constant.slavename.f.30.text":"Zola", "constant.slavename.m.max":20, "constant.slavename.m.1.taken":0, "constant.slavename.m.1.text":"Abram", "constant.slavename.m.2.taken":0, "constant.slavename.m.2.text":"Absolom", "constant.slavename.m.3.taken":0, "constant.slavename.m.3.text":"Alam", "constant.slavename.m.4.taken":0, "constant.slavename.m.4.text":"Ammar", "constant.slavename.m.5.taken":0, "constant.slavename.m.5.text":"Andre", "constant.slavename.m.6.taken":0, "constant.slavename.m.6.text":"Antony", "constant.slavename.m.7.taken":0, "constant.slavename.m.7.text":"Ben", "constant.slavename.m.8.taken":0, "constant.slavename.m.8.text":"Bob", "constant.slavename.m.9.taken":0, "constant.slavename.m.9.text":"Daniel", "constant.slavename.m.10.taken":0, "constant.slavename.m.10.text":"Edwin", "constant.slavename.m.11.taken":0, "constant.slavename.m.11.text":"George", "constant.slavename.m.11.taken":0, "constant.slavename.m.12.text":"Homer", "constant.slavename.m.11.taken":0, "constant.slavename.m.13.text":"Jacob", "constant.slavename.m.11.taken":0, "constant.slavename.m.14.text":"Jim", "constant.slavename.m.11.taken":0, "constant.slavename.m.15.text":"Jon", "constant.slavename.m.11.taken":0, "constant.slavename.m.16.text":"Lewis", "constant.slavename.m.11.taken":0, "constant.slavename.m.17.text":"Oscar", "constant.slavename.m.11.taken":0, "constant.slavename.m.18.text":"Paolo", "constant.slavename.m.11.taken":0, "constant.slavename.m.19.text":"Tom", "constant.slavename.m.20.taken":0, "constant.slavename.m.20.text":"Zek"}

intro:"[get_random_slavename_INSTANT]" {"style":"Him"}
general:"[get_random_slavename_INSTANT]" {"style":"Him"}

get_random_slavename_INSTANT:"[get_random_slavename_f_INSTANT]" {"style":"Him"}
get_random_slavename_INSTANT:"[get_random_slavename_f_INSTANT]" {"style":"Him"}
get_random_slavename_INSTANT:"[get_random_slavename_f_INSTANT]" {"style":"Him"}
get_random_slavename_INSTANT:"[get_random_slavename_m_INSTANT]" {"style":"Him"}
get_random_slavename_INSTANT:"[get_random_slavename_m_INSTANT]" {"style":"Him"}

get_random_slavename_f_INSTANT:"[SETVAR_slavename.gender_f][get_random_slavename_limits_INSTANT]" {"style":"Him"}
get_random_slavename_m_INSTANT:"[SETVAR_slavename.gender_m][get_random_slavename_limits_INSTANT]" {"style":"Him"}

get_random_slavename_limits_INSTANT:"[SETVAR_random.min_1][SETVARBYNAME_random.max_constant.slavename.*slavename.gender*.max][get_random_slavename_index_INSTANT]" {"style":"Him"}

get_random_slavename_index_INSTANT:"[SETVAR_random.result_*( ( da.random x ( random.max - random.min + 1 ) ) \ 1 ) + random.min*][get_random_slavename_name_INSTANT]" {"style":"Him"}

get_random_slavename_name_INSTANT:"[SETVARBYNAME_slavename.result_constant.slavename.*slavename.gender*.*random.result*.text][set_random_slavename_taken_INSTANT]" {"style":"Him"}

set_random_slavename_taken_INSTANT:"[SETVAR_constant.slavename.*slavename.gender*.*random.result*.taken_1][get_random_slavename_done_INSTANT]" {"style":"Him"}

get_random_slavename_done_INSTANT:"Result %3A *slavename.result*" {"style":"Him"}
 
Last edited:

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.