Grh Tile Maker
From VbGORE Visual Basic Online RPG Engine
So I decided to release my own Grh tile generator because I believe it's a bit more user friendly than the others; it's just simpler. This is the first version that's been released, so don't expect it to work 100%, but I know it gets the job done as I've tested and used it myself. I hope you guys find it as helpful as I do : )
For people who are on the fence about using my app, follow these three steps.
- Download my app.
- Enter in the grh # and the file # as shown in the picture below.
- Click the 'EZ Tile maker' button.
I guarantee you'll like it ; )
Contents |
Download
Here is the link to download my App.
http://www.megaupload.com/?d=B8PPOF29
This Tool does not read or write to any pre-defined files, so there is no specific directory that it needs to be installed to. This tool will only read and write to user-chosen files.
Instructions
I kind of overdid this guide just so that people might have less questions. Most of the stuff should be self explanatory.
Assumptions
-First, you need to understand what this tool is for.
- This tool assumes that you are writing for single frame tiles.
- Usually this won't be a problem, but my tool will also only work correctly if your tiles match up with a very specific grid. If, for example, you have 32x32 pixel tiles, and then all of a sudden have one starting on location (40,39) - even if it is 32x32 - my tool will not help. Keep in mind that the grid can be whatever you choose, I only use 32x32 as an example.
- Another assumption is that you have a semi-recent version of java. If my app doesn't work, this should be the first thing you check.
- Because it is recommended strongly by the wiki page, my tool assumes that your .png files are no larger than 1024x1024 pixels.
- Finally, my tool assumes that you took the brief moment to glaze through this guide. Although I think a lot of this stuff is self explanatory, there are a minor few things that you might have questions about.
Picture
- Use this for referencing when reading the following section
Labels, Buttons, and Textboxes
The following are brief explanations for all the little things that might confuse you at first. Trust me though, it's not that hard. You'll very much appreciate it after the 2 minutes it takes to understand. I'll start from the top...
Labels
- When referencing the grh text layout. I use the form grhx=x-x-x-x-x-x, except I will use an 'O' to signify the number specified.
- ) Current Grh Number - This is the GRH number that will be outputted. It starts off as zero assuming that you enter this in yourself. Depending on how many tiles you plan on uploading, you will need to make sure enough grh numbers ahead of the starting one are free for usage. In terms of the grh text, this value is grhO=x-x-x-x-x-x
- ) File Number - This is the file number you plan on using. This starts off as zero as well assuming you will enter this value in. In terms of the grh text, this value is grhx=x-O-x-x-x-x
- ) Tile Width - This is the width of the texture that you want to upload. In terms of the grh text, this value is grhx=x-x-x-x-O-x.
- ) Tile Height - This is the height of the texture. For the grh text, the value is grhx=x-x-x-x-x-O.
- ) Grid Pixel X - I admit this name is a bit confusing, but it's the best I could come up with. This value can loosely mean the smallest tile width inside the .png file. Just keep that in mind when using the tool and you'll be fine.
- ) Grid Pixel Y - This is the smallest tile Height inside the given .png file. (Remember that you might have a 64x64 tile somewhere inside the file along with the usual 32x32).
Buttons
- One thing that needs to be specified first so that you understand, is my method for prompting start x, and start y. I will start with an example.
Assume we have a 128x128 .png file. Now, with a 32x32 grid tile size, this file can be separated into 4 squares by 4 squares right? Now, when entering numbers for my start x/y variables, think about it in terms of tile numbers (make sure to start with zero, not one). So, to get the tile that might be at start location (64, 32), you only need to enter (2, 1). I think it's much easier to handle than calculating out all those numbers.
Onto the buttons...
- ) Add Comment - This will ask you for a line of text to add in a comment. It then gets added to the text area on the right. Pretty self explanatory...
- ) Mass Tile Maker - This tool is useful if you have a lot of tiles that you want to get done with all at once. It brings up 4 prompts; Start X, Start Y, number of tiles to the right, and the number of tiles down. It then does the math for you, and creates the text for each tile.
- ) EZ Tile maker - This button is the best part about my tool. Click it, and it brings up a file browser - where you choose the .png file that you want to open. With the Grid Pixel X and Y values, my tool draws a grid over the picture, and allows you to click whatever tile you want to add to your grh text. After you click on a tile, a confirmation box will prompt you, just making sure that you meant to click there. Remember, you don't have to select tiles that are strictly the grid size. Depending on the Tile Width and Tile Height property that you entered in, you can easily select a 64x64 (or any multiple of the current grid size) tile on a 32x32 grid.
- ) Make New Tile - This button was the beginning to my tool, and pretty much, I was too lazy to take it out. The EZ Tile maker is much more intuitive and easy to use. In case things get buggy however, this button might help, since it is still FAR easier to use than typing it in yourself. Anyway... when you click this button, it prompts you for the start x and start y variables. Remember to not type in the exact pixel locations, and instead type in the tile numbers (again, starting with zero). That's all there is to it.
- ) Save to file - THE LAST BUTTON! Ok, A quick answer to why this doesn't work as a 'Save As' button is the fact that NetBeans didn't have one haha. Anyway, to save the text area as a text file, simply browse to your directory of choice, type in whatever file name you want to save it as, then MAKE SURE to end it with ".txt". If you forget, you can obviously tag it on by renaming the file. You dont' have to save this as a file though. I prefer to just copy and paste what's in the box into my GrhRaw.txt. It's all up to preference I guess.
Text Boxes
There are only 2, and should be self explanatory. Here's a little info in case you didn't know though.
- The current Line box will show you what grh text line you are currently working with. Only what is passed through this text box will every move on to the text area on the right. This text box is not editable, and starts out <Empty>. The values x and y tell you that the starting x and y values have not yet been defined. If you're working with the EZ Tile Maker, or the Mass Tile maker, you won't have to worry about this much.
- The Current GRH Text area is for your viewing pleasure haha. This IS editable, but is mainly there just to show you how much you can accomplish in such a little time ; ) . The only thing you need to watch out for, is that you don't delete something you didn't intend on. I didn't implement an 'undo' button...
Disclaimer
- I did not make this code invincible. This app will not do stupid checks for you. In other words, if you type in random numbers and try to run it, you will get those numbers calculated and returned with no errors. It shouldn't be much a problem really though. Just enter in the numbers you're supposed to :P .
- The only checks I felt were necessary to add, were those making sure that when you clicked [ok], [yes], [no], [cancle], or [x] on the prompts, that they wouldn't throw you in weird places or mess with your data. So, you can rest easy when it comes to that.
End notes
- If you find any bugs, you can either pm me (my username is 'olsonpm') or you can use the discussion page. I will be checking both very often.
- I hope you like the tool. I find it more useful than the others that are around, and my goal is that you guys feel the same.
