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

Re: LUA Editor in progress - private beta testers needed

Post by 501st_commander »

Very bad news. I send a copy to some friends to test before i get too far in the beta, and it crashes. So, after some searching in the error. I i'll have to start over. Sorry. But it may be a while before i get it back to where it was. Sorry Everyone.


The beta testers will get to test all minor updates to see if it works on their computers when i get that far again.
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 Editor in progress - private beta testers needed

Post by General_Nate »

501st_commander wrote:Very bad news. I send a copy to some friends to test before i get too far in the beta, and it crashes. So, after some searching in the error. I i'll have to start over. Sorry. But it may be a while before i get it back to where it was. Sorry Everyone.


The beta testers will get to test all minor updates to see if it works on their computers when i get that far again.
:|

You have to start over...? Well, I wish you good luck.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editor in progress - private beta testers needed

Post by 501st_commander »

Thanks. I dont know what went wrong. It stops working on every operating system but mine.
myers73
Lieutenant General
Lieutenant General
Posts: 690
Joined: Fri Apr 03, 2009 11:04 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Atlanta, GA xfire=myers73 IngameName=mYers

Re: LUA Editor in progress - Big problem pg3

Post by myers73 »

I got it to work with XP sp3
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editor in progress - Big problem pg3

Post by 501st_commander »

version 0.5 or 1.0RC1?
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 Editor in progress - Big problem pg3

Post by lucasfart »

Do you think it's worth having a public beta on gametoast and seeing whose it does and doesn't work on?

Oh and if you're doing this just so people who haven't got the latest .NET framework, i wouldn't really worry about it and just keep going with your current version. I personally don't need it on the old frameworks since i got a new computer which can run it fine. If there are others who need this version, or you just want to use the older version anyway, don't let me stop you.

Good luck with this, and thanks for all the work you're putting into it.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editor in progress - Big problem pg3

Post by 501st_commander »

You know, thats a good idea. You can Donwload it Here. If you test it, if it works or not, please post or PM me what it does so i can get a count. If it doesnt work, post the error also.

This version i restarted from 0.5. It uses the .NET framework 3.5 Client Profile. So then you would need 2.0, 3.0 and 3.5 installed. I'll put on a poll to see what people would rather me do. I want a program that you wouldn't need to install a ton of other things for it to work. Depending on the poll, i may go back to 4.0 Client Profile. Its small compared to the full one, and it wouldn't need older versions.
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 Editor in progress - Big problem pg3

Post by [RDH]Zerted »

Do whichever lets you further your development skills. Also, I hope you have your code under some type of version control system.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editor in progress - Big problem pg3

Post by 501st_commander »

Framework version control system?
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 Editor in progress - Big problem pg3

Post by [RDH]Zerted »

No, source control. Examples: SVN, Bazaar, Git, etc...

It tracks changes to your code so you can undo them later or so you can go back and see what you changed since some random time.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editor in progress - Big problem pg3

Post by 501st_commander »

No, i dont..
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: LUA Editor in progress - Big problem pg3

Post by Teancum »

Don't bother with 4.0. You're not getting much new functionality, and odds are anything that's new relates to stuff you'll never use anyway. We're running 3.5 at work, and I see no reason to run 4.0.
User avatar
Lozza
Lieutenant Colonel
Lieutenant Colonel
Posts: 543
Joined: Tue Jan 05, 2010 5:11 am
Games I'm Playing :: STALKER - TDU2
Location: Australia. Melbourne
Contact:

Re: LUA Editor in progress - Big problem pg3

Post by Lozza »

This is pretty sweet. Hope you can get it all done : )
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: LUA Editor in progress - Big problem pg3

Post by 501st_commander »

Teancum wrote:Don't bother with 4.0. You're not getting much new functionality, and odds are anything that's new relates to stuff you'll never use anyway. We're running 3.5 at work, and I see no reason to run 4.0.
I wanted to do 4.0CP because it's independent. 3.5CP needs the 2.0 framework installed to work. Whats good about the new 4.0 is its smaller that 3.5. So it wont take much room to install.

