PHO - Pokémon Hackers Online
Go Back   PHO - Pokémon Hackers Online > Discussion Board > Archive

Notices

Archive Old threads that serve no purpose are here.

 
 
Thread Tools Display Modes
Old 2nd January 2013, 11:28 PM   #1
Shiny Quagsire
Super Awesome Ninja ASM Guy
PHO VIP
 
Shiny Quagsire's Avatar
 
Join Date: Apr 2010
Age: 20
Posts: 62
Shiny Quagsire
Default [Cross-Platform][WIP] Script Editor Advance


Script Editor Advance
This is the SEA, as you can see...

This is yet another tool made by me, Shiny Quagsire. It's a simple yet powerful script editor designed to be fast, speedy, and cross-platform.


^ That's Linux by the way. ^

Why?
Because the support for Linux, Mac, and BSD's sucks. That's my honest reason for making this (and for porting NSE 2.x to Mono). Also, I prefer working on familiar code, which is why I didn't just port some other scripting editor. Not to mention I wanted to craft an editor from the viewpoint of a programmer/scripter, and thus my editor was born.

How?
SEA is currently written in Java, and uses an SQLite database with information on each individual scripting command available to our current knowledge, which information like it's name, bytecode, description, number of arguments, argument lengths, etc. Using this, it makes compiling, (soon) decompiling, and error checking fast, and efficient.

(Planned) Features
  • Cross-Platform using Java
  • Open-Source!
  • Fast Compiling using SQLite
  • Error checking
  • Easy command aliases - Shorten your code to help readability!
  • Intuitive syntax
  • and more!
How's Progress?
  • Compiling - [|||||||||-] 90%, just need to check for bugs!
  • Error checking - [||||||||||] 100%
  • Live Error Checking (in text, like a spell checker) [----------] 0%, not too much of a priority, but I'd like some Eclipse/Visual Studio style error checking since I'm going to be using this.
  • Decompiling - [|||||||||-] 95%, Decompiling is pretty much perfect! :D (Subject to bugs though.)
  • Syntax Highlighting - [|||||||||-] 90%, subject to bugs, but pretty much done. Issues with if(...) command
  • ROM Writing - [||||||||||] 100%, done.
  • ROM Reading - [||||||||||] 100%, done.
  • ROM Debugging - [||||||||||] 100%, done.
  • UI - [||||||||--] 80%, still need: command help, log viewer, bytecode dump, built-in guide, etc.

Q&A
Q: That sure looks a lot like XSE...
A Yes, yes it does. I designed it to be as familiar as possible while still providing useful additions.

Q: When will this be available?
A: As soon as I finish the decompiler, and add ROM Writing/Reading

Q: Have you even tested this at all, and how do you test it if you can't write to the rom?
A: Yes, I have. Currently it just dumps some bytecode to the console as well as some debugging informations/errors:
Code:
Set script search start to 8388608 (0x800000)

Set script start to 0x800000
Added section: start at 0x7fffff

Added section: msg at 0x80000c
Section contains message: Hello, World!

Script length in bytes (Decimal): 26
Compiled Dump:
6a 5a 0f 00 0c 00 80 08 09 02 6c 02 c2 d9 e0 e0 
e3 b8 00 d1 e3 e6 e0 d8 ab ff
then I just copy+paste it into the ROM itself. Here's a pic of the script shown in the screenshot in action!
The newest build supports saving (I think, unless it's bugged...). Just use the Save button and test it in the game.


Q: What's up with the calculator?
A: Copy and paste... Copy and paste...

Q: Your editor sucks. Can I suggest something to fix it?
A: Sure! I'm always open to suggestions, and if you feel that something in my scripting syntax or UI isn't right, I'll be more than happy to fix it.

Source Code
Currently, the source code is hosted on my GitHub account. You can visit it here.

Downloads
The current release is alpha ETU R3.

Quote:
Originally Posted by Shiny Quagsire View Post
Ok, so I did a lot of work on the compiler and the decompiler, and I believe it's finally as an "Earlier Than Usual" Alpha stage (That's ETU for short.) The entire source code has been pushed to the GitHub Repository. Some things you need to know when testing:
  1. This is a DEBUGGING ALPHA. Use at your own risk on your hacks.
  2. Freespace checking has NOT been added yet, so it'll just overwrite at it's pleasure.
  3. Test with a plain Fire Red ROM using generic scripts, or extremely advanced scripts.
  4. Decompiling doesn't support command aliases yet! So in place of your if's and msgbox's you'll get preparemsgs, callstds, and if1's and if2's. Now it does! :D

