• 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?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Tool: Cosarara97's tools - Map and script editor

23
Posts
13
Years
  • Seen Jun 19, 2020
Wow. So I'd never bothered to open a thread for my ROM-Hacking tools here in pokecommunity, and I now realise it's been quite a stupid thing to do.
I'm cosarara97, and here are my (most important) tools.

The Blue Spider Map Editor
First of all, link to github: https://github.com/cosarara97/blue-spider (yes, GPL)
And the tool's website: https://www.cosarara.me/bluespider/
Now, a screenshot (it's a bit dated, but still):
bluespider_screenshot.png


So what is this exactly? Well, as you might have already guessed, it's my map editor for gen III pokémon games. It supports basic map and event editing, and should be able to open scripts in most script editors.
Now, this will sound funny. It has a command-line version as well. Yup, you can edit the map data importing and exporting to utf-8 and using a text editor, and even use a basic python-eval console to mess with all the program functions. This is fairly useful when toying with unimplemented structures and that kind of thing.
It's written in python, with PyQt4. Linux users (like me), use the source. It's python 3, and the dependencies are listed in the readme.
Now, the latest releases for windows and Mac OSX:
Windows: http://www.mediafire.com/download/2jy9iamg24v6ysg/ASC_git_12_10_2013_win32.zip
Mac OSX (it's a bit old, if anyone wants to make new builds I can provide instructions on how I did it): http://ge.tt/6Txc01n/v/0

Go to https://www.cosarara.me/bluespider/

The Red Alien Script Compiler/Editor
(Formerly Advanced Script Compiler, and written because writing a cross-platform UI for PKSV wasn't enough)
Github: https://github.com/cosarara97/red-alien
And a link to the tool's website: https://www.cosarara.me/redalien/
A screenshot:
redalien_screenshot_3.png


It works with Advance Map and Blue Spider, and uses PKSV's commands and syntax. It aims for compatibility with both PKSV and XSE, although it doesn't have all those nice macros for movements (and well, everything) PKSV comes with.
It also has nice stuff of it's own, though:
Code:
#dyn 0x800000

#org @main
if(0x3000) {
    while(0x4000 < 3) {
        msgbox @text
        callstd 6
        addvar 0x4000 1
    }
} else {
    msgbox @text2
    callstd 6
}
end

#org @text
= lalalalalala

#org @text2
= lelelelelele

Go to https://www.cosarara.me/redalien/ for downloads.
 
Last edited:

Platinum Lucario

The Legendary Master of [color=#D8D48C]Light[/colo
1,607
Posts
16
Years
Yay! More new Generation III Map Editors are being made! I'm looking forward to how this one will turn out, it's great that we're actually using Operating System independent programming languages nowadays. So for those that use a Linux distro or even use Mac OSX, this will be a great choice for anyone to use in the future.

I've gotta say, the script editor sounds very promising too, it will be interesting how it turns out as well. Who knows? Maybe I might use it one day if I ever experiment with any of the Generation III ROMs.
 
1,344
Posts
14
Years
  • Seen Dec 10, 2021
These actually look very interesting, particularly the script editor. Are there any other features that would distinguish it from XSE or PKSV and make it worth using though? I'd love to use it sometime if it was a bit more worked on.
 

Kawaii Shoujo Duskull

The Cutest Duskull
276
Posts
10
Years
  • Age 27
  • Seen Sep 10, 2023
So let me make sure I've got this right...
Your map editer can edit anything about a map--tiles, movement permissions, music, wild encounters, and all that... through a command-line version? Do I have that right?
 

destinedjagold

You can contact me in PC's discord server...
8,593
Posts
16
Years
  • Age 33
  • Seen Dec 23, 2023
So let me make sure I've got this right...
Your map editer can edit anything about a map--tiles, movement permissions, music, wild encounters, and all that... through a command-line version? Do I have that right?

That is one of the tool's options, yes.
He didn't say that we're FORCED to use the command-line to edit the maps.
That would be pretty stupid, don't ya think? :P


It has a command-line version as well.
 
23
Posts
13
Years
  • Seen Jun 19, 2020
So let me make sure I've got this right...
Your map editer can edit anything about a map--tiles, movement permissions, music, wild encounters, and all that... through a command-line version? Do I have that right?
I'd love to be able to say you got it right, but at the moment all you can do through the command line version is:

  • Export tile map data to utf8
  • Import said data
  • Run a python expression against the ROM, using any of the internal functions. For example:
Code:
$ bluespider-cli ~/RH/FR.gba p 0 0 'phb(r(rc, map_header_ptr, 10))'
e8 89 2d 08 dc e0 3a 08 78 04
(which is printing 10 bytes from the map header of map 0 0)
It's more than anything a live environment I hacked up to test new things, but in no doubt can be used by others. It's not documented, so the best source of info is (yes!) the source code: (bluespider/mapped_text.py).
______________

These actually look very interesting, particularly the script editor. Are there any other features that would distinguish it from XSE or PKSV and make it worth using though? I'd love to use it sometime if it was a bit more worked on.
The two reasons I had for making it were:

  • I didn't have anything native to linux except for a command line version of pksv
  • I didn't feel confident enough in my C skills to implement what I wanted in pksv
So instead of creating a crossplatform UI for pksv and trying to understand its code to add those while and if structures I re-made it all in python. As I had no previous experience writing compilers and I didn't read anything on the matter, Red Alien is a bit of a mess (regular expressions, yes!). But it works for me.

Reasons for actually using it, for a windows user. I think the main reasons would be:

  • Those structures I've shown in the first post
  • The support for inline labels (as in jump :label) which is equivalent to that of pksv but AFAIK is not present in XSE
  • And the fact that I'm around and willing to add features (when I have time)

Thanks to all of you for commenting and showing interest, really [imagine a smiley here, because I still don't have a post-count high enough]
 

Kawaii Shoujo Duskull

The Cutest Duskull
276
Posts
10
Years
  • Age 27
  • Seen Sep 10, 2023
Yeah I was a bit too interested last time I posted here. lol Looking back that post was kinda dumb. :P


Anyway. Do you think you might be able to set up a feature in the CLI that allows for exporting/importing a map as text? I know it'd be a bit crazy, but I think a feature like that would be pretty cool. :D Reason I ask is beausemy eyes are too crappy for editing maps using A-Map and MEH. On top of that, I mean really a map-to-text/text-to-map feature has never bee done for the GBA games(to my knolige). lol


Well anyway, best of luck with your tools! ^^
 

Akiba

[img]http://i.imgur.com/o3RYT4v.png[/img]
4,262
Posts
13
Years
I just noticed your tools on the AUR.

Definitely did not expect that.
 
2
Posts
9
Years
  • Age 23
  • Seen Dec 3, 2016
Is it possible to run the script editor on Windows?
It's quite confusing for an idiot like me, and for some reason opening random .exe and .py files doesn't work :L
 

Touched

Resident ASMAGICIAN
625
Posts
9
Years
  • Age 122
  • Seen Feb 1, 2018
Yay! Another Python dev :)

I notice you're doing everything in Python though. I assume you're using CPython, as you're coding in Python 3. I've made some Python C Extensions for LZSS compression (super fast) as well as image loading, if you're interested. It will complicate the build procedure, but I'm sure thats not a problem (I just use setuptools)

I really like the CLI, but it would be cool if you documented it. Python actually creates a '--help' option for you, and you could set it to use docstrings.
 
23
Posts
13
Years
  • Seen Jun 19, 2020
I just noticed your tools on the AUR.

Definitely did not expect that.
They're likely the only ROM Hacking tools with linux packages, but there always has to be a first, hasn't there? =P

Is it possible to run the script editor on Windows?
It's quite confusing for an idiot like me, and for some reason opening random .exe and .py files doesn't work :L
Yeah, I have some windows builds out there and it should work (and even bind with Advance Map). Check out my website (it's on my profile).

Yay! Another Python dev

I notice you're doing everything in Python though. I assume you're using CPython, as you're coding in Python 3. I've made some Python C Extensions for LZSS compression (super fast) as well as image loading, if you're interested. It will complicate the build procedure, but I'm sure thats not a problem (I just use setuptools)

I really like the CLI, but it would be cool if you documented it. Python actually creates a '--help' option for you, and you could set it to use docstrings.
Yes, it's CPython (3). For lz(77 or SS?) I actually adapted the code from NLZ-Advance. IIRC the main bottleneck in the code is when building the tileset and the map (slow blits and colouring), but sure, faster (de)compression is always welcome. Feel free to email me or throw a pull request or whatever you feel like doing ;).

asc-cli does have an automated help with argparse and all. Bluespider's is a bit hacky, but it has a basic --help, which is something. I think the priority there would be making the import/export functionality... useful. Right now, besides the experiment, I only use bluespider's cli to run things on the ROM using 'bluespider-cli RH/FR.gba p 0 0 "(nasty python expression here)"'.
 

PSYqualiac

King of Eatos!
41
Posts
9
Years
Hey, quick question, how EXACTLY does the command-line function for this and what does it do?

What I need is a way to copy one map in one ROM right over to a different ROM without issue. Every tile on the map. I can live with having to re-make events, I have the scripts saved, so it's not a problem, but I need the actual maps to transfer.

I get you explained this, but I want to make sure I don't mis-use it and end up blowing up my computer, or worse... my ROM.
 
23
Posts
13
Years
  • Seen Jun 19, 2020
Hey, quick question, how EXACTLY does the command-line function for this and what does it do?

What I need is a way to copy one map in one ROM right over to a different ROM without issue. Every tile on the map. I can live with having to re-make events, I have the scripts saved, so it's not a problem, but I need the actual maps to transfer.

I get you explained this, but I want to make sure I don't mis-use it and end up blowing up my computer, or worse... my ROM.
First of all, you'll have to use the latest version from git, since I just fixed a couple bugs.

I'll use map 4-0 (lower floor on player house, FR) as an example.
$ bluespider-cli MY_ROM.gba r 1 2
Will output a funky utf8 representation of the tile map + the movement permission tiles:
Code:
$ bluespider-cli ~/RH/FR.gba r 4 0
8 w w K L w J x y w w w w 
8 N O S T E R F G E E m n 
8 V W ! " 9 Z 9 9 9 t u v 
8 9 1 1 & ' ' ' ' ) B C D 
8 9 1 1 @ . / : ; ] 1 1 1 
8 9 1 1 @ . [ \ ; ] 1 1 1 
8 ^ 1 1 | } } } } À 1 1 * 
8 Á 1 1 1 1 1 1 1 1 1 1 < 
8 9 1 i j k 1 1 1 1 1 1 1 
8 8 8 q r s 8 8 8 8 8 8 8 
---
1 1 1 1 1 1 1 1 1 1 1 1 1 
1 1 1 1 1 1 1 1 1 1 1 1 1 
1 c c c c c c c c c c 1 1 
1 c c c c c c c c c c c c 
1 c c c c c 1 1 c c c c c 
1 c c c c c 1 1 c c c c c 
1 c c c c c c c c c c c c 
1 1 c c c c c c c c c c 1 
1 c c c c c c c c c c c c 
1 1 1 1 1 1 1 1 1 1 1 1 1
So the chairs became .'s and ;'s, the black tiles 8's, etc. After the "---" come the movement permissions.
You can redirect it to a text file and then write it to another ROM:
$ bluespider-cli ~/RH/FR.gba r 4 0 > map_0_4.txt
$ bluespider-cli ~/RH/FR_NEW.gba w 4 0 map_0_4.txt

