I seem to be having a conflict between plot assist flags and plot changes in the script below. I've been playing around with tags in the plots assists and there is definitely something not right.
When I take all my plot assist flags out then I get the "!" above my quest givers head but it won't leave, even after the creature team is killed. If I put a plot assist flag in for the ques giver when the plot is given it changes to the appropriated icon over the head of the quest giver "v" thing, but after the quest is done, it doesn't go away.
All of the journal entries change like they are supposed to. I've tried about all the combinations I can think of and am stumped.
I guess my question is (or at least my first one) is it possible to get my icons over my quest givers head to work without the plot assists using this script? If not, how should my plot assist flags be set? I have three main plot flags set in this order.
QUEST_ACCEPTED
QUEST_MIDDLE
QUEST_REWARD
#include "events_h"
#include "wrappers_h"
#include "plt_kill_the_dragon"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_TEAM_DESTROYED:
{
if(GetEventInteger(ev,0) == 1)
{
WR_SetPlotFlag(PLT_KILL_THE_DRAGON, DRAGON_STEW, TRUE);
}
break;
}
}
HandleEvent(ev, RESOURCE_SCRIPT_AREA_CORE);
}
Plot flags and Plot Assists
Débuté par
Sonmeister
, avril 18 2010 03:46
#1
Posté 18 avril 2010 - 03:46
#2
Posté 18 avril 2010 - 04:39
The "!" is the plot giver marker. It is turned on via the creature's blueprint (using the PlotGiver property) and turned on or off via scripting (using the SetPlotGiver function).
The "v" is the plot assist marker. It is has to be turned on and off via the plot flags. I haven't noticed a scripting function for this.
Coincidentally I just posted a demo module that includes turning both the plot giver marker and the plot assist markers on and off. If you look ACCEPTED flag in the script at the COMPLETED flag in the plot you'll see the markes being turned off.
Note that if you are using "Team Destroyed" event (as in your example) to drop the plot giver marker I don't think you can use "object 0" as I do in the demo (though I'm now off to test that). However assuming the plot giver has a unique tag (and they should) you can simply use GetObjectByTag.
The "v" is the plot assist marker. It is has to be turned on and off via the plot flags. I haven't noticed a scripting function for this.
Coincidentally I just posted a demo module that includes turning both the plot giver marker and the plot assist markers on and off. If you look ACCEPTED flag in the script at the COMPLETED flag in the plot you'll see the markes being turned off.
Note that if you are using "Team Destroyed" event (as in your example) to drop the plot giver marker I don't think you can use "object 0" as I do in the demo (though I'm now off to test that). However assuming the plot giver has a unique tag (and they should) you can simply use GetObjectByTag.
Modifié par Sunjammer, 18 avril 2010 - 04:53 .
#3
Posté 19 avril 2010 - 12:24
Thanks, Sunjammer. I downloaded your fedex mod and will take a closer look at it.
Upon further investigation. I have not edited my script any but I tried using your plot assist examples as help and it is basically doing the same thing. What I did notice is when I get the quest over the head of the quest giver it changes to "v" but on the map view a "!" shows along with the "v". Once the quest is done the "v" disappears and the conversations all work appropriately but the "!" still appears overhead. Anyway, more work to be done.
Upon further investigation. I have not edited my script any but I tried using your plot assist examples as help and it is basically doing the same thing. What I did notice is when I get the quest over the head of the quest giver it changes to "v" but on the map view a "!" shows along with the "v". Once the quest is done the "v" disappears and the conversations all work appropriately but the "!" still appears overhead. Anyway, more work to be done.
Modifié par Sonmeister, 19 avril 2010 - 01:03 .
#4
Posté 19 avril 2010 - 07:27
I am about to work on this samething for 2 quest givers I have. I had messed with it once and I had the same thing I'd get the ! and the V on the map. Can we ignore the plotgiver option on the character sheet int he toolset and set them as a plotgiver in scripts only?
#5
Posté 19 avril 2010 - 08:01
jsd313: You can completely ignore the plotgiver function or you can set it only in scripts. Leaving it set to false on the character options will have no effect on the actual plots or dialogues attached to the character.
What I have taken to is turning it on in the character, then turning it off via script (and leaving it off) as soon as the PC initiates a first conversation with the NPC (this is done in the NPC's script and I can use the same script for all plotgiver NPCs). All plot pointers from there on out are handled via the plot assist marker. It's nice because you can immediately see whom you need to talk to in a new area, but it avoids the annoying Slim Couldry Effect of catching your attention whether it's warranted or not.
EDIT:
Sonmeister: "but after the quest is done, it doesn't go away..."
One way to handle that is to make the last step of your quest talking to the quest giver (as opposed to killing the dragon) and turning it off at that point.
Example: Plotgiver: jackie_paper
Target: puff_dragon
In Plot kill_the_dragon you would have three flags:
0 START_QUEST (plot assist sets puff_dragon ON)
1 DRAGON_STEW (plot assist sets puff_dragon OFF, jackie_paper ON)
2 QUEST_COMPLETED (plot assist sets jackie_paper OFF)
You'll meet Jackie and get the quest (START_QUEST), then when you go to the dragon, there will be a plot assist over him. When it's dead (DRAGON_STEW), that one turns off and one above Jackie pops on. Then after you talk to Jackie (QUEST_COMPLETED), his marker goes off. The first and last flags will be set as an action attached to a line of dialogue, the second one will be set in your script above.
What I have taken to is turning it on in the character, then turning it off via script (and leaving it off) as soon as the PC initiates a first conversation with the NPC (this is done in the NPC's script and I can use the same script for all plotgiver NPCs). All plot pointers from there on out are handled via the plot assist marker. It's nice because you can immediately see whom you need to talk to in a new area, but it avoids the annoying Slim Couldry Effect of catching your attention whether it's warranted or not.
EDIT:
Sonmeister: "but after the quest is done, it doesn't go away..."
One way to handle that is to make the last step of your quest talking to the quest giver (as opposed to killing the dragon) and turning it off at that point.
Example: Plotgiver: jackie_paper
Target: puff_dragon
In Plot kill_the_dragon you would have three flags:
0 START_QUEST (plot assist sets puff_dragon ON)
1 DRAGON_STEW (plot assist sets puff_dragon OFF, jackie_paper ON)
2 QUEST_COMPLETED (plot assist sets jackie_paper OFF)
You'll meet Jackie and get the quest (START_QUEST), then when you go to the dragon, there will be a plot assist over him. When it's dead (DRAGON_STEW), that one turns off and one above Jackie pops on. Then after you talk to Jackie (QUEST_COMPLETED), his marker goes off. The first and last flags will be set as an action attached to a line of dialogue, the second one will be set in your script above.
Modifié par BillHoyt, 19 avril 2010 - 09:16 .
#6
Posté 20 avril 2010 - 01:01
Tried this as suggested and it still left the "!" overhead - or is that what you meant? I'm thinking there is a conflict in my conversation and plot assists now. Anyway, what I may do is start from scratch. It's kind of ridiculous how many combinations I've tried now and still can't get it to work quite right.
#7
Posté 20 avril 2010 - 02:01
Sonmeister wrote...
Tried this as suggested and it still left the "!" overhead - or is that what you meant?
It's not the same thing (my mistake). As Sunjammer mentioned, there is the Plot Giver Marker (!) and the plot assist marker (V). I was talking about the latter, which is what is set by plot flags.
If you want to use the (!) and then turn it off, set "Plot Giver" to true when you have the .UTC open (i.e. when you can see a picture of your plot giver). Then in that same place, set his script to this:
// -----------------------------------------------------------------------------
// plot_giver script
// -----------------------------------------------------------------------------
#include "events_h"
#include "plot_h"
#include "wrappers_h"
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
object oNPC = GetEventObject(ev, 0);
void main()
{
switch(nEventType)
{
case EVENT_TYPE_DIALOGUE:
{
// drop the plot giver flag ( ! )
SetPlotGiver(oNPC, FALSE);
}
}
HandleEvent(ev, RESOURCE_SCRIPT_CREATURE_CORE);
}
// -------- End Plot Giver Script
That way when you see the NPC the first time, he'll have (!), but as soon as you talk to him, it'll go away and never re-appear. From there you can manage everything with plot assists on the plot flags.
Modifié par BillHoyt, 20 avril 2010 - 02:11 .
#8
Posté 20 avril 2010 - 02:17
I would tend to drop the plot giver marker using a main plot flag when the quest is ACCPETED. However this is just a personal preference because I sometimes allow the player the option of "thinking" about a quest. In other words the quest has been flagged as AVAILABLE but has not yet been ACCPETED. This is exactly what happens in "Deep Roads Courier".
I guess at some point I should write up the "standard plot flags" article I started in the Mage of the Blood development wiki ...
I guess at some point I should write up the "standard plot flags" article I started in the Mage of the Blood development wiki ...
Modifié par Sunjammer, 20 avril 2010 - 02:18 .
#9
Posté 20 avril 2010 - 02:31
Sunjammer wrote...
I would tend to drop the plot giver marker using a main plot flag when the quest is ACCPETED.
Good call, and I can see how that might be helpful. My personal preference is to kind of "clear the board" early, so if the PC doesn't have the courtesy to tell the plot giver they don't want his quest, they don't ever have to think about it again.
#10
Posté 20 avril 2010 - 11:06
Ok, BillHoyt I tried out your plot giver script, still having similar issues. So do I put your plot giver script in the object inspector under my plot's kill_the_dragon script section or in my quest_givers script section? And, should I still do as you suggested earlier for my plot assists flags,
In Plot kill_the_dragon you would have three flags:
0 START_QUEST (plot assist sets puff_dragon ON)
1 DRAGON_STEW (plot assist sets puff_dragon OFF, jackie_paper ON)
2 QUEST_COMPLETED (plot assist sets jackie_paper OFF)
Or change it up some how?
BTW, thanks for all the input BillHoyt and Sunjammer - it's good to have the support. I am a hack, at best, when it comes to programming. I'm slowly getting a handle on scripts but I'm still best at copy and paste scripts.
In Plot kill_the_dragon you would have three flags:
0 START_QUEST (plot assist sets puff_dragon ON)
1 DRAGON_STEW (plot assist sets puff_dragon OFF, jackie_paper ON)
2 QUEST_COMPLETED (plot assist sets jackie_paper OFF)
Or change it up some how?
BTW, thanks for all the input BillHoyt and Sunjammer - it's good to have the support. I am a hack, at best, when it comes to programming. I'm slowly getting a handle on scripts but I'm still best at copy and paste scripts.
#11
Posté 20 avril 2010 - 11:12
Your quest giver script would go on the character.
#12
Posté 20 avril 2010 - 11:15
Thanks for the tips though guys, when I get back to doing that I'll know exactly what to do.
#13
Posté 21 avril 2010 - 01:09
Precisely, the plot giver script is attached to the plot giver. So when you come into the level, even before you do anything with any quests, you'll see the (!) above his head. Remember, the plot giver flag is "character-specific" (it is an attribute of a person, the plot giver) and not "plot-specific." Now when you talk to him for the first time it should disappear. If I were you, I would start over from scratch (it's not failure, it's practice) and only work on this part until it is correct - that way you can set it aside when you start working on your quest flags and not have to worry about mixing them up. It makes life much simpler if you complete one thing at a time.jsd313 wrote...
Your quest giver script would go on the character.
Once you are certain your (!) is working as you want, then move on to the script flags. It seems to me you have a handle on those, so that should not cause you too much trouble. Once you are comfortable with the whole process, if you like Sunjammer's idea of turning the plot giver (!) off when the quest is accepted, you can move the code to do so without much trouble.
One strategy for attaching scripts: when you get someone else's script and you don't know where it goes, take a look at the last statements to see what script it defaults to. If you see "HandleEvent(ev, RESOURCE_SCRIPT_CREATURE_CORE);" then it's a "creature" script and will be attached to a creature like a monster or an NPC. If you see "AREA_CORE" then it's an area script that will be attached to an entire area. Watching for that will also give you a feel for what events are handled where.
Modifié par BillHoyt, 21 avril 2010 - 01:17 .
#14
Posté 21 avril 2010 - 10:40
Alright, all plot flags are working and the (!) is disappearing with the plot giver script. The reward of 3000 XP is still not being given though. I'll try a couple other things and get back to you.





Retour en haut






