Author Topic: Completing Multi-Player Quests  (Read 2016 times)

Legacy_Joshj5hawk

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Completing Multi-Player Quests
« on: July 22, 2010, 12:43:26 pm »


               Hi,
I'm new to the Aurora Toolset (i did go throught the tutorial) and was wondering a couple of things.
1.) Is it possible to write a scriipt (with the wizard preferably) that would hold a piece of conversation untill you kill all goblins for example.
2.) Is there a way to make it so when playing multiplayer in a created module, that when one person in a party completes the quest, the other(s) have it completed and recieve the rewards also.
Thanks in advance for any help '=]'
               
               

               
            

Legacy_rogueknight333

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #1 on: July 23, 2010, 03:41:53 pm »


               

Joshj5hawk wrote...

Hi,
I'm new to the Aurora Toolset (i did go throught the tutorial) and was wondering a couple of things.
1.) Is it possible to write a scriipt (with the wizard preferably) that would hold a piece of conversation untill you kill all goblins for example.


Yes, but if you don't want to do any scripting apart from what the wizard can do I would suggest that the simplest method would be to put a droppable item on the Boss Goblin with a unique tag (you probably don't need to worry if a few stragglers survive), and have the wizard make a script that checks if the PC has said item.

2.) Is there a way to make it so when playing multiplayer in a created module, that when one person in a party completes the quest, the other(s) have it completed and recieve the rewards also.
Thanks in advance for any help '=]'


Yes. Go to the "Actions taken" tab in the conversation line giving out the reward, click on the wizard, Check "Give Rewards," click Next, enter the gold and XP you want to hand out, and underneath each box click the "To party" box. That will generate a script giving out the indicated amount of gold and XP to the entire party. If you are giving out items or other more complicated rewards that won't be enough but it should get you started.

If this is insufficient you might inquire in the scripting forum about specific scripts to do these things. You will also find it difficult to continue without learning at least basic scripting so I would suggest you look at Bioware's Scripting Tutorial, if you haven't already. You might also want to check out the lexicon, which has some good beginning tutorials under the "Lyceum" section of the website (those are just what come to mind off the top of my head, there are other resources).
               
               

               
            

Legacy_SHOVA

  • Hero Member
  • *****
  • Posts: 893
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #2 on: July 23, 2010, 07:39:31 pm »


               If your going to start scripting, your going to want Lilacs: http://nwvault.ign.c...r.Detail&id=625 This is my favorite tool. I would be completely lost without it.
               
               

               
            

Legacy_Joshj5hawk

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #3 on: July 24, 2010, 07:02:31 am »


               Thank you rogueknight333, I found the answer to my second question shortly after.

But back to the first question, how complex would the script be for checking for instances of goblins, for example, and linking that to the NPC having a new dialogue, could you point me towards a good script tut?
               
               

               
            

Legacy_rogueknight333

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #4 on: July 24, 2010, 01:15:59 pm »


               There are a number of ways you could to it and it need not be complicated at all.

If the goblins have been generated by an encounter, all you need do is check if the encounter is still active.
Encounters are considerd to still be active not only when a player has not yet entered them but as long as the creatures they generated are still alive. So in the "Text appears when" conversation slot you would put something like:


int StartingConditional()
 {
   if (GetEncounterActive(GetObjectByTag("ENCOUNTERTAG")));
    return FALSE;
  return TRUE;
 }



Naturally for "ENCOUNTERTAG" substitue whatever tag the relevant encounter is actually using. Thus if the encounter has not been triggered, or has been triggered but not all creatures generated by it have yet been killed, that conversational line will not appear (returns False), otherwise it will (returns True). Note that a script stops running when it comes to a "return." So when setting up a conditional script like this one puts at the end the default (in this case "return TRUE"), what the script does if none of the conditions are met, and before that one or more conditions that could cause it to return false if any are met. When the script comes to a condition that causes it to "return FALSE," it stops and does that, so it will never get to the "return TRUE" at the end. One could also do the opposite, set up a conditional script so it will "return TRUE" (cause the conversational line to appear) if one or more conditions are met, but not otherwise.
If you are using preplaced goblins then make a custom goblin, go to the "OnDeath" slot in its scripts, open the script in that line ("nw_c2_default7", or if the script is "x2" something as some creature have replace it with nw_c2_default7) and add the following to it at or after line 29:


