Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Item Creation Artefacts

JonnersJonners ✭✭✭✭ - EminentMember Posts: 475 ✭✭✭✭ - Eminent
It has came to my attention that bait producing buckets got nerfed recently to halve the decay time on bait produced. Purportedly this was to help reduce the overload on the servers by reducing the number of bait floating around constantly. This got me thinking about the inefficiency of having a bunch of unused items sitting around in various kits, horns, buckets, jars, racks, pots, boxes, vases, satchels, palettes, and what-have-you. Instead of having these items ready, sitting available, for the owner at all times and wasting precious item space on the servers; why not have the items produced when someone gets the produce-able item from the producer?

Example:
Jumpy buys a bait bucket. It has 50/50 pieces of bait which Jumpy can 'create' any time the bucket is 'full' by getting the bait from the bucket like normal. Jumpy takes the 50 bait from his bucket, generating bait items with item#'s at that moment. Every Achaean day the bait allowed to be produced is increased by a set amount, so 15/50, but no actual item is made until someone gets it from the producer item.

From my understanding this could greatly reduce the number of unused items floating about. By only having items actively created when desired and available, there wouldn't be thousands of bait languishing to decay repeatedly in buckets, hundreds if not thousands of letters awaiting similar treatment, and so much more.

There are a couple things to consider with this: Firstly, there would have to be a way for 'random' generators to still generate randomly and items with lids would still need to work with their lids normally. Secondly, if this was implemented, it would essentially change the producer items like bait buckets from container items that produce and store to non-container items that produce (albeit in a new way) but don't store. This could either be addressed by automatically pushing gold to the owners inventory -before- implementing a change, or leaving them as containers with a single space, or more for items that make sense, but the produced items don't get placed there automatically. This would allow those who use their producers to store their gold to not lose it or to be able to continue to store their gold in the producer.

As a side-note this would also save Jumpy from being short when he needs to write five letters at the top or half of the month. I know of at least three people who are frustrated their stationery kits don't -always- have five letters available if they haven't taken any out.

Finally, there are a few of us who have customized our producers to make unique items. We would obviously want to ensure either these are left untouched or are upgraded to this system keeping the unique items intact. Custom horns of plenty, upgraded bait buckets, things like that.

P.S.- I am not a coder in any sense of the word, I have no idea how easy or difficult this would be to implement. I just see the inherent advantage of reducing the load on the servers.
~
You close your eyes momentarily and extend the range of your vision, seeking out the presence of Drugs. 
Though too far away to accurately perceive details, you see that Drugs is in Mhaldor.
KorbenMelodieSylvanceLynaraDaeir

Comments

  • JonnersJonners ✭✭✭✭ - Eminent Member Posts: 475 ✭✭✭✭ - Eminent
    edited June 2013
    ~
    ~
    You close your eyes momentarily and extend the range of your vision, seeking out the presence of Drugs. 
    Though too far away to accurately perceive details, you see that Drugs is in Mhaldor.
  • SylvanceSylvance ✭✭✭✭✭ - Grand Achaean Member Posts: 1,477 ✭✭✭✭✭ - Grand Achaean
    Jonners said:
    If this could work, this could actually be expanded to denizen and/or comm shops, dropping the active item count in Achaea even more.
    Also not a coder. But I do wonder whether the difference between storing "bait1, bait2... bait50" and "Jumpy has 50 pieces of bait" is actually that large.
    Tvistor: If that was a troll, it was masterful.
    I take my hat off to you.
  • AntoniusAntonius Member Posts: 4,924 @@ - Legendary Achaean
    @Sylvance: Not a coder for Achaea, but logically yes. For every one of those 50 items, you have to keep a record of its ID, its name, its type, its location, and its decay time (as well as, I would imagine, many other things). Whereas tracking that a particular bait bucket "contains" 50 pieces of bait simply requires you to track a single integer.

    Whether there are enough bait buckets, with enough bait in them, for the difference to actually have a noticeable effect is another question entirely.
    Sylvance
  • JonnersJonners ✭✭✭✭ - Eminent Member Posts: 475 ✭✭✭✭ - Eminent
    Considering they nerfed the decay time on bait.. I'd presume so.
    ~
    You close your eyes momentarily and extend the range of your vision, seeking out the presence of Drugs. 
    Though too far away to accurately perceive details, you see that Drugs is in Mhaldor.
  • LynaraLynara ✭✭✭ - Distinguished Member Posts: 39 ✭✭✭ - Distinguished
    Considering the very reason they changed letters to be unable to be non-decay was the largeness of the letter database... and that they reduced the decaytime on bait made by a bucket to account for the amount of bait-buckets out there, and how much bait it was putting into the databases... I'd say it'd have a noticeable effect, especially if applied to every 'creating' artefact out there.
    (The Midnight Crew): Cain says, "You on your period lynara?"

    (The Midnight Crew): Micaelis says, "Lynara coded periods out of his DNA."
  • PenwizePenwize Member Posts: 1,538 @@ - Legendary Achaean
    Really, the generation of items could be triggered by a command rather than by the day ticking over, with a limit of them based on the creation rate.  So, every time you TOUCH KIT, a letter spawns within it, up to 5 per day.  Could even give it a fancy flavour message.  Same functionality, but on demand so it doesn't tax the item db or the day tick.
    Jonners
  • JonnersJonners ✭✭✭✭ - Eminent Member Posts: 475 ✭✭✭✭ - Eminent
    edited June 2013
    @Penwise Won't it tax the day tick regardless by having an integer to track as to how many they are allotted to touch for given the new day? I'm thinking more specifically of bait buckets rather than stationery kits. Buckets only refill by 15 bait at a time but have a max capacity of 50. Also, you wouldn't want to have to touch the bait bucket fifty times so you could get bait.

    My idea at its core basics is simply an integer, a modification to the get/take commands regarding producer items, and an item template for the produced item(s). The integer stating how many are available that is tracked every time it ticks or is used, not necessarily per day. Using the normal get command to generate instead of a touch command would seem simpler to me from a user perspective. But I could be missing some vagaries of coding that are relevant.
    ~
    You close your eyes momentarily and extend the range of your vision, seeking out the presence of Drugs. 
    Though too far away to accurately perceive details, you see that Drugs is in Mhaldor.
  • NizarisNizaris ✭✭✭✭✭ - Grand Achaean The Holy City of MhaldorMember Posts: 537 ✭✭✭✭✭ - Grand Achaean
    Jonners said:
    @Penwise Won't it tax the day tick regardless by having an integer to track as to how many they are allotted to touch for given the new day? I'm thinking more specifically of bait buckets rather than stationery kits. Buckets only refill by 15 bait at a time but have a max capacity of 50. Also, you wouldn't want to have to touch the bait bucket fifty times so you could get bait.

    My idea at its core basics is simply an integer, a modification to the get/take commands regarding producer items, and an item template for the produced item(s). The integer stating how many are available that is tracked every time it ticks or is used, not necessarily per day. Using the normal get command to generate instead of a touch command would seem simpler to me from a user perspective. But I could be missing some vagaries of coding that are relevant.
    Here's how I would do it, written in python syntax:

    artefactsToReset = {}

    def generateItem( artefact ):
      if artefact.timesUsedPerDay < artefact.maxUsesPerDay:
        artefact.generate() # Called when commanded by user, instantiates item
        artefact.timesUsedPerDay = artefact.timesUsedPerDay + 1
        artefactsToReset.append(artefact)
      
    def serenade()
      for artefact in artefactsToReset:
        artefact.timesUsedPerDay = 0
        artefactsToReset.remove(artefact)

    While this code won't work for Achaea, because it's written in another language, I think that the algorithm combines the best of what others have mentioned:

    • Items created only when desired.
    • Only artefacts used during a day need reset, in order to cut down on serenade load.
    image
  • PenwizePenwize Member Posts: 1,538 @@ - Legendary Achaean
    Well, no, you don't need to add that integer to the day tick.  You're somewhat overthinking it.  You can do it without having the items sitting around waiting to decay, and without putting the item generating arties on the day tick.  I would do it this way, which maintains almost the exact same functionality as it currently has:

    Single long value (longs are numbers with higher max values than integers, generally used for things like dates since 65535 isn't very many hours) on each artie that represents a day.  I'll call this value "lastItemDay".
    A method to get the current day in the form of a long.  Let's say there's such a method, getCurrentDay().
    A method to get the max capacity of an item in days worth of item generation.  For a bait bucket, that'd be either 3 (slight nerf, max capacity 45) or 4 (slight buff, max capacity 60).  You can just get it by taking the container's capacity and dividing it by the number generated per day tick (50/15 in this case) if you want to take the smaller value.  I'll call this "getGenerationDays()"
    Whenever you touch (or get, whatever you hook it into), the following happens (in pseudocode): 

    if (getCurrentDay() - lastItemDay > 0) {
    Generate a batch of items (15 in the case of a bait bucket)!
    lastItemDay = MAX(getCurrentDay() - getGenerationDays() + 1, lastItemDay+1)
    }

    Essentially, what this is doing is on activation looking at the last day that an item was taken out of the container.  If the last time was at least one day ago, then it should have some items in it, so you generate them.  Now the trick: instead of setting the last day to right now, you set it to a time in the past related to the capacity of the item and to the last time you took something out. Still using a bait bucket for an example, if it was more than 3 days ago (Achaea days), then it would be full (at 45 fish).  So, if you take something out, you should still have 2 more days worth of stuff to take out.  Thus, you set the last time to today - 3 + 1, or today - 2.  Now, if the last time you took something out was 2 days ago, then you just want to take out one of those days' worth of items.  So, in that case, you'd set the last time to just one more day.

    It sounds complicated, but it's a pretty tiny operation that only needs a single value to represent the last day, on each artie that generates items.  It uses much of the current functionality, but does change the max capacities a little.  Small price to pay honestly, and can be tweaked if it's a problem. 

    Anyway, this is all wildly presumptuous because honestly, I have not seen Achaea's code, and it could use something entirely different for pretty much everything!  Either way, my point remains that it's possible to do with just one value, in a very small way that's not on a main tick like the day rollover, and can be done on demand.  Whether that fits into their methods of doing things or not is something I can't answer, but I imagine it's something that could be improved.  Only Achaea's developers truly know whether or not that's something they'd even consider.  Why I even bothered to write this up I'll never know!
    Nizaris
  • DaeirDaeir AustraliaMember Posts: 6,288 @@ - Legendary Achaean
    A simple int counting the number of "charges" for a producer item -must- be intrinsically smaller than simply storing 50 item instances serverside, simply from all the data that is apparent when handling items in Achaea. Between storing a lookup for item descriptions, decay time, weight, maker (if applicable) and any other teritary effects, that is a lot of data that likely needs to be indexed.

    I hate talking out of my hat like this, but I fully support the pretenses of the idea as stated by the OP and feel this would both make the items much more convenient to use while having significantly less impact on the server DBs as a whole.
  • RinzaiRinzai ✭✭✭✭ - Eminent Member Posts: 178 ✭✭✭✭ - Eminent
    I am really unsure of the impact this would have one say dormant characters with items that generate, I would guess, or think that maybe those would stop generated due to inactivity.

    But I am not sure this would make a difference say the people that reflex to take everything out of all their item generators at every day tick, and then just hold one to them. I know for me I wait til my bucket is full and put it right in one of  my tanks but, on the flip side, I have pretty much nothing to do with the thousands of ammo I pull out of my racks, no way to store it. I just litter the decks of 5 sea striders with it.

     
    Nim
  • JonnersJonners ✭✭✭✭ - Eminent Member Posts: 475 ✭✭✭✭ - Eminent
    edited June 2013
    Penwize said:

    Anyway, this is all wildly presumptuous because honestly, I have not seen Achaea's code, and it could use something entirely different for pretty much everything!  Either way, my point remains that it's possible to do with just one value, in a very small way that's not on a main tick like the day rollover, and can be done on demand.  Whether that fits into their methods of doing things or not is something I can't answer, but I imagine it's something that could be improved.  Only Achaea's developers truly know whether or not that's something they'd even consider.  Why I even bothered to write this up I'll never know!
    It was very enlightening for me at least. It helped me understand what you meant much more clearly. Thanks.

    I'm just glad my idea stirred up this interest and support from people who actually understand coding, if not Achaean coding in specific. I'm sure if the powers that be like the idea too they'll work something out from what's possible and the numerous ideas here. So keep em comin' player coders! B-)
    ~
    You close your eyes momentarily and extend the range of your vision, seeking out the presence of Drugs. 
    Though too far away to accurately perceive details, you see that Drugs is in Mhaldor.
  • XithXith Member Posts: 2,602 @@ - Legendary Achaean
    It does sound like it would take a repetitive amount of modifying, even if each instance wasn't any more difficult. But the time taken compared to all the potential space saved in the future might be worth looking at. Not to beat the dead horse but I TOO am not a coder for Achaea so I don't know! :D

    Up to Them to research, I guess.
    I like my steak like I like my Magic cards: mythic rare.
  • CardanCardan The GardenMember Posts: 437 Immortal
    edited June 2013
    I've already been thinking about this, making those self-filling artefacts act more like perhaps a tarot deck where (as described in the OP) there is no actual card in the deck but a list of how many of each type of card have been added. It would indeed save on the number of replicas we have created which is always an added bonus for us.

    Listed.

    ETA: The trick is going to be that whilst some will be easy because they fill from a list of potential items, others fill from a single item but customise the description based on the container's desc. It's not impossible to work around, will just require some extra thought.
    EldXithMelodie
This discussion has been closed.