Page 1 of 2

[L2j] New GUI Tools!

Posted: Tue Jun 16, 2009 5:11 pm
by ThePhoenixBird
Originally written by: DrLecter

Today I’m pleased to commit a piece of work we had under the hood for quite a while. It’s surprising how some relatively simple things go overseen for months. Anyway it’s working and published now, for you people to test it out, rejoice and why not, contribute whatever you feel we missed.

I’m talking about two graphical user interfaces, one for server settings configuration and one for game server registering against a particular Login server. In the past, you were provided with an “ugly” DOS text-based application for the latter task and for the first one, all you had was a text editor of your choice. Please read more for for some screenshots, design and usage talkabouts…

First of all, have a peek to what they look like on windows XP:
Image

L2J GameServer registering and configuration interfaces

And Kubuntu 9.04:
Image

L2J Gameserver configuration interface, in GNU/Linux.
L2J server settings configuration tool

Let’s talk about the way it works. When it was first written, we agreed with KenM to keep it simple and maintenance-free for the most of it. So when you run the server config tool, it goes through the “config” directory looking for *.properties files and creates one tab per file. Any comment preceding a configuration value will become a tooltip in this GUI (as you can see in the Win screenie). A basic interpretation procedure choses whether you should see a checkbox, an IP widget or a plain text input widget. And that’s about all. Whenever a new file is added, this GUI should support it. All you should need for this tool to work (out of a graphical environment, of course) is to have write permissions for the config files and have them (as well as the languages/images directories) in the correct place. Stock L2J build should grant that. There’s a simple .exe wrapper and a bash script that will server as launchers.
L2J GS registering tool

This tool requires a MySQL server running, you should know the username/password to connect with it. Servername.xml file should be in the login folder too. If for any reason there’s no graphical interface available, this tool should gracefully fall back to the old text based system. I didn’t test it, tho :P
Translation files

I’ve decided to distribute translation files along with the datapack, since the only one that is mandatory for these tools to work are the english ones. The datapack build file should place them accordingly, but if you do not use eclipse for datapack moving the ‘configurator’ and ‘gsregister’ folders out from ‘l2jserver/gameserver/data/lang’ to ‘l2jserver/languages’ would do the trick. You’re encouraged to contribute any fix or missing language in the forums!
What’s missing

I’d like to have optional translations for the tooltips, included in the i18n files. It would be also good to have some more deep checking rules for whatever values are defined by the user. Maybe some xml file could tell the GUI what to validate for a given configuration entry (if no validation is defined, GUI should flawlessly let values go thru), such as “XPRate should be an integer”, etc. I’m optimistic for that you guys will come up with more ideas and functionality.
Credits

All I did out of committing, was to add i18n and some minor improvements. All the glory for this work goes to KenM and the guys at the team who contributed with translations. Enjoy!

Read the article here

Re: [L2jServer] New GUI Tools!

Posted: Wed Jun 17, 2009 4:08 am
by felipegh
Where I can download ?

Re: [L2jServer] New GUI Tools!

Posted: Wed Jun 17, 2009 12:07 pm
by momo61
do we have to use this or can we also use the old .properties files ?

Re: [L2jServer] New GUI Tools!

Posted: Wed Jun 17, 2009 12:13 pm
by MELERIX
felipegh wrote:Where I can download ?
Is already included in L2J :P
momo61 wrote:do we have to use this or can we also use the old .properties files ?
you choise, both options are available :P

Re: [L2jServer] New GUI Tools!

Posted: Sat Jun 20, 2009 10:17 am
by lorenzius
I can help you with italian translation, just tell me how ^^

Re: [L2jServer] New GUI Tools!

Posted: Sat Jun 20, 2009 7:29 pm
by nonom
How can I register a GameServer without X11 capabilities?, i cant use ssh -X or -Y because my framework dont allow it atm. Yep, last interface was "ugly" but functional for quick use. Please dont use X11 / swing apps for l2j, ... we arent noobs.

