Aller au contenu

Photo

I think its a scripting problem...


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

#1
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
I'll ask again, I guess. I have the items I want to add all finished (properties and all that), and I'm somewhat sure that everything else is correct. Is this the correct kind of script to do this, and am I missing anything? I want to add the items (2 longswords, a helm, chest, gloves, and boots) directly to the inventory. If someone could get the script to add the things to Bodahn that'd be great, but I'd be happy with getting this to work.

I've followed both weriKK's blog (http://social.biowar.../5339/blog/576/) and this post I recently found (http://dragonagemodd...player-an-item/). and last time I posted this, I was also pointed to this (http://social.biowar...ndex.php/PRCSCR). that second one has "checktag" and other weird things going on, and I'm a noob at the toolset anyway.

crap, think I'm missing stuff at the bottom, at least. and the longsword model I'm using is a new one, the Velvet Blade on the nexus (voice of velvet dagger model extended to a longsword and greatsword model).

#include "utility_h"
#include "plt_dalish_armor_set"

void main()
{
    if ( WR_GetPlotFlag( PLT_DALISH_ARMOR_SET, MY_ITEM_CHECK_FLAG ) == FALSE )
    {
        UT_AddItemToInventory(R"andruils_sight.uti", 1);
        UT_AddItemToInventory(R"elgarnans_vengeance.uti", 1);
        UT_AddItemToInventory(R"falondins_rest.uti", 1);
        UT_AddItemToInventory(R"mythals_grace.uti", 1);
        UT_AddItemToInventory(R"fenharels_claw.uti", 1);
        UT_AddItemToInventory(R"fenharels_fang.uti", 1);
        WR_SetPlotFlag( PLT_PLT_DALISH_ARMOR_SET, MY_ITEM_CHECK_FLAG, TRUE );
    }
}                                                       

Modifié par yasuraka.hakkyou, 07 mai 2010 - 02:11 .


#2
Lord Thing

Lord Thing
  • Members
  • 257 messages
 The script looks like it should work, if nothing's happening it's quite possible that the script is simply not being run.  Where are you triggering it?  Are you using PRCSCR or something else?

Also, if you simply want to test if the script works properly, you can force it to run in game using the console by typing 'runscript ' (the script-name does not include the .ncs)

As for adding items to Bodahn's store, you'll need to set up your PRCSCR to only run the script in the party camp, then modify your current script to look like this:

#include "utility_h"#include "plt_dalish_armor_set"
void main()
{    
    if ( WR_GetPlotFlag( PLT_DALISH_ARMOR_SET, MY_ITEM_CHECK_FLAG ) == FALSE )
    {
        // Attempts to get Bodahn
        object oVendor = UT_GetNearestObjectByTag(oCharacter, "store_camp_bodahn");

        // If Bodahn was succesfully found
        if (IsObjectValid(oVendor))
        {
            // Add the items, specifying Bodahn as the inventory to add them to
            UT_AddItemToInventory(R"andruils_sight.uti", 1,oVendor);
            UT_AddItemToInventory(R"elgarnans_vengeance.uti", 1, oVendor);
            UT_AddItemToInventory(R"falondins_rest.uti", 1, oVendor);
            UT_AddItemToInventory(R"mythals_grace.uti", 1, oVendor); 
            UT_AddItemToInventory(R"fenharels_claw.uti", 1, oVendor);
            UT_AddItemToInventory(R"fenharels_fang.uti", 1, oVendor);
            WR_SetPlotFlag( PLT_PLT_DALISH_ARMOR_SET, MY_ITEM_CHECK_FLAG, TRUE );
        }
    }
}

Modifié par Lord Thing, 07 mai 2010 - 07:11 .


#3
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
the last link I posted was a PRCSCR link type thingy, as that's what I was recommended to use. I've tried a few times, I can't get the console to work *shrug*.



thank you so much for the Bodahn script. but what's this about setting up the PRCSCR for the camp? do I need to change other stuff, which I wouldn't know about? copy pasted the code, will wait for your response and tommorow to test.



thanks very much again.

#4
Lord Thing

Lord Thing
  • Members
  • 257 messages
By setting up PRCSCR for the camp, I mean setting the camp's area in the AreaListName section of your copy of the PRCSCR_*.gda

When making my 'Special Respecialisation' mod I found 3 camp areas in the OC, and didn't know which ones to use, so I used all of them setting up my gda (named SPCRSPC_spcrspc.gda) like this:

ID -------------- AreaListName ------------------- Script
int -------------- string ------------------------------- string
1012400 ----- cam100ar_camp_plains ----- spcrspc_addmeat
1012401 ----- cam104ar_camp_arch1 ------ spcrspc_addmeat
1012402 ----- cam110ar_camp_arch3 ------ spcrspc_addmeat

Simply replace the IDs (ie 1012400-1012402) with unique numbers, and change the Scripts (ie spcrspc_addmeat) to the name of your script.

Once you've done that, add your gda into your 'AddIns//core/override/' folder, and it should then run your script whenever you enter the party camp.

Modifié par Lord Thing, 07 mai 2010 - 10:16 .


#5
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages
I arrive a little late, but I hope it helps you.

To create a new PRCSCR file you have to follow these steps:

1.- Create a new Excel worksheet. Its name should be PRCSCR_*MyIdHere*

For example, in my mod I spawn a new character (Olias) at the party camp area. To do it I had to create a new PRCSCR file.

Here is an image that shows how my PRCSCR looks like: http://img3.imagesha...4299/prcscr.png

"cam100ar_camp_plains" -> is the name of the area that after being loaded will execute the script defined in the next column. 
"cam100sc_put_olias_at_camp" -> is the name of the script that will be executed when the area defined in the previous column is loaded. 

In your case you should use the same area name (that's the party camp) and write the name of your script.

You have more info aboout how to create your own PRCSCR file here: http://social.biowar....php/PRCSCR.xls

2.- In order to add your PRCSCR file to your mod's directory, first you have to compile it using the ExcelProcessor. 

The ExcelProcessor is located here: C:/*DragonAgeInstallDir*/tools/ResourceBuild/Processors/ExcelProcessor.exe

I think that the easiest way to use it is just copy ExcelProcessor.exe to the directory where your .XLS file is located. Open a command line (cmd) and navigate into that directory. Then type 
ExcelProcessor PRCSCR_myfile.xls

Here is an example of the command line: 
C:/2DA/>ExcelProcessor PRCSCR_myfile.xls

If everything is ok, then a .GDA file will be created in the same directory with the name of the .XLS file. 

Here you have more info about this step: http://social.biowar.../Compiling_2DAs

3.- Copy the .GDA file into the following directory:

My Documents/BioWare/Dragon Age/AddIns/*MyModule*/core/override/

That's all ;)

Modifié par _L_o_B_o_, 07 mai 2010 - 01:22 .


#6
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages

_L_o_B_o_ wrote...

2.- In order to add your PRCSCR file to your mod's directory, first you have to compile it using the ExcelProcessor. 

The ExcelProcessor is located here: C:/*DragonAgeInstallDir*/tools/ResourceBuild/Processors/ExcelProcessor.exe

I think that the easiest way to use it is just copy ExcelProcessor.exe to the directory where your .XLS file is located. Open a command line (cmd) and navigate into that directory. Then type 

ExcelProcessor PRCSCR_myfile.xls

Here is an example of the command line: 
C:/2DA/>ExcelProcessor PRCSCR_myfile.xls

If everything is ok, then a .GDA file will be created in the same directory with the name of the .XLS file. 

Here you have more info about this step: http://social.biowar.../Compiling_2DAs

3.- Copy the .GDA file into the following directory:

My Documents/BioWare/Dragon Age/AddIns/*MyModule*/core/override/

That's all ;)


I followed your post up until the quoted point  :?
 so far my excel sheet is like this (should be ok):
ID-------------AreaListName------------------Script
int-------------string------------------------------string
1231990----cam100ar_camp_plains----dalish_armor_set    (what I named my script .nss file)

Thank you both very much for the help so far  :)

Modifié par yasuraka.hakkyou, 07 mai 2010 - 08:21 .


#7
Lord Thing

Lord Thing
  • Members
  • 257 messages

yasuraka.hakkyou wrote...

I followed your post up until the quoted point  :?
 so far my excel sheet is like this (should be ok):
ID-------------AreaListName------------------Script
int-------------string------------------------------string
1231990----cam100ar_camp_plains----dalish_armor_set    (what I named my script .nss file)

Thank you both very much for the help so far  :)


