This is how you set the quest flag for an NPC:
Code:
chr.quest.questflag.model = "questionmarkI";
chr.quest.questflag.model = "questionmarkB";
"questionmarkI" is for the "i" flag, which stands for tutorial or general information, and "questionmarkB" is for the standard quest flag (the question mark), I think.
"chr" stands for NPChar (non-player character object) -- either passed down into the function or defined at the start of it in a dialogue script like so:
Code:
ref NPChar;
makeref(NPChar,CharacterRef);
In the latter case use:
Code:
NPChar.quest.questflag.model = "questionmarkI";
To clear the quest flag, simply set it to empty:
Code:
chr.quest.questflag.model = "";
You'll find the lines setting these quest flags throughout files in the "scripts" and "dialogs" folders, and in the "loc_ai" folder in "LAi_utilities.c" and "LAi_utils.c".
Edit:
There is also a "questionmarkW", and "questionmarkY", though I'm not sure what these quest flag models stand for. You can find/see all available quest flag models in "RESOURCE/Models/quest_signs/".
Note that you can disable the showing of quest flags/marks directly in the game's settings. There's a checkbox for it you can tick on or off.