Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Graal Shop Pro (https://forums.graalonline.com/forums/showthread.php?t=134269127)

fowlplay4 03-29-2014 09:40 PM

Graal Shop Pro
 
1 Attachment(s)
Welcome to my thread!

I've been working on a much improved scripted Graal Shop (GANI Editor). I've made quite a lot of progress and created a few ganis with it that would have been painful otherwise.

I believe I'm at or close to complete feature parity with the current Graalshop editor.

Controls / Gestures

1. Right mouse button held down to move the preview axis.
2. Ctrl + Left click to select multiple sprites.
3. Keyboard arrows can be used to make fine adjustments to selected sprites.
4. Sprites can be deleted by dragging them into the sprite list, or by being selected and pressing the delete key.
5. Wheel mouse to zoom in and out.

New Features

1. Multiple Sprite Selections. You can select multiple by holding CTRL and selecting a sprite.
2. Full Sprite Effects Support. Color, Mode, Rotate, Stretch all display properly in the preview.
3. Sprite Cutter. You simply select the non-transparent part of the image and it uses a fill algorithm to determine the bounds of the sprite.
4. Gridlines can be disabled.
5. Other small stuff that I can't recall.

I was planning on implementing more features but my work has kind of stagnated on it.

There is currently no serverside functionality to the tool so you don't need to worry about staff having it.

Ganis currently save to your Graal folder under scriptfiles or to your level/ganis folder if you're editing one from there.

Screenshot

http://i.imgur.com/hg9ubxl.jpg

Try it out!

You can log on to Zodiac and use the command "/graalshop" (without quotes) to open it.

Alternatively you can download the script, add it to your server and use it there.

PhantosP2P 03-30-2014 12:31 AM

If there's a greater force of scripting working towards making Graal a more productive platform, I don't know who it could be. Thanks FP!

Stephen 03-30-2014 04:50 AM

Just needs inbetweening. :)

cbk1994 03-30-2014 08:58 AM

Impressive work as always :)

Crono 03-30-2014 09:42 AM

FP Knorr. :)

Torankusu 03-30-2014 07:17 PM

nice work, and great contribution as always. thanks.

callimuc 03-30-2014 10:12 PM

awesome thing you did there!

didnt check it out yet, but are the rotated images inside the preview done with your editor or are those already set by the template?

Tim_Rocks 03-30-2014 11:21 PM

Very nice, I'll be sure to check it later. Looks great.

fowlplay4 03-31-2014 02:23 AM

Quote:

Originally Posted by callimuc (Post 1726518)
didnt check it out yet, but are the rotated images inside the preview done with your editor or are those already set by the template?

Editor. I made them using the batch rotate feature in the add sprite menu out of a single sprite.

With batch rotate you could take a single sword frame either 45 or 90 degree then specify:

Sprites: 8 (360 / 45)
Start: 0
End: 6.28 (Start and End are set to that by default)

and it would create the rest sprites using the rotate effect. You can also change the Stretch X or Y to -1 and get the mirrored version of the sprites.

xAndrewx 04-02-2014 04:13 AM

FYI- I didn't look at your code, but for Facebook you can't combine rotateeffects and coloreffects. It's one or the other

fowlplay4 04-02-2014 04:18 AM

Quote:

Originally Posted by xAndrewx (Post 1726545)
FYI- I didn't look at your code, but for Facebook you can't combine rotateeffects and coloreffects. It's one or the other

that's dumb

xAndrewx 04-02-2014 04:24 AM

I've just tested it on Zodiac. It's really great. Good job

Admins 04-07-2014 10:08 AM

Nice :-)

Elk 04-07-2014 01:02 PM

Quote:

Originally Posted by Stefan (Post 1726606)
Nice :-)

no u

-on topic-

I'll try it out when I get back from having a walk,

if only the default GUI from Graal wasn't such an eyesore

Spikedude 04-14-2014 10:02 PM

We've been using this on Era, and it is the greatest thing ever. The sprite cutter saves so much time and adds so much flexibility, and I love having the script window right there. Best thing ever - especially since I'm stuck on a Mac so all I had before was the old in-game editor (which worked, but not without frustration). I don't think I could thank you enough!

The only problem I've had so far is with crashing while Importing sprites - is this a known issue or something I might be doing wrong?

fowlplay4 04-15-2014 12:19 AM

Quote:

Originally Posted by Spikedude (Post 1726746)
We've been using this on Era, and it is the greatest thing ever. The sprite cutter saves so much time and adds so much flexibility, and I love having the script window right there. Best thing ever - especially since I'm stuck on a Mac so all I had before was the old in-game editor (which worked, but not without frustration). I don't think I could thank you enough!

The only problem I've had so far is with crashing while Importing sprites - is this a known issue or something I might be doing wrong?

Thanks!

It shouldn't be could you attach the gani pre-import (if possible), and the gani you're trying to import?

It's possible it could be a Mac thing.

i8bit 05-15-2014 11:15 PM

I'm looking at it now... it's amazing. But how do you set rotation effect?

fowlplay4 05-16-2014 12:29 AM

Quote:

Originally Posted by i8bit (Post 1727249)
I'm looking at it now... it's amazing. But how do you set rotation effect?

