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 4th January 2013, 06:33 AM   #11
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 droomph View Post
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.
Yeah, that wouldn't be too hard, as I could just append in-line text to the end of the script. However, having it decompile back into that state would be difficult, so that'll most likely be a compile-only feature if it is added.
__________________





My Works:

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


Shiny Quagsire is offline  
Sponsored Links
Old 4th January 2013, 12:31 PM   #12
Elsa
Let it go!
PHO VIP
 
Elsa's Avatar
 
Join Date: Apr 2010
Location: United States
Age: 21
Posts: 365
Elsa
Default

The nice thing about this program is that even if it's fairly like XSE, we have support very close to us who will really help to get us going
Elsa is offline  
Old 6th January 2013, 05:11 AM   #13
Shiny Quagsire
Super Awesome Ninja ASM Guy
PHO VIP
 
Shiny Quagsire's Avatar
 
Join Date: Apr 2010
Age: 20
Posts: 62
Shiny Quagsire
Default

Ok, just a heads up: I got some good progress on the decompiling code, but some bugs are still waiting to be squished, and features to be added. However, since school starts this Monday, progress might be a lot slower than when I'm on break, but I'm estimating that this will be in an alpha state in a few weeks.
__________________





My Works:

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


Shiny Quagsire is offline  
Old 6th January 2013, 02:21 PM   #14
Jambo51
Glory To Arstotzka
Ex-Staff
 
Jambo51's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 85
Jambo51
Default

Wait til you get to the code for dynamically compiling. It's torturous, take it from someone who has done it! You have to make the code differentiate between status and dynamic pointers, and correctly assign space based on the size of the sodding #org. Then there's dynamic pointers inside the script itself.

Oh yes, you're going to have fun with this!

As a related note, I like the look of this (as a programmer myself). I have to ask whether you'll allow the end user to mix and match different styles in one line. That is, have decimal parameters and hex parameters on the same line.

I know it all complies to hex in the long run, but you'd be surprised how easy it is. Well it's easy in .Net at least, so I assume java will be similar?
__________________
I have nothing interesting to add
Jambo51 is offline  
Old 7th January 2013, 10:25 PM   #15
Shiny Quagsire
Super Awesome Ninja ASM Guy
PHO VIP
 
Shiny Quagsire's Avatar
 
Join Date: Apr 2010
Age: 20
Posts: 62
Shiny Quagsire
Default

Yes, I was looking at dynamic compiling, and it'll be a big pain. For now, I'll keep dynamic compiling and static compiling separate until it's implemented in the Beta release.

