Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pure XML config files #238

Closed
dfighter1985 opened this issue Aug 9, 2012 · 14 comments
Closed

Pure XML config files #238

dfighter1985 opened this issue Aug 9, 2012 · 14 comments

Comments

@dfighter1985
Copy link
Member

We should use pure XML config files, that way we could alleviate the current known problems with the config files.
LibXML seems to be a viable XML library to be used.
Altough it's a C library, it's fairly easy to be used and we could easily write a C++ wrapper for the stuff we need.

@ghost
Copy link

ghost commented Aug 12, 2012

@dfighter1985
I made a sample file from my German logon config: [Link removed. Made a pull request.]
Could you take a look at it and tell me if it's okay?

Edit: Sry, "view" was wrong. Changed it to "download".

@neo-mat
Copy link
Member

neo-mat commented Aug 12, 2012

Sigh at this idea, Qt is cool and stuff, but please, say no xml configs, unless you can tell what awesome advantages it will give except headache when people will be trying to edit their configs...

Edit: " that way we could alleviate the current known problems with the config files." What are these problems? I didn't notice any so far, it's readable and easy to edit or is this supposed to be considered a "problem" in comparison to many tags in xml config? Just trying to realize why xml config would be better than what we have now.

@ghost
Copy link

ghost commented Aug 12, 2012

Just trying to realize why xml config would be better than what we have now.

@neo-mat
It's a preparation for

Issue #239: Qt based config tool

@dfighter1985
Copy link
Member Author

@Ceterrec that's not entirely true. I could write a config tool for the current configs too. However I want a simple standard format for the configs, so that everyone can read them easily without having to write a parser for a custom file format.

@neo-mat Other than the custom file format, there are actual problems with the parser, sometimes for example it refuses to read the config files, and instead of fixing it, I want to replace it.

@Magnifikator
Copy link
Contributor

There are a lot of different free XML editor available. However most of them generate more XML tags you may really need. If you want XML than may you should recommend a specific editor for Windows and Linux, that generate the code you really expected. In earlier times I also was against XML for simple config files. But now I think there are good open source XML parsers don't make any headache to write an own parser.

@ghost
Copy link

ghost commented Aug 16, 2012

I reedited the file (ok, Microsoft's XML Notepad 2007 reedited it) and I think it's much cleaner now. If you want to take a look into it you can download it here (keep in mind: it's a file with German comments): [Link removed. Made a pull request.]

Btw, it also is much smaller now because it uses UTF-8 instead of UTF-16 which was really unnecessary.

@Magnifikator
Copy link
Contributor

I already was thinking about the comment lines: Either you make for every line an own comment tag or let them away. I prefer the last option.
In a XML file we don't need really comments. Better a good wiki page that describes all the options well. If people here are really thinking about to make a config editor tool than comment lines are anyway not necessary.

@ghost
Copy link

ghost commented Aug 16, 2012

If people here are really thinking about to make a config editor tool than comment lines are anyway not necessary.

I think you're right but maybe we should add these German comments into that editor because it was so much work for me to create these comments.

Edit: Ok, I'm going to make XML configs without comments. They'll probably be finished tomorrow.

@Magnifikator
Copy link
Contributor

If you program an editor just make separate language files. So the user can choose his preferred language in the beginning and than you load that file. And other people may also translate their own language file.

I didn't wanted to say that the comments are useless. Of course we need them (and also your translation is nice). I only thought they don't need to be in the XML file anymore.

Edit: Even this language files could be in XML :-) But there is no need for. However XML supports very good different charsets, f.ex. Cyrillic for Russian language.

@ghost
Copy link

ghost commented Aug 16, 2012

@Magnifikator That was exactly what I thought: we should make a localization file that's loaded when the editor starts.

Some time ago I made a German localization for the help section of arcemu-logonserver, I even made a patch but I had to agree that it was a pretty bad idea to hardcode it. Someone suggested to make a XML localization file for the server, I think it was you but now I can't find the forum thread anymore (maybe it got deleted).

@Magnifikator
Copy link
Contributor

It was me :-)
But I was thinking not especially in XML. However looking to that charset things, XML is prepared for that.

@neo-mat
Copy link
Member

neo-mat commented Aug 16, 2012

