Skip to main content

Editor

When creating or editing homebrew items, fields that accept Dragonscript will have an input area similar to the one shown below.

bonus 2 to character.athletics as insight;
Supports DragonscriptLine 1, Col 1

The main section of this area is where you can type. Directly beneath that, the text "Supports Dragonscript" identifies this as a space which accepts Dragonscript while also providing a quick link to this documentation. Finally, the bottom-right corner shows the position of the cursor when typing which can be helpful when locating errors.

When writing Dragonscript the input area will continuously parse and execute your statements to ensure there are no issues. If any issues are found, they will be reported immediately. There are two types of issues you may encounter: parsing errors and execution warnings.

Parsing Errors

Parsing errors happen when there is incorrect syntax among Dragonscript statements. Examples include missing ;, invalid or misspelt Properties or incomplete statements. In such a case, you will see errors like the one shown below.

bonus 2 to character.athletics as insigh;
Supports DragonscriptLine 1, Col 35
Error at Line 1, Col 35
Expecting Keyword 'racial'
Expecting Keyword 'theme'
Expecting Keyword 'dodge'
Expecting Keyword 'enhancement'
Expecting Keyword 'insight'
Expecting Keyword 'misc'
Expecting Keyword 'specialization'
Expecting Keyword 'shield'
Expecting Keyword 'circumstance'
Expecting Keyword 'morale'
Expecting Keyword 'focus'

In this case, the word "insight" has been misspelt and the error tells us that one of the actual Bonus Types was expected.

Parsing errors will include the Line and Column number where the error was encountered.

Execution Warnings

Execution warnings are reported when the Dragonscript code is syntactically correct, but the resulting Dragonscript may not have the intended effect. The example below shows the case of trying to add a bonus to a property for which that statememt doesn't make sense.

bonus 2 to character.feats as insight;
Supports DragonscriptLine 1, Col 1
Warning
Bonus: Cannot add a bonus or penalty to property 'character.feats' for Characters.