As for mixing styles, currently it parses numbers without the 0x as an decimal integer (since Java doesn't have unsigned bytes...) and anything with an 0x as a hexadecimal. Also, if you forget to put a 0x and it has some hex-specific numberals, I'll spit out an error. I could also have it just compile, but having too much variation in a language can be confusing.

And yes, compilation was easy once I made my SQLite database of commands. If you've ever done anything with SQL, you'll understand that it is a powerful databasing language indeed. Also, C#/.Net is just a ripoff of Java. They have almost exactly identical syntax. But yes, it makes things much easier. I'm not sure how I'd do section parsing in C(++). In Java I just use Hashmaps. (That's Dictionary in .Net)
__________________





My Works:

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


Shiny Quagsire is offline  
Old 8th January 2013, 12:25 AM   #16
Jambo51
Glory To Arstotzka
Ex-Staff
 
Jambo51's Avatar
 
Join Date: May 2012
Location: Scotland
Posts: 85
Jambo51
Default

Quote:
Originally Posted by Shiny Quagsire View Post
Also, C#/.Net is just a ripoff of Java.
I never even tried to deny it! :P
My issues with java come down purely to lack of familiarity. I understand the libraries available to me in .Net, and how to use them, so I stick to it.

I don't know about Java, but C# has a method called TryParse which acts a bit like try catch and Parse combined. I used the returned boolean to check each parameter.

Looks like this:
Code:
int value = 0;
bool success = Int32.TryParse(theString, out value);
if (!success)
{
     success = Int32.TryParse(ToDecimal(theString), out value);
     if (!success)
     {
          MessageBox.Show("There was an error parsing the parameter.");
     }
}
What that does is automatically try to parse both hex and decimal, allowing users to use each interchangeably.

It's entirely likely that you knew this already. If you did, then I have shared some basic code behind parsing different formats lol.

Needless to say the string and the ToDecimal() methods are held elsewhere and/or passed as parameters.
__________________
I have nothing interesting to add
Jambo51 is offline  
Old 16th January 2013, 05:11 AM   #17
Shiny Quagsire
Super Awesome Ninja ASM Guy
PHO VIP
 
Shiny Quagsire's Avatar
 
Join Date: Apr 2010
Age: 20
Posts: 62
Shiny Quagsire
Default

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.

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.
__________________





My Works:

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


Shiny Quagsire is offline  
Old 16th January 2013, 06:50 AM   #18
tajaros
Beginner
Ex-Staff
 
tajaros's Avatar
 
Join Date: Sep 2012
Location: senippilihP
Posts: 59
tajaros
Default

Oh, yeah the alpha is finally released I'm going to try this now and submit or try to find some bugs... :3

EDIT:
Ok, so here are some things I would like to suggest.

First of all the test button is great I like it I'm just suggesting that can you put the text adjuster in SEA as well?

And I have to go to a hex editor just to get the compiled script to work which is a pain for other hackers so I hope you have the program write the compiled dump in the ROM.

Also why is the program so large? XSE doesn't even take up an MB but this already took 3 MB but is still on Alpha stage I suggest you try to shrink the program I guess...

And is the calculator and the other buttons should not be working?

Also when there are errors in pointers the script won't compile even how many times you click it, but I guess you'll go with the error checking soon.

And we want faster compiling XSE does it without even a second but this compiles it for like 2 or 3 seconds... :/

And finally I don't know why but it slows down my PC a little bit because it's an executable Jar file why not make it a .exe file or something...

And why is the msgbox command a preparemsg when decompiled? Is it supposed to be like that?

I'll get back to you if I find anything else.
__________________

Last edited by tajaros; 16th January 2013 at 07:30 AM.
tajaros is offline  
Old 16th January 2013, 12:10 PM   #19
Elsa
Let it go!
PHO VIP
 
Elsa's Avatar
 
Join Date: Apr 2010
Location: United States
Age: 21
Posts: 365
Elsa
Default

Alpha is out? Exciting
When I get back home after school I'll load it up and mess with it a little~
Elsa is offline  
Old 16th January 2013, 07:48 PM   #20
Shiny Quagsire
Super Awesome Ninja ASM Guy
PHO VIP
 
Shiny Quagsire's Avatar
 
Join Date: Apr 2010
Age: 20
Posts: 62
Shiny Quagsire
Default

OK, I'm going to add this to the front post, but make sure when posting actual bugs (not missing features, ie calculator doesn't work or button doesn't work) that you follow the bug report format.

Quote:
Originally Posted by tajaros View Post
First of all the test button is great I like it I'm just suggesting that can you put the text adjuster in SEA as well?
I could do something like that... BTW, thanks for confirming that it works in Windows, I was kinda unsure if it would. :P

Quote:
Originally Posted by tajaros View Post
And I have to go to a hex editor just to get the compiled script to work which is a pain for other hackers so I hope you have the program write the compiled dump in the ROM.
Did you use the save button? Compiling it only modifies the temporary ROM until you save. This will be an option later, but having a ROM for testing the script until it's polished can be useful, at least for me.

Quote:
Originally Posted by tajaros View Post
Also why is the program so large? XSE doesn't even take up an MB but this already took 3 MB but is still on Alpha stage I suggest you try to shrink the program I guess...
The SQLite database could be at fault. I think I may have accidentally included it twice (into the JAR and the ZIP). I could have it compressed and then unzipped by the program I guess. I also left a few unused libraries in there as well.

Quote:
Originally Posted by tajaros View Post
And is the calculator and the other buttons should not be working?
Yes, that's not much of a priority at the moment.

Quote:
Originally Posted by tajaros View Post
Also when there are errors in pointers the script won't compile even how many times you click it, but I guess you'll go with the error checking soon.
Could you post the script as well as a saved log (to pastebin) and post the link to the pastebin URL?

Quote:
Originally Posted by tajaros View Post
And we want faster compiling XSE does it without even a second but this compiles it for like 2 or 3 seconds... :/
I'm still working on speed. The SQLite library I'm using should be fast enough, but chances are that the real lag is the Character -> Hex conversion. Also, in case you didn't know, XSE used to have slower compiling than it does not, until they polished it up in XSE 1.1.1. However, speed is definitely something to be worked on.
Quote:
Originally Posted by tajaros View Post
And finally I don't know why but it slows down my PC a little bit because it's an executable Jar file why not make it a .exe file or something...
Because it's Java, Java uses JARs, Windows uses EXEs, Macs use whatever the heck they use (.apps?). JARs are more cross-platform friendly. By slows down, does it just slow down your computer all together, or is it slow to start? And just a matter of curiosity, what are your computer's specs (RAM, processor, etc). I need to know how low of specs I need to optimize for.

Quote:
Originally Posted by tajaros View Post
And why is the msgbox command a preparemsg when decompiled? Is it supposed to be like that?
When XSE writes an msgbox, it has two arguments: the message pointer, and the type. msgbox and if are command aliases, they aren't actually in the command database inside the ROM.

Instead, msgbox(something 2) translates out to
Code:
preparemsg(something)
callstd(2)
If's are similar, but unless you really want to know, I won't explain. :P

EDIT:
The current SEA release is now at version R2! Changelog:
Quote:
Originally Posted by SEA Github
Increased compile speed by loading pokestring table and command table from SQlite database to HashMaps to reduce file reading, which may or may not have increased startup time. Speeds up subsequent compiles and decompiles. Also added timing to compiling, and started CompileWindow JFrame as well as ScriptCompiler in threads to improve overall responsiveness.
You can view changes to SEA here. Some may or may not make sense to you depending on your code skills.

I also decreased the file size a bit by removing unused libraries that got thrown in.
__________________





My Works:

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



Last edited by Shiny Quagsire; 16th January 2013 at 08:45 PM.
Shiny Quagsire 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 10:34 AM.

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