I have been having great luck with making my mod so far, but I just can not get my PRCSCR file to call my script when den200ar_market is loaded.
I know that the area name is correct, because if I run the script from the command prompt, it adds my NPC perfectly. The file though simply will not work.
It is currently set up as follows:
ID | AreaListName | Script
int | string | string
1662401 | den200ar_market | nd_addqstart
The conversion to .GDA workes fine, and I name it PRCSCR_ndFP.GDA and place it in the core override section of my addin (though I have tried every override on my HD) and it simply refuses to trigger.
I can't seem to find any information about these types of files besides a few tutorials, any information to help me find what I am doing wrong would be greatly appreciated.
Just cant get PRCSCR file to trigger.
Débuté par
void24
, nov. 22 2009 07:12
#1
Posté 22 novembre 2009 - 07:12
#2
Posté 22 novembre 2009 - 07:37
You need to make sure that the tab is named PRCSCR_ndFP.
#3
Posté 22 novembre 2009 - 07:42
So the tab needs that name too? I thought that only effected the end filename. I'll try it, thanks
#4
Posté 22 novembre 2009 - 07:47
Ok, the tab now has the name PRCSCR_ndFP, causing the end GDA file to be named the same. It still does not do anything when I enter the area in game.
#5
Posté 22 novembre 2009 - 09:54
are you sure your usinf the correct area-tag? my prcscr's work fine
#6
Posté 22 novembre 2009 - 05:50
I think so. The area tag works fine in the script if I run it using "runscript" in console. I could perhaps have the wrong one though, and my script is working by coincidence. Is den200ar_market the tag for the denerem marketplace?
#7
Posté 22 novembre 2009 - 06:07
Try it with another area?
Modifié par maikanix, 22 novembre 2009 - 06:19 .
#8
Posté 22 novembre 2009 - 07:24
That is the correct tag for the Denerim market. I finally realized that your most likely problem is that you are using the area tag, but the market is on an area list, so the PRCSCR file will only work if the area list name is given. Without access to the Single Player module resources that is more or less impossible to determine. I'll see if I can dig it up when I get back to work.
#9
Posté 22 novembre 2009 - 07:34
I can help you out with that. The Denerim Market Area List is called "den02al_den_market".
#10
Posté 22 novembre 2009 - 07:54
So do I use this in my xls file instead of den200al_market? I tried it and no luck. I am guessing this area list is going to take something slightly different.
By the way, thanks for all the help!
By the way, thanks for all the help!
#11
Posté 22 novembre 2009 - 08:03
When Craig helped me out earlier with a similar issue he suggested to use 'any' in the xls file and check for the area tag inside your script. This runs your script every time you enter an area/list. A bit more resource intensive but it should solve your problem too.
#12
Posté 22 novembre 2009 - 08:05
Yep, that all there's to it, really.So do I use this in my xls file instead of den200al_market? I tried it and no luck. I am guessing this area list is going to take something slightly different.
(edit : removed the image, obviously unnecessary)
Modifié par Phaenan, 22 novembre 2009 - 08:08 .
#13
Posté 22 novembre 2009 - 08:08
Phaenan wrote...
Yep, that all there's to it, really. You just need the area tag.
Unfortunately, that only works for standalone areas. it does not seem to work for areas grouped by area lists. Since those areas are grouped together and loaded into memory at once, the area list tag should trigger them, but it seems that does not work either.
Modifié par weriKK, 22 novembre 2009 - 08:12 .
#14
Posté 22 novembre 2009 - 08:11
Yeah, I basically answered before the whole issue got to my brain... That's me.
In the end, putting an "any" instead of the tag and sorting via area IDs in the script shouldn't be that resources hungry, since it'll only occur during area transitions...
In the end, putting an "any" instead of the tag and sorting via area IDs in the script shouldn't be that resources hungry, since it'll only occur during area transitions...
#15
Posté 22 novembre 2009 - 08:15
Ok, any works perfectly. I assume that because it tries to add the NPC to denerem, it wont add multiple NPCs as I progress through the game?
Or should I have the script check to see if I am in denerem?
Or should I have the script check to see if I am in denerem?
#16
Posté 22 novembre 2009 - 08:20
You should check whether the object exists before creating one.
#17
Posté 22 novembre 2009 - 08:26
I am using "UT_GetNearestObjectByTag" to check for the object, but I assume that if this script runs in some other area, it wont find that object. So it will run "CreateObject" aimed at denerem. I guess I should just check to see if I am in denerem before doing any of that. It should run faster that way (minutely) anyway.
#18
Posté 22 novembre 2009 - 11:13
The following appears to work pretty solidly:
#include "wrappers_h"
void main()
{
string sAreaTag = GetTag(GetArea(GetMainControlled()));
if (sAreaTag=="den200ar_market")
{
object oPlayer = GetMainControlled();
DisplayFloatyMessage(GetHero(), "Spawning Quest Start NPC", FLOATY_MESSAGE, 16777215, 20.0);
object oServant = UT_GetNearestObjectByTag(oPlayer, "ndboredservant");
if (!IsObjectValid(oServant))
{
object oArea = GetObjectByTag("den200ar_market");
location lServantLocation = Location(oArea, Vector(82.967682, 34.678642, -0.096997), 82.657371521);
CreateObject(OBJECT_TYPE_CREATURE, R"ndboredservant.utc", lServantLocation);
}
}
}
Thanks again! Now I can get my quest underway!
#include "wrappers_h"
void main()
{
string sAreaTag = GetTag(GetArea(GetMainControlled()));
if (sAreaTag=="den200ar_market")
{
object oPlayer = GetMainControlled();
DisplayFloatyMessage(GetHero(), "Spawning Quest Start NPC", FLOATY_MESSAGE, 16777215, 20.0);
object oServant = UT_GetNearestObjectByTag(oPlayer, "ndboredservant");
if (!IsObjectValid(oServant))
{
object oArea = GetObjectByTag("den200ar_market");
location lServantLocation = Location(oArea, Vector(82.967682, 34.678642, -0.096997), 82.657371521);
CreateObject(OBJECT_TYPE_CREATURE, R"ndboredservant.utc", lServantLocation);
}
}
}
Thanks again! Now I can get my quest underway!
#19
Posté 23 novembre 2009 - 02:15
I'm glad you made it work.
Unfortunately this still leaves us in the gray about how to refer to areas in area lists or area lists themself using PRCSCR.
I thought it might uses the first index of the list but it does not seem to work for any of them in fact. There has to be a better way than manually filtering 'any'. Maybe some prefix?
Unfortunately this still leaves us in the gray about how to refer to areas in area lists or area lists themself using PRCSCR.
I thought it might uses the first index of the list but it does not seem to work for any of them in fact. There has to be a better way than manually filtering 'any'. Maybe some prefix?
#20
Posté 24 novembre 2009 - 04:16
If you look in Dragon Age\\modules\\single player\\data\\ you will find a list of all the area lists in the main campaign. Just refer to the area list without the "al_" prefix and the PRCSCR file should fire on loading the area list.
It's possible that this event may fire before resources are completely loaded for areas in an area list - at least see if your script can print to the log.
Edit or create \\\\..\\main\\build\\bin_release\\ECLog.ini and set Script=1 in the [LogTypes] section.
It's possible that this event may fire before resources are completely loaded for areas in an area list - at least see if your script can print to the log.
Edit or create \\\\..\\main\\build\\bin_release\\ECLog.ini and set Script=1 in the [LogTypes] section.
#21
Posté 24 novembre 2009 - 05:28
Craig Graff wrote...
Edit or create \\\\\\\\..\\\\main\\\\build\\\\bin_release\\\\ECLog.ini and set Script=1 in the [LogTypes] section.
Well Craig, I think you just made many scripter smile with that sneaky line to enable logging
Just a minor issue, your build path is a bit different from our install path, the proper location for end users should be:
<DragonAgeInstallDirectory>\\\\bin_ship\\\\ECLog.ini
-
That being said it works flawlessly, and it does seem to trigger indeed.
I've tried to zone into Denerim Market with PRCSCR triggering for "den02al_den_market" and it seems to work just fine, and the area tag I could retrieve was the denerim market tag.
Script WRK_DEBUG: den200ar_market
I could also create an object on the hero, so I guess the resources are loaded too by that time. Makes me wonder why did it not work for void24 earlier?!





Retour en haut






