Register for your free account! | Forgot your password?

You last visited: Today at 19:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



NCOs Database

Discussion on NCOs Database within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
U2_Caparzo's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 90
NCOs Database

Hi everyone, i'm using NCOs and i was trying to make the characters load from a ini file, inventory from a txt file, equips from an inifile and skills from a text file, when i finished, I thought I should not have any problem, so i logged, but the client closes in less than 1/4 of the progressbar, and console write "xxxxxx character has logged on sucesfully), then i download ProjectX source, it had ini database but it load both databases(binary and after the ini one), is posible make it just ini, or why the client closes when i tried changing the DB, of course y changed CreateCharacter, SaveCharacter and LoadCharacter, there isn't error with them, i'm pretty sure.

thanks

srry for my bad english :s
U2_Caparzo is offline  
Old 01/15/2012, 09:26   #2
 
elite*gold: 0
Join Date: Feb 2007
Posts: 340
Received Thanks: 38
why do you want to change the database type if it's still a file (not a sql database) which is much more secure than anything else...saving in plain text is not the best ideea tho...my opinion is to stick with binary writer/reader for the database
ryuchetval is offline  
Old 01/15/2012, 20:29   #3
 
U2_Caparzo's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 90
Quote:
Originally Posted by ryuchetval View Post
why do you want to change the database type if it's still a file (not a sql database) which is much more secure than anything else...saving in plain text is not the best ideea tho...my opinion is to stick with binary writer/reader for the database
caz i think this

1.-with the normal database:
pick up an item then save the whole character(friends,items, equips, stats....)

2.-with what i want to do:
pick up an item then save inventory(max. 40 lines)

i suppose(just suppose) that the second one can be faster for save items caz u are saving less info.

maybe i'm wrong, but i think it can be a good idea
U2_Caparzo is offline  
Old 01/15/2012, 22:26   #4
 
Silent-Death's Avatar
 
elite*gold: 0
Join Date: Jan 2006
Posts: 1,055
Received Thanks: 296
idk how the database you are dealing with works, but i would suggest to create a new table or database (depending on your needs) to handle the inventory.

from what i understand now you have something like this:
DB1 [ TABLE1 { friends, items, equips, stats, inventory ... } ]

What I would do is to have something like this:
DB1 [ TABLE1 { friends, items, equips, stats ... } , TABLE2 { inventory } ]

Or you could just change the syntax when you pick up an item from saving all the info to pinpoint on inventory items

Plain text storage really isn`t a good idea from a security perspective and it`s actually harder to work with in the long run then a db. You can at any time install apache and php and inspect your db with PhpMyAdmin, and when working with a lot of data this could come in handy.

Good luck!
Silent-Death is offline  
Old 01/15/2012, 23:20   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by U2_Caparzo View Post
caz i think this

1.-with the normal database:
pick up an item then save the whole character(friends,items, equips, stats....)

2.-with what i want to do:
pick up an item then save inventory(max. 40 lines)

i suppose(just suppose) that the second one can be faster for save items caz u are saving less info.

maybe i'm wrong, but i think it can be a good idea
If you care at all about efficiency you shouldn't be using flatfile at all.

Databases were invented to make managing data easier, more efficient and scale better as you increase the amount of data stored... therefor if you want efficiency or convenience databases are the way to go lol.
pro4never is offline  
Old 01/16/2012, 03:25   #6
 
U2_Caparzo's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 90
Quote:
Originally Posted by Silent-Death View Post
idk how the database you are dealing with works, but i would suggest to create a new table or database (depending on your needs) to handle the inventory.

from what i understand now you have something like this:
DB1 [ TABLE1 { friends, items, equips, stats, inventory ... } ]

What I would do is to have something like this:
DB1 [ TABLE1 { friends, items, equips, stats ... } , TABLE2 { inventory } ]

Or you could just change the syntax when you pick up an item from saving all the info to pinpoint on inventory items

Plain text storage really isn`t a good idea from a security perspective and it`s actually harder to work with in the long run then a db. You can at any time install apache and php and inspect your db with PhpMyAdmin, and when working with a lot of data this could come in handy.

Good luck!
NCOs uses a flatfile database, encypted as binary file, one file stores all character info(friends, skills, stats, items....).

Quote:
Originally Posted by pro4never View Post
If you care at all about efficiency you shouldn't be using flatfile at all.

