Is there any way to initiate a character or swf reset within a dialogue?
A complete reset probably isn't what you want, because it would discard much of the dialogue "state" information. You'd successfully remove the unwanted bit of clothing, but the next line might be
"Hello, nice to meet you. I'm a sexy librarian!" or whatever.
I'm fairly certain that dialogueActions can run arbitrary snippets of code. You'll need to consult with the expert dialogue writers (or
@Pim_gd himself) to get the exact syntax. Once you've got that, one (or both) of the following lines might suffice.
g.characterControl.initChar();
g.customElementLoader.clearInstancedMods();
There is a swf file that ignores override and includes several body locations that will not cleanly remove through the {"set":{"da.clothes. command.
Probably a Loader mod. If you can identify the specific file then we might be able to troubleshoot. In some cases it's possible to repackage a Loader mod as a vanilla import (which will load/unload more reliably).
But your main idea is correct. It should be possible to discard unwanted clothing or body-mods by invoking a customized dialogue line.
Re-loading the entire character definition is possible, but it's less tidy.
l.loadCharString("Alice");
; assuming that the Character Folder is named Alice
The problem here is that you need to know exactly what the character's name is. And your dialogue will break if someone downloads it and then renames or reorganizes their files. So I'd recommend either the "reset via dialogue code" approach, or the "fix the misbehaving mod so that it unloads properly" approach.