I'm trying to create custom content that adds codex entries as letters from various companions. I have so far succeeded in adding a codex entry upon adding an item from a container. My question is how do I add script to check for flags so that the codex entry will vary according to the flag? For example, if Zevran and the Warden werefriendly, I want the Warden receiving a "friendly" letter, not a romantic one, or the Warden shouldn't be getting a Leliana letter at all if she was never recruited.
My current setup is:
PRCSCR gda file that adds the placeable
Plot file for letter (one so far)
Script to add the letter to inventory
The letter itself (uti)
The placeable file (container)
The script:
#include "utility_h"
#include "wrappers_h"
#include "events_h"
#include "plot_h"
#include "plt_dogletter"
void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
object oPC = GetHero();
int nDoOnce = GetLocalInt(OBJECT_SELF, "dogletter_GIVEN");
if ( nDoOnce != 1 )
{ switch(nEventType)
{ case EVENT_TYPE_MODULE_LOAD:
{
int nHas = CountItemsByTag(oPC, "dogletter");
if ( nHas == 0 )
UT_AddItemToInventory(R"dogletter1.uti", 1);
WR_SetPlotFlag("plt_dogletter", LETTER, TRUE);
break;
} }
SetLocalInt(OBJECT_SELF,"dogletter_GIVEN", 1); }
}Do I just add to the code? Or add plots? Add flags to plots? I'm confused. Any help would be appreciated! Currently it's spawning the codex in Origins as well... that's another problem. (sigh)
P.S. Yes, my first letter is actually from the dog. (shrug)
Modifié par Elrith Galadon, 03 décembre 2013 - 10:56 .





Retour en haut