Databases were invented to make managing data easier, more efficient and scale better as you increase the amount of data stored... therefor if you want efficiency or convenience databases are the way to go lol.
what i understand from ur post is that flat file isn't a database :s
U2_Caparzo is offline  
Old 01/16/2012, 05:28   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by U2_Caparzo View Post
NCOs uses a flatfile database, encypted as binary file, one file stores all character info(friends, skills, stats, items....).



what i understand from ur post is that flat file isn't a database :s
It depends on your definition of database... In the broad sense, yes it is a database... just the most basic one possible.

The idea is that flatfile is essentially a database without any of the mapping done which is why more advanced database solutions were invented (such as oracle, mysql, mssql and a bunch of other options). They became necessary because as you expand flatfile 'databases' they become less and less efficient (they do not scale well with large amounts of data). Now... in the case of a conquer server this isn't a huge issue as you just split things up into smaller sections (character file ONLY contains character stats, prof file ONLY has prof info on that character, etc) but the fact remains that it's simply a less effective solution than using a proper database system.
pro4never is offline  
Thanks
1 User
Old 01/16/2012, 16:45   #8
 
U2_Caparzo's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 90
Quote:
Originally Posted by pro4never View Post
It depends on your definition of database... In the broad sense, yes it is a database... just the most basic one possible.

The idea is that flatfile is essentially a database without any of the mapping done which is why more advanced database solutions were invented (such as oracle, mysql, mssql and a bunch of other options). They became necessary because as you expand flatfile 'databases' they become less and less efficient (they do not scale well with large amounts of data). Now... in the case of a conquer server this isn't a huge issue as you just split things up into smaller sections (character file ONLY contains character stats, prof file ONLY has prof info on that character, etc) but the fact remains that it's simply a less effective solution than using a proper database system.
so u recommend trying to change to a type of sql right? the reason i haven't tried it is caz flat files are(at least for me) much more simpler to use, aniways i'll try with mysql, but i'm thinking i will get the same error that when i tried to change the database to ini files, caz the last time i just changed that, and the client closes when u login :s
U2_Caparzo is offline  
Old 01/16/2012, 18:43   #9
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by U2_Caparzo View Post
so u recommend trying to change to a type of sql right? the reason i haven't tried it is caz flat files are(at least for me) much more simpler to use, aniways i'll try with mysql, but i'm thinking i will get the same error that when i tried to change the database to ini files, caz the last time i just changed that, and the client closes when u login :s
You're welcome to do whatever you're most comfortable with. Just seems a bit odd to me to re-write the database and not use some form of sql (leaving oracle out of this cause I doubt you wanna spend a few thousand bux ahah).

If the client is crashing out then chances are you are not loading the correct information from the files and therefor are sending rubbish to the client causing it to crash.
pro4never is offline  
Thanks
1 User
Old 01/16/2012, 22:44   #10
 
U2_Caparzo's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 90
Quote:
Originally Posted by pro4never View Post
You're welcome to do whatever you're most comfortable with. Just seems a bit odd to me to re-write the database and not use some form of sql (leaving oracle out of this cause I doubt you wanna spend a few thousand bux ahah).

If the client is crashing out then chances are you are not loading the correct information from the files and therefor are sending rubbish to the client causing it to crash.
Hmm thanks, but i have hear about some problems in MySql, for example LOTF, most people says that its MySql fails, or the SleepyConnections(to fix this i have to use the KillConnections released by Fang i think) but i dk the problem of LOTF'S MySql, so why take all the work of converting the database if it may will be worse
so wich are the problems that i have worry using a MySql database?
P.S. Thanks for the quick replies
U2_Caparzo is offline  
Old 01/17/2012, 00:31   #11
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by U2_Caparzo View Post
Hmm thanks, but i have hear about some problems in MySql, for example LOTF, most people says that its MySql fails, or the SleepyConnections(to fix this i have to use the KillConnections released by Fang i think) but i dk the problem of LOTF'S MySql, so why take all the work of converting the database if it may will be worse
so wich are the problems that i have worry using a MySql database?
P.S. Thanks for the quick replies
The potential problems with sql are the same as flatfile. The rewards are simply greater.

It all boils down to user errors... It's like saying planes are dangerous.. sure they could crash but so can cars. Planes are simply faster/more convenient (well... In theory xD) . All boils down to implimenting and using it correctly regardless of what system you go with.
pro4never is offline  
Old 01/26/2012, 02:27   #12
 
