There really is no simple solution. It completely depends on what systems you are using in your module and what you need to add to your OnEnter script to make these systems work correctly.
To do this you need to understand how an include script works.
So here is a basic module OnEnter script with nothing added yet. All we do so far is just declare the entering object of the module as oPC. And we also add a second line that is just checking to make sure that the entering object is a player. If it is not a player then the script ends:
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
}
Now most systems, like Shayan's, use a major include script that has all kinds of functions in it that relate to that system. And some of these systems require you to add a line or two to your OnEnter script to make the system work correclty. You do NOT add the include script to the OnEnter script. You only reference it and use the correct OnEnter function. And in the case of Shayan's you would do this to your OnEnter script:
#include "sha_subr_methds"
<----reference Shayan's include scriptvoid main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
SubraceOnClientEnter();
<----the function from Shayan's include script}
When we just reference an include script at the top of another script we can use all the functions from that include script in our new one without having to rewrite or copy and paste everything in it.
So what the top line is saying is simply that we are going to include this script("sha_subr_methds") so that we can pull stuff from it that we need for our new script.
Now lets take our new OnEnter and add what we need from "_pw_journal_inc" to make it so that players journals are updated when they enter the mod.
#include "sha_subr_methds"
<----reference Shayan's include script#include "_pw_journal_inc"
<----reference Persistent Journal include scriptvoid main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
SubraceOnClientEnter();
<----the function from Shayan's include scriptRestorePersistentJournal( oPC);
<----the function from the Persistent Journal include script You will also notice that some of the functions require you to fill in some parameters. In this case you need to pass the entering object into it. And since we already declared and defined the entering object os "oPC" then we just plug that in.}
Understanding this and making sure that you add stuff from includes correctly to your other scripts will fix the first part of your problem.
The second part of your problem also has to do with includes.
You are using the plot wizard to pump out the quests. I know we already talked about this before and I won't attempt to deter you from doing that again. Instead we'll just work with that.
What the plot wizard scripts do, when a player finishes a quest, is update the journal of all the party members by default. If you open up one of the scripts that the wizard makes to accomplish this, you might see a line in it that looks something like so:
AddJournalQuestEntry("Quest1", 10, oPC,
TRUE, FALSE, FALSE);
or maybe just:
AddJournalQuestEntry("Quest1", 10, oPC);
If you see something like the first line then you need to change that TRUE to FALSE.
If you see something like the second line then you need only add the other parameter. So the new lines should look like so:
AddJournalQuestEntry("Quest1", 10, oPC,
FALSE, FALSE, FALSE);
or
AddJournalQuestEntry("Quest1", 10, oPC,
FALSE);
Doing this will make it so that the different quest states only changes for the one player and NOT his party members.
However. This will not fix your persistent journal. When a player leaves and the module is reset, the journal inforamation is also reset. So when the player comes back into the game they will be able to do the quests all over again.
The "_pw_journal_inc" script has different functions in it that replace the above functions with ones that update the journal AND store the information to an item. Then when a player enters the module, the information is retrieved from the item and their journal is rebuilt.
So you will have to go into everyone of your plotwizard scripts that update the journal and replace the lines you see above with a script that looks more like this:
#include "_pw_journal_inc"
<----reference to include scriptvoid main()
{
//stuff
AddPersistentJournalQuestEntry("quest1", 10, oPC, FALSE);
<----function from include script//maybe more stuff
}
Probably not what you wanted to hear. But as I said. There really is no simple solution.
Hopefully this helps. Good luck.
Modifié par GhostOfGod, 10 novembre 2010 - 06:25 .