Graal Forums

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

Cubical 03-09-2010 08:09 AM

SetShape2 Editor
 
5 Attachment(s)
I originally started this like 2 days ago because I wanted to use pics1 with terrain and couldn't figure out a way to do it so I decided to use GuiDrawingPanel and save the image that it rendered and just use that. That's when I found out what a hassle it was to do setshape2 for larger objects so I continued on making it and added support for any image size, I got a little carried away haha. I'm sure it could be scripted better but it was originally for personal use and it got the job done. Hopefully it will help people if for nothing more save time on creating setshape2 arrays. This is in no way done, I had a lot more things I was going to add to it but I just don't feel like putting anymore time into it because it pretty much has everything I could need.


This is how it works:
You can either put a Tile Array in the bottom left box and click load or goto file-> open and type an image on the server to open up.

If you plan on saving a setshape2 array that was created from a tile array you must first save the image however if you loaded the image you do not; all files are saved into "scriptfiles/servername/SetShapeEditor/imagename" so it doesn't get messy.

You can click the images on the right hand side of the gui to set the tiletype you want to set because I know how annoying it is to constantly go through a dropbox.


Thanks to dusty for his tile functions and to people who answered my questions in irc

Gambet 03-09-2010 09:31 AM

Not sure if you knew about Dusty's setshape2 generator? Could've probably saved you the hassle of making your own, but your version is a bit different so nice work anyway.

Cubical 03-09-2010 09:50 AM

His was for tiles(i think?) mine was originally for creating images and creating a setshape2 for them.

DustyPorViva 03-09-2010 10:33 AM

Mines was using tiles to generate it, but it churned out a script for using in an NPC.

LoneAngelIbesu 03-20-2010 02:02 AM

Hm. Just tried this out. It frequently froze Graal, at least on my laptop using Windows 7. :(

Cubical 03-20-2010 05:05 PM

yeah, I think it's because it's rendering the image clientside. It happens with bigger images. It beats copy and pasting tiles in paint though.

Draenin 03-20-2010 08:00 PM

Quote:

Originally Posted by Cubical (Post 1563681)
yeah, I think it's because it's rendering the image clientside. It happens with bigger images. It beats copy and pasting tiles in paint though.

Are you sure about that? I've seldom had problems loading even the largest of images in-game, but when the editor is opened and I load a large image, I experience most of the slowdown when I'm adding blocking tiles and other stuff. When I'm not adding anything, I can move the window around a bit with no slow response, but when the generated code is being updated, it goes very slowly.

I'm just wondering if the editor could be improved by simply having a 'generate code' button, instead of instant updates being shown in a small box, and if that would make any kind of difference.

Cubical 03-20-2010 10:22 PM

Well, it also depends on how fast you computer is when rendering the image. I have never had any lag when setting the shape of an image but I could add an option to automatically generate teh code and a button to. The main problem is rendering the image clientside when you are using a tile array. It's something with the GUIDrawingPanelCtrl. If someone could think of a way to render it clientside faster and would like to share that would be awesome because right now I'm clueless. I'd rather not have to render everything serverside because teh strain it would put on the server as well as not being able to save it clientside.


All times are GMT +2. The time now is 10:38 AM.

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