View Single Post
  #1    
Old March 25th, 2013, 01:54 AM
Jambo51's Avatar
Jambo51
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Hey guys, and welcome to my tool showcase!

Battle Script Pro
Spoiler:
This helps you to create new effects for moves, and slightly simplifies the actual insertion of a battle script as the tool compiles and inserts it for you!

This thread is ONLY for the tool itself and related discussions. Please do NOT ask questions about the scripting language itself here. Direct your queries about the Scripting Language itself to here.

Please also ensure you have updated to the latest .NET framework.


Features:
Dynamic Offsets - Searches for free space to insert into on your behalf
SQLite Database - Uses an SQLite database to store the commands and information related to them. Quick and small in size!
Coded in C#.Net - Simply the language I am most comfortable with. Sorry Mac/Linux users!
Tabbed Interface - Like XSE, you can have several scripts open at any one time. Makes for easier editing, or even copy and pasting!
Decompilation - Decompiles scripts from the ROM. This is known to be a little slow and buggy and is still in development.
Compilation - Compiles scripts. Well, what else would you expect a Script Editor to do?
Custom Commands - Allows you to define custom commands using a (hopefully) simple format in the commands header file.
XSE Style Definitions - Allows you to define certain strings to have a certain value. Can make scripting easier.

Currently, it only "supports" BPRE, as I haven't added the necessary data to the INIs to support any other ROM, but if this data were to be added, it would work perfectly well.

Note, what this actually means is that the tool won't be able to decompile battle scripts from the effect table, and you won't be able to use the "keywords" I have defined. It will still be able to insert, and decompile, scripts to any given ROM.

Now, I hear you ask, "What do you mean by 'keywords'"?

Good question, sir/madam! What it actually means is that it allows you commonly used offsets by referencing a "keyword".

Eg, I want to check what move is being executed, and jump somewhere if it is this move, say Pound. Normally, you'd have to do this:
Code:
jumpifhalfword 0x0 0x02023D4A 0x1 @somewhere
But with "keywords", you can do this instead:
Code:
jumpifhalfword B_== move MOVE_POUND @somewhere
I feel that the latter is easier to understand, since you don't need to remember the various RAM Locations!

So, to the nitty gritty stuff.
Compiler Directives:
Spoiler:
#org - Defines the start of any script segment or a jump anchor.
#define - Lets you define some text string to have a specific associated value.
#include - Lets you include a header file. The header files themselves are just lists of #defines.
#dynamic - Defines the starting search location for dynamically assigned scripts. Necessary if you have any dynamic offsets anywhere in your script. Note, you can have more than 1 #dynamic to assign different parts of the script to different areas of the ROM. I don't know why you would want to do that, but I digress.
#freespacebyte - This allows you to define what byte is regarded as free space in your ROM. Unless you explicitly tell the tool otherwise, the tool will use 0xFF as the free space byte.



Keywords:
Spoiler:
baselocationbattledata
baselocationpartydata
attacker
target
attackpartner
targetpartner
move
battletype
terrainbyte
weather
weatherturns
numberofpokemon
attackdamage
knockedoffitem
loopcounter
currentposition
outcome
effectchooser
multistringchooser
attackmultiplier
statchange



Here are some screenshots: Note, these screenshots are actually a little out of date, as I've redesigned the interface since I took them.
Spoiler:

The Main Interface


The Main Interface with some scripts open


The Goto Line Interface


The Find Text Interface


The Find and Replace Interface


A decompiled script, with some basic formatting in place


So you know, this tool is still in development, so if you have any sensible feature requests, or any ideas, or whatever, let me know! I'll try my best to implement them if I like them!

I've tested this quite thoroughly, but I can't guarantee it's bug free. So do let me know if you encounter any bugs. Note, by bugs, I mean occasions where the tool actually crashes or displays garbage data or something. Not occasions where the tool complains about "Unknown Commands" because I know of these and coded in checks to ensure that the tool wouldn't crash when it hit such a command.

Without any further ado: the tool itself.

After downloading, you must press F5 or Help -> Update Database in order to get the most up to date version of the database available. This way, I can ensure that you can easily access the database.


Unnamed Trainer Editor
Spoiler:
A new trainer editor which correctly labels the AI and IV values, as well as supporting reading from an INI to help ensure that it should be future proof!
Attached Files
File Type: zip UnnamedTrainerEditor.zip‎ (37.7 KB, 886 views) (Save to Dropbox)
File Type: zip BSP.zip‎ (1.23 MB, 544 views) (Save to Dropbox)
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!

Last edited by Jambo51; September 10th, 2013 at 04:47 AM. Reason: Updating BSP to 0.9.5.0 and Unnamed Trainer Editor to 0.7.0.0
Reply With Quote