Lozza wrote:This is pretty sweet. Hope you can get it all done : )
I will after i fix it :D


______
I was going though to code of the current version. I made some DLL changes to core and removed one that i made. What’s odd, is now it works on my moms computer, before it didn't. So i will send the changes out to the users that pre-beta tested it for the compatibility check (not the beta testers). If it works i dont have to start over, but i will make some major changes to the program if it does. Including BF1 support.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Lua Editor: Small Update on an Update... Syntax solutio

Post by 501st_commander »

Taking a break from working on this since the big bad bug, willingly and not :| blame minecraft

I’ve been thinking what to do with this program, if I should continue building it in Visual Basic, or if I should program it in C#. How to get everything working right, what features should I have first, and the big one is.. What should I do for the syntax highlighter?

I found SciLexer, a programming language Lexer made by Scintilla (makers of SciTE). Thinking “YAY! I finally found something that I can use for the highlighter!”, but when I tried adding it, an error popped up. Digging in the source code, I found why. It’s programmed in C++ 6 not C++ .NET (HUGE difference between them), so I can’t use it. This put me back where I started.

But, this project isn’t dead; I’m in the state of what I should do now. If there are any C# or VB .NET programmers in this forum by any chance, and you think you could help, pm me. For the rest of the community, please post what features you want first (r1.0). Make some up, use other programs ideas (as long they don’t have any legal marks on them), I don’t care. I want to build a program that is useful, and what other people want.

So, I hope this sounded like an update.

Here is a list of features I was going to add in it:
Lua Syntax highlighter – If you don’t know what that is….
Multi Document interface - Have more than one lua open at a time
Project Support - open a lua right from the program, insted of going to the data_@#$'s script folder
Error Checker – Check for missing or wrong things
List of all SWBF2 commands
SWBF1 support


BumpyEdit:
Guess what this is, win a cookie:
Hidden/Spoiler:
[code]
''----------------------------------------------------------
'' Copyright (C) 501st_commander 2010
'' This it the lua editor form, NOT the Lua Editor it self!
''----------------------------------------------------------

Public Class lua
''Make the codetextbox
Private moonlight As New Moonlight.CodeTextBox

''When i load.. this is what happens
Private Sub lua_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

''Create the Lists
Dim comment As List(Of String) = New List(Of String)
Dim functions As New List(Of String)
Dim keywords As New List(Of String)
Dim ScopeOperators As New List(Of String)
Dim Types As New List(Of String)

''comment string, only one
comment.Add(New String("--"))

''functions, one looooooooog list
functions.Add(New String( _
"AddCameraShot", _
"AddWalkerType", _
"AddUnitClass", _
"AudioStreamAppendSegments", _ '' O.o
"CommandPost", _
"EnableSPHeroRules", _
"GetEntityName", _
"OnObjectKill", _
"OpenAudioStream", _
"PlayAnimation", _
"PlayAnimation", _
"SetAmbientMusic", _
"SetBleedingVoiceOver", _
"SetDenseEnvironment", _
"SetDefeatMusic", _
"SetHeroClass",
"SetMaxFlyHeight", _
"SetMaxPlayerFlyHeight", _
"SetMemoryPoolSize", _
"SetOutOfBoundsVoiceOver", _
"SetSoundEffect", _
"SetSpawnDelay", _
"SetupTeams", _
"SetVictoryMusic", _
"ScriptCB_DoFile", _
"ScriptInit", _
"ScriptPostLoad"))

''Keywords
keywords.Add(New String("function", _
"if", _
"else", _
"elseif", _
"local", _
"end"))

''ScoperOperators, aka :
ScopeOperators.Add(":")


''Types
Types.Add("New", _
"ObjectiveConquest", _
"true", _
"false", _
"AddCommandPost", _
"Start", _
"conquest")

''Fill it in!
moonlight.Dock = DockStyle.Fill

