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

Talk and share anything related to Star Wars Battlefront 2. No maps or mod announcements here. Use Work in Progress forum.

Moderator: Moderators

What framework do you think would be best for the program? Read about them

Microsoft .NET framework 3.5 Client Profile
6
75%
Microsoft .NET framework 4.0 Client Profile
2
25%
 
Total votes: 8
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

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

Post 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
Last edited by 501st_commander on Thu Nov 18, 2010 1:41 pm, edited 18 times in total.
User avatar
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Re: LUA Editer in progress

Post 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.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editer in progress

Post 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.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: LUA Editer in progress

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: LUA Editer in progress

Post 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.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editer in progress

Post 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.
User avatar
General_Nate
Lieutenant General
Lieutenant General
Posts: 689
Joined: Sun Jun 28, 2009 4:01 pm
Projects :: None because BFII is not working
Games I'm Playing :: Minecraft
xbox live or psn: No gamertag set
Location: 127.0.0.1

Re: LUA Editer in progress

Post by General_Nate »

Woah! This would make BFII modding sooooo much easier!

I hope it works out! :thumbs:
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editer in progress

Post by 501st_commander »

^ :D

UPDATE:
Line Numbers are working now!

Screen:
Hidden/Spoiler:
Image
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: LUA Editer in progress

Post 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
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editer in progress

Post 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.
RogueKnight
Space Ranger
Posts: 2512
Joined: Sat Nov 22, 2008 1:50 pm
Projects :: Life. Work.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: Washington, US

Re: LUA Editer in progress

Post by RogueKnight »

You should make a function that automaticly adds in certain scripts for you, ie. Random skies-map-teams.
User avatar
General_Nate
Lieutenant General
Lieutenant General
Posts: 689
Joined: Sun Jun 28, 2009 4:01 pm
Projects :: None because BFII is not working
Games I'm Playing :: Minecraft
xbox live or psn: No gamertag set
Location: 127.0.0.1

Re: LUA Editer in progress

Post 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.
Blade117
Command Sergeant Major
Command Sergeant Major
Posts: 293
Joined: Thu Nov 26, 2009 9:10 pm
Projects :: No Mod project currently.
Location: location, location

Re: LUA Editer in progress

Post 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.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editer in progress

Post 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 :)
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editer in progress - Update

Post 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
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: LUA Editer in progress - Update

Post 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:
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: LUA Editer in progress - Update

Post by kinetosimpetus »

Hm, user preference quick bar sounds good. He could use an .ini file for that probably.
User avatar
Eggman
Master Bounty Hunter
Master Bounty Hunter
Posts: 1516
Joined: Mon Jul 16, 2007 1:30 pm
Projects :: Battlefront Chronicles
Location: Las Vegas

Re: LUA Editer in progress - Update

Post 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).
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: LUA Editer in progress - Update

Post 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.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editer in progress - Update

Post 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
Post Reply