Jump to content

'Not'-cha or "I can't believe it's not Gacha" possibilities.


Quistess Alpha
 Share

You are about to reply to a thread that has been inactive for 989 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Given the following stipulation from the new gacha policy:

Quote

We will continue to allow any sales where a payment is given for a known item

I think there are a variety of ways to make a vendor that still fits the spirit of "Gacha" but remains within the letter (and to varying degrees the spirit) of the policy.

I've put together a script that can configured in a few different ways (all of which give a known item upon payment) and I think it would be useful if @Patch Linden or otherwise could provide some  guidance as to whether these possibilities are in violation of the new policy:

(roughly in order from most-acceptable seeming to least):

  1. Limited time sale: (mode 1, any nextItem option) The vendor lists an item for sale for a short period of time, anyone may buy the item while it is listed. (Common items might be more likely to be shown at any given time, if you want a rare you may have to wait until it shows up)
  2. Conveyor/Fixed order Restocking (mode 11, nextItem 1) The vendor lists an item for sale for a medium amount of time, after an item is sold, the next item in the queue will be listed, and the queue is shuffled when the timer runs out. If you buy as many items as there are in the set before the timer runs out (and nobody is competing with you) you will get one of every item.
  3. Random Restocking (mode 2, any nextItem) The vendor lists an item for sale indefinitely. After it's sold, another item will be put on display. (If you want a rare, you may be inclined to purchase commons in the hopes a rare will show up, but you always know what item you will receive from a purchase)

Anyone else have other fun ideas? with the script below there are also some other variations that could be fun, for example, mode 9 and a small gTimeAvailable could encourage people to keep buying an item to keep the vendor fixed on it.

Reference Script:

//"I can't believe it's not Gatcha" script: 
integer mode = 1;
// Modes: (actually a bitmap)
//1: 'limited time', each item is shown for a specific time then another item is shown.
//2: 'Switch after purchase', change the item after purchase.
//3: Both of the above.
//4: 'reset time after purchase' the timer goes back to gTimeAvailable after a purchase.
//8: 'Randomize list after coutdown'
integer nextItem = 0;
// 0: totally random,
// 1: conveyor belt
// 3: conveyor belt & randomize list order after each cycle.

list gNamePicPrice =
[   "Notcha item 1","texture 1",50,
    "Notcha item 2","texture 2",50,
    "Notcha item 3","texture 3",50
    // no final ','
];

//options only relevant in modes 2 or 3:
integer gTimeAvailable = 300; // each item shown for 300 time units;
float gTimeUnit = 1.0; // ticks down once per second.

//
// end config variables.
//

integer gIndexSale; // index into gNamePicPrice;

string gNameForSale;
integer gPriceSale;

integer gTimeLeft;

set_for_sale(integer index)
{
    llSetText(
        (gNameForSale=llList2String(gNamePicPrice,index))+
        llList2String(["","\n"+(string)gTimeAvailable],mode&1),
        <0,1,0>,1.0);
    llSetTexture(llList2String(gNamePicPrice,index+1),0);
    gPriceSale=llList2Integer(gNamePicPrice,index+2);
    llSetPayPrice(gPriceSale, [PAY_HIDE ,PAY_HIDE, PAY_HIDE, PAY_HIDE]);
}
choose_next_item_random()
{
    gIndexSale = 3*(integer)llFrand(llGetListLength(gNamePicPrice)/3);
}
choose_next_item_conveyor()
{
    if(--gIndexSale<0)
    {
        if(nextItem&2)
            gNamePicPrice = llListRandomize(gNamePicPrice,3);
        gIndexSale=llGetListLength(gNamePicPrice)-3;
    }
}
default
{
    state_entry()
    {
        llRequestPermissions(llGetOwner(),PERMISSION_DEBIT);
        if(mode&1) llSetTimerEvent(gTimeUnit);
    }
    timer()
    {
        if(--gTimeLeft<0)
        {
            gTimeLeft = gTimeAvailable;
            // only use 1 next item selection method:
            if(mode&8)
                gNamePicPrice = llListRandomize(gNamePicPrice,3);
            if(nextItem==0)
            {   choose_next_item_random();
            }else if(nextItem&1)
            {   choose_next_item_conveyor();
            }
            set_for_sale(gIndexSale);
        }
        llSetText(gNameForSale+"\n"+(string)gTimeLeft,
            <0,1,0>,1.0);

    }
    money(key id, integer amount)
    { // taken directly from the Wiki:
        if (amount < gPriceSale)
        {   // Customer has not paid enough
            llInstantMessage(id, "That's not enough money.");
            llGiveMoney(id, amount);   // Refund the money they paid
            return;
        }
        if (amount > gPriceSale)
        {   // Customer paid too much. Refund the excess
            integer change = amount - gPriceSale;
            llInstantMessage(id, "You paid more than L$" + (string)gPriceSale
                + "  your change is L$" + (string)change );
            llGiveMoney(id, change);
        }
        // Customer has paid at least the right amount. Give them the item.
        llGiveInventory(id, gNameForSale);
        llInstantMessage(id, "Please accept your purchase worth L$" + (string) gPriceSale);

        if(mode&2)
        { // switch after purchase
            if(nextItem==0)
            {   choose_next_item_random();
            }else if(nextItem==1)
            {   choose_next_item_conveyor();
            }
            set_for_sale(gIndexSale);
        }
        if(mode&4)
        { // reset time after purchase
            gTimeLeft=gTimeAvailable;
        }
    }
}

