Page 2 of 4
Re: Lua Editor
Posted: Thu Aug 08, 2013 10:02 am
by John Adams
Cannot launch the script editors.
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in ScintillaNET.dll
An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in ScintillaNET.dll
Additional information: Cannot load the 'SciLexer.dll' module into memory.
The ScintillaNET.dll exists, but the other one does not.
Copied SciLexer.dll to the bin/debug or release folder, and now it's okay.
Re: Lua Editor
Posted: Wed Aug 28, 2013 11:00 pm
by Jabantiz
Added the following lua functions to Lua.xml
GetEquippedItemBySlot
GetEquippedItemByID
GetItemByID
Stealth
IsInvis
IsStealthed
PlayAnimation
SetTarget
IsPet
GetOwner
SetInCombat
CompareSpawns
Runback
GetRunbackDistance
IsCasting
IsMezzed
IsStunned
IsMezzedOrStunned
ClearEncounter
ClearHate
GetMostHated
GetEncounterSize
HasRecovered
ProcessMelee
ProcessSpell
GetEncounter
GetHateList
HasGroup
AddWard
AddToWard
RemoveWard
SetQuestComplete
Updated file on tools svn.
Also added the SciLexer dll's to the bin/debug and bin/release folders
Re: Lua Editor
Posted: Thu Aug 29, 2013 12:24 am
by Jabantiz
Another update for this tool tonight
Found a better way to prevent the icons in solution explorer from changing when you select a node so it should no longer flicker like it was doing. Also filled in some missing text for the tool bar buttons so the tool tips should now be helpful
Re: Lua Editor
Posted: Thu Aug 29, 2013 3:43 pm
by Jabantiz
Removed a bunch of files visual studio creates from svn
Fixed: Solution explorer should no longer collapse and scroll to the top when you save a file.
Re: Lua Editor
Posted: Wed Sep 11, 2013 3:25 pm
by Jabantiz
Emu keywords will now show in auto complete if there is no match in lua keywords
Auto complete is no longer case sensitive so if you type "add" and select "AddHate" the "add" will be replaced instead of it ending up "addAddHate"
New exe's on tools svn
Re: Lua Editor
Posted: Wed Sep 11, 2013 4:48 pm
by Jabantiz
Been playing around with the idea of tool tips, however I can't get them based off the auto complete window (issues with the 3rd party library and not having a pointer to the auto complete window) so I got it working with hovering the mouse over the emu keyword
LUAEditor.jpg
This was just a test and will probably require another xml file to be maintained with all the info, for those of you that use this what are your thoughts? Is this worth the effort?
Re: Lua Editor
Posted: Wed Sep 11, 2013 5:16 pm
by thefoof
That would be a pretty cool feature, but I'd say if it's going to take a ton of work don't worry about it until we get some more people actually scripting. I'm probably the only active scripter right now (content wise) and I can remember all the syntaxes pretty well personally, but for new scripters that would be awesome.
Re: Lua Editor
Posted: Wed Sep 11, 2013 5:28 pm
by Jabantiz
On the code side it shouldn't be to hard to set it up, content side would be time consuming adding all params, param types, return type and description for all lua functions to a new xml file. The xml file is something that could be built over time.
Also my plan was for tool tips to contain at most what is in the screen shot, as I have F1 to go to the wiki for more detailed info.
Re: Lua Editor
Posted: Thu Sep 12, 2013 4:21 am
by alfa
Jabantiz wrote:Been playing around with the idea of tool tips, however I can't get them based off the auto complete window (issues with the 3rd party library and not having a pointer to the auto complete window) so I got it working with hovering the mouse over the emu keyword
LUAEditor.jpg
This was just a test and will probably require another xml file to be maintained with all the info, for those of you that use this what are your thoughts? Is this worth the effort?
I Like it !

Re: Lua Editor
Posted: Thu Sep 12, 2013 9:25 pm
by Jabantiz
Added code to support the tool tips, loads from an xml file, also moved the emu keywords out of lua.xml, the new xml will handle all of the emu related keywords. Did this so we don't have to maintain the keywords in 2 different files.
I haven't committed yet as I would like opinions on the xml, this is what I came up with
Code: Select all
<Function Name="GetDistance">
<ReturnType>float</ReturnType>
<Param Type="Spawn">Spawn1</Param>
<Param Type="Spawn">Spawn2</Param>
<Param Type="int8" Optional="True">include_radius</Param>
<Description>Gets the distance between two spawns, if third parameter is included it will take collison radius into account</Description>
</Function>
<Function Name="AddControlEffect">
<ReturnType>void</ReturnType>
<Param Type="Spawn">Target</Param>
<Param Type="int8">Type</Param>
<Description>Adds the control effect given by type to the target spawn</Description>
</Function>
Thoughts?
Re: Lua Editor
Posted: Thu Sep 12, 2013 10:49 pm
by Jabantiz
Went ahead and committed it, the new xml file has all the emu keywords in it so auto complete and highlighting will still work, only about 5 have detailed info for the mouse hover tool tips though. It should mostly be copy and paste work from the wiki to fill out the xml but it will still be time consuming so it will probably be done over a long period of time.
Re: Lua Editor
Posted: Tue Oct 15, 2013 2:52 pm
by Jabantiz
Added: "Find" and "Find & Replace" to the menu under edit (normal key bindings will work ctrl + f and ctrl + h)
Fixed: Auto format should work again, I deleted a bunch of code for this on accident in one of my commits...
Updated exe's on the tools svn as usual
Re: Lua Editor
Posted: Mon Oct 21, 2013 4:24 pm
by Jabantiz
Was looking into a "compile" option for the editor to check for errors and discovered luac.exe that comes with lua, using that program I can get syntax errors.
LuaError.jpg
The only problem is it will only return 1 error per file so you would have to fix the error and run it again to see if there are more. Would this be useful to anyone? or should I look for a better solution then luac.exe?
Re: Lua Editor
Posted: Mon Oct 21, 2013 5:15 pm
by John Adams
That might be okay. I think even Visual Studio has trouble identifying ALL syntax errors at once. I find when I fix one thing, something right below it will then go squiggly... at least it's something, until you stumble upon something better.
Re: Lua Editor
Posted: Mon Oct 21, 2013 8:06 pm
by thefoof
One error at a time wouldn't be a problem, sounds cool.