Aller au contenu

Photo

Plot-flag or something else...? (Noob question)


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
HurraFTP

HurraFTP
  • Members
  • 105 messages
Hello,

I created a small module for DA that brings up a merchant at the party camp, following the instructions in this tutorial http://dragonagemodd...rs-camp-part-1/
Everything works fine  :)

Now, it would be nice if the merchant spawns only if the player's  spared Zevran's life and takes him in his party (because he also comes from Antiva and also attempts to escape the Crows, selling his stuff in return for protection in camp...)

How to add the condition that Zevran is indeed at the camp?
Can I just do like for the merchant? (something like " object oFollower = UT_GetNearestObjectByTag (oPlayer,"zevran"); and IsObjectValid(oFollower)) or must I use a plot-flag, or...?

Here's my script:

 #include "wrappers_h"
   void main()
{
    object oPlayer = GetMainControlled();
    DisplayFloatyMessage(oPlayer, "Emporium", FLOATY_MESSAGE, 16777215, 20.0);
    object oMerchant = UT_GetNearestObjectByTag (oPlayer,"vendel");
   
    if (!IsObjectValid(oMerchant))

    {
    object oArea = GetObjectByTag("cam100ar_camp_plains");
    location lMerchantLocation = Location(oArea, Vector(163.5444205, 131.740692,-1.661039), 85.4);
    CreateObject(OBJECT_TYPE_CREATURE, R"vendel.utc", lMerchantLocation);}}

sorry for my rudimentary English, I use a translator ... I hope my question is understandable.

#2
Sunjammer

Sunjammer
  • Members
  • 925 messages
The short answer is you can do either.

Zevran's tag is gen00fl_zevran so provided your PRCSCR script is just set to run in the camps or you are checking that the current area is a camp (or one of the camps) then you should be fine.

However there is a plot flag which indicates if Zevran has been hired and not subsequently gone hostile, rejoined the Crows or left the party. To check it use:

if(WR_GetPlotFlag(PLT_GEN00PT_PARTY, GEN_ZEVRAN_RECRUITED))
{
    // your code goes here
}

Modifié par Sunjammer, 01 septembre 2011 - 10:25 .


#3
HurraFTP

HurraFTP
  • Members
  • 105 messages
Thank you! Both solutions work like a charm. I will use the plot-flag.

ps: Is there somewhere in the toolset  a list of plot-flags used by the game?

Modifié par Drums-Coyote, 02 septembre 2011 - 06:35 .


#4
Sunjammer

Sunjammer
  • Members
  • 925 messages
I'm not aware of such a list (either in the toolset or in the internet) but all the plot flags are listed in the appropriate plot resource (which you need to know in order to used them).

It might be possible to write a query to generate such a list but that probably wouldn't be that helpful as you'd have little or no idea of their purpose (it isn't always clear from their name). To properly understand a plot flag you often have to do a bit of detective work to see how it is used in game (i.e. when it is set and if/when it is unset).

#5
HurraFTP

HurraFTP
  • Members
  • 105 messages
Ok I will explore some more. This is the first time I try modding a game, it's funny!
Thank you very much for your quick answer.