*script was not tested thoroughly, may contain bugs.

Link to comment
Share on other sites

 

seems Linden are still working on what is/isn't allowed under the new policy FAQ. And we will know soon enough I suppose

i think that it will come down to 2 things

1) Transfer permission of the item (which Patch Linden has already referred to in the other thread)

2) A definition of 'random'. I think that the easiest governance method for Linden will be to disallow the use of llFrand or other PRNG within the device when the items are Transfer and the 'random' method determines the presentation order. Whether the presentation  be 1 item forward or 10 forward, drawn/shown from some larger ordinal set randomly ordered

we will have to wait and see tho what Linden comes up with to be sure

Link to comment
Share on other sites

1 minute ago, Mollymews said:

1) Transfer permission of the item (which Patch Linden has already referred to in the other thread)

To be honest that's really confusing me (for reasons others have articulated better than I could on the other thread (Ex. Gacha Tickets)).

I'm betting on the definition of "Known item" being the more important deciding factor, but I suppose discussing specific "solutions" and possibilities is a bit premature when we don't have a clear picture of what the rules are yet.

Even without scripted randomness, selling things on a fixed but random-seeming schedule (Ex. the best (transferable) rare is only sold from 8-9 pm on tuesday nights) seems to me like it'd be allowed under any reasonable implementation of the no-gacha policy. How far down the slippery slope you can slide though, is an interesting question.

Link to comment
Share on other sites

1 hour ago, Quistess Alpha said:

Even without scripted randomness, selling things on a fixed but random-seeming schedule (Ex. the best (transferable) rare is only sold from 8-9 pm on tuesday nights) seems to me like it'd be allowed under any reasonable implementation of the no-gacha policy. How far down the slippery slope you can slide though, is an interesting question.

i think variable spot pricing could be done. Like the vendor array displays all the items in the set.  The vendor changes the price of each item according to some schedule. Right now the 'rare' is 100L, next minute it is 1000L and so on

altho this does lend itself to sniping the vendor with a bot

 

redacted my ps. comment as it doesn't belong here

Edited by Mollymews
Link to comment
Share on other sites

2 minutes ago, Tonk Tomcat said:

How about just selling the items so anybody can buy them instead of trying to build a gatcha-alike thing again? Nobody can tell me that the "customers" like to pay a ton of money or wait ages till they finally get what they really wanted.

to be fair, Quistess (and me as well) are into scripting. And we never met scripting ideas we never liked. At least anyway, wondering how an idea can/could be scripted and exploring whether or not  a script would be compliant with the ToS, whatever the ToS might be on any matter 

and Quistess did move my ps. comment and their response to the other thread where it does belong

  • Like 1
Link to comment
Share on other sites

55 minutes ago, Tonk Tomcat said:

 Nobody can tell me that the "customers" like to pay a ton of money or wait ages till they finally get what they really wanted.

I point you to lucky chairs/boards/etc.  People seemingly stand around for hours for their letter to come up and hope that they get it before someone else with the same letter grabs it.  Granted it's for free stuff, but still.  People that will wait around for ages for something is proven.  :)

  • Like 1
Link to comment
Share on other sites

1 hour ago, Tonk Tomcat said:

How about just selling the items so anybody can buy them instead of trying to build a gatcha-alike thing again? Nobody can tell me that the "customers" like to pay a ton of money or wait ages till they finally get what they really wanted.