Excuse me, maybe I am too conservative, but I personally dislike localization, being Russian myself I hate to see any Russian language/localizations in any game/movie/tv show/etc , it's not that Russian is bad language (tho WoW in Russian looks ridiculous and sounds so freaking stupid -.-), it's just that without localization people will be selfeducating more, learing English with the help of translator and in the end it will better for them that they didn't had a chance to configure server/play WoW in their native language. Even when I was handling server by myself in Russian zone (avg online was 250) I clearly stated that we won't be doing any kind of localization nor support it and only few were mad at that, rest were neutral/happy because Russian text was ruining their game experience. Maybe that's just case of Russian language, maybe in German or French game sounds okay, not sure since I don't know those languages. Just my 2cents, I am not being really negative about localization support in ArcEmu, just sharing my opinion on this topic.

Edit: Forgot to mention that I learned English only because I was playing WoW back in 2004 and using really wierd and stupid translator, but still it helped me to figure out what quest givers want from me and what I have to do to finish quest, I mean really, if I would be following university's English program I would end up as 95% of those who followed it - I would be able to say only "Hello" and "Herp derp hurr durr". Just the fact that game forced me to use translator due to lack of localization improved my life (Visiting UK? No problem. Going to another country? Also no problem, most EU countries citizens speak English fluently so you will always find the way to your hotel if you are lost or getting into private closed parties...)

@ghost
Copy link

ghost commented Aug 16, 2012

I know that. When you force people to learn English then they'll do that. That's the reason why I'm able to understand English. But many people simply want to try ArcEmu, they don't want to learn English to do that.

Off topic about German localization/synchro:
Yesterday I saw a video about the synchro for the new Medal of Honor. The leader of the studio said that they think that the German synchro and localization work is probably one of the best in the world. So, yes, I think that the German synchro is pretty good. But I'm sorry for you Russians for that bad synchro.

@Magnifikator
Copy link
Contributor

@neo-mat
In one way your are right. And for some reason I know pretty good how movies are translated in Russia :-) It's horrible. I can assure you that's very different in Germany. They have a very good synchron translation made by real actors. It's at the end a question of money.
I also learnt my first English by reading books about Electronics in hard- and software. But in my time there was no Google.

On the other sides the bad feelings about translations are mostly only because of the bad quality of the translation. A good translated text can really save a lot of time and maybe also prevent a lot of mistakes. And the time you saved you can use to study something more interesting.

And escpecially here in the world of WoW you have a lot of very young people with low skill in language as well as technical skill. So I think some localization may also prevents to answer a lot of repetitive questions of beginners in the arcemu forum.

Edit: Not to forget the psychologic effect, that you feel more to be in a community in your own language. So localization may also helps to find some more members interested in Arcemu.

@neo-mat
Copy link
Member

neo-mat commented Aug 16, 2012

Well, I guess I am wierdo then, I don't remember last time I chatted on internet in Russian... Even on skype I prefer to chat/use VoIP with people from UK/Germany/Finland and I am trying to avoid any Russian community, but maybe that's just me or Russian community is really bad place to be in/with. As I said before, just sharing my biased opinion and experience ^^

@ghost
Copy link

ghost commented Aug 16, 2012

I finished the files already today: [Link removed. Made a pull request.]
I had really nothing else to do. lol
The CheckTriggerPrerequisites spelling error fix is also added, so the world.xml file will only work correctly when #242 is merged into ArcEmu. In the mean time ArcEmu will use the default value true.

Localization discussion:
Also interesting: I heard that in Poland they use the original English audio in movies but there is also an off speaker who explains what does happen.

Damnit... Edith says that "correct" should be "correctly" since it's an adverb.

@dfighter1985
Copy link
Member Author

Translation is always good to have. Even if I myself prefer English too.
Qt has a very nice translation framework, it even has a nice GUI tool for it.

@ghost
Copy link

ghost commented Aug 17, 2012

we could easily write a C++ wrapper for the stuff we need.

http://libxmlplusplus.sourceforge.net/

dfighter1985 added a commit that referenced this issue Aug 22, 2012
@dfighter1985
Copy link
Member Author

dfighter1985 added a commit that referenced this issue Sep 7, 2012
dfighter1985 added a commit that referenced this issue Sep 7, 2012
@dfighter1985
Copy link
Member Author

You can start messing around with the tools branch if you feel like it.
The new configs should be working 100% now :)

@dfighter1985
Copy link
Member Author

In fact you SHOULD test it, since I am not gonna merge it into the mainline until I am done with the tool too! :)

@Dibzz
Copy link

Dibzz commented Nov 22, 2013

@dfighter1985 Thanx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants