eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 04:52 AM |
That is me. I have neglected the actual point of this forum -once again- but I love you guys I couldn't poosssiiiiblllyyyy post anywhere else.
So, just to keep this related I have a good question of What is the shortest way for me to serialise data created by random generation? Since I'm currently working on loot and stuff, but I need to serialise all of the attributes under the Inventory class which can take a lot of space and idk I'm conscious of the datastore limit (What's a good guideline for how many array style entries that is?) and yeah. Am I just best off to store the randomseed that generated it and the invariables? |
|
|
| Report Abuse |
|
|
Chrapnel
|
  |
| Joined: 01 Feb 2014 |
| Total Posts: 951 |
|
|
| 11 Jan 2015 04:54 AM |
*slowly blinks*
i..i'm just gonna go back to reading the wiki... |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 05:22 AM |
Pfff, what? It's because I'm Mama Cat now, isn't it? |
|
|
| Report Abuse |
|
|
Chrapnel
|
  |
| Joined: 01 Feb 2014 |
| Total Posts: 951 |
|
|
| 11 Jan 2015 05:25 AM |
| it's because i can only read and comprehend english |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 05:46 AM |
| It's not like I wrote it in anything other than English. Considering the fact that I like to not write in English, you got off lucky. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 11 Jan 2015 10:09 AM |
Just save the properties you change in an array and load them back up, so with a two dimensional array. The first holding all the arrays as stated in my earlier. You were probably already considering that. Convert the properties that would take more than a character into a single character, and decode later. Probably the only way.
I don't understand why serializing the attributes under the inventory class would be an issue. "Am I just best off to store the randomseed that generated it and the invariables?" Yes because you will just have to recreate them in runtime if you're loading them anyway. |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2015 10:12 AM |
What a simple topic.
Hey eLunate...
Do it like this:
Serialize and Post to your website and have it save under a key.
When you want to get the data back, Get from your website and unserialize it. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 10:13 AM |
| I'm just conscious of the DataStore limit, to be honest. I'd normally be fine, since I know how to serialise the raw data, but I'm needing to look at a way that's smaller in terms of data length because my inventories use a dynamic length model. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 10:13 AM |
> Post to your website and have it save under a key.
Assumes I have a website. |
|
|
| Report Abuse |
|
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 10:16 AM |
Anyway, you're avoiding the question that I used to keep this off topic post on topic.
What is the best way to serialise randomly generated attributes (For DataStores) with the least data impact? Does nobody have any better ideas than what I've already said? |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 11 Jan 2015 10:21 AM |
lol too bad ROBLOX won't let you save binary (without parsing and 1byte for each bit :P). I probably won't have any ideas but I'm lacking understanding of your "dynamic inventory" as of now. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 10:25 AM |
Jeez if it would let me save binary I'd just hardcode a huffman tree and let it do the work for me.
The dynamic length inventory just means it's a weight based model instead of a slot based model. The issue here is that I'm using classes and randomly generated items, so whereas I'd just store the source's name in the DataStore and collect it at runtime, I can't here because the sources are generated randomly at runtime. |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 11 Jan 2015 10:29 AM |
ooho that's cool, I was thinking about doing one of those for an RPG I was working on ages ago.
Hmm, so the only time I would see an issue is if someone has ten thousand paperclips, for example, which weigh very little (so they could hold ten thousand). So you could just save another number to them indicating how many of them you have. Otherwise I don't think you'll run into any problems with the data limit, though I have no idea how much data it can hold. |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 11 Jan 2015 10:29 AM |
| On a side note, you should make daily nightly notifier extension. |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 10:35 AM |
| Stackable items aren't really my issue to be honest. Stackable items are basic, and I've got an inheritence model set up for those things so their properties can be saved together with the rest of everything (I only have to save an ID and amount), but unique items like equippable items and things such as those will have various properties generated at the point of instantiation (Including more properties than you see at face value that determine how it behaves and what it inherits from etc) |
|
|
| Report Abuse |
|
|
lordrambo
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 20628 |
|
|
| 11 Jan 2015 10:38 AM |
| Well what's the data limit? And is it specific to each key or what? |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 10:59 AM |
Apparently the dataStore limit is 64KiB That should be fine, since that's 64*1028 characters. I just don't trust Roblox's table serialisation for big tables, strong nesting or lots of properties hehe |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2015 11:02 AM |
can I be a kitten? <3
logic is logical |
|
|
| Report Abuse |
|
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 11:06 AM |
I normally tell people this: "Knaboj estas virkatoj kaj knabinoj estas katidoj"
But just to but it really simply for you, you can't be a kitten unless you're a girl because you're probably not cuddly enough to qualify. |
|
|
| Report Abuse |
|
|
Kyuro
|
  |
| Joined: 03 Sep 2012 |
| Total Posts: 5800 |
|
| |
|
| |
|
eLunate
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 11 Jan 2015 11:14 AM |
| Excuse me, cuddliness is the most sexist thing ever. There is no getting around it. |
|
|
| Report Abuse |
|
|