Yes, Being the devil's advocate I'm going to tell you exactly that, well perhaps with a bit of nuance. In a virtual economy, where supplies never run out, there's no sense of Rarity or uniqueness. Sure I (speaking as a hypothetical merchant) could make a thing, say a fancy hat for example, and sell only one copy of it to a customer and it would be their special hat, but I'd have to start charging outrageous prices for each hat to keep afloat. On the other hand, if I could make some scripted system that would help my customers feel like their hat is special and unique, I wouldn't have to charge so much, and they could get to feel special. Hopefully a win-win.

Now of course the simplest way to make something unique would be to only sell a fixed number of them. but that's not as fun for the customer (Yes, I think getting a random thing, and Skinner boxes are "fun" for a lot of people, even if they are also exploitative and unethical, those are not mutually exclusive) and no more income for me when I've sold the last unit.

So the question becomes, now that Gacha's are Banned, how do we (speaking as a scripter) design something that has as many of its benefits as possible, while still being compliant with LL's policies and the global community's evolving sense of ethics.

I think the problems with Gachas are pretty clear and I'm not at all sad to see them go, but I know that even if I do nothing, there are others who will try to make something as close ot gacha as possible without actually being Gacha, because they know the market is there. On the one hand I think it's an interesting problem, and worth puzzling over. On the other, this seems like a golden opportunity for something like gacha, but better to come out. the scripting isn't that hard. Once someone makes a successful 'not'cha, I can't imagine it will be all that hard for anyone who knows what they're doing to study it and make a knockoff, but subtle differences in design could make very similar products better or worse or compliant/non-compliant. so I think an open discussion about what the best possible gacha alternatives might be and how to implement them would be useful.

Some things (not-exhaustive) people like about Gachas:

  • Artificial Rarity. As I Discussed above, because you have to put in some "work" to get a rare gacha, it feels more special and unique.
  • Sliding Price. For people who just want the thing and don't care about the color/type/specialness The "common" versions of a gacha can be priced even below their resale value (I'd pay more for a green widget than for one which might be red, green or blue), making them more affordable than some non-gacha alternatives.
  • Resale market. because an opened box can be more valuable than a closed one, this creates a large secondary market that a lot of people "rely" on for SL income. (Whether this is a good thing or not is debateable, but it's hard to deny that resellers are going to be very hungry for things to sell soon)

I'm sure there are ways to do some or all of these things without "Gacha Mechanics"; A combination of no-copy/trans perms and lucky letter chairs is another interesting idea. (although if people game it by making an alt for every possible first letter. . .)

Edited by Quistess Alpha
Quoted wong person.
Link to comment
Share on other sites

4 hours ago, Anna Salyx said:

I point you to lucky chairs/boards/etc.  People seemingly stand around for hours for their letter to come up and hope that they get it before someone else with the same letter grabs it.  Granted it's for free stuff, but still.  People that will wait around for ages for something is proven.  :)

me too. I have never met a lucky chair or board that I never liked

  • Like 2
Link to comment
Share on other sites

If lucky chairs did not change and are the same as i remember them years ago, ppl get stuff for free when they sit on them and don't have to pay. And for free things waiting is always something ppl do. The thing with "rarity" is in my eyes just a creator reason to make a ton of money, because i know a lot of ppl who hated gatchas. They just want a good looking item and not some rarity. Nobody will run around and tell you about the rarity they finally got. But yeah, i'm just a full time creator since 15 years in here, so what do i know :) I apparently have a different mindset when it comes to cashcowing customers. So i'm happy for you if you find a way to do your system, sorry for the interruption.

Link to comment
Share on other sites

2 hours ago, Tonk Tomcat said:

because i know a lot of ppl who hated gatchas.

Just because "ppl" don't like a thing, doesn't make it bad. I think the "grind" of a gacha is a little bit similar to the "grind" in a JRPG or MMO. With the former people can bemoan "I just want to pay more and get the thing" with the latter "I just want to see the story and get to max level already", but in either case, if you give people what they ask for, they don't necessarily like it as much as they thought they would. People don't always actually know what they want.

 

3 hours ago, Tonk Tomcat said:

The thing with "rarity" is in my eyes just a creator reason to make a ton of money,

Do cite any hard evidence you have to tell me I'm wrong, but it seems to me it's the resellers who had the most to gain from gachas, not the original gacha merchants. If everyone hated them, nobody but resellers would buy them, and if only resellers were buying them, it would effectively be a paid marketing scheme for the original merchant. (which in my eyes is more practicality than greed).

