Quest system.
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- Minutis
- Posts: 56
- Joined: Thu Feb 22, 2007 2:01 pm
Quest system.
Why quests are still written using python? Isn't it better to translate all quests to java?
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: Quest system.
why touch what already work and don't have bug?
- poltomb
- L2j Veteran
- Posts: 225
- Joined: Wed Jul 13, 2005 7:13 am
- Location: USA
Re: Quest system.
It's mostly just preference. Unless someone can show some serious data supporting a performance gain in changing to java, then then there is no need for us to use the very limited L2J team manpower to convert the scripts. If you want to, feel free to do so and share the results. No guarantee it would get accepted though.Minutis wrote:Why quests are still written using python? Isn't it better to translate all quests to java?
Personally, I think that groovy should be looked into. It has java-like syntax with the benefits of a scripting language like python. I don't know the performance differences between groovy, python, javascript, or plain java to say which is better though.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: Quest system.
Duh... there have been made multiple topics about this, one guy "translated" scripts/custom folder to java, one other - few quests, but none of them ever got committed because as far as I can guess - some people just don't think it's MORE COMFORTABLE to have all scripts in the same language (Yes, I know some people know jython more than java but this is a JAVA project after all)!
Since I'm using Eclipse (just like so many other people out there), right-clicking on a method or a class in a jython script and going to the source is IMPOSSIBLE, unlike java scripts. That's the simplest, but also IMHO most annoying thing - you have to copy the method name, find in which file it is contained and then search in that file, not to mention that there are methods that have several versions of the same thing which makes it harder to find the right one.
If it's a java script, however, you get straight to the exact method.
Also, code completion and suggestions are not available in Eclipse. I tried jyDT and some other jython plugins for Eclipse, but I didn't really notice ANY difference, there was no option to go to core classes from jython scripts, no code completion, same old text editor, just with slight syntax highlighting...
Basically, I'm all hands for java. I've already mentioned this before, but I have translated multiple (~40) quest scripts to java myself and I might actually share them some day, but at the current rate and attitude (none of my contribs have been even appreciated, even though they were good) I don't see why I should.
[offtopic]If I had the time and passion, I'd make a fork myself, maybe some day I will. IMO current l2j attitude is way off. I'm not talking about the leecher thing, I'm talking about anyone that is not a team member and is not sucking a dick to become one.[/offtopic]
Since I'm using Eclipse (just like so many other people out there), right-clicking on a method or a class in a jython script and going to the source is IMPOSSIBLE, unlike java scripts. That's the simplest, but also IMHO most annoying thing - you have to copy the method name, find in which file it is contained and then search in that file, not to mention that there are methods that have several versions of the same thing which makes it harder to find the right one.
If it's a java script, however, you get straight to the exact method.
Also, code completion and suggestions are not available in Eclipse. I tried jyDT and some other jython plugins for Eclipse, but I didn't really notice ANY difference, there was no option to go to core classes from jython scripts, no code completion, same old text editor, just with slight syntax highlighting...
Basically, I'm all hands for java. I've already mentioned this before, but I have translated multiple (~40) quest scripts to java myself and I might actually share them some day, but at the current rate and attitude (none of my contribs have been even appreciated, even though they were good) I don't see why I should.
[offtopic]If I had the time and passion, I'd make a fork myself, maybe some day I will. IMO current l2j attitude is way off. I'm not talking about the leecher thing, I'm talking about anyone that is not a team member and is not sucking a dick to become one.[/offtopic]
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- L2j Veteran
- Posts: 3437
- Joined: Wed Apr 30, 2008 8:53 am
- Location: Russia
Re: Quest system.
Currently no one in team interested in such huge useless work. Remember what you should not only move to another language, but also test each quest and fix errors.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
public static final int PI = 3.1415926535897932384626433832795;
- Minutis
- Posts: 56
- Joined: Thu Feb 22, 2007 2:01 pm
Re: Quest system.
First of all, if I'm not wrong - whole python code in L2J are quests.
--> So if we make them all java there will be no need of python injectors (that libraries for python integration into java, don't know how they're called).
--> Secondly Java is much more simple to learn and you don't need other programing languages to freely control L2J to suite your needs. It's easily readable.
--> Java is faster than Python.
So as I see things, we would get reasonable performance boost.
And I'll volanteruly start translating quests. Hope they will be accepted
Or at least discussed about to see whats wrong.
--> So if we make them all java there will be no need of python injectors (that libraries for python integration into java, don't know how they're called).
--> Secondly Java is much more simple to learn and you don't need other programing languages to freely control L2J to suite your needs. It's easily readable.
--> Java is faster than Python.
So as I see things, we would get reasonable performance boost.
And I'll volanteruly start translating quests. Hope they will be accepted

