Yandros on 10/7/2013 at 02:58
This thread is the closest I could find to my question.
I have a no kill objective in DCE mission 2 which is optional. I've verified that goal_optional_x is set to 1 and all the others (type, reverse, target) are set correctly. The problem is, it is marked as failed if I kill an AI, not canceled as I would expect. The behavior is the same when optional is 0, which is what I would expect in that case. Has anyone ever tried this before managed by standard scripts? Unless I find something dumb I did, I guess I'll have to remove its type and manage it using TrigSlain and a QVTrap to force it to canceled state, and I'll also have to manually manage the success condition as well. Ugh.
MysteryMan on 10/7/2013 at 14:52
Quote Posted by Yandros
This thread is the closest I could find to my question.
I have a no kill objective in DCE mission 2 which is optional. I've verified that
goal_optional_x is set to 1 and all the others (type, reverse, target) are set correctly. The problem is, it is marked as
failed if I kill an AI, not
canceled as I would expect. The behavior is the same when optional is 0, which is what I would expect in that case. Has anyone ever tried this before managed by standard scripts? Unless I find something dumb I did, I guess I'll have to remove its type and manage it using
TrigSlain and a
QVTrap to force it to canceled state, and I'll also have to manually manage the success condition as well. Ugh.
Do you have JAccuse on the ai ? gen.osm 1/G/2
When Slain, if the Player is the culprit, has a CulpableFor link to the culprit, or has a CulpableFor link to this object, then J'Accuse will be sent to the Player.
quest_create_mis goal_type_x, 2 Kill target Check to see if this is in your mission quest data.
Should be:
quest_create_mis goal_type_x, 2
quest_create_mis goal_optional_x, 1
quest_create_mis goal_reverse_x, 1
1=Steal
2=Kill
3=Loot
4=go to location
0=Incomplete =0
1=Complete =1
2=Cancel =2
3=Fail =3
If it is still being changed to =3 failed, then you might try deleting the quest data: quest_create_mis goal_type_x, 2 and re-type it. Sounds like the problem you are having may be a glitch, or you don't have JAccuse on the ai.
The no kill goal will cancel at the end of the mission when all other objectives have been completed, if the target was not destroyed.
Yandros on 11/7/2013 at 01:42
I'll double check, but if I didn't have JAccuse then it wouldn't be changing state at all when I kill an AI, I imagine. And as I said, I have all the Qvars set correctly and the objective changes state, it just goes to failed (3) instead of cancelled (2). I'm wondering if the LGS scripts even support optional reverse objectives correctly. I'm going to do some more testing tonight.
Quote Posted by MysteryMan
The no kill goal will cancel at the end of the mission when all other objectives have been completed, if the target was not destroyed.
No, it should go to complete (1) if I don't kill any AI at the end of the mission, not cancelled (2).
MysteryMan on 11/7/2013 at 02:05
Quote Posted by Yandros
I'll double check, but if I didn't have JAccuse then it wouldn't be changing state at all when I kill an AI, I imagine. And as I said, I have all the Qvars set correctly and the objective changes state, it just goes to failed (3) instead of cancelled (2). I'm wondering if the LGS scripts even support optional reverse objectives correctly. I'm going to do some more testing tonight.
No, it should go to complete (1) if I don't kill any AI at the end of the mission, not cancelled (2).
Okay, yep, should complete, and would show in objectives complete after the end of the game. Possibly another way would be to use qvartrigger to force the change.
In your objective, it is normal for the mission to fail if the no-kill is breached. You say you get an X if you kill the ai instead of cancel. So, the X is normal for failing a mission! Isn't the cancel just temporary until all of the other goals have been completed, then the optional,reverse goal completes, as long as the ai remains alive?
Yandros on 11/7/2013 at 03:10
It looks like my assumptions were incorrect.
Quote Posted by convict.doc by LGS
GOAL_OPTIONAL_n: The goal is scored normally, but it is not actually required to finish the mission. If the goal is still incomplete upon completion of the mission, it is marked cancelled.
So what I am seeing is in fact the expected behavior, and thus optional reverse goals are not possible with standard scripts. It would be easy enough to make its state cancelled when an AI is killed, but making it complete at mission end when I already have another final goal will be trickier. So, I think I'll just make it not optional.
If NV, kdau, telliamed or The Watcher ever are inspired to write a script that will handle this automagically, that would be great, but it's not a big deal.
kdau on 11/7/2013 at 21:41
Quote Posted by Yandros
If NV, kdau, telliamed or The Watcher ever are inspired to write a script that will handle this automagically, that would be great, but it's not a big deal.
Hmm...I'll take a look. As you said, the actual checking and fixing of goal qvars would be simple. The problem would be timing the fixes correctly to avoid being clobbered by VictoryChecker. Well, that and figuring out what to name the thing -
OptionalReverseObjectiveFix?
Oh, and happy birthday! :)
kdau on 17/7/2013 at 17:16
Quote Posted by Yandros
If NV, kdau, telliamed or The Watcher ever are inspired to write a script that will handle this automagically, that would be great, but it's not a big deal.
KDOptionalReverse is (
http://www.ttlg.com/forums/showthread.php?t=141906) now available in KDScript. :) There's some extra configuration needed (the visible version of the optional reverse objective is fake, while there's a hidden real one that's the opposite), but it manages to work around VictoryCheck.
Yandros on 18/7/2013 at 02:38
Oh my, that was fast! I haven't tried out your scripts yet, but will do so this weekend. This mission started Alpha testing yesterday but if I can get this back in for Beta 1 that would be wonderful. Thanks!