zdswulyx Posted August 2, 2016 Share Posted August 2, 2016 My first mod, a simple companion that allows your character to carry any amount of loot. Your magical chest is waiting in the Kvatch Encampment. You can download it from here:http://s000.tinyupload.com/?file_id=34604690149703349808 Enjoy. Link to comment Share on other sites More sharing options...
lubronbrons Posted August 3, 2016 Share Posted August 3, 2016 I don't understand why you not put your file in nexus modanywaythx Zd for sharing with us ! Link to comment Share on other sites More sharing options...
zdswulyx Posted August 3, 2016 Author Share Posted August 3, 2016 (edited) It's quite simple, I was hoping in some feedback before that. I would like to add some functionalities also: multiple drawers and a cheat version that is also a (e.g., mercantile 100) merchant so you can also sell your loot. Sounds good? Edit: Too bad I cannot make MessageBox work... :S Edit(2): oh, who cares. here it is. Edited August 4, 2016 by zdswulyx Link to comment Share on other sites More sharing options...
Oblivionaddicted Posted August 7, 2016 Share Posted August 7, 2016 Nice idea. I already have a french mod based on the same concept with many more features. Link to comment Share on other sites More sharing options...
zdswulyx Posted August 9, 2016 Author Share Posted August 9, 2016 What features? I was considering to add: multiple drawers, a quick way to sell the content of a drawer, using the Luggage as sleeping place, using the Luggage as merchant, teleport the Luggage nearby the owner if it strands away. The quick way to sell is probably the most difficult. Link to comment Share on other sites More sharing options...
Surilindur Posted August 9, 2016 Share Posted August 9, 2016 (edited) The quick way to sell is probably the most difficult. Depends on how you are going to implement it. If you use OBSE, you can write up a simple "user-defined function" or whatever they are called (an object script that acts as a function). Getting the total gold value for items should be relatively straightforward, and then adding a small multiplier to account for something random, or maybe player skill. Currently on my laptop with no chance to test, but maybe something like this (assuming GetItems returns a list of base objects that can actually be used like that): ScriptName ezzeFnItemsToGold ; the "ezze" part is from your previous script examples (I think they had that prefix) ; this is called on the container that holds the items int iCount float fTotal float fRandPortion ref rBase ref rGoldTarget short bSilentAdd ; whether to add silently short bPrintInfo ; whether to print info to console array_var aTemp ; underscore before script block name to apply OBSE compiler override Begin _Function { rGoldTarget bSilentAdd bPrintInfo fRandPortion } ForEach aTemp <- ( GetItems ) ; something like this DID WORK last I checked let rBase := *aTemp ; unwrap the ref (I think it is needed) If Eval ( IsQuestItem rBase ) Continue ; skip quest items EndIf let iCount := GetItemCount rBase let fTotal += ( GetGoldValue rBase ) * iCount RemoveItemNS rBase iCount Loop If Eval ( bPrintInfo ) PrintC "ezzeLuggage: Total value (%.2f), fRandPortion (%.2f)" fTotal fRandPortion EndIf ; calculate the random portion If Eval ( fRandPortion > 0 ) && ( fRandPortion <= 1 ) let fTotal := ( fTotal * ( 1 - fRandPortion ) ) + ( Rand 0 ( fTotal * fRandPortion ) ) EndIf If Eval ( bPrintInfo ) PrintC "ezzeLuggage: Value after random mod (%.2f)" fTotal EndIf If Eval ( bSilentAdd ) rGoldTarget.AddItemNS F fTotal Else rGoldTarget.AddItem F fTotal EndIf If Eval ( bPrintInfo ) PrintC "ezzeLuggage: Septims (%.2f), added to (%i)" fTotal rGoldTarget EndIf End But the console printings could be substituted with DebugPrint combined with SetDebugMode (a much, much better solution). The custom function could be called on the ref (that contains the inventory). ; ezzeFnItemsToGold goldTarget:ref silent:bool consolePrint:bool randPortion:float YourMimicRef.Call ezzeFnItemsToGold PlayerRef 0 1 0.5But as I mentioned, I do not have any means to test it at the moment, which makes that a completely untested script. I just wrote it to give you an idea of what the thing could potentially look like in Oblivion scripting. More info on custom function here (if you have not yet found it): http://obse.silverlock.org/obse_command_doc.html#User_Defined_Functions Hopefully that helps a little. If someone has a better suggestion, let me know. :smile: Edited August 9, 2016 by Contrathetix Link to comment Share on other sites More sharing options...
zdswulyx Posted August 9, 2016 Author Share Posted August 9, 2016 (edited) It's helpful, yes. I was thinking something similar. Here is my idea, but I did not go coding yet. When the game is in MenuMode and it's actually a merchant (using MenuMode + IsBarterMenuActive), add an item called "sell drawer 1 content" in the player inventory with the value based on the sum of values from the container, just like you did in your code example. On the OnSell function of that item transfer all container items to the merchant and finally remove the item from his inventory. Now I cannot find it, but I am fairly sure I found a function that moves references from a container to another. On the other hand if after after the end of the menu mode the item is still in the player inventory; remove it from there. Edited August 9, 2016 by zdswulyx Link to comment Share on other sites More sharing options...
Surilindur Posted August 9, 2016 Share Posted August 9, 2016 Now that definitely sounds more... well... immersive (oops, I used the word :sick:). If you manage to make that work, it would probably be better than running some background function to magically turn stuff into gold. Haha. I was thinking about adding a dialogue topic to any merchant NPC (a universal topic with some relevant conditions only) with that function in the result box. But your idea sounds better, and if you manage to make it work, that would be great. :thumbsup: Link to comment Share on other sites More sharing options...
zdswulyx Posted August 9, 2016 Author Share Posted August 9, 2016 (edited) I found the function I was thinking of: RemoveAllItems. However, I now notice the caller is actually a "ActorID" I wonder if it works with containers. I guess I have to try. Why you don't like the word "immersive" :D ? Edited August 9, 2016 by zdswulyx Link to comment Share on other sites More sharing options...
Surilindur Posted August 9, 2016 Share Posted August 9, 2016 I found the function I was thinking of: RemoveAllItems. However, I now notice the caller is actually a "ActorID" I wonder if it works with containers. I guess I have to try. Why you don't like the word "immersive" :D ? From what I have read, one has to be careful with RemoveAllItems. It had some issues with some items, I think quest items at least, but I am not sure. The page has some notes, it seems. People slap "immersive" on everything in the Skyrim section, and it is slowly turning into a bland "salesword" in my mind with no real function to it - other than taking up space from other even more silly words. Also, I think it is a matter of taste and/or preference - people might find different types of things "immersive", and not all might agree on everything potentially "immersive" actually being "immersive". It is like "lore-friendy": someone can add in a functional train and firearms, and while it could be considered "immersive" by some because of the Dwemer and "lore-friendly" by others, there would always be those who disagree, saying it is neither "immersive" nor "lore-friendly". Sometimes those two words are somewhat flammable, too. The Internet is a handy way to unintentionally collect a bunch of overzealous fanatics in the same place, and magic words such "immersive" and "lore-friendly" can result in those fanatics having a discussion of sorts... :laugh: So, instead of "immersive", I would say the user experience could potentially be more familiar and more intuitive with your idea than mine, when the selling of items would be integrated in the existing familiar merchant interface already present in the game. Maybe? :wacko: Link to comment Share on other sites More sharing options...
Recommended Posts