'' Colors for the highlighter
moonlight.CodeColor_Comment = Color.Green
moonlight.CodeColor_Function = Color.Yellow
moonlight.CodeColor_Keyword = Color.Blue
moonlight.CodeColor_PlainText = Color.Black
moonlight.CodeColor_Type = Color.Red

'' Set the codes
moonlight.CodeWords_Comments = comment
moonlight.CodeWords_Functions = functions
moonlight.CodeWords_Keywords = keywords
moonlight.CodeWords_ScopeOperators = ScopeOperators
moonlight.CodeWords_Types = Types

'' Add it to the form!
Me.Controls.Add(moonlight)

'' Bring it to the front, so it doesnt hide benind things...
moonlight.BringToFront()


End Sub

''WIP
Private Sub moonlight_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles syntax.TextChanged
End Sub

''Make an event
Friend WithEvents syntax As Moonlight.CodeTextBox
End Class
[/code]
Still adding things to the lists
:D
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 Editor: Small Update on an Update... Syntax solutio

Post by kinetosimpetus »

Hidden/Spoiler:
[quote="501st_commander"]Taking a break from working on this since the big bad bug, willingly and not :| blame minecraft

I’ve been thinking what to do with this program, if I should continue building it in Visual Basic, or if I should program it in C#. How to get everything working right, what features should I have first, and the big one is.. What should I do for the syntax highlighter?

I found SciLexer, a programming language Lexer made by Scintilla (makers of SciTE). Thinking “YAY! I finally found something that I can use for the highlighter!”, but when I tried adding it, an error popped up. Digging in the source code, I found why. It’s programmed in C++ 6 not C++ .NET (HUGE difference between them), so I can’t use it. This put me back where I started.

But, this project isn’t dead; I’m in the state of what I should do now. If there are any C# or VB .NET programmers in this forum by any chance, and you think you could help, pm me. For the rest of the community, please post what features you want first (r1.0). Make some up, use other programs ideas (as long they don’t have any legal marks on them), I don’t care. I want to build a program that is useful, and what other people want.

So, I hope this sounded like an update.

Here is a list of features I was going to add in it:
Lua Syntax highlighter – If you don’t know what that is….
Multi Document interface - Have more than one lua open at a time
Project Support - open a lua right from the program, insted of going to the data_@#$'s script folder
Error Checker – Check for missing or wrong things
List of all SWBF2 commands
SWBF1 support


BumpyEdit:
Guess what this is, win a cookie:
[hide][code]
''----------------------------------------------------------
'' Copyright (C) 501st_commander 2010
'' This it the lua editor form, NOT the Lua Editor it self!
''----------------------------------------------------------

Public Class lua
''Make the codetextbox
Private moonlight As New Moonlight.CodeTextBox

''When i load.. this is what happens
Private Sub lua_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

''Create the Lists
Dim comment As List(Of String) = New List(Of String)
Dim functions As New List(Of String)
Dim keywords As New List(Of String)
Dim ScopeOperators As New List(Of String)
Dim Types As New List(Of String)

''comment string, only one
comment.Add(New String("--"))

''functions, one looooooooog list
functions.Add(New String( _
"AddCameraShot", _
"AddWalkerType", _
"AddUnitClass", _
"AudioStreamAppendSegments", _ '' O.o
"CommandPost", _
"EnableSPHeroRules", _
"GetEntityName", _
"OnObjectKill", _
"OpenAudioStream", _
"PlayAnimation", _
"PlayAnimation", _
"SetAmbientMusic", _
"SetBleedingVoiceOver", _
"SetDenseEnvironment", _
"SetDefeatMusic", _
"SetHeroClass",
"SetMaxFlyHeight", _
"SetMaxPlayerFlyHeight", _
"SetMemoryPoolSize", _
"SetOutOfBoundsVoiceOver", _
"SetSoundEffect", _
"SetSpawnDelay", _
"SetupTeams", _
"SetVictoryMusic", _
"ScriptCB_DoFile", _
"ScriptInit", _
"ScriptPostLoad"))

''Keywords
keywords.Add(New String("function", _
"if", _
"else", _
"elseif", _
"local", _
"end"))