- Minutis
- Posts: 56
- Joined: Thu Feb 22, 2007 2:01 pm
Re: Quest system.
I know, i had translated few quests before and tested them. They worked good. But if it's really pointless then nevermind._DS_ wrote:Currently no one in team interested in such huge useless work. Remember what you should not only move to another language, but also test each quest and fix errors.
What I don't understand, why Quests have been written in Python. Why combine few languages, when i think it will be more efficient to use one.
- Stake
- Posts: 383
- Joined: Sun Mar 23, 2008 9:33 pm
- Location: Hungary
- Contact:
Re: Quest system.
When scripts are loaded, they are converted into Java bytecode, and JVM handles them the same way like a compiled pure Java code. Anyway, you're right about the performance issue, but it would affect only the loading time of the gameserver, runtime would be the same. I think, it's good as it is, since most of the quests work fine, and it would be unnecessary to rewrite them into pure Java just for about 10 second reduction in load (compilation) time.Minutis wrote:I know, i had translated few quests before and tested them. They worked good. But if it's really pointless then nevermind._DS_ wrote:Currently no one in team interested in such huge useless work. Remember what you should not only move to another language, but also test each quest and fix errors.
What I don't understand, why Quests have been written in Python. Why combine few languages, when i think it will be more efficient to use one.


- Minutis
- Posts: 56
- Joined: Thu Feb 22, 2007 2:01 pm
Re: Quest system.
Oh if thats how it is, then this is really low priority
Ok. How do you learn this stuff? By yourself?

- poltomb
- L2j Veteran
- Posts: 225
- Joined: Wed Jul 13, 2005 7:13 am
- Location: USA
Re: Quest system.
This is true.Minutis wrote:First of all, if I'm not wrong - whole python code in L2J are quests.
They are not called either. It is a script engine.Minutis wrote:--> So if we make them all java there will be no need of python injectors (that libraries for python integration into java, don't know how they're called).
First part: not for everyone.Minutis wrote:--> Secondly Java is much more simple to learn and you don't need other programing languages to freely control L2J to suite your needs. It's easily readable.
I agree with the second two parts.
Minutis wrote:--> Java is faster than Python.
- Do you have proof?
- I believe it is your assumptions about Java, Python, and scripts written in Java that is causing you to believe this is always true. Scripts written in Java being faster would mean that the script engine compiles the Java into byte code that executes faster than the compiled classes from the Jython script engine. The last benchmark test I saw (granted it was several years ago) Jython typically performed as good or better than the Java Beanshell scripting engine (Beanshell is the engine we use that compiles our scripts in Java).
See above.Minutis wrote:So as I see things, we would get reasonable performance boost.
You are very welcome to do so! If you can do this, get it tested by enough server admins saying that it works the same (without any performance hit), then I will personally push to get this in. Mind you that this is still a datapack element, not a core element.Minutis wrote:And I'll volanteruly start translating quests. Hope they will be acceptedOr at least discussed about to see whats wrong.
- poltomb
- L2j Veteran
- Posts: 225
- Joined: Wed Jul 13, 2005 7:13 am
- Location: USA