Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-20-2012, 11:21 PM
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
Custom coloring system

I wanted to ask if itīs possible to have a custom coloring system. So I want to get rid of using this.colors[0],this.colors[1], ... and create my own system instead of that.

An example:
After some researches I have figured out that Bomy Island used/planned to use such a system with single body parts (extra shoes spritesheet, body spritesheet, ....) and for every single body part they had extra colors.
Sadly it seemd like they had to upload tons of files for the body parts in several colors.
I also want to try to do such a similar system, but I was wondering if I could have like 1 file, "find" a RGB, colors hex or HSV and change it into an other RGB, colors hex or HSV. Just like the colors changing in the default body system.
This also could give me the option to set more colors than just 5 at once.
__________________
MEEP!
Reply With Quote
  #2  
Old 01-20-2012, 11:32 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
You'll have to use store the body/color data in ATTRs instead, you might be able to rig something with gani scripts.

It's more trouble than it's worth though.
__________________
Quote:
Reply With Quote
  #3  
Old 01-20-2012, 11:38 PM
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
Quote:
Originally Posted by fowlplay4 View Post
You'll have to use store the body/color data in ATTRs instead, you might be able to rig something with gani scripts.

It's more trouble than it's worth though.
So it would be better having individual images for each body part/color?
__________________
MEEP!
Reply With Quote
  #4  
Old 01-20-2012, 11:54 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 callimuc View Post
So it would be better having individual images for each body part/color?
I guess, if you just want more flexibility than default sprites/ganis try using the kingdoms sheets and ganis as a base instead.

Unless you have some sort of revolutionary body idea and the determination to complete it I'd work on something else.
__________________
Quote:
Reply With Quote
  #5  
Old 01-21-2012, 12:02 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
You're riding the ferry into Hades.
Reply With Quote
  #6  
Old 01-21-2012, 12:03 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
Quote:
Originally Posted by fowlplay4 View Post
Unless you have some sort of revolutionary body idea and the determination to complete it I'd work on something else.
I wanted to try to have such a body system Bomy Island used/planned to use. I think itīs a nice thing though with all the single things, instead of bumping them into a body or adding them with an extra sheet into the ganis.

Well since it seems (almost) impossible, is there a way I can use this.colors[0] = colorname, ... on other images instead of just bodies? I think I tried that in the past but it didnīt seem to work.
__________________
MEEP!
Reply With Quote
  #7  
Old 01-21-2012, 12:14 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 callimuc View Post
Well since it seems (almost) impossible, is there a way I can use this.colors[0] = colorname, ... on other images instead of just bodies? I think I tried that in the past but it didnīt seem to work.
Unless you fit it all on the same BODY image, no.

Get creative and figure out what you can do.
__________________
Quote:
Reply With Quote
  #8  
Old 01-21-2012, 09:32 PM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
I did something like this using an offsite PHP server running GD that would generate a new image by replacing color indexes and send it to the client for its custom colors.

It was retarded.
Reply With Quote
  #9  
Old 01-21-2012, 09:37 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
You can do it via dividing the body segments in the gani, but it's coloring them that's a pain. Attr's themselves can be somewhat unreliable when it comes to forcing an update, and then you have to color each sprite individually. Not like... each and every instance of sprite defined in the gani(say you have an arm with 6 frames of animation, then you have it for all 4 directions, then 2 arms... that's 48 sprites just for the arms and you'd have to color each one of those separately, since you can only reference the sprite index).
Reply With Quote
  #10  
Old 01-22-2012, 01:29 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
Quote:
Originally Posted by DustyPorViva View Post
(say you have an arm with 6 frames of animation, then you have it for all 4 directions, then 2 arms... that's 48 sprites just for the arms and you'd have to color each one of those separately, since you can only reference the sprite index).
You forgot the different variations.

Anyway I had some ideas but actually they wouldnīt work. Well I got stuck on this one yet:
Is it somehow possible using the CHANGEIMGCOLOR, or how that command for the gani file is called, for every single sprite, to "load" the colors from the player? Maybe from the players flags, attributes or whatever?

Or can I, when I display as example a body as player.attr[1], use something like player.attr[1].red = ###; ? Iīm pretty sure it wonīt but didnīt test it yet.
__________________
MEEP!

Last edited by callimuc; 01-22-2012 at 01:41 AM..
Reply With Quote
  #11  
Old 01-22-2012, 03:19 AM
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
In my point of view these things are too complex, it can be better to make a few good looking graphics and offer them in a few color variations. It can also be possible to offer a gui tool for creating a new custom graphic, with TDrawingPanel you can even do it on server-side.
Reply With Quote
  #12  
Old 01-22-2012, 03:22 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Stefan View Post
In my point of view these things are too complex, it can be better to make a few good looking graphics and offer them in a few color variations. It can also be possible to offer a gui tool for creating a new custom graphic, with TDrawingPanel you can even do it on server-side.
Hmm that's a good idea... Give the player the option to preview a body in a drawingpanel, customize it fully to their liking via coloring various parts, then on the serverside when the player applies it render it into a drawingpanel and save it as a custom body for the player.

edit: My only concern is if you try to do this and use the BODY value... well Graal is picky with the palette. Would saving an image created via a serverside drawingpanel have issues with the palette control, and Graal overwriting the first 6 palettes with the default values?
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 10:44 PM.


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