Add / edit a sprite and set the rotation (it's a radian value so 0-2pi instead of 0-360) there.

i8bit 05-16-2014 12:35 AM

Quote:

Originally Posted by fowlplay4 (Post 1727250)
Add / edit a sprite and set the rotation (it's a radian value so 0-2pi instead of 0-360) there.

wow I feel dumb, it was in the add menu the whole time ;/

sorry!

scriptless 08-07-2014 04:54 AM

Sorry for the bump but I noticed when I try and save the gani nothing happens.

I can still set my gani online,restarting the client and it doesn't show anymore, but the file seems to be nowhere. Not online, nor on my computer. Both mac and windows. Any help would be awesome. I would love to be able to edit ganis online, or save them offline and upload them at least using my mac.

Edit:
I managed to change the line that saves the file to call a triggeraction and saved the lines serverside. This allowed me to save the gani online. Which accomplishes what I need. Would be cool if I could get it to save locally tho. But this definitely helps me alot. Thanks FP4.

Here is what I did,

PHP Code:

function onActionServerside() {
  
// save to server maybe
  
if ( params[0] == "savegani" ) {
    echo(
params[2SPC "uploaded or updated!");
    
temp.lines params[1];
    
temp.lines.savelines(params[2], 0);
  }


And editing:

PHP Code:

  // Save File
  
temp.lines.savelines(this.filename0); 

to the following, using ASDFG so I could ctr+f to it since its on like line 3,700 something.

PHP Code:

  // Save File
  // ASDFG
  
triggerserver("gui"this.name"savegani"temp.linesthis.filename);
  
//temp.lines.savelines(this.filename, 0); 

I also noticed the NPC Server needed rights to the file.

xAndrewx 04-24-2015 02:39 PM

Hey is there an update to the gani editor?

The one on Zodiac (live) is different to this version? (So I've been told) The iEra staff would like me to add the one with the folder view (if that makes sense)

I think what they mean is one that is linked directly to the FTP rather than their own folder (after logging online I'm pretty sure this is what they mean). Would this be possible?

Hahahaha - ok just ignore this post. I've just seen the post above. Thankssssssss

xXziroXx 06-25-2015 07:40 AM

Quote:

Originally Posted by scriptless (Post 1729708)
Sorry for the bump but I noticed when I try and save the gani nothing happens.

I can still set my gani online,restarting the client and it doesn't show anymore, but the file seems to be nowhere. Not online, nor on my computer. Both mac and windows. Any help would be awesome. I would love to be able to edit ganis online, or save them offline and upload them at least using my mac.

Edit:
I managed to change the line that saves the file to call a triggeraction and saved the lines serverside. This allowed me to save the gani online. Which accomplishes what I need. Would be cool if I could get it to save locally tho. But this definitely helps me alot. Thanks FP4.

Here is what I did,

PHP Code:

function onActionServerside() {
  
// save to server maybe
  
if ( params[0] == "savegani" ) {
    echo(
params[2SPC "uploaded or updated!");
    
temp.lines params[1];
    
temp.lines.savelines(params[2], 0);
  }


And editing:

PHP Code:

  // Save File
  
temp.lines.savelines(this.filename0); 

to the following, using ASDFG so I could ctr+f to it since its on like line 3,700 something.

PHP Code:

  // Save File
  // ASDFG
  
triggerserver("gui"this.name"savegani"temp.linesthis.filename);
  
//temp.lines.savelines(this.filename, 0); 

I also noticed the NPC Server needed rights to the file.


After posting in the wrong thread, I figured I'd share this in the right one!

I changed it so that when saving (and uploading the gani), it checks if the gani already exists on the server, and if it does, overwrites it. Otherwise, it defaults to the file path provided by the client.

Just replace the onActionServerside block with this code:

PHP Code:

function onActionServerside() {
  
// save to server
  
if ( params[0] == "savegani" ) {
    echo(
params[2SPC "updated!");
    
temp.lines params[1];

    
temp.fileName extractFileName(params[2]);
    
temp.fileList findFiles(format("levels/%s"temp.fileName), true);
    
temp.filePath temp.fileList.size() == params[2] : temp.fileList[0];
    
temp.lines.savelines(temp.filePath0);
  }



xAndrewx 10-06-2016 04:19 PM

Has anybody else noticed an issue with the sprites when using rotatesprite? It makes the GANI file size a lot bigger.

PlanetOscar 10-06-2016 06:14 PM

Nah, not an issue for me. Works flawlessly :)

fowlplay4 10-06-2016 08:33 PM

Quote:

Originally Posted by xAndrewx (Post 1740149)
Has anybody else noticed an issue with the sprites when using rotatesprite? It makes the GANI file size a lot bigger.

open it in notepad and look at the file for oddities.

xAndrewx 10-07-2016 10:13 AM

1 Attachment(s)
Here's an example of one that's messed up - it's duplicating the ROTATESPRITE.

Could this be the batch operations not clearing the rotate sprite flag from a previous gani? The gani staff using it only uses the sprite cutter not the batch operations though.

If you try open the gani in game it won't work - if you open it using GraalShop and just 'save' it, it will clear all the sprites and work again.

fowlplay4 10-07-2016 05:23 PM

1 Attachment(s)
Looks like I used rotation instead of rotate during the gani initialization so rotate effects would stack.

Update lines 3220 and 3221:

PHP Code:

  this.effects.rotation = {};   // Rotation Effects
  
this.effects.rotation.clearvars(); 

to be the following instead:

PHP Code:

  this.effects.rotate = {};     // Rotation Effects
  
this.effects.rotate.clearvars(); 

alternatively download the corrected version attached.

xAndrewx 10-08-2016 10:10 AM

ooo i'll give it a try!

Thanks

xAndrewx 11-13-2016 07:40 PM

Sorry - works a treat! :) thank you

Kamaeru 04-05-2017 09:22 AM

I really like this Gani editor, and I just spent a few hours making a nice gani with it. :)


All times are GMT +2. The time now is 09:52 PM.

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