generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How would you organise this?

Previous Thread :: Next Thread 
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
22 Jan 2016 11:11 AM
I'm making an inventory system and there's going to be hundreds of items. Currently, I have a modulescript which contains all of the item info and stuff and it's in the ServerScriptService, so nobody can mess with it.

All the item models are in a folder in the ServerStorage and when you get a new item it adds a value or folder to your Inventory folder with the name of the item.

How would you sort it?
This is really messy.

Would it just be easier to have folders containing all the info of the item in it and putting THAT in the inventory, or would it lag if there's hundreds?
Report Abuse
litalela is not online. litalela
Joined: 30 Mar 2010
Total Posts: 6267
22 Jan 2016 11:14 AM
just have a table

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
22 Jan 2016 11:17 AM
a table where and for what
Report Abuse
QJD1996 is not online. QJD1996
Joined: 20 Jan 2009
Total Posts: 1472
22 Jan 2016 11:23 AM
I don't know how you have your inventory set up, but I'm guessing it's GUI that contains a bunch of boxes...

I'd personally try to do everything on a server script. I'm currently making an inventory system, and I've decided it would be better to have an inventory table for each player, versus a folder. That would just create too much lag.

I'm assuming you are having DataStores with this game. Have a table or multiple tables assigned to each player that contain a serialized version of their inventory. As they add/remove items, the table will add/remove values. When they leave, have a DataStore that gathers all the contents of these tables... then have them reload when the player enters.

Here's what I'd advise: Each item will be represented through an inventory box. Have a table created that contains each box:

table = {
box1;
box2;
box;
}

That will be the serialized inventory. When it reloads, the boxes will be cloned from your ServerStorage to the inventory GUI, and the scripts should already been inside them.

Sorry for being so vague, but hopefully you get the point. If you really need help, just message me.

Report Abuse
Zenuvius is not online. Zenuvius
Joined: 26 Aug 2014
Total Posts: 551
22 Jan 2016 11:27 AM
Right in front of me so I can flip it !

Use a table for this, put all the "items" in a table so u can pull it out from it when you need it, same goes for inventory and crafting if it exist in your game.

Davidii made a neat crafting/inventory system before and it generally use tables to pull it off.
Report Abuse
litawolf is not online. litawolf
Joined: 26 Feb 2013
Total Posts: 396
22 Jan 2016 11:29 AM
tab = {
{"Iron Sword", {
["Damage"] = 10,
["Durability"] = 100
},

},
{"Empty"},
}

➳Lɪᴛᴀʟᴇʟᴀ ɪs ᴍʏ ɴᴀᴍᴇ, Lᴜᴀ ɪs ᴍʏ ɢᴀᴍᴇツ
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
22 Jan 2016 11:40 AM
alright lit, that's what i'm already doing
thanks!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image