int nCount=GetLocalInt(GetModule(),"DEATHCOUNT");
SetLocalInt(GetModule(),"DEATHCOUNT",nCount+1);


Then USE "SAVE AS" TO SAVE THIS SCRIPT UNDER A DIFFERENT NAME, so the alteration don't apply to every standard creature you place. Actually you should probably save under a new name before making the change, just to be sure, and save again after. Also you don't have to name your integer "DEATHCOUNT", that's just an example, call the part in quotes anything you like. This will cause the variable "DEATHCOUNT" (or whatever you call it) to go up by one every time a creature with this death script is killed. Let's say you've placed ten goblins. If you don't want a conversational line to appear until all ten are killed you would put something like this in the "Text Appears When" script slot for that line:


int StartingConditional()
 {  
  if (GetLocalInt(GetModule(),"DEATHCOUNT")==10)
   return TRUE;
 
  return FALSE;
 }
 

Naturally if you are using multiple encounters or a combination of encounters and pre-placed creatures it gets a little more complicated. If you had 10 preplaced plus an encounter you might do something like:


int StartingConditional()
 {
 object oEncounter=GetObjectByTag("ENCOUNTERTAG");
  int nCount=GetLocalInt(GetModule(),"DEATHCOUNT");
 
  if (nCount < 10)
   return FALSE;
 if (GetEncounterActive(oEncounter));
    return FALSE;
   
  return TRUE;
 }


Here "oEncounter" and "nCount" are arbitrary names, you could call them something else. It's generally helpful to predefine relevant variables like this as I have done here for simplicity and readability, particularly if you are using the same ones more than once. There are still other methods you might use like looping through various objects to see if any are live goblins but that starts to get beyond the very basics of scripting. Hopefully this gives you an idea of how what you are trying to do might work. If none of this makes any sense, then I refer you again to the tutorials I linked to in my first post. This website might also be helpful.
               
               

               


                     Modifié par rogueknight333, 24 juillet 2010 - 12:18 .
                     
                  


            

Legacy_Joshj5hawk

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #5 on: July 24, 2010, 11:49:58 pm »


               Thank you very much '=]'

and I just got a little ahead of myself and missed the tutorials you had put in the first post. Thank you again.
               
               

               
            

Legacy_rogueknight333

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #6 on: July 25, 2010, 06:32:13 pm »


               Oops. The lines



if (GetEncounterActive(GetObjectByTag("ENCOUNTERTAG")))



and



if (GetEncounterActive(oEncounter))



ought not to have semi-colons after them as they do above. Typing a little too fast there.

   

               
               

               
            

Legacy_Joshj5hawk

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #7 on: July 26, 2010, 03:13:12 am »


               Hey it's okay, btw I played your Swordflight Chapter One and it's pretty cool.

Mind if I ask any other questions I have as I continue through my module?
               
               

               
            

Legacy_rogueknight333

  • Sr. Member
  • ****
  • Posts: 394
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #8 on: July 26, 2010, 03:50:02 pm »


               

Joshj5hawk wrote...

Hey it's okay, btw I played your Swordflight Chapter One and it's pretty cool.


Thank you.

Mind if I ask any other questions I have as I continue through my module?


You can of course post other building-related questions you have on this forum or in the scripting forum. I cannot guarantee that I personally will be around to answer  (I go through periods when I am distracted by other things and not participating in the forums regularly), or even that I will be the best-qualified to answer, but chances are someone will.
               
               

               
            

Legacy_Joshj5hawk

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Completing Multi-Player Quests
« Reply #9 on: July 28, 2010, 03:52:43 am »


               Okay cool thanks