Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2024-10-13 01:11:58



Reply to topic  [ 3 posts ] 
Inventory Link Search & Replace 
Author Message

Joined: 2012-03-22 19:43:50
Posts: 11
Reply with quote
One thing I've found very useful in Firestorm (and just about the only reason I ever use it) is to replace inventory links with a different item. For example, it can find all instances of links to "XYZ Red Dress" and replace them with links to "XYZ Blue Dress". Any possibility this could be added to Cool VL Viewer? I probably do this sort of thing once a week.

And thanks for all the work you do Henri.


2018-04-19 05:49:58
Profile

Joined: 2009-03-17 18:42:51
Posts: 5801
Reply with quote
I'm against bloat, and frankly this feature would be just that, given how few people would "need" it and how often they would use it... So, no, not on my agenda.

However you could code it using Lua scripting (with MakeInventoryLink(), DeleteInventoryLink(), ListInventoryFolder() to delete and recreate the links, MakeDialog() for the UI dialog, etc). The very reason for Lua scripting in the Cool VL Viewer is precisely to add such features that do not deserve being hard-coded in the viewer C++ sources: I'd rather add new Lua functions to allow implementing such features with Lua than implementing them in C++ and bloating the viewer code as a result.


2018-04-19 09:09:29
Profile WWW

Joined: 2011-09-27 11:18:31
Posts: 203
Reply with quote
Question: how do we find the inventory path of a certain item, knowing its UUID? ListInventoryFolder does the reverse.

I've started thinking about this, and what I have so far is:

Define: ReplaceInventoryLinks(A,B)
0. Input: A (item given by full inventory path case sensitive, with "|" used as folders separator)
0. Input: B (item given by full inventory path case sensitive, with "|" used as folders separator)
1. FindInventoryObject(A) → keep only those for which type = AT_LINK = 24 and of them only the "id" (=UUIDs) → UUIDofA (make a new array using an existing array)
2. For all i in UUIDofA,
2a. we find its inventory path (how?) → pathofi
2b. DeleteInventoryLink(pathofi|i)
2c. MakeInventoryLink(B,pathofi)

Define: DeleteInventoryLinks(A)
0. Input: A (item given by full inventory path case sensitive, with "|" used as folders separator)
1. FindInventoryObject(A) → κρατᾶμε μόνον αὐτὰ γιὰ τὰ ὁποῖα type = AT_LINK = 24 καὶ κρατᾶμε μόνον τὰ "id" (=UUIDs) → UUIDofA
2. For all i in UUIDofA,
2a. we find its inventory path (how?) → pathofi
2b. DeleteInventoryLink(pathofi|i)

Am I thinking correctly?


2024-01-30 17:37:14
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.