U2_Caparzo's Avatar
 
elite*gold: 0
Join Date: Aug 2011
Posts: 314
Received Thanks: 90
Quote:
Originally Posted by pro4never View Post
The potential problems with sql are the same as flatfile. The rewards are simply greater.

It all boils down to user errors... It's like saying planes are dangerous.. sure they could crash but so can cars. Planes are simply faster/more convenient (well... In theory xD) . All boils down to implimenting and using it correctly regardless of what system you go with.
well, i was going with mysql, but i remember teroareboss's source and it's using the same MySql handler that i was going to use, so i think is pointless to make something that have been done in the same way, so i will go with ini files(and because its more easy to use than mysql), and when i get enough experience i'll try not converting NCOs, i'll try to make Hybrid source a bit more complete, at the moment i can login with the ini files, but with a really minor amount of the character info, but then i got a new problem, jumping around in any map, i can't see any npc, and just some mobs(not all of the spawns) and get a msg saying " Character query: [random number] i think it should be fine after finish of converting the database.
U2_Caparzo is offline  
Old 01/26/2012, 19:35   #13
 
.Kinshi's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 341
Received Thanks: 255
People who complain about MySql simply don't know how to use it correctly and efficiently.
.Kinshi is offline  
Old 01/26/2012, 23:35   #14
 
elite*gold: 0
Join Date: Dec 2011
Posts: 1,537
Received Thanks: 785
Quote:
Originally Posted by .Kinshi View Post
People who complain about MySql simply don't know how to use it correctly and efficiently.
It is like that with anything. If you don't use it proper, then it won't work proper. It's common knowledge.

It's like just because you use the most efficient programming language, doesn't mean the output will be the most efficient, because the developer takes a big part of what is going to be.
I don't have a username is offline  
Old 01/27/2012, 10:40   #15
 
BioHazarxPaul's Avatar
 
elite*gold: 0
Join Date: Nov 2005
Posts: 548
Received Thanks: 93
As iv said in mine and fangs development thread, mysql is much better for managing data, you able limit the type of information that should be inputted, and set keys so you don't have 2 of the same values, and lets just face it your bound to put invalid data every now and then so this just helps you keep from making common mistakes you might find in a flatfile database.
BioHazarxPaul is offline  
Reply


Similar Threads Similar Threads
some questions (NCOs)
11/20/2011 - CO2 Private Server - 11 Replies
Hi guys, i want ask u something, first of all, i am using NCOs, i like this source for the version and have bugs(i learn more than making quest like most of ppl in an advanced source). 1.- I want to know if there is a way to stop sending a packet(in this case ally/enemy packet in a guild) because when i delete a guild from the allies list, i still seeing that guild as ally, same with enemies. i found in packets.cs EndSend, but i dont understand really how it works 2.- when monster attack, it...
A New Database
07/18/2011 - Rappelz - 2 Replies
Hello, I Would Like A Database With Génis And Nagas Included. Thanck You =)
Database
06/23/2011 - Flyff Private Server - 11 Replies
Hey in Meiner Database(von Sedrika)werden Fehler Gefunden. Dann hab ich mal nach der von Cross gesucht weil diese ja fehlerfrei sein soll. Schön und gut ich habe sie auch gefunden jedoch kann ich sie mir nicht downloaden weil der download nicht mehr vorhanden ist kann mir jemand weiterhelfen?
[REL] Flashing Screen Colors (NCOS)
06/07/2011 - CO2 PServer Guides & Releases - 4 Replies
Very simple release. The first time I saw this was in ACO, so that's where I got the idea. Anyways, I wanna thank Jacob for referring me to his source. You can change the color values, I just put them randomly as I was going down the list. if (Cmd == "/irandom") { Repeat:
[GUIDE]LOTF & NCOS
07/29/2010 - CO2 PServer Guides & Releases - 8 Replies
First of all this guide is made, cuz i don't understand why peoples keep call newestcoserver for lotf. There is a big different. What is LOTF? LOTF, was a 5017Server made of Tanels source (COServerProject). It stands for Land Of The Forgotten. LOTF, have nothing to do with the newer source by Tanel (newestcoserver). Only thing they got wich is same, is both a Conquer Online Private Server C# Source. Is a public release and made by same person. If NewestCOServer is not a LOTF, what is it...



All times are GMT +1. The time now is 19:37.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.