Aller au contenu

Photo

Conversation editor questions


1 réponse à ce sujet

#1
FalloutBoy

FalloutBoy
  • Members
  • 580 messages
Was reading about the conversation editor on the wiki. A lot of cool stuff there, but I did have a few questions.

1. It appears that plot editor only supports flags. In fact it looks exactly like the old journal editor. How would you implement a counter if you wanted to the player to kill 10 monsters before setting the plot flag that the quest is complete? I read somewhere about registering global variables in a table somewhere, but I don't remember.

2. Furthermore, it looks like a conversation line condition can test a flag, but not multiple flags. So if I had some dialog with multiple prerequisites, I take it I would need to use a script instead, or is there an easier way?

3. In NWN there was no way to pass parameters into a script from the conv editor. This resulted in you having to make a metric assload of little scripts that tested various flags and counters against magic numbers. It was an organizational nightmare. NWN 2 fixed this, thank god, by allowing you to pass parameters into scripts. Please tell me there is a way to do this in Dragon Age. I see a parameter field on the conv editor, but it isn't clear how flexible this is or how it works.

#2
DavidSims

DavidSims
  • BioWare Employees
  • 196 messages
1. The easiest way would be to put all the creatures you need to kill in a team. You then get an event passed to the area when they are all dead which you can use to set whatever plot flag you like. The only limitation of that is you have to kill all of the enemies, not just a subset.

If you want a quest to say kill 10 werewolves and there are 15 in the area to choose from, you'd either need to make x number of plot flags, or store the variable somewhere. You could add the variable to the 2da for the module or for the player, but if it was all in one area I'd use a generic variable on an invisible placeable and save yourself the trouble.

2. You use a defined flag. When you check a defined flag, it calls the plot script with the flag as a parameter. You use a switch structure to isolate which plot flag it is, and put all your scripting in there. There are template plot scripts and lots of examples in the OC to copy. As an example:
 
switch (nPlotFlag)
{
    case QUEST_READY_FOR_TURN_IN:
    {
        int bPrincessRescued = WR_GetPlotFlag(PLT_RESCUE_PRINCESS, PRINCESS_RESCUED);
        int bQuestComplete = WR_GetPlotFlag(PLT_RESCUE_PRINCESS, QUEST_COMPLETE);
 
        if (bPrincessRescued  && bQuestComplete)
        {
            bResult = TRUE;
        }
        break;
    }
}
 
You could do the same thing with a conditional script, but using defined flags helps keep the number of scripts down, and keep all the scripting for a given plot localized.

3. Essentially, the plot flag is the parameter. What we do is give each plot it's own script. As with the defined flags, the flag is passed to the script, and using a switch structure you can put whatever scripted actions you want associated with the flag. The only difference compared to the above is there's no return value to worry about. The script field, which we don't really use, let's you specify a script and a single integer parameter. It's not quite as powerful as NWN2 in that respect but you could make a script like give_gold and use the integer as the amount of gold given.

Modifié par DavidSims, 31 octobre 2009 - 02:42 .