My original point (perhaps not well-made?) still stands: *some* people obviously liked Gachas. What parts did they like the most, and how can we design systems that can more ethically implement the good fun things about Gacha.

Link to comment
Share on other sites

Some more 'not'cha ideas:

#1. Gift gachas. If you don't pay for the gacha, it shouldn't be in violation of the new policy. You could either have them as group gifts (assuming there's no fee to join the group) and a 1-(per set)-per-person rule, or as a 'gift-gacha fatpack' where one buys a set containing one of each item, but the items are packaged in identical looking (gacha) boxes (boxes are transfer, but "opening" one gives you a no-transfer item); Open them until you get the one you want, then give away the unopened ones to your friends.

#2. Restocking shelves. Have the vendor pretend to act like a shelf at a supermarket. There are only so many of each item on the shelf (artificial scarcity), and the wait time for how long it will take to restock depends on how empty the shelf is ( llSetTimerEvent((float)items_on_shelf/total_Number_items); timer decrements a variable; restock when variable==0 or empty shelf) or some other advertised deterministic criteria for restocking (most exploitative would be to require everything to be sold before restock)

#3. Skill-based. (I believe someone else mentioned this somewhere.) Any number of possibilities to make prizes for a "skill-based" game, or make things directly purchasable with 'arcade tokens'.

Link to comment
Share on other sites

1 hour ago, Mollymews said:

the FAQ has been updated, and conveyor systems are allowed

so can start scripting them up

Hope they don't backtrack on that before everyone goes script crazy. It's only the 3rd day. Anything can happen.  Actually, personally, I hope they do backtrack.

  • Like 1
Link to comment
Share on other sites

2 hours ago, Sam1 Bellisserian said:

Hope they don't backtrack on that before everyone goes script crazy. It's only the 3rd day. Anything can happen.  Actually, personally, I hope they do backtrack.

Yeah, from a moral standpoint I don't see a "conveyor" as defined in the FAQ to be really any different to a normal Gacha functionally, except with an added step, and I personally think such systems fit the definition of "chance-based outcome as a result of a payment". "Restock Vendor" sounds much less 'lootbox'-like than "gacha" though.

  • Like 1
Link to comment
Share on other sites

Quote

#3. Skill-based. (I believe someone else mentioned this somewhere.) Any number of possibilities to make prizes for a "skill-based" game, or make things directly purchasable with 'arcade tokens'.

hmm, so, if you make a skill game that costs to play, and gives prizes based on score? would that work?

( I did a mod of this one at a recent Burningman event, very popular)

https://marketplace.secondlife.com/p/Steam-Fair-Whack-a-Pirate-Game-12-prims/6323707

High Score = the Rare!

3a46ffa51a4aeef64c2dbf61bc06ac4b.png

Edited by Xiija
  • Like 1
Link to comment
Share on other sites

1 hour ago, Xiija said:

hmm, so, if you make a skill game that costs to play, and gives prizes based on score? would that work?

Yesish, but also very much no. Yes skill games exist, so it's possible, but you need to go through an expensive application process, which (for the creator) involves getting a verified legal opinion (from a licensed lawyer) on why your game is legal in the 30 something states skill games are allowed in, and paying a recurring fee to LL for admin costs.

iirc there are 66 approved games and 47 approved creators.

http://wiki.secondlife.com/wiki/Linden_Lab_Official:Second_Life_Skill_Gaming_Approved_Participants

http://wiki.secondlife.com/wiki/Linden_Lab_Official:Second_Life_Skill_Gaming_FAQ

TL;DR, Unless you have a /lot/ of $$$ to invest, you need to make your game free to play and give out no more than L$100 worth of value per play.

Quote

What is the max amount my players can earn while playing a freeplay Skill Game?

A player can earn up to L$100 (max amount) during one play through of a freeplay Skill Game.

 

Edited by Quistess Alpha
  • Like 1
Link to comment
Share on other sites

The LL blog seems very iffy, i think i will just skip doing anything but a normal vendor heh...

 

https://community.secondlife.com/blogs/entry/8586-policy-change-regarding-gacha/

Quote

7seas : the purchase of bait to go “fishing” is a purchase being made of a known item, and also the fish you catch while playing the game are non-transferable.  To be clear, if they are not currently, they must be going forward.

are these fish random?.. or  buying one type of bait Always gets you one type of fish? (guaranteed catch?)

it seems LL is giving them special preference ?

anyhoo, ... oh well :)

 

Edited by Xiija
  • Like 1
