SphereServer BugTracker - SphereServer
View Issue Details
0002226SphereServernew feature requestpublic19-10-13 11:0610-11-13 00:14
XuN 
Ben 
normalfeaturehave not tried
resolvedfixed 
Windows8 x64pro
16-06-2013, 0.56b Prerelease 
0.56c Nightly 
Automated (specify build number)
None
None
1651
0002226: Item categorization
We've talked a bit about this in IRC and it would be nice to have a way to make use of 'category, subsection and description' already applied on items/chars so we can make a new and better .add, and few more things.

I think it could be good to add a new function to sphere_serv_Triggers, something like f_onobj_load, wich would fire on server startup when writing items/chars in memory, that gives us that information and we can make use of it creating lists, writing html content, sql, or whatever.

Or just a way to access to EVERY item and char created as for now we can access with loops via script only to numerically defined objs [itemdef 0aed] but not named ones [itemdef i_whatever].
No tags attached.
Issue History
19-10-13 11:06XuNNew Issue
22-10-13 17:27CorujaNote Added: 0001744
23-10-13 13:07XuNNote Added: 0001745
23-10-13 14:35xwerswoodxNote Added: 0001748
27-10-13 18:20BenAssigned To => Ben
27-10-13 18:20BenStatusnew => assigned
27-10-13 19:12BenNote Added: 0001751
27-10-13 19:12BenStatusassigned => resolved
27-10-13 19:12BenFixed in Version => 0.56c Nightly
27-10-13 19:12BenResolutionopen => fixed
03-11-13 23:59XuNNote Added: 0001757
03-11-13 23:59XuNStatusresolved => feedback
03-11-13 23:59XuNResolutionfixed => reopened
10-11-13 00:14BenNote Added: 0001765
10-11-13 00:14BenStatusfeedback => resolved
10-11-13 00:14BenResolutionreopened => fixed

Notes
(0001744)
Coruja   
22-10-13 17:27   
I never tried this, but maybe you can use a function to access all objects based on the UID list.
But I think it will be too heavy, just imagine how long it will take to loop through 1.000.000 objs. And even make it worse when using WRITELINE, since sphere takes a huge time to write on files (write on RAM is much faster than write on the physical HD)

[FUNCTION lol]
FOR 0 <NEW> //0 to latest created UID
 REF1=<UID.<LOCAL._FOR>>
 IF (<REF1>) //proceed only if REF1 exists, since the UID list has many gaps caused by deleted objs
  REF1.something
 ENDIF
ENDFOR
(0001745)
XuN   
23-10-13 13:07   
The problem for this to work propperly is that you must have every item created ingame so the FOR will check for every item scripted (or npcs) and doing it manually doesn't worth.
(0001748)
xwerswoodx   
23-10-13 14:35   
If you want to get CATEGORY with <serv.item.ID.category> I agree with you, It's very important in sometimes.
(0001751)
Ben   
27-10-13 19:12   
Added Something that should help with this... See changelog
(0001757)
XuN   
03-11-13 23:59   
Is it possible to make also DupeItem readable? is a pain in the ass to work with dupelists, i had to make a list of 'banned_items' and add items inside it so in each input i check if the itemdef is not there to add it to real lists, but since some items are loaded before... i have to do a check after finishing reading all the lists created to remove items inside this list.
(0001765)
Ben   
10-11-13 00:14   
Adding dupeitem as a readable variable.