jburrows Posted March 22, 2010 Share Posted March 22, 2010 Well I wanted to add stuff to an awakening merchant store.Please in my version the end user in the version will run a script from the console have it added to the merchant. requires toolset and basic scripting knowledge.It also assumes you created the object already. There could be issues with updates to mod if you release non awakening version. First there are several stores in awakening. The stores names are store_aoa100cr_dwarfmerchstore_coa100cr_dwarfmerchstore_coa100cr_merchant_1store_coa100cr_merchant_2store_coa110cr_bartenderstore_trp200cr_merchantstore_vgk100cr_enc_lillithstore_vgk100cr_herrenstore_vgk100cr_merchantstore_vgk100cr_merchant_1store_vgk100cr_merchant_2store_vgk100cr_merchant_3store_vgk210cr_enchanterstore_vgk210cr_woolseystore_vgk400cr_medic.utm Some of them are easy to figure out what store they are. In my example I am using the rune merchant. which is store is store_vgk210cr_enchanter First create a new script.Here is script I wrote as an example how to do it. // ---- SCRIPT STARTS HERE ---- #include "utility_h" void main(){object oCharacter = GetMainControlled(); object oStore = GetObjectByTag("store_vgk210cr_enchanter");CreateItemOnObject(R"bloodmagic_rune.uti",oStore);CreateItemOnObject(R"darkspawn_rune.uti",oStore);CreateItemOnObject(R"expert_armor_rune.uti",oStore); // Pop up a nice floating message about the character's headDisplayFloatyMessage(oCharacter, "Runes added enchanters store", FLOATY_MESSAGE, 16777215, 3.0f);}//end script in my script if you wanted to change the merchant to something else change the line that reads object oStore = GetObjectByTag("store_vgk210cr_enchanter"); and change it one of the aboves stores in side the quotes. To change what the stores adding change lines CreateItemOnObject and replace the stuff between the quotes with the uti filename of the object being replaced. Then you save and compile the script. Get the compiles script from the toolsetexport. It should scriptname.ncs. Then you would have either copy of exported uti you included or builder to player packege and use winrar to extract the dazip file get the file that reads your module name_package.erf Then you copy content of download to the overide directory located something like C:\Documents and Settings\username\My Documents\BioWare\Dragon Age\packages\core\override Then please note I tested this method on my runes mod and works in my mod. Then when your in the game in the merchant area you are added the stuff to the merchant enter the console and type in runscript whatever named the script and press enter. Now I am going to try add a new merchant to awakening.Hopefully it works. Link to comment Share on other sites More sharing options...
DarkeWolf Posted March 23, 2010 Share Posted March 23, 2010 so. Did it work? Link to comment Share on other sites More sharing options...
hdhd Posted March 29, 2010 Share Posted March 29, 2010 It is also no problem to create merchant in Awakening without using an already existing one. Open "C:\Program Files\Dragon Age\addins\dao_prc_ep_1\module\data\designerareas.erf", look for the area where you want to spawn him, get the location (use the first script from http://dragonagemodding.wordpress.com/2009/11/15/creating-a-custom-merchant-for-the-players-camp-part-1/), make a new script and spawn him (using the second script on dragonagemodding). So basically there are a lot more things possible without an updated toolset than many think. An example spawning Sandal in the first mission of Awakening: #include "wrappers_h" void main() { object oPlayer = GetMainControlled(); object oMerchant = UT_GetNearestObjectByTag(oPlayer, "camp_sandal"); if (!IsObjectValid(oMerchant)) { object oArea = GetObjectByTag("vgk100ar_exterior"); location lMerchantLocation = Location(oArea, Vector(77.675064, 61.997501, -1.807399), 140.000106812); CreateObject(OBJECT_TYPE_CREATURE, R"camp_sandaltwo.utc", lMerchantLocation); } } Screenshots:http://img689.imageshack.us/img689/681/screenshot2010032920490.jpghttp://img140.imageshack.us/img140/4341/screenshot2010032921531.jpg Link to comment Share on other sites More sharing options...
DarkeWolf Posted March 30, 2010 Share Posted March 30, 2010 VERY nice find and share hdhd! Great post! Link to comment Share on other sites More sharing options...
deshenwei Posted March 30, 2010 Share Posted March 30, 2010 Thanks for those tutorial :D Link to comment Share on other sites More sharing options...
DarkeWolf Posted March 30, 2010 Share Posted March 30, 2010 Actually, now that I've had a chance to really realize what this does.... has anybody tested this to see if the character spawns the same as it would in savefile? Meaning, if I were to spawn Quartermaster Tolby into awakening, would he still have all the junk on him that he had in a savegame?(I'd test this myself, but I am NOT for the life of me, EVER going to reinstall patch 1.03 until we have a fix for it!!!) Link to comment Share on other sites More sharing options...
jburrows Posted March 30, 2010 Author Share Posted March 30, 2010 Actually, now that I've had a chance to really realize what this does.... has anybody tested this to see if the character spawns the same as it would in savefile? Meaning, if I were to spawn Quartermaster Tolby into awakening, would he still have all the junk on him that he had in a savegame?(I'd test this myself, but I am NOT for the life of me, EVER going to reinstall patch 1.03 until we have a fix for it!!!)Well I had my own merchant in awakening for few days.I finally managed to my rune merchant so that it works in awakening and non awakening. My merchant Jasmine sells runes and has additional store for storage. I have used that tutorial and used 3 parts with alterations to make it work with awakening. I believe doing the first tutorial as mentioned by hdhd will only generate merchant creature there.The convo may popup on existing merchant however it requires the merchant store on the map which is different the merchant creature.It is not that hard and have to do the 3 tutorial on it which will teach you how to add merchant to the map. I Imagine quartermaster toby would only get only get the stuff that he has originally not from a had in savegame. I would responded sooner but last time I looked no one responded and eventually forgot about it. Link to comment Share on other sites More sharing options...
hdhd Posted March 30, 2010 Share Posted March 30, 2010 No, he shouldn't have all the items you sold to him on him. When you want some more items added to him just modify the .utm files. The script I posted above will only spawn the npc, you still have to bring him to speak (dialog) and make him a merchant (dummy area). My point had been anyway that it is possible to modify the Awakening campaign more than most think so many mods that had been labelled as impossible (without a new version of the toolset) are actually possible. I haven't yet tested adding new cutscenes or areas to existing maps but I will try to make them work. Link to comment Share on other sites More sharing options...
DarkeWolf Posted March 30, 2010 Share Posted March 30, 2010 CreateObject(OBJECT_TYPE_CREATURE, R"camp_sandaltwo.utc", lMerchantLocation)would this line mean that you'd have to create the new merchant, named camp_sandaltwo, before implementing the scipt? still. even with those restrictions, these are both a step in the right direction. Great shares guys! Link to comment Share on other sites More sharing options...
hdhd Posted March 30, 2010 Share Posted March 30, 2010 You also can use an already existing one I for instance exported sandal and renamed him to camp_sandaltwo. The extended module is awakening so you need to export the npc from origins otherwise awakening won't find any file called camp_sandal. But this will only spawn the npc, creating a merchant is a bit more difficult. http://dragonagemodding.wordpress.com/2009/11/18/creating-a-custom-merchant-for-the-player%E2%80%99s-camp-%E2%80%93-part-3/ describes how to add to your dialog script a merchant. Edit:@jburrowsHow did you make it work in Awakening and Origins? I know only of the method creating in the addins.xml a new AddInItem with ExtendedModuleUID="DAO_PRC_EP_1". Link to comment Share on other sites More sharing options...
Recommended Posts