Graal Forums  

Go Back   Graal Forums > Development Forums > Gani Construction
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-15-2012, 10:42 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Custom Template and setting them issues?

It's a lttle difficult for me to explain,
But bare with me:P

I've been creating my own style of a body template.
And currently, I've been having trouble making it so that:
Other than re-Gani'ing every body I make for every gani possible,
How would I go about having a folder, For example: levels/body2/*
and in all Gani's, replace the current body with my custom,
Yet the design changes to the uploaded body.

Sorry, It sounds hard to follow.
But for another example,
The current body template is changeable when you set another body and goes for any template with that body template.

How would I go about making something like this?
Reply With Quote
  #2  
Old 08-15-2012, 11:31 PM
haro41 haro41 is offline
zenkou
haro41's Avatar
Join Date: Jul 2003
Location: Sol Grotto
Posts: 689
haro41 will become famous soon enough
Send a message via AIM to haro41
Still not completely sure what you want, but remember that gani's are simply text files. Open up one with notepad and you will quickly understand how they work. Sometimes it is quicker to work in notepad when making changes to ganis, such as swapping out sprites. A simple "Find and Replace" is all that is needed.

As far as changing which body you want to use in a gani, when importing your body sprites, chose "BODY" from the image dropdown menu on the left side. Then to view the body in the gani while working, paste the filename of the body image into the Def. body table on the right side of the main window.
__________________

Zenkou for life
Reply With Quote
  #3  
Old 08-15-2012, 11:36 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by haro41 View Post
Still not completely sure what you want, but remember that gani's are simply text files. Open up one with notepad and you will quickly understand how they work. Sometimes it is quicker to work in notepad when making changes to ganis, such as swapping out sprites. A simple "Find and Replace" is all that is needed.

As far as changing which body you want to use in a gani, when importing your body sprites, chose "BODY" from the image dropdown menu on the left side. Then to view the body in the gani while working, paste the filename of the body image into the Def. body table on the right side of the main window.
Sorry, I must not have been clear enough.
I'm trying to use a custom template as the body, rather than the current body template.
I hae it all created and working,
But right now, I have no way of setting new types of bodies,
Example: body1.png, body2.png, body3.png.
You currently have body1.png, and you setbody body2.png. For any GANI with the body, will change th body look from body1 to body2.

I'm trying to make it so I can use a custom body template and still be changable.
I guess a better exampe would be like Zone or GK's body system.
How did they do something like that to change the body template and make it so they're still changable as far as design/looks for every gani?

If this is any better at understanding, Then good. If not, Tell me what I need to explain better
Reply With Quote
  #4  
Old 08-16-2012, 12:57 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
When adding sprites to the gani, you can either specify an image name, or choose from an existing list. The list should also have BODY in it (all caps) or similar. When you use this, the current body image of the player is used in it's place. In the bottom right corner of Graal Shop (the gani editor, not the shop) you can set a default body/head/and so on image to go with that while editing.
__________________
Reply With Quote
  #5  
Old 08-16-2012, 02:02 AM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by Crow View Post
When adding sprites to the gani, you can either specify an image name, or choose from an existing list. The list should also have BODY in it (all caps) or similar. When you use this, the current body image of the player is used in it's place. In the bottom right corner of Graal Shop (the gani editor, not the shop) you can set a default body/head/and so on image to go with that while editing.
Im sorry, I dont know how to explain this any more clearly.
But i'll try.
I'm not trying to change the default head/body/whatever.
Another example ofwhat i want is like,
Umm let's pretend I create a scarf item/accessory.
Let's pretend I name it fyse_scarf1.png.
I then make a Gani for walk and idle.
I then make fyse_scarf2.png and fyse_scarf3.png.
Rather than making 2 more Gani's for a different color scarf,
How would I make it so I can say setscarf fyse_scarf#.png.
(Replace the look of one scarf, to the look of another.
Again with the defaut body example; how you can setbody and the body style will change along with the style in every Gani with a body,
and still not make seperate gani's for every little body uploaded to the server.)

Again, I'm not trying to set a default body.
Reply With Quote
  #6  
Old 08-16-2012, 03:23 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
You could put them as ATTRs in the gani (body attr1, head attr2, hat attr3, scarf attr4, ...) and than script your set#

PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "setbody"player.attr[1] = player.chat.substring(7);
  else if (
player.chat == "sethead"player.attr[2] = player.chat.substring(7);
  else if (
player.chat == "sethat"player.attr[3] = player.chat.substring(6);
  else if (
player.chat == "setscarf"player.attr[4] = player.chat.substring(8);

keep in mind that is very basic. You would do better doing serverside checks if the file actually exists and if it's the correct body part. But you should get what I want to say
__________________
MEEP!
Reply With Quote
  #7  
Old 08-16-2012, 03:24 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
Quote:
Originally Posted by Fysez View Post
Im sorry, I dont know how to explain this any more clearly.
But i'll try.
I'm not trying to change the default head/body/whatever.
Another example ofwhat i want is like,
Umm let's pretend I create a scarf item/accessory.
Let's pretend I name it fyse_scarf1.png.
I then make a Gani for walk and idle.
I then make fyse_scarf2.png and fyse_scarf3.png.
Rather than making 2 more Gani's for a different color scarf,
How would I make it so I can say setscarf fyse_scarf#.png.
(Replace the look of one scarf, to the look of another.
Again with the defaut body example; how you can setbody and the body style will change along with the style in every Gani with a body,
and still not make seperate gani's for every little body uploaded to the server.)

Again, I'm not trying to set a default body.
Hmm, I recognize your name... Do you own the server named Fyse?
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #8  
Old 08-16-2012, 03:46 AM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by callimuc View Post
You could put them as ATTRs in the gani (body attr1, head attr2, hat attr3, scarf attr4, ...) and than script your set#

PHP Code:
//#CLIENTSIDE
function onPlayerChats() {
  if (
player.chat == "setbody"player.attr[1] = player.chat.substring(7);
  else if (
player.chat == "sethead"player.attr[2] = player.chat.substring(7);
  else if (
player.chat == "sethat"player.attr[3] = player.chat.substring(6);
  else if (
player.chat == "setscarf"player.attr[4] = player.chat.substring(8);

keep in mind that is very basic. You would do better doing serverside checks if the file actually exists and if it's the correct body part. But you should get what I want to say
Okay good,
You get where i'm coming from.
I knew this attribute thing,
But now that we have this out of the way,
How would I enter this into the Gani???
Because i'm pretty positive player.attr[4] wont know exactly where you want the sprite at on the player, And what layer.
What would I put in for the image?
Like, In the Gani image thing.
Would I put SCARF or like, player.attr[4] or something???

EDIT: I mean, Since attr's go by Gani. Not Image.
Reply With Quote
  #9  
Old 08-16-2012, 03:47 AM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by xXziroXx View Post
Hmm, I recognize your name... Do you own the server named Fyse?
LOLif you're saying that on purpose,
I should slap you xD
Reply With Quote
  #10  
Old 08-16-2012, 09:41 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
I know what you want, but why not use the default body "space"? As callimuc said, you'd have to use attributes instead. Those are limited though. And if you're abandoning default bodies completely, there's no reason not to use that extra space you got. The default "setbody" command is not limited to default style bodies, only to bodies as defined per RC folder configuration. So you can also use that with your new type of bodies.

Edit: Also, for attributes in ganis, use ATTR1 to ATTR30. ATTR1 defaults to the hat already though, might want to start with attribute two. But again, there's no reason not to use BODY, HEAD and so on. Why not use them?
__________________
Reply With Quote
  #11  
Old 08-16-2012, 04:35 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Quote:
Originally Posted by Crow View Post
I know what you want, but why not use the default body "space"? As callimuc said, you'd have to use attributes instead. Those are limited though. And if you're abandoning default bodies completely, there's no reason not to use that extra space you got. The default "setbody" command is not limited to default style bodies, only to bodies as defined per RC folder configuration. So you can also use that with your new type of bodies.

Edit: Also, for attributes in ganis, use ATTR1 to ATTR30. ATTR1 defaults to the hat already though, might want to start with attribute two. But again, there's no reason not to use BODY, HEAD and so on. Why not use them?
Because the default body space goes for the original styled and ordered template designed simply for the default body TEMPLATE. I'm not meaning custom as in different look, I mean custom as in a different look to the TEMPLATE. So using the default body "space" would only mix pieces of my template around and look like its all screwed up.

I see what you mean by ATTR, but my problem is if I wanted to make more than one (for example again) Scarf.
Using ATTR, it goes by Gani. Not image.
So for example,
ATTR[30] would work for something like sit.gani
But not for chair.png.
Because it goes for Gani, not image.
Therefore,
For every scarf I want to make, I'd have to make another Gani for every scarf.
Which is not what I want.

I use the example scarf, because I'm using this for a custom TEMPLATED body.
However, In order to have more than one available body/scarf with this custom TEMPLATE, I'd have to remake every little Gani over and over and over for every body I make.
But I want to make something like in the Gani Sprite,
The image being player.attr[30], but that doesn't work.

The default body TEMPLATE is defined as BODY in the sprite, and automatically changes the default body to the body you are wearing.
But I'd like to do the same, but with my "scarf" instead.

I understand your RC Configuring Concept,
But that won't help make the "scarf" image automatically reset or change to what you want when you say setscarf.
Again, because player.attr goes by GANI. Not image.
Reply With Quote
  #12  
Old 08-16-2012, 06:07 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Fysez View Post
Because the default body space goes for the original styled and ordered template designed simply for the default body TEMPLATE. I'm not meaning custom as in different look, I mean custom as in a different look to the TEMPLATE. So using the default body "space" would only mix pieces of my template around and look like its all screwed up.
You don't seem to understand. I explicitly pointed out that there is no restriction on the way an image looks. Try putting sword1.png into your playerworld's body folder, then try "setbody sword1.png". Will work like a charm and look scrambled as hell. Get where I'm going yet? Just throw your body images into your body folder and use BODY inside the gani. Then use the default setbody command.

You don't seem to be getting the attribute stuff either. Let's say you're using ATTR2 in your gani for the scarf. You can then change around the player's second attribute via script like this:
PHP Code:
player.attr[2] = "scarf2.png"
And it'd change the way the scarf looks in the gani, since you used ATTR2 to define the used image inside the gani. ATTR#, where # is any number between 1 and 30, can be used in a gani to use player.attr[#] as an image in its place.
__________________
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 Off
HTML code is Off

Forum Jump


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


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