Page 1 of 5

Lua Editor: Small Update on an Update... Syntax solution

Posted: Tue Mar 09, 2010 12:30 am
by 501st_commander
For right now, i am working on a lua editor for scripting, well, luas :)
I am making it in Microsoft Visual Basic 8.

**staff, if this is the wrong place, please move it.

The features are the following
  • Open, close, save and edit luas (of corse)
    Line numbers on the left side - Done.
    Most to all functions will be listed in the LUA code explorer - (coming)
    Syntax and/or Error checker for missing "{", "}", "(", ")", ",", etc. - (coming)
    Syntax highlighter (If, Then, End, //comment, etc. - Done.

    and more.
Early Screenshots:
Hidden/Spoiler:
Image
Image
Image
Image
Code Explorer list:

Code: Select all

//FUNCTIONS
ScriptCB_DoFile()
ScriptPostLoad()
OnEnterRegion()
OnObjectKill()
PlayAnimation()
CommandPost:New{}
ActivateRegion()
GetEntityName()
MoveEntityToNode()
AddDeathRegion()
EnableSPHeroRules()
ReadDataFile()
SetMaxFlyHeight()

//CONQUEST FUNCTIONS
conquest:AddCommandPost()
ObjectiveConquest:New{}
conquest:Start()
CommandPost:New{}

//OTHER
BlockPlanningGraphArcs()
function()
SetUberMode()

//CAMPAIGN
Start function
end function
GoTo
Assault
Conquest

//POOLS
Soldier Animation Pool

//CODES
T_END (end)
T_IF (If [condition] Then ////code End)


please post any suggestions, or feature additions for this.


Version Update Links:
0.5: (this post)
1.0: http://www.gametoast.com/forums/viewtop ... 77#p398777

Re: LUA Editer in progress

Posted: Tue Mar 09, 2010 8:33 am
by RED51
Nice job! When I was working with VB last year (This year) in one of my classes, I thought how easy LUA scripting would be if we an editor a bit like VB's scripter. Hopefully after this is made we'll see more complex scripted maps.

Re: LUA Editer in progress

Posted: Tue Mar 09, 2010 1:10 pm
by 501st_commander
Thanks.
I still need more of the functions from the luas. If anyone knows more please post them or a link to them so i can add it in the explorer list.

I am still working on organizing the functions in the explorer - make it easier to find them. I also may add a feature to complete code when you start typing it. If i get it working..


If anyone is interested in helping to this project, throw me a pm for more information and the source of it.

Re: LUA Editer in progress

Posted: Tue Mar 09, 2010 1:24 pm
by MercuryNoodles
http://www.gametoast.com/forums/viewtop ... 27&t=12469

There you go. Scroll down to Tean's posts. :P As for the details behind each, I'd advise searching through the docs, and around here, though I'm pretty sure not everything has an explanation.

Re: LUA Editer in progress

Posted: Tue Mar 09, 2010 1:37 pm
by [RDH]Zerted
Not to say you can't continue working on your editor, but it might be simpler to just add the function list to another editor such as SciTE. I had planned to do it when I finished the API documentation, but I haven't put much time into that.

Re: LUA Editer in progress

Posted: Tue Mar 09, 2010 6:03 pm
by 501st_commander
MercuryNoodles wrote:http://www.gametoast.com/forums/viewtop ... 27&t=12469

There you go. Scroll down to Tean's posts. :P As for the details behind each, I'd advise searching through the docs, and around here, though I'm pretty sure not everything has an explanation.
thank you. :D
[RDH]Zerted wrote:Not to say you can't continue working on your editor, but it might be simpler to just add the function list to another editor such as SciTE. I had planned to do it when I finished the API documentation, but I haven't put much time into that.
I didn't think of that... I will do this, though, gives me knowledge on building a program.

Re: LUA Editer in progress

Posted: Tue Mar 09, 2010 8:21 pm
by General_Nate
Woah! This would make BFII modding sooooo much easier!

I hope it works out! :thumbs:

Re: LUA Editer in progress

Posted: Tue Mar 09, 2010 8:26 pm
by 501st_commander
^ :D

UPDATE:
Line Numbers are working now!

Screen:
Hidden/Spoiler:
Image

Re: LUA Editer in progress

Posted: Wed Mar 10, 2010 7:22 am
by lucasfart
Wow! only just noticed this and its looking awesome! i would suggest adding kill object/respawn object commands, and if possible, some commands to help with math.random setup. what about helping new people setting up sides using this, or would it be almost pointless/come under the readdatafile section?

EDIT: Also, something that would be really awesome would be a quick way to add AIHerosupport code to maps, getting the user to input amount of cp's, spawns, unit names, mode and health. this would be really awesome and would encourage beginners to use it.
Also noticed you had blockplanninggraphs, which instantl made me think of disable/enable barriers.
Addunitclass command?

My list of command idea's:

Code: Select all

disablebarriers
enablebarriers
killobject
respawnobject
AIHeroSupport help?
math.random help?
addunitclass

Re: LUA Editer in progress

Posted: Wed Mar 10, 2010 12:09 pm
by 501st_commander
I'll see about the math.random function. I hope i can find something that i can use a the description.

About the sides, I will have a button to convert the shipped sides (ReadDataFile("SIDE\\rep.lvl", ...) to the ReadDataFile("dc:SIDE\\rep.lvl", ... with a click of a button. Then have something to load the req file from the custom sides folder and put all the units/walkers/flyers etc. in that section.

The AddUnitClass() and SetHeroClass() will be added soon.

Thanks for the comment.

Re: LUA Editer in progress

Posted: Wed Mar 10, 2010 7:16 pm
by RogueKnight
You should make a function that automaticly adds in certain scripts for you, ie. Random skies-map-teams.

Re: LUA Editer in progress

Posted: Thu Mar 11, 2010 3:29 pm
by General_Nate
RogueKnight wrote:You should make a function that automatically adds in certain scripts for you, ie. Random skies-map-teams.
Seconded.

And things like like that.

Re: LUA Editer in progress

Posted: Thu Mar 11, 2010 4:25 pm
by Blade117
Thirded (Is that even a word?) I'll most likely never use this (I don't mod...yet) but with it, many more quality maps with such things will be made, which is definitely a good thing.

Re: LUA Editer in progress

Posted: Thu Mar 11, 2010 6:28 pm
by 501st_commander
Blade117 wrote:Third. I'll most likely never use this (I don't mod...yet) but with it, many more quality maps with such things will be made, which is definitely a good thing.
fixed

Yea, i may once i finish this, make an addon or another projeam for odfs and reqs.
General_Nate wrote:
RogueKnight wrote:You should make a function that automatically adds in certain scripts for you, ie. Random skies-map-teams.
Seconded.

And things like like that.
will do :)

Re: LUA Editer in progress - Update

Posted: Tue Apr 27, 2010 10:05 pm
by 501st_commander
Update
  • All functions work in the LCE
  • Syntax HightLighter is being developed. I have to convert C# code to VB :runaway:
  • Icons Made
I still have some work to do. Rearange the functions in the code list, and some minor work. Many functions i still have to add. I am hoping to have 0.5 public in a month.
POLL:
What function(s) do you use the most? I will add them to the quick click bar.


Screen:
Hidden/Spoiler:
Image

Re: LUA Editer in progress - Update

Posted: Thu Apr 29, 2010 6:35 am
by lucasfart
Glad to see you're still working on this :)

I would have to say math.random is the thing i use most, not that i use it that much........would it be possible to make it so that the user can add their own favourite commands to a quick click bar? It would be awesome if we could each have our own favourites, instead of the more common ones, although i can live without it :D

Also, is LCE the program you use to develop it or what?

Can't wait to see this released, it looks pretty handy :thumbs:

Re: LUA Editer in progress - Update

Posted: Thu Apr 29, 2010 8:15 am
by kinetosimpetus
Hm, user preference quick bar sounds good. He could use an .ini file for that probably.

Re: LUA Editer in progress - Update

Posted: Thu Apr 29, 2010 11:50 am
by Eggman
I'd say I use KillObject and RespawnObject more than anything else. ActivateRegion/DeactivateRegion are pretty common for me as well, along with the functions involving procedural animations (I can't remember what they're called off-hand, I think it's something like PlayAnimation and PauseAnimation).

