no, no, we're not talking about re-writing anything. This would be a parallel scripting language to the existing one. There are advantages and disadvantages of *using* java for scripting but neither advantage or disadvantage if you do not use it.
It's sorta like this. Theoretically, you have some basic layers here:
- 1. eqgame.exe
2. hooks (detours, dx, maybe more here)
3. code that sucks data out of eqgame.exe that we want and spits stuff back into it (thus the MacroQuest window, controlling mouse, UI, sending keys, retrieving items you’re your inventory, etc)
4. scripting language interface
Now, in theory the scripting language interface (the 4th layer) "exposes" the functionality of the 3rd layer. In such a fashion another scripting language could be added to expose this same functionality.
The advantages are this:
- * Much of the scripting language features perform basic functions that existing languages already perform. (file access, looping, mathematical functions, etc)
* The java language adds many more programming constructs that would simplify the MQ scripting process and allow for greater reusability of scripting components. So you might have a script that performs some useful function (in your class) and then people like it so much that they use it in their scripts without having to cut and paste.
* There are benefits to using standardized languages on the learning curve for those who have either used java or C++ before or those who end up using it later after having first been exposed to java from MQ.
* It will not affect users who do not wish to use it.
Disadvantages:
- * Java has to be compiled
* A Java Virtual Machine would have to be created, probably within the process, which can be expensive on resources
* Java commands wont be able to be used from the EQ command line (chat window) as with the original scripting language since they have to be compiled into .class files or objects.
* Some separation of code may be needed between layers 3 and 4 as described above to isolate the script language implementations from the underlying functionality
Now, to counter some of these disadvantages the J2ME (Java 2 Micro Edition) was deigned to run on small appliances (microwave ovens to cell phones and PDAs) and thus has a significantly reduced "fingerprint". Since we only need very simple functionality the embedded java might cover everything we need and at most Personal Java (the java platform targeted at PDAs).
For compilation, java files can be edited using the now existing and awesome commands that let you edit MQ scripts now and the compilation and running of java MQ scripts (JMQ?) can be done with... what? .... macros commands! (in their existing format and structure).