It will actually output, not to ~/RH/FR_NEW.gba, but to a copy of it named ~/RH/FR_NEW.gba.new.gba , so it won't break your original ROM.

This won't create new banks or find free space, though, so if you've changed the map size you'll start breaking things (on the *.new.gba ROM). Is this the case?
Also, it will only transfer the tile map, not the tilesets.
_____

@Nikolai Fox: The map editor (blue spider) can read level scripts, but can't add or remove them. The script editor (red alien) can of course edit them, since they are just scripts.
 

PSYqualiac

King of Eatos!
41
Posts
9
Years
First of all, you'll have to use the latest version from git, since I just fixed a couple bugs.

I'll use map 4-0 (lower floor on player house, FR) as an example.
$ bluespider-cli MY_ROM.gba r 1 2
Will output a funky utf8 representation of the tile map + the movement permission tiles:
Code:
$ bluespider-cli ~/RH/FR.gba r 4 0
8 w w K L w J x y w w w w 
8 N O S T E R F G E E m n 
8 V W ! " 9 Z 9 9 9 t u v 
8 9 1 1 & ' ' ' ' ) B C D 
8 9 1 1 @ . / : ; ] 1 1 1 
8 9 1 1 @ . [ \ ; ] 1 1 1 
8 ^ 1 1 | } } } } À 1 1 * 
8 Á 1 1 1 1 1 1 1 1 1 1 < 
8 9 1 i j k 1 1 1 1 1 1 1 
8 8 8 q r s 8 8 8 8 8 8 8 
---
1 1 1 1 1 1 1 1 1 1 1 1 1 
1 1 1 1 1 1 1 1 1 1 1 1 1 
1 c c c c c c c c c c 1 1 
1 c c c c c c c c c c c c 
1 c c c c c 1 1 c c c c c 
1 c c c c c 1 1 c c c c c 
1 c c c c c c c c c c c c 
1 1 c c c c c c c c c c 1 
1 c c c c c c c c c c c c 
1 1 1 1 1 1 1 1 1 1 1 1 1
So the chairs became .'s and ;'s, the black tiles 8's, etc. After the "---" come the movement permissions.
You can redirect it to a text file and then write it to another ROM:
$ bluespider-cli ~/RH/FR.gba r 4 0 > map_0_4.txt
$ bluespider-cli ~/RH/FR_NEW.gba w 4 0 map_0_4.txt

