Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Has anyone created a vendor that doesn't read the entire config notecard into memory?

Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
06-11-2006 12:34
... And therefore can handle virtually unlimited inventory? And hopefully is a freely available script?

:)

I thought I'd ask before I started writing one for a friend. I looked through some of the usual suspects in the script library, and most of them seem to pull everything into memory, which won't work for what I'm trying to do. Ideally, I need something that reads the next notecard line when the 'next' button is clicked. I'm still going through Fenrir Reitveld's SVN thread to try and figure out how it works, that seems to be my best bet so far.
Joannah Cramer
Registered User
Join date: 12 Apr 2006
Posts: 1,539
06-11-2006 12:47
From: Ziggy Puff
... And therefore can handle virtually unlimited inventory?

Yes.. dunno if there's a free version available out there, but if you can't find one, let me know.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
06-11-2006 13:55
From: Ziggy Puff
... And therefore can handle virtually unlimited inventory?


heh thats the first time ive ever heard 64kb as virtually umlimited

um i dont have a vendor script, but here is a little 2 way one line @ a time notecard reader i whipped up, altho it probally could be done much better, its just for example... from here it wouldnt take much more to be a vendor

CODE

string notecard = "";

integer count = -1;
integer total;

key start;

get_info(){llGetNotecardLine(notecard,count);}

default
{
state_entry(){start = llGetNumberOfNotecardLines(notecard);}

touch_start(integer n)
{
string input = llGetLinkName(llDetectedLinkNumber(0));

if (input == "NEXT")
{
++count;
if (count > total) {count = 0; get_info();}
else get_info();
}

else if (input == "BACK")
{
--count;
if (count < 0) {count = total; get_info();}
else get_info();
}

else {llWhisper(0,"BUY NOW!!!"); return;}
}

dataserver(key id, string data)
{
if (id == start) total = ((integer)data - 1);
else llOwnerSay(data);
}
}
Nick Shatner
Isn't a game
Join date: 11 Jul 2005
Posts: 39
06-11-2006 14:07
From: Osgeld Barmy
heh thats the first time ive ever heard 64kb as virtually umlimited


Being a tad too generous there - 16kb :P
Moonshine Herbst
none
Join date: 19 Jun 2004
Posts: 483
06-11-2006 14:12
It is not free, but JEVN with the JENC combo can easily handle a couple thousand products. Vendors are completely modifiable on look and feel. Plus, its networked, with central servers. No need to fly around updating vendors when you have something new out. A click on the update button is enough to update all vendors in world.

Priced at somewhere below 5K, its really a bargain. Also, the creator is not that hard to convince if you need it modded in some way. IMO spending lots of time scripting something with lower specs is a waste of time.
_____________________

Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
06-11-2006 14:13
From: Nick Shatner
Being a tad too generous there - 16kb :P


Actually, the method that was being referred to was to read only a line of a notecard at a time, and not load everything into the script's variables. A notecard can be 64kb, hence, the 64kb limit.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
06-11-2006 14:20
From: Moonshine Herbst
It is not free, but JEVN with the JENC combo can easily handle a couple thousand products. Vendors are completely modifiable on look and feel. Plus, its networked, with central servers. No need to fly around updating vendors when you have something new out. A click on the update button is enough to update all vendors in world.

Priced at somewhere below 5K, its really a bargain. Also, the creator is not that hard to convince if you need it modded in some way. IMO spending lots of time scripting something with lower specs is a waste of time.


isnt that the same one that comes up with some MAJOR exploit every patch? also its not like ppl are spending LOTS of time making vendors, i spent a whole 5 min on my notecard reader, maby about another 5 min worth of scripting to add in the data phraser and payment stuff... and you dont have to read a novel to get 1 5k vendor to work in your buddies shop


oh and what Alondria LeFay said is where i got 64kb from
Moonshine Herbst
none
Join date: 19 Jun 2004
Posts: 483
06-11-2006 14:25
From: Osgeld Barmy
isnt that the same one that comes up with some MAJOR exploit every patch? also its not like ppl are spending LOTS of time making vendors, i spend a whole 5 min on my notecard reader, maby about another 5 min worth of scripting to add in the data phraser and payment stuff... and you dont have to read a novel to get 1 5k vendor to work in your buddies shop
That is up to you, of course. I've had no problems with exploits, having the vendors out at SL's most popular places. It took me less than an hour to set it up with +200 products in several categories, with profit split to my external designers. But of course, if you can do as good in 5 minutes, more power to you. :D
_____________________

Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
06-11-2006 14:29
From: Moonshine Herbst
That is up to you, of course. I've had no problems with exploits, having the vendors out at SL's most popular places. It took me less than an hour to set it up with +200 products in several categories, with profit split to my external designers. But of course, if you can do as good in 5 minutes, more power to you. :D


didnt say AS good :) just saying for the application @ hand ...
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
06-11-2006 14:42
I think JEVN is probably overkill for this application. Thanks for the code snippet :) I was mostly hoping to find a framework/skeleton to work from that I could then mod to add the features I need.

Joannah, I'll get in touch with you in-game later.
Zalandria Zaius
Registered User
Join date: 17 Jan 2004
Posts: 277
That datareader is slow
06-11-2006 17:29
While your in there you may want it to read the line before, and line after, after showing the current item so as to hide the lag a little. People flip through vendors so fast sometimes it lags out mine that are holding everything in memory..
Julia Banshee
Perplexed Pixie
Join date: 16 Jan 2006
Posts: 97
06-11-2006 18:13
From: Zalandria Zaius
While your in there you may want it to read the line before, and line after, after showing the current item so as to hide the lag a little. People flip through vendors so fast sometimes it lags out mine that are holding everything in memory..

If you make a "Buy"-based vendor, you don't have to worry about the lag of reading notecards, you just rez the next plaque by number. Avoids the 64K limit that way, too.

Then again, I don't have much inventory. Even a notecard-based vendor is overkill for my usage. YMMV... ;)
Nepenthes Ixchel
Broadly Offended.
Join date: 6 Dec 2005
Posts: 696
06-11-2006 19:43
From: Alondria LeFay
Actually, the method that was being referred to was to read only a line of a notecard at a time, and not load everything into the script's variables. A notecard can be 64kb, hence, the 64kb limit.


But notecards can point to other notecards, so storage is effectivly unlimited... provided you are willing to put up with insanely hard coding and notecard writing.

In practical terms, 64kb is probably the limit before things get too unmanageable. But I'm tempted to make a 128k vendor now just to be stubborn. :-)

From: Osgeld Barmy
isnt that the same one that comes up with some MAJOR exploit every patch?


And then blames it on an an LSL "exploit", making accusation other vendors are still vulnerable and only JEVN has the fix? Yeah, things like that are why I'm not using the JEVN system. I'm currently using KDC's networked vendors, with a little extra script of my own added to provide email notification.

If I wasn't so caught up in RL stuff right now I'd like to make my own networked vendor using some of the public vendor code as a base. That way I'd have a vendor that functioned exactly the way I want. I've already done that for non-networked vendors, but I have too many storefronts now for that to be manageable.