Unna Oertdottir on 13/4/2016 at 06:32
How to change quest data with a dml?
In this case:
goal_max_diff_1 1
to
goal_max_diff_1 2
voodoo47 on 13/4/2016 at 11:19
if modifying an already existing qvar value is what you want, it should be
Code:
ObjProp XXX "TrapQVar"
{
"" goal_max_diff_1 2
}
with XXX being the obj id/number of the QVar marker. or check the Shadow of Doubt fixup dmls, I did some extra qvar dml stuff there.
Unna Oertdottir on 13/4/2016 at 12:12
Looks like it's a existing qvar. But where? Not on objects I guess.
It's written in Editors-->Quest Data. I need to edit/delete a line there with a dml. This is a final goal with a welcomeroom-script.
I already added a trigroomplayer script on that room and linked it to a qvartrap (which is working according to Dromed).
But I couldn't find a way to edit that line in Editors-->Quest Data.
voodoo47 on 13/4/2016 at 18:54
you can set the prop on a junk object via dml and link it to something that will fire it during the mission. the question, why would you want to do that if you can just edit the map? or can't you? it feels like you are misunderstanding the dml use a bit here.
Unna Oertdottir on 13/4/2016 at 19:16
I already put a TrigQVar-script on a junk object and linked the trigger to the object.
The problem is, that the quest data doesn't get overwritten. So I need find find a way to delete it or change it.
I'm fixing a mission and I don't want to do it in DromEd (in Dromed, it's easy).
I already fixed a big bunch of stuff with dmls. It works just fine. This is the last issue.
voodoo47 on 13/4/2016 at 20:17
you also need to put the script on the junk object. then check whether any errors are thrown out (dbmod_log 10 needs to be set in cam_ext) while the map is getting loaded into the regular exe (dbmod.log). if everything is good, check whether the prop is getting assigned after the trigger fires (dromed, set game_mode_backup 0 in dromed).
Unna Oertdottir on 15/4/2016 at 16:32
I can add
goal_max_diff_1 2
with an dml. I can see it in the quest data after setting game_mode_backup 0
but this is just an additional line in Editors--> Mission Quest Data
The 'old' "goal_max_diff_1 1" is still there. I think I need a way to wipe out that line completely. It's just troublesome.
voodoo47 on 15/4/2016 at 17:53
not much experience with goals, but I guess you need to tell it to modify an already existing goal somehow.
R Soul on 17/4/2016 at 00:27
I don't see anything in the documentation that suggests quest vars can be edited before the mission loads, but that's when objectives are initialized.
I just did an interesting experiment. I have a mission with a no-kill goal for Expert only, so I set up three TrapSetQVar objects, (actually I used the NV version, triggered on Sim). One of them set goal_min_diff_X to 0, the second set goal_visible_X to 1, and the third one set goal_state_X to 0 (when I first tested, it showed up as cancelled).
In game, on Normal, I saw the goal only after the mission loaded (makes sense), and when I killed someone the mission failed. The goal was marked as failed when I checked just before the 'failed' movie, but in the stats screen it appeared as 'incomplete'.
So it looked odd afterwards but everything else worked as it should.
Unna Oertdottir on 17/4/2016 at 14:02
Sounds interesting to me. May I have that demo?