It will actually output, not to ~/RH/FR_NEW.gba, but to a copy of it named ~/RH/FR_NEW.gba.new.gba , so it won't break your original ROM.

This won't create new banks or find free space, though, so if you've changed the map size you'll start breaking things (on the *.new.gba ROM). Is this the case?
Also, it will only transfer the tile map, not the tilesets.

So if I understand you correctly, I use the commandline version to save my current maps to a separate copy of the game (a back-up that your program makes) and then I have to use a map editor to edit the size of my maps themselves, but then I can use the commandline version of your map-editor to import the proper tile-maps... essentially meaning that so long as I use your program correctly, I don't have to remap anything once I import the tilemap over to a clean rom. I am understanding you correctly, right?
 
23
Posts
13
Years
  • Seen Jun 19, 2020
So if I understand you correctly, I use the commandline version to save my current maps to a separate copy of the game (a back-up that your program makes) and then I have to use a map editor to edit the size of my maps themselves, but then I can use the commandline version of your map-editor to import the proper tile-maps... essentially meaning that so long as I use your program correctly, I don't have to remap anything once I import the tilemap over to a clean rom. I am understanding you correctly, right?
Not exactly. Say you have ROMs A and B. You have your maps in A and want to put them in B.
First, you'll have to resize the maps in B. Then you can copy the maps over using the cli.
The backup thing might be more annoying than anything if you want to move lots of maps quickly (it depends on your scripting skills). I can make tweak it if you need it.
 