''ScoperOperators, aka :
ScopeOperators.Add(":")


''Types
Types.Add("New", _
"ObjectiveConquest", _
"true", _
"false", _
"AddCommandPost", _
"Start", _
"conquest")

''Fill it in!
moonlight.Dock = DockStyle.Fill

'' Colors for the highlighter
moonlight.CodeColor_Comment = Color.Green
moonlight.CodeColor_Function = Color.Yellow
moonlight.CodeColor_Keyword = Color.Blue
moonlight.CodeColor_PlainText = Color.Black
moonlight.CodeColor_Type = Color.Red

'' Set the codes
moonlight.CodeWords_Comments = comment
moonlight.CodeWords_Functions = functions
moonlight.CodeWords_Keywords = keywords
moonlight.CodeWords_ScopeOperators = ScopeOperators
moonlight.CodeWords_Types = Types

'' Add it to the form!
Me.Controls.Add(moonlight)

'' Bring it to the front, so it doesnt hide benind things...
moonlight.BringToFront()


End Sub

''WIP
Private Sub moonlight_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles syntax.TextChanged
End Sub

''Make an event
Friend WithEvents syntax As Moonlight.CodeTextBox
End Class
[/code]
Still adding things to the lists
:D[/quote][/Hide]
looks like you found a syntax highlighter.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Lua Editor: Small Update on an Update... Syntax solutio

Post by 501st_commander »

Yeppo, a good one at that, the only thing is it doesnt highlight strings ("astring")

Here is a screen of what it looks like:
Image
Options on colors?

New code:
Hidden/Spoiler:
[code]
''----------------------------------------------------------
'' Copyright (C) 501st_commander 2010
'' This it the lua editor form, NOT the Lua Editor it self!
''----------------------------------------------------------

Public Class lua
''Make the codetextbox
Private moonlight As New Moonlight.CodeTextBox

Friend luatype As String = "1"

''When i load.. this is what happens
Private Sub lua_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

'Fill the codetextbox in!
moonlight.Dock = DockStyle.Fill

'' Colors for the highlighter
Moonlight.CodeColor_Comment = Color.Green
Moonlight.CodeColor_Function = Color.Maroon
Moonlight.CodeColor_Keyword = Color.Blue
moonlight.CodeColor_PlainText = Color.Black
moonlight.CodeColor_Type = Color.Red

'A complete hack to get it to work. Dont try this at home.
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(lua))

'' Set the codes
moonlight.CodeWords_Comments = CType(Resources.GetObject("CodeTextBox1.CodeWords_Comments"), System.Collections.Generic.List(Of String))
moonlight.CodeWords_Functions = CType(Resources.GetObject("CodeTextBox1.CodeWords_Functions"), System.Collections.Generic.List(Of String))
moonlight.CodeWords_Keywords = CType(Resources.GetObject("CodeTextBox1.CodeWords_Keywords"), System.Collections.Generic.List(Of String))
moonlight.CodeWords_ScopeOperators = CType(Resources.GetObject("CodeTextBox1.CodeWords_ScopeOperators"), System.Collections.Generic.List(Of String))
moonlight.CodeWords_Types = CType(Resources.GetObject("CodeTextBox1.CodeWords_Types"), System.Collections.Generic.List(Of String))


'' Add it to the form!
Me.Controls.Add(Moonlight)

'' Bring it to the front, so it doesnt hide benind things...
Moonlight.BringToFront()
End Sub
End Class


[/code]
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 Editor: Small Update on an Update... Syntax solutio

Post by kinetosimpetus »

And that is In VB right? I searched for that codebox object on google and found one for C (possibly#?) but not VB.
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Lua Editor: Small Update on an Update... Syntax solutio

Post by 501st_commander »

Its programmed in C# and its name is CodeTextBox. I added the .dll as a resorce and got it working. But i had to do everything in code, not in the designer.
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 Editor: Small Update on an Update... Syntax solutio

Post by kinetosimpetus »

Ok
Post Reply