When submitting a bug, please use the following format:
  • Description (sometimes not needed)
  • Date built (If you didn't build it yourself, just put ETU)
  • Code Inputted (your script)
  • Decompiled Code
  • Log file - Use pastebin!
  • Optional: In-Game screenshot of script. Not really needed, but nice.

Some features that are useful when debugging:
  • The logger - This can save a log with VERY useful information to me or any other bugfixers.
  • The debugger - The little VBA icon will save your ROM with the byte modifications to a temporary location so you can test it without writing. The changes will NOT be written until you press the Save button. It opens it with the default emulator for your system, so you must have it set to VBA by default.
  • The decompiler - This can give some useful output as well. Since the decompiler doesn't have hardly as many bugs as the compiler, you can often determine if the script will work just by decompiling.

And since this is a new script editor, feel free to ask questions! If something confuses you, I'll be happy to help.
Attached Files
File Type: zip SEA.zip (2.60 MB, 102 views)
__________________





My Works:

Coming Soon/Working On:
  • Pokemon Amethyst
  • ?Using HMs via Items?
  • Custom GUIs using ASM (and soon) C



Last edited by Shiny Quagsire; 9th February 2013 at 08:58 PM.
Shiny Quagsire is offline  
Sponsored Links
Old 2nd January 2013, 11:46 PM   #2
Elsa
Let it go!
PHO VIP
 
Elsa's Avatar
 
Join Date: Apr 2010
Location: United States
Age: 21
Posts: 365
Elsa
Default

I might have to use this when it comes out

How is the code's simplicity in comparison to XSE?
Elsa is offline  
Old 3rd January 2013, 12:11 AM   #3
Shiny Quagsire
Super Awesome Ninja ASM Guy
PHO VIP
 
Shiny Quagsire's Avatar
 
Join Date: Apr 2010
Age: 20
Posts: 62
Shiny Quagsire
Default

The syntax basically goes like this:

Instead of #dynamic 0x123456, you type ;0x123456
or, if you want to set the location statically, ie #org 0x123456, you'd type #0x123456.

commands are organized so as to be more readable, so
Code:
msgbox @whatever 0x6
becomes:
Code:
msgbox(whatever 0x6)
For commands that don't have arguments, parentheses are optional. I'm debating whether or not I'll force users to use commas, but I'll probably make it work either way.

if you wanted to put text, however, you would write
:super_important_message (Confidential FBI Stuff to be\nprinted to a msgbox.)
instead of
Code:
#org @super_important_message
= Confidential FBI Stuff to be\nprinted to a msgbox.
Basically, the syntax isn't too complex, and is, in fact, much more efficient to write.
__________________





My Works:

Coming Soon/Working On:
  • Pokemon Amethyst
  • ?Using HMs via Items?
  • Custom GUIs using ASM (and soon) C


Shiny Quagsire is offline  
Old 3rd January 2013, 02:01 AM   #4
Elsa
Let it go!
PHO VIP
 
Elsa's Avatar
 
Join Date: Apr 2010
Location: United States
Age: 21
Posts: 365
Elsa
Default

Okay, my plan.

1. Make a banner for this and put it in my sig
2. Ask you nonstop about its release everyday
3. Jump up and down excitedly when its released and I'll use it
Elsa is offline  
Old 3rd January 2013, 03:20 AM   #5
tajaros
Beginner
Ex-Staff
 
tajaros's Avatar
 
Join Date: Sep 2012
Location: senippilihP
Posts: 59
tajaros
Default

This is cool and looks much simplifier than XSE I will try to use this when it's released.

I'm noticing something and all te Icons look like the one's from XSE haha, but those are ok.

And if you're looking for suggestions why not something like just clicking a button to make the script you just have to type in the pointer of the script and the things in it like the text and movements.

And a test button should be great you click it and opens up the Emulator and plays your game...
__________________
tajaros is offline  
Old 3rd January 2013, 03:21 AM   #6
Shiny Quagsire
Super Awesome Ninja ASM Guy
PHO VIP
 
Shiny Quagsire's Avatar
 
Join Date: Apr 2010
Age: 20
Posts: 62
Shiny Quagsire
Default

Quote:
Originally Posted by Rocka View Post
Okay, my plan.

1. Make a banner for this and put it in my sig
2. Ask you nonstop about its release everyday
3. Jump up and down excitedly when its released and I'll use it
Sounds like a plan.

btw, got some progress on the decompiler. It was just as easy as I expected, since I can literally just get all the command information from my command database using
Code:
select * from commands where hex=<something>
However, I still need to do some section parsing, as well as reversing text, otherwise I get a bunch of garbage. For example, this is the Hello, World script:
Code:
;0x800000

:start
lock
faceplayer
msgbox(msg 2)
release
end

:msg (Hello, World!)
which is compiled then decompiled to become this:
Code:
//Decompiled Hello World. Comments added to explain.
lock 
faceplayer 
loadpointer 0x0 0x80000C //This is what happens when you call msgbox
callstd 0x2 //This is what happens when you call msgbox
release 
end 
updatecoins //Text gets interpreted as garbage commands. This should be "Hello, world!"
cmdd9 
buffercontestype 0xE0 0xB8E3 
nop 
warpteleport2 0xE3 0xE6 0xE0 0xABD8
Still, it's progress! I just need to parse and format the msgbox command, as well as text, sections, and other things of that sort.


Quote:
Originally Posted by tajaros View Post
This is cool and looks much simplifier than XSE I will try to use this when it's released.

I'm noticing something and all te Icons look like the one's from XSE haha, but those are ok.

And if you're looking for suggestions why not something like just clicking a button to make the script you just have to type in the pointer of the script and the things in it like the text and movements.

And a test button should be great you click it and opens up the Emulator and plays your game...
Suggestions noted. For applymovement I'll have something that makes it more automated. The test button isn't too hard to add, and I can probably add that while I still have Eclipse open.

EDIT:
Decompiling now comes out to this:
Code:
#0x800000

lock
faceplayer
loadpointer(0x0 msg_80000C)
callstd(0x2)
release
end


:msg_80000C (Hello, World!)
msgbox and other command aliases are still being worked on.
__________________





My Works:

Coming Soon/Working On:
  • Pokemon Amethyst
  • ?Using HMs via Items?
  • Custom GUIs using ASM (and soon) C



Last edited by Shiny Quagsire; 3rd January 2013 at 04:34 AM. Reason: Decompiling Update!
Shiny Quagsire is offline  
Old 3rd January 2013, 07:50 AM   #7
tajaros
Beginner
Ex-Staff
 
tajaros's Avatar
 
Join Date: Sep 2012
Location: senippilihP
Posts: 59
tajaros
Default

Quote:
Originally Posted by Sparkles View Post
Sounds like a plan.

btw, got some progress on the decompiler. It was just as easy as I expected, since I can literally just get all the command information from my command database using
Code:
select * from commands where hex=<something>
However, I still need to do some section parsing, as well as reversing text, otherwise I get a bunch of garbage. For example, this is the Hello, World script:
Code:
;0x800000

:start
lock
faceplayer
msgbox(msg 2)
release
end

:msg (Hello, World!)
which is compiled then decompiled to become this:
Code:
//Decompiled Hello World. Comments added to explain.
lock 
faceplayer 
loadpointer 0x0 0x80000C //This is what happens when you call msgbox
callstd 0x2 //This is what happens when you call msgbox
release 
end 
updatecoins //Text gets interpreted as garbage commands. This should be "Hello, world!"
cmdd9 
buffercontestype 0xE0 0xB8E3 
nop 
warpteleport2 0xE3 0xE6 0xE0 0xABD8
Still, it's progress! I just need to parse and format the msgbox command, as well as text, sections, and other things of that sort.



Suggestions noted. For applymovement I'll have something that makes it more automated. The test button isn't too hard to add, and I can probably add that while I still have Eclipse open.

EDIT:
Decompiling now comes out to this:
Code:
#0x800000

lock
faceplayer
loadpointer(0x0 msg_80000C)
callstd(0x2)
release
end


:msg_80000C (Hello, World!)
msgbox and other command aliases are still being worked on.
Cool can't wait for the others...

And also why not have in game notes or something? Like there's a part in the program where the pokemon list is and the scripter can just look on that and copy the value. Or make things like RBH files...
__________________
tajaros is offline  
Old 3rd January 2013, 08:07 AM   #8
Sky0fBlades
Emerald Hacker
Moderator
 
Sky0fBlades's Avatar
 
Join Date: Sep 2012
Location: Ice Path
Age: 26
Posts: 128
Sky0fBlades
Default

Very very nice. I plan to try this out, although XSE is doing everything I need. This editor you are working on really looks like it will go a very long way though in which case it will be my new default script editor.
Also looks like I will have to re-learn a few terms script-wise but that is no problem. Good luck, although I'm sure you won't need it!
Sky0fBlades is offline  
Old 4th January 2013, 02:10 AM   #9
Hopeless Masquerade
山の新人神様
Ex-Staff
 
Hopeless Masquerade's Avatar
 
Join Date: Oct 2012
Location: 守矢神社
Age: 21
Posts: 84
Hopeless Masquerade
Default

This looks great! Can't wait to see what this comes out like, keep it up.
Hopeless Masquerade is offline  
Old 4th January 2013, 06:07 AM   #10
droomph
握りモンスター
Ex-StaffPHO VIP
 
droomph's Avatar
 
Join Date: Apr 2012
Location: maybe.
Age: 21
Posts: 418
droomph
Default

And another thing I really think would be nice is if I could like directly make a message into the command.

So something like this:

msgbox (hey guys what's up?\nlol, text is overrated)

I don't think that would take too much work, and it would add to the ease-of-use of the program. win-win.
__________________
droomph is offline  
 

Tags
advance, crossplatform, crossplatformwip, editor, script, wip, [Editor]

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:39 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc. User Alert System provided by Advanced User Tagging (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo.
Pokémon Hackers Online (PHO) is in no way affiliated with or endorsed by Nintendo LLC, Creatures, GAMEFREAK inc,
The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast.
All forum/site content (unless noted otherwise) and site designs are © 2006-2013 Pokémon Hackers Online (PHO).
Green Charizard Christos TreeckoLv100

"Black 2" by ARTPOP. Kyurem artwork by XOUS.

no new posts