Myriad

New /conf folder sucks

18 posts in this topic

Sorry...just updated to latest herc and I want to give my feedback on it.

 

I think the new format for the /conf folder is really bad, and just creates extra hassle for no benefit. I didn't find anything wrong with the old format and it was easy to follow.

 

It's not like item_db.txt -> item_db.conf which made things more legible. All these required quotations as well is just extra hassle for why.

 

Pls respond.

Share this post


Link to post
Share on other sites

Well the way it was before was a very custom approach to handling the item/mobs (I found it kind of hard). We're now going into a libconfig format change to our files to standardize how everything is... or something like that, I know I'm close to the answer.

Maybe problem with converting rA -> Herc stuff? I could understand at that point but we're just updating to a more standardized reading of the files

Share this post


Link to post
Share on other sites

Also, I wanna bring a not too usefull information but still, .conf files has better compatibility for encoding, for some reason. (tested approved) Also still now, you can find different style of coding for the same thing, which is weird. Making all .conf will become easier.

 

I agree that for some point, syntax is very weird but maybe in the future, it will be good to add many other cool stuff !

Share this post


Link to post
Share on other sites

He's not complaining about the new item_db syntax, I think it's more the fact that we now have 7 sub folders when we used to have 3 (correct me if I'm wrong in thinking this was what you meant). I also find it very annoying. I like editing my files all at once, and what is the point of a sub-folder with one or two files? Seems pointless to me.

Edited by Wolfeh

Share this post


Link to post
Share on other sites

He's not complaining about the new item_db syntax, I think it's more the fact that we now have 7 sub folders when we used to have 3 (correct me if I'm wrong in thinking this was what you meant). I also find it very annoying. I like editing my files all at once, and what is the point of a sub-folder with one or two files? Seems pointless to me.

Yes this is what I meant. It's made it very hard to edit the conf files.

Share this post


Link to post
Share on other sites

Just want to express my dissatisfaction as now the import folder is useless...or at least having to put stuff in sql_connections is stupid.

Share this post


Link to post
Share on other sites

I agree with you that libconfig is quite bad, but that's what we're stuck with for the time being. If it was up to me, I'd convert everything to yaml, but I was too late to the party, and Hercules had already started using libconfig for some files.

 

The old .txt format had a lot of (parsing and future extensibility) problems, and it was overdue for an update.

 

I disagree with your point about the sql_connection. The most common case is to have everything in one database, and now you can do that by just editing one file. The format allows for more advanced cases using different databases of course, and it's not much harder to achieve than it used to be (or possibly easier, since the format is standardized, and it makes easier to find things, just do a folder-wide search for sql_connection and you'll find all the files that support separate configurations. You'd previously have to search for sql, db_ and possibly other words.

 

About the separate folders, it might be personal preference, but it feels better organized this way. If you're using any decent/modern text editor, you'd normally open the whole config folder with it, and the files to edit are just one click or keypress away, tidily organized in a nice folder tree (Vim/GVim/MacVim (screenshot), Atom (screenshot), Kate, TextMate, Sublime Text, Coda and possibly many more allow you to do that. If you're stuck with the old notepad++ and it still forces you to open all files separately, maybe it's time to start looking around for alternatives)

On a side note, the files in the import folder are still all in one place.

 

Could the file format and structure be done better? Probably. Are we still in time to do improve it? Of course. Got specific suggestions? Post them in the bugtracker. Complaining that something sucks is pointless, just say how you'd improve it.

Share this post


Link to post
Share on other sites

I agree with you that libconfig is quite bad, but that's what we're stuck with for the time being. If it was up to me, I'd convert everything to yaml, but I was too late to the party, and Hercules had already started using libconfig for some files.

 

The old .txt format had a lot of (parsing and future extensibility) problems, and it was overdue for an update.

 

I disagree with your point about the sql_connection. The most common case is to have everything in one database, and now you can do that by just editing one file. The format allows for more advanced cases using different databases of course, and it's not much harder to achieve than it used to be (or possibly easier, since the format is standardized, and it makes easier to find things, just do a folder-wide search for sql_connection and you'll find all the files that support separate configurations. You'd previously have to search for sql, db_ and possibly other words.

 

About the separate folders, it might be personal preference, but it feels better organized this way. If you're using any decent/modern text editor, you'd normally open the whole config folder with it, and the files to edit are just one click or keypress away, tidily organized in a nice folder tree (Vim/GVim/MacVim (screenshot), Atom (screenshot), Kate, TextMate, Sublime Text, Coda and possibly many more allow you to do that. If you're stuck with the old notepad++ and it still forces you to open all files separately, maybe it's time to start looking around for alternatives)

On a side note, the files in the import folder are still all in one place.

 

Could the file format and structure be done better? Probably. Are we still in time to do improve it? Of course. Got specific suggestions? Post them in the bugtracker. Complaining that something sucks is pointless, just say how you'd improve it.

I don't have any suggestions, I just wanted to give feedback. I wasn't sure where to post the thread.

Share this post


Link to post
Share on other sites

Logs should be in different database, I have a total of 4gb logs and If I try to search for a particular item from the logs the server will freeze.

Share this post


Link to post
Share on other sites

Logs should be in different database, I have a total of 4gb logs and If I try to search for a particular item from the logs the server will freeze.

 

I second this, Please put them on different database.

Share this post


Link to post
Share on other sites

 

Logs should be in different database, I have a total of 4gb logs and If I try to search for a particular item from the logs the server will freeze.

 

I second this, Please put them on different database.

You can change them by editing inter-server.conf its just defaulted to use 1db.

Share this post


Link to post
Share on other sites

 

 

Logs should be in different database, I have a total of 4gb logs and If I try to search for a particular item from the logs the server will freeze.

 

I second this, Please put them on different database.

You can change them by editing inter-server.conf its just defaulted to use 1db.

Example please!

Share this post


Link to post
Share on other sites

- Open inter-server.conf

- Search for 

@include "conf/global/sql_connection.conf"

 

- Replace with

//Logs DB connection info
sql_connection: {
	db_hostname: "127.0.0.1"
	db_port: 3306
	db_username: "ragnarok"
	db_password: "ragnarok"
	db_database: "ragnarok"
}

 

 

 

 

Share this post


Link to post
Share on other sites

Cool, what i did is, instead of changing the main configfile, I edited the config in import folder

 

 

 

conf/import/inter-server.conf

 

 

 

//================= Hercules Configuration ================================
[...]
//=========================================================================
//= Hercules Inter Server local configuration file.
//=========================================================================

inter_configuration: {
	// See conf/common/inter-server.conf
	
	// Log configuration
	log: {
		// [LOGIN, MAP] Log database SQL connection
		sql_connection: {
        	db_hostname: "127.0.0.1"
        	db_port: 3306
        	db_username: "hercrodbusr"
        	db_password: "[HERCRO_PASS]"
        	db_database: "hercro_log"
        }
	}
}

 

seems to work!

 

I will update my 2017 Hercules Setup guide!

 

The only problem is that the credentials and  information is redundant. But maybe it's good if you want to have a different user with different credentials for that log database?


 

He's not complaining about the new item_db syntax, I think it's more the fact that we now have 7 sub folders when we used to have 3 (correct me if I'm wrong in thinking this was what you meant). I also find it very annoying. I like editing my files all at once, and what is the point of a sub-folder with one or two files? Seems pointless to me.

Yes this is what I meant. It's made it very hard to edit the conf files.

 

Well use the config files in the import folder, all relevant to your server configurations are in one place!.

 

Import folder is a great way to keep it nice, clean, revertable and portable.

Yeah that's sux that you have to edit conf/global/sql_connection.conf

 

But, that's about the only config file that you have to edit outside import folder.

Edited by Habilis

Share this post


Link to post
Share on other sites

Uhm, Why we cannot have it by default?

Share this post


Link to post
Share on other sites

Uhm, Why we cannot have it by default?

Simply as a server owner you need to setup your db only 1 time, while default confs are for devs that need to have multiple databases for their work and it makes more sense to have the logs in the same database.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now