• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best places on the 'net to talk Pokémon and more! Community members will not see the bottom screen advertisements.
  • Want to share your adventures playing Pokémon?
    Check out our new Travel Journals forum for sharing playthroughs of ROM Hacks, Fan Games, and other Pokémon content!
  • IMPORTANT: Following a takedown request, the following hacks have been delisted from PokéCommunity:

    • Pokémon Glazed
    • Pokémon: Giratina Strikes Back
    • Pokémon Flora Sky
    • Pokémon Stranded
    The downloads and discussion threads for these hacks will no longer be accessible, and staff will be unable to return questions regarding accessing this content.

Survey: New Script Editor Ideas Thread

Status
Not open for further replies.
275
Posts
13
Years
  • Seen Oct 9, 2019
I'm thinking XSE and PokeScript's styles are very similar, and what I've called "PokeScript" is actually a hybrid of the two. What's XSE have that this variant doesn't?
Now that I look at the specific example you've given, the differences are minimal. XSE (as I usually see it posted here) just looks cleaner because it's lowercase. :\

I've seen other examples of PokeScript and PKSV on the boards, though, and those usually look quite a bit messier. Dollar signs, weird command names...
 
5,256
Posts
16
Years
I agree with DavidJCobb's idea for the layout purely because I'm more used to that kind of style.
Though the colours - the orange in particular - tend to hurt my eyes. I'd suggest making ordinary commands (which are in blue) plain black, and then the text using the orange to become the blue. Though I guess then non-commands won't be noticeable...eh, idk. This looks great though, good luck (not that you need luck).
 

Truality

Left for good
1,006
Posts
12
Years
  • Age 32
  • Seen May 17, 2013
The inline thing is a good feature indeed. I'm fine with both layouts, but I wonder if you're going to include something like what XSE has on its friendly user interface; a built-in guide/command list and/or a text adjuster.

Overall, best of luck with the project!
 

droomph

weeb
4,285
Posts
12
Years
Also, maybe an x-code thing where it guesses which function you're going to do?

For example I type in "p" and xcode guesses that I'm going to do "printf", so it prints out in gray, "printf ("message");", and if I decide to keep it...

Something like that.

Spoiler:


AND YES PRETTY PLEASE INLINE