Yeah, that PRCSCR should work fine

#8
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
do you know how to better explain that quoted part, by the way?

#9
Lord Thing

Lord Thing
  • Members
  • 257 messages
to turn your excel spreadsheet into a GDA, you simply need to drag and drop it onto the ExcelProcessor.exe, which can be found in the '/tools/ResourceBuild/Processors/' folder of your Dragon Age installation (not in the my documents folder where the mods go).

Once you have your GDA (it should create it in the same folder as your ExcelProcessor.exe), make sure it's called PRCSCR_<unique name>.gda (so for example PRCSCR_mymod.gda), this way the game knows to add this to the existing PRCSCR.gda, rather than overriding it.

Finally, to get you GDA working in game, simply put it in your add-ins '/core/override/' folder.

I hope this helps.

#10
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
the .GDA is in my add-ins/core/override folder, and still nothing it seems. I'm trying to build a .dazip to try it that way, but I'm not completely sure what files to put in the .dazip. I figured the 6 items I'm trying to add, but what about the script, plot, and .GDA files and such?

#11
TimelordDC

TimelordDC
  • Members
  • 923 messages
You do not need a dazip to test this. If it doesn't work with just the files, it won't work as a dazip too.

I suggest putting debug messages using PrintToLog (make sure ECLog.ini has Script = 1 set) to see if the script is actually firing.