Re: LUA Editer in progress - Update

Posted: Thu Apr 29, 2010 1:23 pm
by FragMe!
Even though it is an easy change but since you are making a fancy interface anyway, I'd suggest something to fill in the walker setting. So like walker type, Droideka, 2 leg 4 leg 6 leg how many, any command walkers things like that.

Re: LUA Editer in progress - Update

Posted: Thu Apr 29, 2010 4:02 pm
by 501st_commander
lucasfart wrote: Glad to see you're still working on this :)
:D
lucasfart wrote:I would have to say math.random is the thing i use most, not that i use it that much........would it be possible to make it so that the user can add their own favourite commands to a quick click bar?
Yes, if they are part of the LCE.
lucasfart wrote:It would be awesome if we could each have our own favourites, instead of the more common ones, ...
It will be possible.
lucasfart wrote:Also, is LCE the program you use to develop it or what?
LCE = LUA Code Explorer
lucasfart wrote:Can't wait to see this released, it looks pretty handy :thumbs:
It it, i used some myself already. :P
kinetosimpetus wrote:Hm, user preference quick bar sounds good. He could use an .ini file for that probably.
I am working on it now, it will be in a .dll
Eggman wrote:I'd say I use KillObject and RespawnObject more than anything else. ActivateRegion/DeactivateRegion are pretty common for me as well, along with the functions involving procedural animations (I can't remember what they're called off-hand, I think it's something like PlayAnimation and PauseAnimation).
They will be all in a checkbox popup. Then you can check the ones you want.
FragMe! wrote:Even though it is an easy change but since you are making a fancy interface anyway, I'd suggest something to fill in the walker setting. So like walker type, Droideka, 2 leg 4 leg 6 leg how many, any command walkers things like that.
That is also a thing i am working on now.. :D Thanks for the idea.
Edit:
Done with that..

Here is a screen i thought was funny (look at the floating text)
Hidden/Spoiler:
Image