aww no mac :(

best of luck!
 
28
Posts
12
Years
  • Seen Sep 30, 2013
I prefer the C-style, but lowercased commands and keywords. Also, coming from a programming (Java) background and wanting to take up scripting, I like to see the print command: message.print("this is a message!"); or msgbox.print("this is a message!");. I'm not all that familiar with other scripting formats, but I find applymovement too lengthy of a command; how about reducing it to just move? If you want to move that player, then we use move(player, movement commands) or if any other NPC, we use move(var, commands) where var is the players number or whatever.. I'm just blabbering, lol.

The in-line feature is actually pretty great to implement.

Code:
#org @main
lock; faceplayer;
move(PLAYER, 0x1 0x2);
move(10, 0x1 0x2);
move(10, @movement);
waitmovement();
message.print("a message!", #6); // in-line
message.print(@msg, #6); // or without the hash-tag.
release; end;

#text @msg
= this is a message!

#raw @movement
= 0x1 0x2 0xFF
Something like this. Or not.

Also, the colors are fine except the orange; what about just simple dark gray or something close to black?

Also, how about a looping feature? Oh, like the poster above me said.
 
Last edited:

IIMarckus

J946@5488AA97464
402
Posts
16
Years
  • Seen Feb 21, 2024
Providing a GUI editor is fine, but please provide at least a basic command‐line option for people who like to use other text editors like vi.

Also, making it open source would be a great idea.
 
58
Posts
13
Years
  • Seen Jan 3, 2015
Adding a looping feature is very good idea:

Code:
loop(@i ; 10)
{
      message("Message " + i);
}

OR

Code:
loop(@i ; 10) :
message("Message " + i);

@i declares an integer variable and 10 represents how many times the loop will iterate. Using for or while might be a little confusing to some so using a keyword like loop explains what will happen upon usage better. I also am fond of using brackets since they organize the script, but not really needed. This is regards for a loop. I haven't seen something similar to this in other languages, so this will be great if it is to be implemented. Having a script editor that have a close syntax to an actual programming language would be great, at least in my opinion.
 

tinix

PearlShipper & C Programmer
86
Posts
14
Years
Adding a looping feature is very good idea:

Code:
loop(@i ; 10)
Code:
[SIZE=2][FONT=Calibri]{[/FONT][/SIZE]
[SIZE=2][FONT=Calibri]      message("Message " + i);[/FONT][/SIZE]
[SIZE=2][FONT=Calibri]}[/FONT][/SIZE]

OR

Code:
loop(@i ; 10) :
Code:
[SIZE=2][FONT=Calibri]message("Message " + i);[/FONT][/SIZE]

@i declares an integer variable and 10 represents how many times the loop will iterate. Using for or while might be a little confusing to some so using a keyword like loop explains what will happen upon usage better. I also am fond of using brackets since they organize the script, but not really needed. This is regards for a loop. I haven't seen something similar to this in other languages, so this will be great if it is to be implemented. Having a script editor that have a close syntax to an actual programming language would be great, at least in my opinion.
Well you can already do this in XSE by doing something like this:
Code:
#dynamic 0x80000
 
#org @main
lock
setvar 0x8000 0x0
goto @loop
end
 
#org @loop
compare 0x8000 0xA
if 0x1 goto @cont
//Code Here
addvar 0x8000 0x1
goto @loop
end
 
#org @cont
release
end

Anyway I think it is great idea to have loops implemented with less annoying syntax.
EDIT: This is very similar to Assembler loops and I think that if we will be implementing some other dialect for scripting whit some advanced freatures like loops or objects, we should treat XSE like "assembly". By that I mean like C on computers which is compiled into assembly and the machine code. We could make the compiler compile the new dialect into machine code BUT any freature of the new dialect must be implementable somehow through the "assembly" (XSE in our case).
Also, making it open source would be a great idea.
I also support this.
 
Last edited:
275
Posts
13
Years
  • Seen Oct 9, 2019
I find applymovement too lengthy of a command; how about reducing it to just move? If you want to move that player, then we use move(player, movement commands)
It's my understanding that there actually are other move-related commands, which teleport a sprite instead of having it execute a movement sequence. Ergo "move" as a command name would be too ambiguous.
 

link12552

decade club
205
Posts
16
Years
Someone mentioned a smart intellisense type dialog, I think that would be wonderful!
(no more having to guess what variable goes where)

And on second thought, I don't know if all these colors are necessary for the highlighting.
Just blue and black, with maybe red for defined terms, would be very easy on the eyes.

Blue = things like "if" and all the functions,
Red = defined terms, from the custom definitions and the predefined ones, they might begin with the #,
Green = commented lines,
Black = everything else.

It can be hard to see the orange font if you have, say a dim laptop screen, or there is a source of light/glare.

I was also wondering if you were going to use c# or c/c++ style naming convention.

c/c++ contains more all caps and all lowercase terms, where as in c# most terms begin with a capital letter, and are lowercase except if the term, is a combination of multiple words.
(ex: applymovement vs ApplyMovement)
 

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Another idea ive got is some kind of plugin system, so people can extend the editor without messing with original source code. So for example I want the editor to be able to compile ASM, I make an DLL that can have pre-defined entry point for program to find. Then I open the editor open some kind of dialog for adding extensions and it would load the assembly and add it to the menu (or another dialog with extensions) from which I can invoke the extension.
Ugh. That would take so much effort to implement. It's going to be open source. People can just edit it.
I think you should treat Person Events as objects, and things like applymovement as methods. (Java style)

Eg,

#org mainorg
player.lock(); // lock
player.move1(up, down, left, end); // applymovement move1 PLAYER
msgbox.talk1("Hello there, " + \v\h01 + "!"; noclose); // msgbox talk1 callstd msg_noclose
mainorg.call(suborg); // call suborg
player.release(); // release
end;

#org suborg
var4001 = 1; // setvar 0x4001 0x1
if (var4001 == 0x1); // compare 0x4001 0x1, if ==
var4001 = 2; // setvar 0x4001 0x2
return;

// #org move1
m walk_up walk_down walk_left end

// #org talk1
= Hello there, \v\h01!



As you can see, this is all just aesthetics (the comments are PKSV style).

In addition, please use black font for normal syntax. Also give some syntax, like msgbox or if, bold, dark blue font like PKSV does. I find that really helpful. I think being able to add comments to the script would also be very useful. Everything else you've done so far is good. I especially like being able to put movements/text on the same line as the command.

This would help beginners program in a more realistic way.
I don't like Java. But... I guess. Maybe.
Looks good. I personally like the C syntax better (might just be because of consuetude).

About suggestions, I don't know how much it would be worth it, but what about implementing a VisualStudio-like "intellisense" (sorry for using that word since I know many persons can't stand it, but it explains the idea)? So when you open a parenthesis after the function name, a tool-tip-text pops up showing possible arguments for that function.
I was already planning on including something like this. I have the base coded already. ^_^
I'm really new to hacking etc but I am actually studying IT. I just had a class with some assembler coding this semester.
I don't know how many possibilities are available for hacking but maybe you can do one of these things:
1) for/while cycle.
2)Or something like this:
[insert command here] * 6; // do something 6 times no matter what it is. Would be easier than a for cycle and better to code. Also, no-one can possibly create an endless for cycle this way. Then again if your stupidity reaches a critical mass it might happen anyway.
Nope. I think for loops are easy enough anyway.
Also, working slowly on a hack that will have a lot of puns/jokes and hidden easter eggs in it. I have designed a map and a rough storyline, but as I'm still learning to script it will take a lot of time until I'm ready to come out with it.
k
Now that I look at the specific example you've given, the differences are minimal. XSE (as I usually see it posted here) just looks cleaner because it's lowercase. :\

