Project

General

Profile

Feature #4103

OpenMW-CS - extend verification to Script Text in TopicInfo

Added by Loriel 2 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Editor
Target version:
Start date:
09/13/2017
% Done:

0%

Severity:
Normal

Description

Verify is extremely useful for finding problems in mods / omwaddons in the CS.
Unfortunately it doesn't appear to cover the Script Text in TopicInfo.

Would it be possible to add this - either as part of the main "Verify" routine, or as a separate one, eg "Verify TopicInfo" ?

History

#1 Updated by scrawl . 2 months ago

  • Category set to Editor
  • Target version set to openmw-cs-1.0

This is supported in the game, with the --script-all-dialogue switch. We can also add this functionality in the editor. The process is a little complicated, because script compilation may depend on the actor's local variables and the actor depends on filtering process. For this reason there is a very small chance for false positives, if a script implicitely accesses a local variable of the actor it's meant for and the topic info's filter technically (but not practically, due to runtime states) allows that topic info to be used by other actors that don't have this local variable; but we've never seen this happen, and if it did, it's a simple fix to add an id-filter to stop the complaint.

#2 Updated by Loriel 2 2 months ago

Thanks for the pointer to --script-all-dialogue, which I hadn't noticed.
However that brings up its own problems. As the status of feature requests is under heated discussion at present, I will summarise here:
Using it on morrowind.esm I got a log file approximately 26,000 lines long.
There was one error, and what appeared to be the same sequence of warnings repeated numerous times - as it was 10 lines long, I assume it was repeated about 2,600 times.

Error:
error line 1, column 40 (Keep)
Unexpected name
compiling failed (dialogue script)
Choice "Give her the land deed' 1 "Keep the land deed" 2

Warning:
warning line 1, column 21 (to)
unknown variable (ignoring set instruction)
warning line 2, column 23 (to)
unknown variable (ignoring set instruction)
warning line 2, column 23 (to)
unknown variable (ignoring set instruction)
warning line 1, column 23 (to)
unknown variable (ignoring set instruction)
warning line 1, column 24 (Plantation)
Ignoring extra argument

Unfortunately in neither case was there sufficient information to locate the problem - the search function didn't bring up any suitable matches.
So two suggestions:
Log the TopicInfo ID as well as the warnings/errors.
Assuming the repeated identical warnings arise from running the same TopicInfo through multiple Actors, cut it back to a single Actor with saving on time and log length.

#3 Updated by scrawl . 2 months ago

Log the TopicInfo ID as well as the warnings/errors.
Assuming the repeated identical warnings arise from running the same TopicInfo through multiple Actors, cut it back to a single Actor with saving on time and log length.

Both good ideas.

There's no need to log the same output for the same script twice, just because it was tested with a different actor. (Or even compile the script more than once for the same set of local variable definitions).

Also available in: Atom PDF