PSYqualiac

King of Eatos!
41
Posts
9
Years
Not exactly. Say you have ROMs A and B. You have your maps in A and want to put them in B.
First, you'll have to resize the maps in B. Then you can copy the maps over using the cli.
The backup thing might be more annoying than anything if you want to move lots of maps quickly (it depends on your scripting skills). I can make tweak it if you need it.

So... I'm getting lost. Haha So sorry! XD

So I have Version A (pre-hacked) and B (re-sized to fit V.A maps)

I can just import each one into B into the right map banks and it's as easy as that? Or I have to go through the back-up copy? Or... I am so sorry for not understanding this... Hahaha

Also, scripts do NOT transfer, right? The scripts in Version A need to be re-input in B, right?
 
23
Posts
13
Years
  • Seen Jun 19, 2020
So... I'm getting lost. Haha So sorry! XD

So I have Version A (pre-hacked) and B (re-sized to fit V.A maps)

I can just import each one into B into the right map banks and it's as easy as that? Or I have to go through the back-up copy? Or... I am so sorry for not understanding this... Hahaha

Also, scripts do NOT transfer, right? The scripts in Version A need to be re-input in B, right?

To avoid confusion, I've removed the backup thing. So if you get the last version from the git repo, yes, you can do what you are saying.

What OS are you running? Do you need windows binaries?
 
Back
Top