I've seen other examples of PokeScript and PKSV on the boards, though, and those usually look quite a bit messier. Dollar signs, weird command names...
Haha, indeed.
I agree with DavidJCobb's idea for the layout purely because I'm more used to that kind of style.
Though the colours - the orange in particular - tend to hurt my eyes. I'd suggest making ordinary commands (which are in blue) plain black, and then the text using the orange to become the blue. Though I guess then non-commands won't be noticeable...eh, idk. This looks great though, good luck (not that you need luck).
Hmm, you may be right. Colors will be customizable anyway, but it's probably better to make make them basic colors for now.
The inline thing is a good feature indeed. I'm fine with both layouts, but I wonder if you're going to include something like what XSE has on its friendly user interface; a built-in guide/command list and/or a text adjuster.

Overall, best of luck with the project!
Of course. Both of those things.
Also, maybe an x-code thing where it guesses which function you're going to do?

For example I type in "p" and xcode guesses that I'm going to do "printf", so it prints out in gray, "printf ("message");", and if I decide to keep it...

Something like that.
Er... Maybe. It's a good idea, but may be difficult to implement.
How about making a loop thing?

I mean,
Code:
@for
for (variable = number, variableoperate, variable condition number)
	loop statement
…
	return '}

next

Code:
	@for
	setvar variable number
	compare variable number
	if1 condition @loop
	jump @next

	@loop
	variableoperate
	statement
	compare variable number
	if1 condition @loop
	jump @next

	@next