I need to register a Gameserver without X11. Can I?

Thanks

Re: [L2jServer] New GUI Tools!

Posted: Sat Jun 20, 2009 8:05 pm
by Vapulabe
Try to use the --cmd argument (no GUI) or --register <id><hexid_out_dir> to register without the GUI

Re: [L2jServer] New GUI Tools!

Posted: Sat Jun 20, 2009 8:15 pm
by nonom
Im using Debian Lenny

Code: Select all

$ sh RegisterGameServer.sh --register 15  19bb25a5a0bfb0e4b9b66fc0fcc05000Exception in thread "AWT-EventQueue-0" java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.    at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)    at java.awt.Window.<init>(Window.java:431)    at java.awt.Frame.<init>(Frame.java:403)    at java.awt.Frame.<init>(Frame.java:368)    at javax.swing.JFrame.<init>(JFrame.java:163)    at net.sf.l2j.gsregistering.GUserInterface.<init>(GUserInterface.java:58)    at net.sf.l2j.gsregistering.BaseGameServerRegister$1.run(BaseGameServerRegister.java:273)    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Re: [L2jServer] New GUI Tools!

Posted: Sat Jun 20, 2009 8:25 pm
by Vapulabe
have a look at the RegisterGameServer.sh script and you'll see that there is nothing present to pas the command line parameters.

You should add the parameters to the command line IN the script

alternatively, you may use

Code: Select all

java -cp ../libs/*:l2jserver.jar net.sf.l2j.gsregistering.GameServerRegister --register 15 19bb25a5a...

Re: [L2jServer] New GUI Tools!

Posted: Sat Jun 20, 2009 8:44 pm
by nonom
Thanks for your help,

Code: Select all

 #!/bin/shjava -Djava.util.logging.config.file=console.cfg -cp ./../libs/*:l2jserver.jar net.sf.l2j.gsregistering.GameServerRegister --register 14 19bb25a5a0bfb0e4b9b66fc0fcc05000 
returns

Code: Select all

 Checking if GameServer ID 14 is in use...Exception in thread "main" java.lang.NullPointerException    at net.sf.l2j.gsregistering.BaseGameServerRegister$RegisterTask.run(BaseGameServerRegister.java:544)    at net.sf.l2j.gsregistering.BaseGameServerRegister.main(BaseGameServerRegister.java:199)    at net.sf.l2j.gsregistering.GameServerRegister.main(GameServerRegister.java:33) 
another argument is needed? i have a clean workingcopy

Re: [L2jServer] New GUI Tools!

Posted: Sat Jun 20, 2009 11:45 pm
by Vapulabe
maybe try with --cmd and using the interactive text system...

Re: [L2jServer] New GUI Tools!

Posted: Sun Jun 21, 2009 6:37 am
by smartmedia
Hi...

I like to ask if it's possible on next release of L2JConfig.exe to include a function that backups the properties in a zip or a folder and restore them again if you like. This way the user will keep he's server properties if he install a DataPack or server with newer version.
Thanks

Re: [L2jServer] New GUI Tools!

Posted: Sun Jun 21, 2009 1:13 pm
by momo61
ok i was a bit sceptic about this tool, but I have to admit its quite good :) Thanks a lot for your work on it.

Re: [L2jServer] New GUI Tools!

Posted: Wed Jun 24, 2009 10:33 am
by nonom
Vapulabe wrote:maybe try with --cmd and using the interactive text system...
Yes, it works,

Code: Select all

#!/bin/shjava -Djava.util.logging.config.file=console.cfg -cp ./../libs/*:l2jserver.jar net.sf.l2j.gsregistering.GameServerRegister [b]--cmd[/b]
Adding --cmd argument is possible to use command line mode.

Thanks Vapulabe. I was wrong, sorry all.

Re: [L2jServer] New GUI Tools!

Posted: Sun Jun 28, 2009 7:30 pm
by roxaz
tool wont start on vista x64/windows 7 x64