Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-23-2011, 04:13 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by cbk1994 View Post
Even if someone made a third-party program, which wouldn't be that hard, it wouldn't be able to show particles.
But working Zoom, Color, Rotate effects and UI-functionality for attaching sprites and a sprite cutter would surely make up for that.

Edit: Forgot about movie ganis but given the amount of usage they get it (I've never used them), **** em.
Edit2: Edited script so it'll still preserve the MOVIE section.
__________________
Quote:
Reply With Quote
  #2  
Old 01-23-2011, 07:30 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
This is great. There are times when I have to edit over 300 ganis in the pastwith a script, but now maybe I'll be able to just use these functions.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 01-23-2011, 08:34 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The scripted gani editor can handle rotation etc. but is not as cleanly programmed as this.
Reply With Quote
  #4  
Old 08-18-2013, 08:57 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Is there any way to prune the unused sprites?
__________________
Reply With Quote
  #5  
Old 08-18-2013, 01:37 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by xAndrewx View Post
Is there any way to prune the unused sprites?
No but it wouldn't be that difficult to write a function to do so using the class.

Edit: Wrote some functions to do so.

PHP Code:
public function deleteSprite(sprite_id) {
  if (
sprite_id in this.sprites) {
    
this.sprites.remove(sprite_id);
    
this.sprite.(@sprite_id) = "";
    return 
true// Deleted Successfully
  
} else {
    
// Doesn't exist.
    
return false;
  }
}

// HAVEN'T TESTED BUT THIS SHOULD WORK
public function removeUnusedSprites() {
  
temp.inuse = {};
  
// Determine Sprites Inuse
  
for (temp.fthis.frames) {
    for (
temp.stemp.f) {
      if (!(
temp.s[0in temp.inuse)) {
        
temp.inuse.add(temp.s[0]);
      }
    }
  }
  
// Delete Unused Sprite Data 
  
for (temp.sthis.sprites) {
    if (!(
temp.s in temp.inuse)) {
      
this.sprite.(@temp.s) = "";
    }
  }
  
// Update Sprite ID List
  
this.sprites temp.inuse;

__________________
Quote:

Last edited by fowlplay4; 08-18-2013 at 01:54 PM..
Reply With Quote
  #6  
Old 08-19-2013, 09:23 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Haha you're a legend. Thanks

__________________
Reply With Quote
  #7  
Old 09-10-2013, 03:08 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
There was a bug with STRETCHXEFFECTs not being parsed properly resulting in them being converted to STRETCHYEFFECTs. Fixed another weird bug with calcframe.

I've added some get functions for effects, and included the two functions in my previous post in the updated class.
Attached Files
File Type: txt gani.txt (26.0 KB, 238 views)
__________________
Quote:

Last edited by fowlplay4; 09-10-2013 at 03:34 AM..
Reply With Quote
  #8  
Old 09-29-2013, 12:36 AM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Don't suppose you ever got around making an external window gani editor?
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #9  
Old 09-29-2013, 12:44 AM
RegretZ RegretZ is offline
Me.
RegretZ's Avatar
Join Date: Sep 2010
Location: USA
Posts: 415
RegretZ will become famous soon enough
*inserts obligatory comment about there not being a ganishop for mac*
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:39 AM.


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