edriano Posted March 13, 2011 Share Posted March 13, 2011 (edited) Hello, I tried using datools and start with something simple which is making a ring.I make the ring strong but not overpowered that it will become a cheat item. I used this 3 useful tutorial : http://social.bioware.com/wiki/datoolset/index.php/Item_tutorial http://social.bioware.com/wiki/datoolset/index.php/Item http://social.bioware.com/5339/blog/576/ I manage to spawn the item in game but it will duplicate upon loading save file. So using werikk script : #include "utility_h" #include "plt_my_custom_plot" void main() { // If our plot flag is set to TRUE, that means we have already // given the items to the player, there is no need to continue // running this script. if ( WR_GetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG ) == TRUE ) return; event ev = GetCurrentEvent(); int nEventType = GetEventType(ev); // We will watch for every event type and if the one we need // appears we will handle it as a special case. We will ignore the rest // of the events switch ( nEventType ) { // This event happenes every time the module loads // This usually happenes when creating a new game // or loading a savegame case EVENT_TYPE_MODULE_LOAD: { // The UT_AddItemToInventory function adds various resources to a // creature's inventory. Here we add one weapon and one shield. UT_AddItemToInventory(R"my_custom_weapon.uti", 1); UT_AddItemToInventory(R"my_custom_shield.uti", 1); // Set our plot flag to TRUE, so the next time this script tries // to run it will not add extra items to the player's inventory WR_SetPlotFlag( PLT_MY_CUSTOM_PLOT, MY_ITEM_CHECK_FLAG, TRUE ); // We have dealt with the event we were waiting for. // At this point we can stop looking for other events break; } default: break; } } The items did stop re-spawning, but when I tried loading another save file the ringdoesn't spawn. I triple check the mods and I found everything as it should be. Tried to make a new mods and re-step everything but the problem persist, eitherthe ring won't stop re-spawning or the ring won't spawn at all. In the end I use this mods to make the ring available in game : http://dragonagenexus.com/downloads/file.php?id=1825 So, I would like to ask for opinion or ideas to solve this problem. Thank You. Regards Edhriano. Edited March 13, 2011 by edriano Link to comment Share on other sites More sharing options...
DarkeWolf Posted March 13, 2011 Share Posted March 13, 2011 Hiyas Edriano :)I will wait until you post your compiled script to see if I can determine where the errors are.In the meantime, here is a much simpler Console Command script that I prefer to use. Though it does require the console to be active in your game. #include "utility_h" void main() { UT_AddItemToInventory(R"dw_mage_ring01.uti", 1); UT_AddItemToInventory(R"dw_mage_ring02.uti", 1); UT_AddItemToInventory(R"dw_mage_necklace.uti", 1); UT_AddItemToInventory(R"dw_mage_belt.uti", 1); UT_AddItemToInventory(R"dw_mage_staff.uti", 1); } You can change it to use your own items by changing the names inside the quotes "dw_mage_ring01.uti" to "youritemname.uti" and if you want more than one of the item to spawn change the 1); to 2);If you want to not use that many line items, you can simply comment them out by making them look like this- UT_AddItemToInventory(R"dw_mage_necklace.uti", 1); // UT_AddItemToInventory(R"dw_mage_belt.uti", 1); // UT_AddItemToInventory(R"dw_mage_staff.uti", 1); There's a couple of reasons that I like this script a lot more.1) Its more simple to write and edit.2) Its not affected by the bug that causes items not to load on new characters3) You can repeat it as necessary if you want to get more of the items again at a later time ;) :D Link to comment Share on other sites More sharing options...
edriano Posted March 13, 2011 Author Share Posted March 13, 2011 (edited) Thank you for the reply DarkeWolf, here is the compiled script : #include "utility_h" #include "edhriano_ring_plot" void main() { if ( WR_GetPlotFlag( PLT_edhriano_ring_plot, MY_RING_CHECK_FLAG ) == TRUE ) return; event ev = GetCurrentEvent(); int nEventType = GetEventType(ev); switch ( nEventType ) { case EVENT_TYPE_MODULE_LOAD: { UT_AddItemToInventory(R"edhriano_ring.uti", 1); WR_SetPlotFlag( PLT_edhriano_ring_plot, MY_RING_CHECK_FLAG, TRUE ); break; } default: break; } } I will try your script, it does looks a lot simpler. Edited March 13, 2011 by edriano Link to comment Share on other sites More sharing options...
edriano Posted March 13, 2011 Author Share Posted March 13, 2011 I have tried you script , but sadly the result is as follows : When try to compile it I receive message : bad value, failed to compile.So the result is the item(s) spawn infinitely. Am I missing something here ? Link to comment Share on other sites More sharing options...
DarkeWolf Posted March 13, 2011 Share Posted March 13, 2011 Edriano- Ok, I was looking at the script that you posted, and it looks to be in order. Did you create your event handler script? And did you export that out, as well as your add item script (For Werrik's scripts)?Did you include both of them in your override folder?Both the add item script and the event handler script? As for the script that I provided you... I need to see you work, my friend ;) Please post it so I can take a look at it ;) Link to comment Share on other sites More sharing options...
edriano Posted March 14, 2011 Author Share Posted March 14, 2011 (edited) Well I did all that DarkeWolf, here you can see it in the screenshot. As for the script : #include "utility_h" void main() { UT_AddItemToInventory(R"edriano_ring_cara.uti", 1); UT_AddItemToInventory(R"edriano_ring_denna.uti", 1); UT_AddItemToInventory(R"edriano_glove_mordsith.uti", 1); } I put that on .nss Thank you for being patience with me DarkeWolf . :thumbsup: . Edited March 14, 2011 by edriano Link to comment Share on other sites More sharing options...
DarkeWolf Posted March 14, 2011 Share Posted March 14, 2011 hrm. Well... I didnt get any compile errors when I compiled the simple version of the script. But the bad value CAN cause that infinity loop that you mentioned. Bug #5: Another common form bug is invalid data. Empty fields can return a null value and calculations can result in non-numbers, such as infinity, or even text strings. A bad value in one place can cascade into other parts of the form where it's used in a calculation. To isolate this kind of error, you have to trace backward to find the original bad value.Does the compiler tell you what line the null value is in? Let me do a bit of legwork and see if another source might be able to help figure this out. Link to comment Share on other sites More sharing options...
edriano Posted March 14, 2011 Author Share Posted March 14, 2011 A miracle happened last night (don't know how else to describe it :confused: ). I make a new 'fresh' module separate from the current project, re-done everything.Compile them and it worked , it actually worked :sweat: . I think I'll try it a few more time before I upload it at mods section. Thank you again for your help :thumbsup: . Link to comment Share on other sites More sharing options...
DarkeWolf Posted March 14, 2011 Share Posted March 14, 2011 Hahaha. well... sometimes you just have to start all over from scratch.But, I'm glad to hear that you got it working!I noticed some of the filenames that you were using. If you plan to release them, make sure that you dont include another modder's actual work in the mod, unless you've got their permission. Or they've said that anybody can use it.And if they do just reference other modder's work, make sure to give them credit for what they released ;) Good to hear that you got it sorted out! :thumbsup: Link to comment Share on other sites More sharing options...
edriano Posted March 14, 2011 Author Share Posted March 14, 2011 (edited) Well actually, I have been using mordsith for sometimes now, buttruth to be told I don't really like the glove, that is why I try to make a glove that match the suit. But to do something like that1st I learn something simple , like making a ring, and while atit I end up making 2 rings. Sure, I always give credits as credits due :smile: . How about something like this : ============================= Title : Edriano's MordSith alternate glove and rings Hello This is my 1st mods so please be gentle <-- (I often read this line :laugh: ).I have been using MordSith mods for quit a while now, and I must sayI really love it. I love it so much I often experiment other in-game glove andboots to better suits my liking, so I mods this glove and ring. This was intended to be of my personal use, but decided to share it with the community. Glove stats :Rings Stats : Screenshot(s) = maybe 3-4 pic Installation : damodder / modmanagerUn-install : damodder / modmanager Possible problem : been using this many beautiful mods :1. MordSith2. Phoenix armory 3. Voice of velvet 4. witcher raptures 5. Petrovich Assasins armor and rapiersSo far no problem. Recommend mods : MordSith by adriangihttp://www.dragonagenexus.com/downloads/file.php?id=1055 Fell free to use this mods in your own, just please give me credits as credits due. Credits for MordSith origin mods goes to : adriangiYou can find the mods here : http://www.dragonagenexus.com/downloads/file.php?id=1055 Have fun :thumbsup: . Ends here ============================= What do you think? is that ok? Edited March 14, 2011 by edriano Link to comment Share on other sites More sharing options...
Recommended Posts