Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Pixel Perfect Tile Editor (https://forums.graalonline.com/forums/showthread.php?t=134267103)

0PiX0 09-11-2012 05:21 AM

Pixel Perfect Tile Editor
 
1 Attachment(s)
[VERSION]1.3.0[/VERSION]
Pixel Perfect Tile Editor
Version
  • - 1.3

Features
  • - Relatively easy setup with simple configuration
  • - Works with graal file browser rights system
  • - Scrolls automatically when selecting large portions of the gui
  • - Open, save, and delete tile clipboard files
  • - Undo & redo (Note: history is cleared when the editor closes)
  • - [Toggle] Fade inactive tilelayers
  • - [Toggle] Level grid to separate tiles
  • - [Toggle] Extra cursor info
  • - [Toggle] External window
  • - Create new levels
  • - Flood fill
  • - Automatically checks if there is an update available when the script is initialized
  • - More

Installation
  1. Create a new weapon script named -Development/TileEditor or
    whatever whatever is pleasing to you
  2. Copy the entire text of the pastebin document into the script
  3. Modify the configuration portion of the script to suit your
    server best
  4. Give (npcserver) the required rights
    By default, this includes:
    rw access to TileEditor/Clipboard/ and subfolders,
    rw access to TileEditor/Data/ and subfolders,
    rw access to a levels folder (to create new levels),
    rw access to levels/images/tileeditor_icon_1-1.png ,
    rw access to levels/images/tileeditor_bucket_1-1.png ,
    rw access to levels/images/tileeditor_pencil_1-1.png
    Quote:

    rw TileEditor/Clipboard/*
    rw TileEditor/Clipboard/*/*
    rw TileEditor/Clipboard/*/*/*
    rw TileEditor/Data/*
    rw TileEditor/Data/*/*
    rw TileEditor/Data/*/*/*
    rw levels/levels/*
    rw levels/images/tileeditor_icon_1-1.png
    rw levels/images/tileeditor_bucket_1-1.png
    rw levels/images/tileeditor_pencil_1-1.png
  5. Give level designers necessary rights
    r and/or w access to TileEditor/Clipboard/ and/or
    subfolders, rw access to level files to use this program on
    Quote:

    rw TileEditor/Clipboard/*
    rw TileEditor/Clipboard/*/*
    rw TileEditor/Clipboard/*/*/*
    rw levels/levels/*
  6. Add the weapon script to the level designers

Directions
  • Type /te into the chat bar to open the program
  • Left click to select tiles, right click to paste the selection

Script Interface
- The following clientside public functions are available:
  • open() - triggers the request to open the editor
  • close() - triggers the program to close
  • isOpen() - returns true if the program is open

What's new in 1.3?
  • Improved the grid feature. It now uses different colors to represent modulo offsets of 64, 32, 16, and 8
  • Fixed the use of the default graal rights system on gmaps. It now will not allow any tiles to be placed unless every part of the rectangle is within a level you have WRITE rights to. (It previously required write rights to the .gmap itself)
  • Added a menu item to check for an update within the program at Options->Check for update
  • Other small bug fixes, optimizations, and meaningless changes

http://forums.graalonline.com/forums...1&d=1347329811
Note: tiles in screenshot are just some free tiles found online

Please report any problems or bugs in this thread. I will try to fix it as soon as I have time. Also any suggestions for a future version are welcome! Enjoy!

PASTEBIN

http://pastebin.graalcenter.org/read/6101023324639

Old versions:
1.2
1.1 revision 3

cbk1994 09-11-2012 09:38 AM

Looks nice, good work. Thanks for sharing.

NicoX 09-11-2012 09:42 AM

Good job!

xXziroXx 09-11-2012 01:14 PM

It looks nice. Good job!

callimuc 09-11-2012 06:09 PM

Looks... very interesting!

WanDaMan 09-11-2012 08:25 PM

Brilliant contribution + rep.

0PiX0 09-12-2012 04:01 AM

Thanks for the positive feedback. I hope the editor works well for everyone's purposes. Let me know if you have any problems.

I made a few updates:
  • Automatically checks if there is an update available when the script is initialized
  • [Toggle] Extra cursor info
  • Optimizations and bug fixes to the flood fill algorithm

The original post has been updated with the new version.

Emera 09-12-2012 08:44 AM

Quote:

Originally Posted by 0PiX0 (Post 1703617)
Thanks for the positive feedback. I hope the editor works well for everyone's purposes. Let me know if you have any problems.

I made a few updates:
  • Automatically checks if there is an update available when the script is initialized
  • [Toggle] Extra cursor info
  • Optimizations and bug fixes to the flood fill algorithm

The original post has been updated with the new version.

Fantastic, really good work.

MattKan 09-13-2012 03:35 AM

Was wondering when I'd see this...

It's fantastic :)

0PiX0 09-18-2012 02:07 AM

It's very frustrating that I cannot edit the original post. I plan on doing updates every now and then to this, and I really would like to be able to update my post.

I have come out with a new release: 1.3

http://pastebin.graalcenter.org/read/6101023324639

What's new in this version?
  • Improved the grid feature. It now uses different colors to represent modulo offsets of 64, 32, 16, and 8
  • Fixed the use of the default graal rights system on gmaps. It now will not allow any tiles to be placed unless every part of the rectangle is within a level you have WRITE rights to. (It previously required write rights to the .gmap itself)
  • Added a menu item to check for an update within the program at Options->Check for update
  • Other small bug fixes, optimizations, and meaningless changes

If a moderator could update the original post or allow me access to edit it again, I would be very grateful. The update checking feature of the program will not work if the original post cannot be updated.

Important: If you update the original post, please change the text between [VERSION] and [/VERSION] to 1.3.0 so that the program's update checking works.

Thank you!

cbk1994 09-18-2012 11:47 AM

You can't edit posts after 24 hours, which is really annoying in the Code Gallery. If you ask a moderator, they'll generally do it for you.

Tricxta 09-18-2012 12:32 PM

Nice work pix, I was wondering what you'd been up to.

boolean 09-21-2012 03:08 AM

and it only took 2000 lines of boilerplate code to get a thread that lacks any criticism whatsoever

lol k

0PiX0 09-28-2012 06:59 AM

New Version 1.4
http://pastebin.graalcenter.org/read/92657616352

Here's what's new:
  • File -> Update Level ( immediately saves tile changes to the level file you are currently in )
  • Layer -> Add ( Adds a tilelayer )
  • Layer -> Remove ( Removes a tilelayer. Note that the default client behavior of removing a tilelayer can be very buggy. It's not recommended to remove tilelayers. )
  • Fixed a few problems with rights on gmaps.
  • Other minor fixes and changes as usual

There are changes which must be made to (npcserver) rights. This is the new list of default (npcserver) rights:
Quote:

rw TileEditor/Clipboard/*
rw TileEditor/Clipboard/*/*
rw TileEditor/Clipboard/*/*/*
rw levels/images/tileeditor_icon_1-1.png
rw levels/images/tileeditor_bucket_1-1.png
rw levels/images/tileeditor_pencil_1-1.png
rw levels/*
rw levels/*/*
rw levels/*/*/*
rw levels/*/*/*/*
rw to all levels is required for the these features:
  • Create new levels
  • Force immediate level save
  • Add and remove tilelayers
however, rw to all levels will also be required for future features.

Here's the current goal for version 1.5:
  • View/Edit signs
  • View/Edit level links
  • View/Edit npcs
  • Rename from "Tile Editor" to "Level Editor"

Please report any problems you find. :)

Bam112 10-01-2012 03:04 AM

Nice work! :)


All times are GMT +2. The time now is 07:17 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.