#12
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
I don't seem to have an ECLog.ini

#13
TimelordDC

TimelordDC
  • Members
  • 923 messages
You can create one :)

#14
_L_o_B_o_

_L_o_B_o_
  • Members
  • 117 messages
Make sure you have exported everything you need:wizard:

#15
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
I've exported w/o resources and all that junk, still nothing. I'm basically giving up for now.

#16
Loc'n'lol

Loc'n'lol
  • Members
  • 3 594 messages
You're sure you're testing this on a savegame that hasn't already been flagged with MY_ITEM_CHECK_FLAG = true (Tried to run it once, failed somehow, but set the flag anyway, dooming future attempts to add items to the vendor on that save) ? Actually you could disable that check entirely for testing.



Just to make sure it's not a problem with the area, try to put "any" (without quotes) instead of "cam100ar_camp_plains" in your PRCSCR_*.gda



Other stupid mistake : you're sure your addin is enabled in the DLC/addin tab ?



Check carefully Bodahn's store when testing, it's possible some of your items somehow didn't work (invalid properties, whatever) and only a few did. Chances are the items won't be properly sorted in Bodahn's store too, so make sure you check it all. Hell, if you can't use the console, for a start you should probably try to add an existing item to Bodahn's store (a keening blade, whatever), just to make sure you have the scripting working right in the first place.



Getting it to work once is really the hard part. After that it's only a matter of doing it again. :P

#17
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
I've tried different saves (and characters), and I've put any in the GDA instead, and made a .dazip of that. it's been enabled in the DLC tab, and I've always checked his store pretty thoroughly.

still nothing.

like I said, I'm just giving up for now.

#18
TimelordDC

TimelordDC
  • Members
  • 923 messages
Can you send me a b2b of what you have got? It shouldn't take more than a few minutes to see what the problem is. Would be better if you can send the dazip too. Email: timelorddc at gmail dot com

#19
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
I can send you the stuff, sure, but a b2b? it'll be coming from my screenname here, but from gmail.

#20
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
oh, builder to builder? 'k, hang on. hmm, how do I go about makin' that? don't see the file type anywhere (dadbdata thing).

you might need "the velvet blade" (longswords) from the nexus to see the swords.

Modifié par yasuraka.hakkyou, 09 mai 2010 - 07:45 .


#21
yasuraka.hakkyou

yasuraka.hakkyou
  • Members
  • 1 834 messages
sent you the stuff, it'll be from yasuraka.hakkyou at gmail dot com.