MMORPG - Item system and patcher

Hi guys!
I have to major problem which I am struggling with:
1
I am making a 3D game [client is made in Unity and the server is a c# console application]. It is like an MMORPG. I made the network system and the login system. It is quite good :slight_smile:
I would like to implement the item system. I can not figure out how to do it.
I would like to make a txt file in the client which store all the items like this:

It means that the Sword has the id of 290 It is sword because of the type (1). It has 40 phisical damage and 20 attack speed which means you hit 20 in a min. Or something like this. I will figure it later. (The point is the structure)
At the server side I have a database what stores the data.
Is this idea okay?
2
Because it is an MMORPG it means that the users will have the client and if i make a change in the client (for example I add an extra item, i have to update my itemlist. I am sure that you guys know what does it mean. I need an idea for the patcher. Is it possible If i make my game, I write a patcher in c# for it and I patch the assets files? Or is it a better option for it?
Thanks for the answers! I appreciate your time for me!
Best regards: MrAkroMenToS!

You could try making your client read from a cache that holds all item details such as the item id, the name, the price and the model. You could have the cache in the main game server/network that everyone will be connecting to and then have it download on the first time the game client is launched and save somewhere within the players /user file or their /roaming in appdata. That would mean you need only update your cache and have the client re-download it when it’s launched and the items and such will be within the game, basically saving all data server-sided rather than client sided so updating will be easier and bugs will be harder to abuse in a sense. It’s just an idea based off of how Jagex host their Runescape servers. The database is a good idea to keep track of the things currently in the game but don’t have it directly effecting anything in the game, In personal experiences databases can be a bit of a pain especially if you want an mmo.

Maybe later down the line once the game is more developed you could use the database idea, but, have it tracking item purchases and then slowly over time have the item prices change in the cache according to it’s popularity. That’s an interesting idea but I haven’t given it nearly enough thought to give you any idea on where to start with it, I will need to give it a bit of thought when I have some free time.

P.S. I’m not the best with programming, merely a beginner. I’m decent at some things but I’m basing the idea from a pre-existing and working system so it should work if done right. :slight_smile:

Edit: Also, with mmo’s never save item prices client sided, it only takes an experienced person to decompile your scripts and recompile it then the prices will be much cheaper for that person only, I know you probably weren’t going to but I’ve seen people do this before and it would ruin the economy in-game if ever that was to happen.

I would like to response to your edit part.
I didn’t mean to store the data in the client. I thought I will store it in the server. With my first i said i make a copy of the server database to the client!
For example:
server side: id-1 name-sword value1-40
client side: id-1 name-sword value1-40
the client just shows me the values. if you are a good decrypter you can decrypt my client and overwrite the values, so you see
id-1 name-bigsword value1-999999
BUT because of the server you won’t have more damage, because if you hit something the server uses the database values.

Anyways, your idea seems to OK, but I need to implement a patcher to the game so it can check for updates every time i start the client!

I did say I know you probably weren’t going to, it was merely a heads up in case somewhere down the line for whatever reason you decided to cut corners.

Personally I would just send the item values from the Server. That way you only have to update the Server side database and the Client wouldn’t need patches for the least little change you wanted to make.

I toyed with similar idea at one point, the main thing you gain from replicating the item(or other) database on client is a bit of bandwidth and loading time. If bandwidth is no concern I would just download items/stats as you need them.

If you need to replicate DB one solution I tried was creating hash values for each item so client just checks on loading game or level if the hashes match server, if they do then no need to update local copy.

i still play runescape i chose my servers to play from rsps100

Not relevant pacolitt. But I get RSPS from RuneLocus, lot bigger.

The way I do this is I define all my stuff, be it items, skills, whatever, client side. In my case I just create classes to define that data, have an editor script to edit them, and use JSON.net to export it to the server. The server reads in that json and that’s it’s master copy basically. Player instances are created and stored in the database.

So the master list of everything in your game is static data that can be distributed with the client or via url,and gzipped if necessary. The only thing clients need to download from the server are their owned instances of those items.

You don’t need a patcher for this. Just have the server send the client your data version, and the client downloads your new data file via http. If you compress that data file it’s going to be ridiculously small.