Aller au contenu

Photo

Just cant get PRCSCR file to trigger.


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

#1
void24

void24
  • Members
  • 11 messages
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.

#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
You need to make sure that the tab is named PRCSCR_ndFP.

#3
void24

void24
  • Members
  • 11 messages
So the tab needs that name too? I thought that only effected the end filename. I'll try it, thanks

#4
void24

void24
  • Members
  • 11 messages
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
AND04

AND04
  • Members
  • 154 messages
are you sure your usinf the correct area-tag? my prcscr's work fine

#6
void24

void24
  • Members
  • 11 messages
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
maikanix

maikanix
  • Members
  • 142 messages
Try it with another area?

Modifié par maikanix, 22 novembre 2009 - 06:19 .


#8
Craig Graff

Craig Graff
  • Members
  • 608 messages
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
weriKK

weriKK
  • Members
  • 106 messages
I can help you out with that. The Denerim Market Area List is called "den02al_den_market". :)

#10
void24

void24
  • Members
  • 11 messages
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!

#11
weriKK

weriKK
  • Members
  • 106 messages
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
Phaenan

Phaenan
  • Members
  • 315 messages

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.

Yep, that all there's to it, really. ^_^

(edit : removed the image, obviously unnecessary)

Modifié par Phaenan, 22 novembre 2009 - 08:08 .


#13
weriKK

weriKK
  • Members
  • 106 messages

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
Phaenan

Phaenan
  • Members
  • 315 messages
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...

#15
void24

void24
  • Members
  • 11 messages
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?

#16
weriKK

weriKK
  • Members
  • 106 messages
You should check whether the object exists before creating one.

#17
void24

void24
  • Members
  • 11 messages
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
void24

void24
  • Members
  • 11 messages
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!


#19
weriKK

weriKK
  • Members
  • 106 messages
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?

#20
Craig Graff

Craig Graff
  • Members
  • 608 messages
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.

#21
weriKK

weriKK
  • Members
  • 106 messages

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?!