We moved our repositories to BitBucket!

If you can't login or you can't register to the forums do not rise an issue, instead please write to support (at) l2jserver.com

Check our wiki!

Report server issues here

Forum has been updated to phpBB 3.2, let's see if this fixes some minor bugs we had.

Thank you for visiting http://www.l2jserver.com/

[L2j] New GUI Tools!

Read me first before posting anywhere!
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
ThePhoenixBird
L2j Inner Circle
L2j Inner Circle
Posts: 1857
Joined: Fri May 27, 2005 5:11 pm

[L2j] New GUI Tools!

Post by ThePhoenixBird » Tue Jun 16, 2009 5:11 pm

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
Image

felipegh
Posts: 5
Joined: Fri May 29, 2009 2:25 am

Re: [L2jServer] New GUI Tools!

Post by felipegh » Wed Jun 17, 2009 4:08 am

Where I can download ?

User avatar
momo61
Posts: 1648
Joined: Fri Jun 06, 2008 2:05 pm
Location: Europe

Re: [L2jServer] New GUI Tools!

Post by momo61 » Wed Jun 17, 2009 12:07 pm

do we have to use this or can we also use the old .properties files ?

User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: [L2jServer] New GUI Tools!

Post by MELERIX » Wed Jun 17, 2009 12:13 pm

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

lorenzius
Posts: 8
Joined: Wed Feb 04, 2009 5:52 pm

Re: [L2jServer] New GUI Tools!

Post by lorenzius » Sat Jun 20, 2009 10:17 am

I can help you with italian translation, just tell me how ^^

User avatar
nonom
L2j Veteran
L2j Veteran
Posts: 618
Joined: Wed Mar 11, 2009 10:34 pm
Location: Magmeld

Re: [L2jServer] New GUI Tools!

Post by nonom » Sat Jun 20, 2009 7:29 pm

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
Image
"There are three kinds of people in this world, those who can count and those who can't"

Vapulabe
Posts: 271
Joined: Wed Mar 19, 2008 10:16 am

Re: [L2jServer] New GUI Tools!

Post by Vapulabe » Sat Jun 20, 2009 8:05 pm

Try to use the --cmd argument (no GUI) or --register <id><hexid_out_dir> to register without the GUI

User avatar
nonom
L2j Veteran
L2j Veteran
Posts: 618
Joined: Wed Mar 11, 2009 10:34 pm
Location: Magmeld

Re: [L2jServer] New GUI Tools!

Post by nonom » Sat Jun 20, 2009 8:15 pm

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)
Image
"There are three kinds of people in this world, those who can count and those who can't"

Vapulabe
Posts: 271
Joined: Wed Mar 19, 2008 10:16 am

Re: [L2jServer] New GUI Tools!

Post by Vapulabe » Sat Jun 20, 2009 8:25 pm

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...

User avatar
nonom
L2j Veteran
L2j Veteran
Posts: 618
Joined: Wed Mar 11, 2009 10:34 pm
Location: Magmeld

Re: [L2jServer] New GUI Tools!

Post by nonom » Sat Jun 20, 2009 8:44 pm

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
Image
"There are three kinds of people in this world, those who can count and those who can't"

Vapulabe
Posts: 271
Joined: Wed Mar 19, 2008 10:16 am

Re: [L2jServer] New GUI Tools!

Post by Vapulabe » Sat Jun 20, 2009 11:45 pm

maybe try with --cmd and using the interactive text system...

smartmedia
Posts: 60
Joined: Tue Jun 16, 2009 4:38 pm
Location: Hellas

Re: [L2jServer] New GUI Tools!

Post by smartmedia » Sun Jun 21, 2009 6:37 am

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

User avatar
momo61
Posts: 1648
Joined: Fri Jun 06, 2008 2:05 pm
Location: Europe

Re: [L2jServer] New GUI Tools!

Post by momo61 » Sun Jun 21, 2009 1:13 pm

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.

User avatar
nonom
L2j Veteran
L2j Veteran
Posts: 618
Joined: Wed Mar 11, 2009 10:34 pm
Location: Magmeld

Re: [L2jServer] New GUI Tools!

Post by nonom » Wed Jun 24, 2009 10:33 am

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.
Image
"There are three kinds of people in this world, those who can count and those who can't"

User avatar
roxaz
Posts: 20
Joined: Sat Mar 04, 2006 8:29 am

Re: [L2jServer] New GUI Tools!

Post by roxaz » Sun Jun 28, 2009 7:30 pm

tool wont start on vista x64/windows 7 x64
No more hard coding - we will be good people

Post Reply