AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 28 Jul 2016 01:37 PM |
| I was thinking about it, but how would you make a secure inventory for a game like DayZ? The entire inventory would be local. In the case of DayZ, the only thing I could think of would be to have a table on the server for all of the items in someones inventory. Once they drop it, use it, etc, it gets removed. But what are some other ways to secure it? |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 31 Jul 2016 03:41 PM |
And since the entire inventory is local it'd be fairly easy to change values on the client if it's a StringValue. Aside from the table on the server of all of your items (which would work fine), there is one other system I can think of, with custom networking replication depending on your loot system:
> Each item spawned in the world has a # ID, from 1-infinity. 1) You request to pick up an item. Your client removes it instantly and sets it as a slot in your inventory by changing the slot ItemName.
2) .Changed on ItemName, sends a remote function to server with the ID. If the loot item isn't nil (to prevent duplicate items in the server delay time with multiple players), it checks if you're in range of the item (with added range in case of server delay), and that the item name your inventory tried to set it to corresponds with the item name of the piece of loot.
3) Returns true or false, if true leaves your slot item with the right ID alone. Removes loot from world.
Now this system I just described to prevent exploiting works if there is a StringValue for the ItemName in every slot. Is this a good system? I also mentioned that it would have a very long table on the server with the {ID, ItemName} table for every piece of loot in the map. Over a very long server time this means there could be loot tables with ID's in the 100,000. Every time someone takes a piece of loot, it just sets the "v" value to nil, but the "i" (index) stays, so the server could see it's been collected.
A different system than using StringValue's would be to just use a module script, which would be a lot cleaner.
Any thoughts on a good system for inventory management (keeping track of items) or prevent exploiting would be great!
|
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
|
| 31 Jul 2016 07:50 PM |
Can I help with the game I'm a builder ?
~ Onions taste like funions :D |
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 31 Jul 2016 07:53 PM |
| This is a discussion thread for scripters. |
|
|
| Report Abuse |
|
|
SatanVIII
|
  |
| Joined: 08 May 2011 |
| Total Posts: 2129 |
|
|
| 31 Jul 2016 07:59 PM |
You are on game design not the scripters forum
|
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
| |
|
SatanVIII
|
  |
| Joined: 08 May 2011 |
| Total Posts: 2129 |
|
|
| 31 Jul 2016 08:01 PM |
Why dont you go to the scripters forum where there are actually people who are masters at the art of scripting, opposed to here where there are just wannabes. <3 Don't give me that shhtt when I'm trying to help you.
|
|
|
| Report Abuse |
|
|
AntiFiter
|
  |
| Joined: 14 May 2009 |
| Total Posts: 12290 |
|
|
| 31 Jul 2016 08:01 PM |
| This discussion ties in game design and scripting. |
|
|
| Report Abuse |
|
|
SatanVIII
|
  |
| Joined: 08 May 2011 |
| Total Posts: 2129 |
|
|
| 31 Jul 2016 08:02 PM |
Well you wont find any good scripters here.
|
|
|
| Report Abuse |
|
|