ilsolas Posted November 28, 2020 Share Posted November 28, 2020 Over the last few hours I have been trying to add a chest via a prcscr script to the King's Camp (night version). I have to admit I seem to be terrible with scripts! I have created a new module, made up my chest which contains a test item, got the vector numbers for the location by duplicating the area and deleting it afterwards (no exporting). I use this script (a template from the datoolset wiki) along with their instructions: //const string TAL_STORAGE_CHEST_SPAWNED = "TAL_STORAGE_CHEST_SPAWNED";const string TAL_IP_STORAGE_CHEST = "gwo_storage_chest";const resource TAL_RESOURCE_IP_STORAGE_CHEST = R"joining_storage_chest.utp"; void main(){ object oMainControlled = GetMainControlled(); object oChest = UT_GetNearestObjectByTag(oMainControlled, TAL_IP_STORAGE_CHEST); //DisplayFloatyMessage(oMainControlled, "storage script working", FLOATY_MESSAGE, 16777215, 30.0); if (!IsObjectValid(oChest)) { location lSpawn = Location(GetArea(oMainControlled), Vector(658.13, 473.23, 8.51), 0.0); CreateObject(OBJECT_TYPE_PLACEABLE, TAL_RESOURCE_IP_STORAGE_CHEST, lSpawn); //DisplayFloatyMessage(oMainControlled, "storage chest created", FLOATY_MESSAGE, 16777215, 30.0); }} I also modified the gda file from the storage mod as I don't have excel and trying to make it on google sheets didn't work unfortunately. I'm not sure what I have done wrong, as the chest doesn't appear. I have seen another people use this script and their items have turned up fine. I also tried looking for another scripts but can't seem to find any and the datool wiki site doesn't go into a lot of detail. Link to comment Share on other sites More sharing options...
balmz Posted November 28, 2020 Share Posted November 28, 2020 https://discord.gg/ykQmFMw try asking here Link to comment Share on other sites More sharing options...
ilsolas Posted November 28, 2020 Author Share Posted November 28, 2020 Thanks for the link, I will try over there. Link to comment Share on other sites More sharing options...
ilsolas Posted November 28, 2020 Author Share Posted November 28, 2020 After editing the script and doing a bit of testing I got the chest to appear in the party camp when using the location vectors from a storage mod. But when the in the location vectors I want to use, the chest still doesn't appear. Link to comment Share on other sites More sharing options...
Pasquale1223 Posted November 28, 2020 Share Posted November 28, 2020 Did you create a PRCSCR gda file for your mod as described here? There's also some info about custom PRCSCRs in a recent post here. Link to comment Share on other sites More sharing options...
ilsolas Posted November 29, 2020 Author Share Posted November 29, 2020 (edited) Yes I did, I have tried using the area code for the kings camp night and day also tried the area list names. I have even tried the cousland castle and I can only get the camp area to work. So I do think there is an issue with the gda file I edited. I'm going to try and do the google sheet xlsx again with the method the user mentioned in the post you linked. EDIT: didn't work with the google sheets method, I also made it from scratch in the gda tool,also converted that to excel and used the excel processor. Edited November 29, 2020 by iLoveStimpaks Link to comment Share on other sites More sharing options...
ilsolas Posted November 29, 2020 Author Share Posted November 29, 2020 Ok so I messed around with the scripts a little more. Also added in an npc using a tutorial: https://dragonagemodding.wordpress.com/2009/11/15/creating-a-custom-merchant-for-the-players-camp-part-1/ to see if I was making a mistake on my end. That npc worked straight away when I created a gda file from scratch in the gda app, so I went back to the chest script. Wrote it all out by hand and redid the gda file with the area lists typed in by hand. Then suddenly the chest appeared as planned. So I think copying and pasting in the names lead to me making a mistake somewhere but can't figue it out but at least it's working! Link to comment Share on other sites More sharing options...
LadyHonor Posted November 29, 2020 Share Posted November 29, 2020 Try this.....make sure you use your information and when making the gda (use GDApp) that you are using the area list for the king's camp.....and the name of your script. #include "utility_h" #include "placeable_h" #include "wrappers_h" #include "plot_h" #include "YOUR_PLOT_GOES_HERE" void main() { object oKingsCamp = GetObjectByTag("pre100ar_kings_camp_night"); object oPC = GetMainControlled(); object oArea = GetArea(oPC); location vChestLoc = Location(GetArea(oArea), Vector(Use_Your_Coordinates), Your_Coordinates); if(IsObjectValid(oKingsCamp)) { if (!WR_GetPlotFlag(YOUR_PLOT, YOUR_FLAG)) { CreateObject(OBJECT_TYPE_PLACEABLE, R"YOUR_CHEST_ID.utp", vChestLoc); WR_SetPlotFlag(YOUR_PLOT, YOUR_FLAG, TRUE); } } } Link to comment Share on other sites More sharing options...
LadyHonor Posted November 29, 2020 Share Posted November 29, 2020 lol we posted at the same time. glad you got it working. Link to comment Share on other sites More sharing options...
ilsolas Posted November 29, 2020 Author Share Posted November 29, 2020 :) Actually I was looking for a script part that I could put in the location before I got it working so that will be helpful in the future! Link to comment Share on other sites More sharing options...
Recommended Posts