It's totally possible.
I really don't see For Loop shorthand as necessary.
AND YES PRETTY PLEASE INLINE
KAY!
aww no mac :(

best of luck!
Yeah. I might code a compiler in C, and build it for Mac and PC, but Mac won't get a GUI. I don't have a mac to test on.
I prefer the C-style, but lowercased commands and keywords. Also, coming from a programming (Java) background and wanting to take up scripting, I like to see the print command: message.print("this is a message!"); or msgbox.print("this is a message!");.
Er... That's just a longer name. Seems silly to me.
I'm not all that familiar with other scripting formats, but I find applymovement too lengthy of a command; how about reducing it to just move? If you want to move that player, then we use move(player, movement commands) or if any other NPC, we use move(var, commands) where var is the players number or whatever.. I'm just blabbering, lol.

The in-line feature is actually pretty great to implement.

Code:
#org @main
lock; faceplayer;
move(PLAYER, 0x1 0x2);
move(10, 0x1 0x2);
move(10, @movement);
waitmovement();
message.print("a message!", #6); // in-line
message.print(@msg, #6); // or without the hash-tag.
release; end;

#text @msg
= this is a message!

#raw @movement
= 0x1 0x2 0xFF
Something like this. Or not.
Command names will be customizable, so you can change them to whatever you like.
Also, the colors are fine except the orange; what about just simple dark gray or something close to black?
Suggestion noted.
Providing a GUI editor is fine, but please provide at least a basic command‐line option for people who like to use other text editors like vi.

Also, making it open source would be a great idea.
Deal. To both suggestions.
Adding a looping feature is very good idea:

Code:
loop(@i ; 10)
{
      message("Message " + i);
}

OR

Code:
loop(@i ; 10) :
message("Message " + i);

@i declares an integer variable and 10 represents how many times the loop will iterate. Using for or while might be a little confusing to some so using a keyword like loop explains what will happen upon usage better. I also am fond of using brackets since they organize the script, but not really needed. This is regards for a loop. I haven't seen something similar to this in other languages, so this will be great if it is to be implemented. Having a script editor that have a close syntax to an actual programming language would be great, at least in my opinion.
Ugh. I guess everyone wants a loop. Can someone give me an example of why this would be needed. Any script example would be great. Thanks.
Well you can already do this in XSE by doing something like this:
Code:
#dynamic 0x80000
 
#org @main
lock
setvar 0x8000 0x0
goto @loop
end
 
#org @loop
compare 0x8000 0xA
if 0x1 goto @cont
//Code Here
addvar 0x8000 0x1
goto @loop
end
 
#org @cont
release
end

Anyway I think it is great idea to have loops implemented with less annoying syntax.
EDIT: This is very similar to Assembler loops and I think that if we will be implementing some other dialect for scripting whit some advanced freatures like loops or objects, we should treat XSE like "assembly". By that I mean like C on computers which is compiled into assembly and the machine code. We could make the compiler compile the new dialect into machine code BUT any freature of the new dialect must be implementable somehow through the "assembly" (XSE in our case).

I also support this.
Radicle.
It's my understanding that there actually are other move-related commands, which teleport a sprite instead of having it execute a movement sequence. Ergo "move" as a command name would be too ambiguous.
Yep.
Someone mentioned a smart intellisense type dialog, I think that would be wonderful!
(no more having to guess what variable goes where)
WOO!
And on second thought, I don't know if all these colors are necessary for the highlighting.
Just blue and black, with maybe red for defined terms, would be very easy on the eyes.

Blue = things like "if" and all the functions,
Red = defined terms, from the custom definitions and the predefined ones, they might begin with the #,
Green = commented lines,
Black = everything else.

It can be hard to see the orange font if you have, say a dim laptop screen, or there is a source of light/glare.
That could work.
I was also wondering if you were going to use c# or c/c++ style naming convention.

c/c++ contains more all caps and all lowercase terms, where as in c# most terms begin with a capital letter, and are lowercase except if the term, is a combination of multiple words.
(ex: applymovement vs ApplyMovement)
Well... I'm undecided. I was just going to allow both. But I could add something to change the case if everyone would prefer. Right now it allows for either.


*Sorry if I seem blunt, but there was a lot to reply to.
 

hinkage

Everyone currently in an argument with this member
381
Posts
13
Years
  • Age 28
  • Seen Mar 17, 2024
Don't bother incorporating loops. I can't imagine any scripts that would use them other than to spam msgbox's or something, and technically loops are already possible using the "jump" or "goto" commands. Although those are bad programming style, they work, and you can do loops just fine.
 

tinix

PearlShipper & C Programmer
86
Posts
14
Years
Ugh. That would take so much effort to implement. It's going to be open source. People can just edit it.
Well I dont really think it would be painful at all. Before I posted that idea Ive tried to throw together a little program in C# that would load an assembly that has specified entry point and invoke the entry point of assembly. (Essentialy the idea of plugin system was an DLL written in .NET language with specified entry point that would get invoked from the main program) The code for loading the DLL is 6 lines long:
Spoiler:


This would need little modifications to work in the editor but it is the essential part of it.
And to your response that it will be opensource. That is a good thing, but plugin manager is useful anyway, because if you will release a new version with lets say important bugfix in compiler code, some people could be using modified branch of editor with ASM compiler and syntax highlithing for example. If the modification would be plugin the person that is using it just needs to load it in new version. But if it would be a fork of the source, then they would need to wait for a day or two for new modified version or give up their modification and upgrade instantly. So you need to consider this fact.
 

droomph

weeb
4,285
Posts
12
Years
Well mainly I wouldn't need loops, I was bored one day and thought "maybe me could implements something like C into it! durr" And this is what exploded out of that.

And #include, #define, and such were out of the question, so I thought maybe...bleh

Anyways, whatever not important

The only C elements we'll (as in noobs like me) need, if at all, are these...
Spoiler:


But just a few ideas from a guy who likes to keep stuff easy.

Anyone can do this on their own, I thought it might be nice.

Apparently I'm wrong. *oh well* *shrugs*

I guess I'll shut up right about now

From the Noobs,
ME SIND IDIOT​

FOOTNOTE: I KNOW I suck.
 
Last edited:

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Don't bother incorporating loops. I can't imagine any scripts that would use them other than to spam msgbox's or something, and technically loops are already possible using the "jump" or "goto" commands. Although those are bad programming style, they work, and you can do loops just fine.
It's all compiled into jump's and call's anyway. It's just considered ugly and hard to read.
Well I dont really think it would be painful at all. Before I posted that idea Ive tried to throw together a little program in C# that would load an assembly that has specified entry point and invoke the entry point of assembly. (Essentialy the idea of plugin system was an DLL written in .NET language with specified entry point that would get invoked from the main program) The code for loading the DLL is 6 lines long:
Spoiler:


This would need little modifications to work in the editor but it is the essential part of it.
And to your response that it will be opensource. That is a good thing, but plugin manager is useful anyway, because if you will release a new version with lets say important bugfix in compiler code, some people could be using modified branch of editor with ASM compiler and syntax highlithing for example. If the modification would be plugin the person that is using it just needs to load it in new version. But if it would be a fork of the source, then they would need to wait for a day or two for new modified version or give up their modification and upgrade instantly. So you need to consider this fact.
Well... You make valid points. Maybe I shouldn't assume something is difficult just because I've never tried it before. Thanks. :)
Well mainly I wouldn't need loops, I was bored one day and thought "maybe me could implements something like C into it! durr" And this is what exploded out of that.

And #include, #define, and such were out of the question, so I thought maybe...bleh

Anyways, whatever not important

The only C elements we'll (as in noobs like me) need, if at all, are these...
Spoiler:


But just a few ideas from a guy who likes to keep stuff easy.

Anyone can do this on their own, I thought it might be nice.

Apparently I'm wrong. *oh well* *shrugs*

I guess I'll shut up right about now
This post was incredibly helpful, actually. You've made me reconsider how I'm going to implement this. Screw conforming to the current scripting styles, I should just make a logical, flowing scripting language.

You've impressed me. :)
 

droomph

weeb
4,285
Posts
12
Years
Oh...

Spoiler:


Ahhhhhhhhhhhhhhhhhh I think I'm demanding too much. If you could instead make a small pre-packaged plugin for people like me (nubcakes) that takes certain code words and turns them into real code (we define them ourselves). That would be nice, and the "purists" can also go do whatever they do in a dark room all day that way. And you wouldn't have to deal with the crap that we want! Loops, and everything.

And not only that, if you provide syntax coloring personalization like Notepad++ (which should take like five minutes) it wouldn't have to be case sensitive! Just a side bonus.


AHAHAHA yeah I don't know either. Might be nice, though, if you wanted.

Ehhhh you decide. I'm just glad that you would think of the *twenty* people here who use Mac/Linux. (Because sometimes X11/Wine sucks.)

Anyways...best of luck! ^^
 

link12552

decade club
205
Posts
16
Years
If or when you get around to plugins, feel free to contact me.
I've worked out some interesting tricks for implementing plugins in c# and would be overjoyed to help.
You can even JUST HAVE the code NSE 2.X uses if you want it.
-I think I'll go the open-source route soon as-well, lol

Edit: There. NSE [classic] is open source. I'll post 2.X's source as soon as it's out of beta.

I'm hearing a lot of good ideas come out of this thread...

good luck!
 
Last edited:

Darthatron

巨大なトロール。
1,152
Posts
18
Years
Oh...

Spoiler:


Ahhhhhhhhhhhhhhhhhh I think I'm demanding too much. If you could instead make a small pre-packaged plugin for people like me (nubcakes) that takes certain code words and turns them into real code (we define them ourselves). That would be nice, and the "purists" can also go do whatever they do in a dark room all day that way. And you wouldn't have to deal with the crap that we want! Loops, and everything.

And not only that, if you provide syntax coloring personalization like Notepad++ (which should take like five minutes) it wouldn't have to be case sensitive! Just a side bonus.


AHAHAHA yeah I don't know either. Might be nice, though, if you wanted.

Ehhhh you decide. I'm just glad that you would think of the *twenty* people here who use Mac/Linux. (Because sometimes X11/Wine sucks.)

Anyways...best of luck! ^^
I don't see that happening. I think people need to go the hard way for learning ASM. All the GBA games have functions for dividing/modulo anyway, you can just call them.
If or when you get around to plugins, feel free to contact me.
I've worked out some interesting tricks for implementing plugins in c# and would be overjoyed to help.
You can even JUST HAVE the code NSE 2.X uses if you want it.
-I think I'll go the open-source route soon as-well, lol

Edit: There. NSE [classic] is open source. I'll post 2.X's source as soon as it's out of beta.

I'm hearing a lot of good ideas come out of this thread...

good luck!
Thanks, I'll keep that in mind. :)
 

Sawakita

Not Invented Here
181
Posts
13
Years
  • Age 34
  • Seen Nov 17, 2019
How come strings don't have quotation marks? I think they should, it makes things more solid.

Also, I don't know if you already added this, but what about implementing the support for macros?
 
Status
Not open for further replies.
Back
Top