Link to comment
Share on other sites

15 hours ago, Kyau Brodie said:

Happy to see some creators already working on the new conveyor vendors!

miepon2

 

.

11 hours ago, Mollymews said:

i get that this is a first effort, but I think machines like this are going to get overrun by more sophisticated machines which will be far more popular with the customers

the new improved machines will allow the customer to buy any of the items in the conveyor queue,  upon which the queue will advance by 1 step from the bought item position

so if the customer doesn't want to buy 03, they can buy 01. (7th item in the queue) which will advance 8th, 9th, 10th, 11th items. And the next item will appear in the 11th position

 

6 hours ago, Lucia Nightfire said:

That would be too convenient and leave nothing but commons in the visible queue after the vultures picked the bones clean.

If I saw 11 items visible and one was a rare and I was allowed to buy any of those 11, it would be a no brainer what I would buy. Same goes for anything over commons.

But if someone can only buy the first item and you see a rare is coming soon, they might be enticed to buy what they don't want to get to it, perpetuating predatory selling.

 

1 hour ago, Mollymews said:

with a device of the pictured design a queue of 11 items, and a random selection algorithm, then all 11 items in the queue can be commons. Which means the player will have to pull a minimum of 12 times to get the 12th item into the buy window

at 100L a pull thats 1200L assuming the 12th item is not a common. 1200L is the minimum spend to not get a common. Then 100L a pull for each additional time that it is another common

or with the buy any displayed item, the player can pull 1 time, and the 12th item is not a common. Minimum spend 200L

the typical player prefers a minimum spend of 200L rather than 1200L for a similar item available elsewhere. And will tend toward frequenting the 200L opportunity shop, moreso than the 1200L opportunity shop

a way to ameliorate this 1200L pull effect is to not use a random algorithm, to use a non-random disordered sequence

a thing with this tho, is that players recognise non-random sequences when they see them. For the combinatory math inclined we can spot them more readily and when the non-random sequence algorithm is naive then can be taken advantage of. For those who aren't combinatory math inclined, they can feel/smell that something is off. They are expecting random and not getting it. When so they stop playing, especially at 1200L a pop
 

i post this conversation from the gacha policy thread, as something to think about when making conveyors/rollers

  • Thanks 1
Link to comment
Share on other sites

You can fish 7Seas without bait. It surprised me that more people didn't know that. So go out and be cheap like me for your fish!

Anyway, I like the idea of the vendor that changes what it sells at random (idea 1) and I'm not someone who has ever run a gacha. I see a random vendor as being more like the lucky chair experience rather than gacha, but with low prices rather than completely free. For that reason, it's also not likely to be allowed at events (lucky chairs are usually banned), but a possible fun thing for main stores.

Link to comment
Share on other sites

more conversation from the policy thread to think about when designing a not-a-gacha machine in name only

4 hours ago, Cackle Amore said:

Personally, if I was to try and reinvent the gacha, I'd just have it cycle through items on it's own timer, somewhere around the range of 1-5 minutes depending on if it's in a normal store or at an event.  It doesn't change until it's timer counts down, and anybody can buy into it's current available item, that way it takes away the player influence, and just becomes a matter of a time sink instead of a money sink.

One downside though is it might cause an issue of camping

 

2 hours ago, Mollymews said:

yes it will I think. People waiting round for the item they want to appear. Which some shops will be happy to do I think

is kinda inverse camping. The camper person rewards the shopkeeper in L$ as opposed to traditional camping where the shopkeeper rewarded the camper

 

2 hours ago, Cackle Amore said:

Yeah, in a way it'd be more  like an evolution of the old lucky chairs, just minus the letter part.

To add to the idea, to help give that little rush people like for rares, the timer could be shorter when those pop up, maybe anywhere from 25-50% shorter than the normal time

 

2 hours ago, Mollymews said:

adding on to this. I think a pay-to-play chair (items randomised like a conveyor belt) would work quite well

right-click and Sit the chair. Then you get say 30 seconds to pay for the item(s). If you don't pay in the time allowed for each item (as they are conveyed) then it unsits you and anyone else can sit

i think Sit is better than Touch to lock the machine to a player.  It will make it easier for everyone when the venue is busy. Nobody else will bother trying to Sit on the chair when some one else is already

it also solves the sniping problem

Sit would also solve the fishing game No-Transfer fish problem

a fishing chair. Sit the chair, buy the fish in the window within the time.  Some time later catch a fish. Caught fish shown in the window. Pay in the allowed time or get kicked off the chair

