Skip to content

Script compilation fails if an NPC deleted in a content file is disabled

One of mods, which I tried, deleted several NPC's from game world, but left untouched calls in scripts like "Deleted NPC ID"->Disable. Such scripts still works in vanilla game, but fail with runtime errors in openmw:

Execution of script test_ref failed:
unknown ID: caius cosades

To better illustrate problem, I made an example mod. In vanilla mw, though I have deleted reference to Caius Cosades from his home, such start script worked and message box was shown:

begin Test_Ref
	short doOnce
	if (doOnce == 0)
		set doOnce to 1
		"caius cosades"->Disable
		MessageBox "Hello there!"
	endif
end Test_Ref

In openmw, I got aforementioned runtime error. I'd like to suggest handle such cases more gracefully, and dont stop script execution.

OpenMW version 0.43.0 Revision: b86118f7

(RM-4289 from redmine: created on 2018-01-10 by Good Better, )

Attachments: test_disable.ESP

Edited by redmine