JulieLakaye 1 Posted December 22, 2017 Hello everyone! I've so far have had some (modest) success modding Kotor 1 and correcting some compatibility issues between the mods I used . Editing .uti, .utc, .utm, .dlg,... and some basic scripting.Now that I'm done with my playthrough, I've started TSL and I would like to try something more ambitious: I'm trying to create a script that removes one item from a stack in the player's inventory... When using DestroyObject(); it removes the whole stack so that is not what I want to achieve. I've tried something like this : int nStack = 0; nStack = GetItemStackSize(GetItemPossessedBy(GetFirstPC(), item_tag)); SetItemStackSize((GetItemPossessedBy(GetFirstPC(), item_tag), (nStack - 1)); But it doesn't seem to work, it does not decrease said stack size by one.Is there something I'm missing or is my syntax completely stupid? Any help would be much appreciated! Thanks! Quote Share this post Link to post Share on other sites
JulieLakaye 1 Posted December 22, 2017 Oops nevermind guys, I got it working, I was just missing a set of parentheses in my (complete) script BTW, this was about fixing the Holowan Duplisaber mod (http://deadlystream.com/forum/files/file/424-holowan-duplisaber-beta), and i think I suceeded: Now removes a single crystal of the adequate color when creating a new hilt (instead of all of them). Correctly uses a cerulean crystal when choosing that color, instead of a blue one. I've also corrected the "bug" making all Dark Jedi lightsabers green, they're now the classic red. How do I go about sharing the fixed version of this mod? New topic, new upload? PS: This place has helped me immensely when it comes to understanding Kotor/TSL modding! Kudos to you all! Quote Share this post Link to post Share on other sites
jc2 581 Posted December 22, 2017 Oops nevermind guys, I got it working, I was just missing a set of parentheses in my (complete) script BTW, this was about fixing the Holowan Duplisaber mod (http://deadlystream.com/forum/files/file/424-holowan-duplisaber-beta), and i think I suceeded: Now removes a single crystal of the adequate color when creating a new hilt (instead of all of them). Correctly uses a cerulean crystal when choosing that color, instead of a blue one. I've also corrected the "bug" making all Dark Jedi lightsabers green, they're now the classic red. How do I go about sharing the fixed version of this mod? New topic, new upload? PS: This place has helped me immensely when it comes to understanding Kotor/TSL modding! Kudos to you all! Welcome to Deadlystream JulieLakaye! Glad you had success modding k1, best of luck with all your TSL modding endeavors! However, I would like to let you know about uploading fixes for mods. You'll want to check the permission section of the readme or the mod's description and, or contact the originally mod author to ask him for permission to use his files before uploading any mod that has his/her files. In this case, I think the author is Varsity Puppet so send him a PM and ask him. Quote Share this post Link to post Share on other sites
JulieLakaye 1 Posted December 22, 2017 Thank you for your advice, jc2 I've just sent a PM to the author of the mod asking for his/her opinion on this matter. If he/she would rather update it him/herself, I'll just send him/her the files Quote Share this post Link to post Share on other sites