add more: thinking about this a bit more.  Free rod gets some kind of fish types.  Paid-for-rods get some kinds of other more 'valuable' fish. And so long as each type of paid-for-rod gives from the same fish set on the chair then I think it would be compliant for Transfer fish. No bait needed for this kind of fishing

edit again:

is quite a number of different games could be made this way

had a conversation in update thread about collectible cards and how to make the cards Transfer so that they can be tradeable

make a card table with a number of chairs. Sit a chair, other people can sit as well on the other chairs. Buy the card in the window for your chair to get into the game. Cards get dealt to each chair, are shown in the window

the table then random picks a player to go first. The player can buy any of the cards in the window. Then the table picks the next player. They buy any card. Next player picked and so, til all the players have bought a card. Then shuffle up and new game

player can stand and quit the game any time

get lucky and will get lots of 'valuable' cards. Get unlucky and oh! well, is always another game another day

 

Edited by Mollymews
  • Like 1
Link to comment
Share on other sites

in the update thread started to talk about the standard binomial distribution algorithm

is a number of ways to write this.  Here is an example of one way to do this which aligns with Contents direct indexing or a list of item names

by standard we mean that the numbers generated will conform to the distribution over the long run. Over short runs there can be deviations (which is expected behavior)

 

list bin = [1,2,3,4];
integer mag = 20;

/*
   [1] = 1:mag
   [2] = 2:mag
   [3] = 3:mag
   [4] = 4:mag
   [n] = mag - (1+2+3+4) :mag  (common)

   mag = 20. n = 10. ratio 10:20
   
   1/20 = 5%
   2/20 = 10%
   3/20 = 15%
   4/20 = 20%
   10/20 = 50%
   
   list bin can align with the respective items in Contents (either directly or list)
*/


// for checking distribution
list distribution;

integer binInit()
{
   integer len = llGetListLength(bin);
   integer sum;
   integer i;
   for(i = 0; i < len; i++)
      sum += llList2Integer(bin, i);
   if (sum < mag) bin += [mag - sum];
   return sum <= mag; // return TRUE when no error
}

 
integer binRand()
{
   integer r = (integer)llFrand(mag);
   integer n;
   integer i;
   do
   {
        n += llList2Integer(bin, i++);
   } while (n <= r);
   return --i; // list index of the bin item
}

default
{
   state_entry()
   {
      if( binInit() )
        state main;
      else
        llOwnerSay("initialisation error");
   }
}


state main
{
   state_entry()
   {
       // this is a fast way to fill a list with a same value. Doubles the number of elements appended on each pass
       distribution = [0];
       while (llGetListLength(distribution) < llGetListLength(bin))
          distribution += distribution;
       // this catches any overs appended
       distribution = llDeleteSubList(distribution, llGetListLength(bin), llGetListLength(distribution));  
       
   }
   touch_start(integer num)
   {
       integer i = mag * 100;
       while (i--)
       {
          integer r = binRand();
          distribution = llListReplaceList(distribution, [llList2Integer(distribution, r) + 1], r, r);
       }
       llOwnerSay(llList2CSV(distribution));
   }
}

 

  • Like 1
Link to comment
Share on other sites

9 hours ago, Mollymews said:

Here is an example of one way to do this which aligns with Contents direct indexing or a list of item names

It's going to take me a bit to parse that fully, but thank you!

I notice one of the operations you're doing would (probably, tell me if I'm wrong) be better implemented with the little-known llListStatistics() function.

Quote
integer binInit()
{
   integer sum = (integer)llListStatistics(LIST_STAT_SUM,bin);
   if (sum < mag) bin += [mag - sum];
   return sum <= mag; // return TRUE when no error
}

 

 

  • Like 2
Link to comment
Share on other sites

2 hours ago, Quistess Alpha said:

I notice one of the operations you're doing would (probably, tell me if I'm wrong) be better implemented with the little-known llListStatistics() function.

 

yes that works as well

i did the example by looping as in a full fledged app then we probably want to also validate that each item referenced in bin is also present in Contents

llListStatistics is a pretty nice function tho

 

ps add: is other optimizations we can make

for example when we can get a runtime efficiency by moving the addition to the initialisation stage

 

list bin = [1,3,6,10,20];

integer binRand()
{
   integer r = (integer)llFrand(mag);
   integer i;
   while (llList2Integer(bin, i++) <= r);
   return --i;
}

 

Edited by Mollymews
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 989 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...